/* KY8 Learn site. Miami Tropical tokens, matching the Kandoro app (docs/brand.md) */
@font-face {
  font-family: 'Baloo 2';
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/baloo-2-latin-800-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/nunito-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito Sans';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/nunito-sans-latin-700-normal.woff2') format('woff2');
}

:root {
  --bg: #e6f8f4;
  --surface: #ffffff;
  --ink: #0f2a3f;
  --muted: #4c6577;
  --line: #cdebe5;
  --accent: #00786f;
  --accent-ink: #ffffff;
  --coral: #d9472b;
  --gold: #ffc531;
  --mint: #eaf7f5;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1f2b;
    --surface: #12303f;
    --ink: #eaf7f5;
    --muted: #9db8c4;
    --line: #1e4557;
    --accent: #4fe3d6;
    --accent-ink: #0f2a3f;
    --coral: #ff7e62;
    --mint: #12303f;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.6 'Nunito Sans',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
}
img {
  max-width: 100%;
  height: auto;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.narrow {
  max-width: 720px;
}

h1,
h2,
h3 {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.15;
  margin: 1.6em 0 0.4em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-top: 0.4em;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.15rem;
}
a {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 0.15em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.muted {
  color: var(--muted);
}
.heart {
  color: var(--coral);
}

/* Skip link */
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo img {
  display: block;
  height: 44px;
  width: auto;
}
.site-header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
}
.site-header nav a:hover,
.site-header nav a[aria-current='page'] {
  border-bottom-color: var(--gold);
}
.site-header nav a.lang-switch {
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
}
.site-header nav a.lang-switch:hover {
  border-color: var(--gold);
}

main {
  padding-top: 24px;
  padding-bottom: 64px;
}

/* Hero */
.hero {
  padding: 32px 0 8px;
}
.hero h1 {
  max-width: 18ch;
}
.lead {
  font-size: 1.2rem;
  max-width: 60ch;
}

/* Cards and grids */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 24px 20px;
  margin-top: 24px;
}
.card h2:first-child,
.card h3:first-child {
  margin-top: 0.6em;
}
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  padding: 0;
  list-style: none;
}
.grid > .card {
  margin-top: 0;
}
.value h3 {
  margin-bottom: 0;
}
.value p {
  margin: 0.4em 0;
}

/* Kandoro feature */
.app {
  display: grid;
  gap: 8px 28px;
  grid-template-columns: 1fr;
  align-items: start;
}
.app-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  margin-top: 20px;
}
@media (min-width: 720px) {
  .app {
    grid-template-columns: 112px 1fr;
  }
}
.pill {
  display: inline-block;
  background: var(--gold);
  color: #0f2a3f;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 14px;
  font-size: 0.95rem;
}
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  border-radius: 14px;
  padding: 10px 20px;
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  padding: 0;
  list-style: none;
}
.note {
  border-left: 4px solid var(--gold);
  padding: 4px 16px;
  margin: 20px 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  padding: 24px 0 40px;
}
.footer-grid {
  display: grid;
  gap: 8px 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.footer-mark {
  width: 48px;
  height: auto;
  display: block;
  margin-top: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
