/* ==========================================================================
   Lingro — informational website
   Warm, joyful, global. Cream paper, storybook feel.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */
:root {
  /* Neutrals (warm — never pure black) */
  --cream: #FBF4E9;
  --cream-2: #F6EAD8;
  --paper: #FFFFFF;
  --ink: #2E2620;
  --ink-2: #7A6E62;
  --line: #EFE1CC;

  /* Brand */
  --jade: #10A088;
  --jade-d: #0C6B5A;
  --jade-bg: #E4F4EF;
  --coral: #EE6C4D;
  --coral-d: #C9472A;
  --coral-bg: #FBE7DF;
  --gold: #F2A93B;
  --gold-d: #C77F12;
  --gold-bg: #FCEFD7;
  --plum: #7C5191;
  --plum-d: #5A3770;
  --plum-bg: #EFE6F3;
  --sky: #3E92CC;
  --sky-bg: #E2EFF7;

  /* Radii */
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;

  /* Soft shadows only */
  --shadow-sm: 0 2px 8px rgba(46, 38, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(46, 38, 32, 0.08);
  --shadow-lg: 0 18px 48px rgba(46, 38, 32, 0.10);

  /* Layout */
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 48px);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* --- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (max-width: 480px) { body { font-size: 16px; } }

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-optical-sizing: auto;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }

p { margin: 0 0 1em; }

a { color: var(--jade-d); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--jade);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 1000;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* --- Layout helpers ------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(56px, 9vw, 112px);
}

.section__eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jade-d);
  margin-bottom: 14px;
}

.section__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-2);
  max-width: 56ch;
}

.center { text-align: center; }
.center .section__lead { margin-inline: auto; }

/* --- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand .dot { color: var(--coral); }

.nav__links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav__links a:hover { background: var(--jade-bg); color: var(--jade-d); }

.nav__toggle {
  display: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.nav__toggle svg { width: 24px; height: 24px; }

@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    gap: 4px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 12px;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 16px; }
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--jade); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--jade-d); }
.btn--ghost { background: var(--paper); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { background: var(--cream-2); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 96px);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero__logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.hero__logo .dot { color: var(--coral); }
.hero__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  color: var(--jade-d);
  margin: 0 0 22px;
}
.hero__desc {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--ink-2);
  max-width: 48ch;
  margin-bottom: 28px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__desc { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__art { order: -1; max-width: 460px; margin-inline: auto; }
}

/* Hero illustration card */
.hero__art {
  position: relative;
}
.flashcard {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}
.flashcard__img {
  border-radius: var(--r-md);
  background: var(--gold-bg);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  overflow: hidden;
}
.flashcard__img svg { width: 56%; height: auto; }
.flashcard__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.flashcard__word { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.flashcard__word small { display: block; font-family: var(--font-body); font-size: 0.85rem; color: var(--ink-2); font-weight: 700; }
.flashcard__audio {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--jade);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.2s ease;
}
.flashcard__audio:hover { transform: scale(1.06); background: var(--jade-d); }
.flashcard__audio svg { width: 22px; height: 22px; }

/* Floating decorative badges around hero card */
.float-badge {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
}
.float-badge svg { width: 26px; height: 26px; }
.float-badge--a { top: -18px; right: 10%; background: var(--coral-bg); border-color: transparent; }
.float-badge--b { bottom: -16px; left: -4%; background: var(--plum-bg); border-color: transparent; }
@media (max-width: 860px) {
  .float-badge--a { right: -4%; }
}

/* --- Language toggle (hero delight) -------------------------------------- */
.lang-demo {
  margin-top: 26px;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  max-width: 48ch;
}
@media (max-width: 860px) { .lang-demo { margin-inline: auto; } }
.lang-demo__line {
  font-family: var(--font-display);
  font-size: 1.25rem;
  min-height: 1.5em;
  margin: 0 0 12px;
  transition: opacity 0.3s ease;
}
.lang-demo__controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang-demo__label { font-size: 0.85rem; font-weight: 800; color: var(--ink-2); }
.lang-pill {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lang-pill[aria-pressed="true"] { background: var(--jade); color: #fff; border-color: var(--jade); }

/* --- Generic surfaces ---------------------------------------------------- */
.surface-paper { background: var(--paper); }
.surface-cream2 { background: var(--cream-2); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.icon-chip {
  width: 52px; height: 52px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.icon-chip svg { width: 28px; height: 28px; }
.chip-jade { background: var(--jade-bg); color: var(--jade-d); }
.chip-coral { background: var(--coral-bg); color: var(--coral-d); }
.chip-gold { background: var(--gold-bg); color: var(--gold-d); }
.chip-plum { background: var(--plum-bg); color: var(--plum-d); }
.chip-sky { background: var(--sky-bg); color: var(--sky); }

/* --- Problem section ----------------------------------------------------- */
.problem__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
@media (max-width: 800px) { .problem__grid { grid-template-columns: 1fr; } }
.problem__points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; }
.problem__points li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.problem__points .icon-chip { width: 40px; height: 40px; margin: 0; flex-shrink: 0; }
.problem__points .icon-chip svg { width: 22px; height: 22px; }
.problem__points strong { display: block; font-size: 1.05rem; }
.problem__points span { color: var(--ink-2); font-size: 0.97rem; }

.scene {
  background: linear-gradient(160deg, var(--sky-bg), var(--cream-2));
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: 40px;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-md);
}
.scene svg { width: 70%; }

/* --- What Lingro is ------------------------------------------------------ */
.oneliner {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.25;
  max-width: 22ch;
  margin: 0 auto 8px;
}
.oneliner .hl { color: var(--jade-d); }
.different {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 48px;
}
@media (max-width: 760px) { .different { grid-template-columns: 1fr; } }
.different .card h3 { display: flex; align-items: center; gap: 10px; }

/* --- Language showcase --------------------------------------------------- */
.cards-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}
@media (max-width: 900px) { .cards-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) {
  .cards-strip { grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; }
}
.cards-strip .flashcard { padding: 20px; box-shadow: var(--shadow-md); }
.cards-strip .flashcard__img { margin-bottom: 14px; }
.cards-strip .flashcard__word { font-size: 1.4rem; }
/* The home-language word sits prominent; keep its script unstyled-clean. */
.cards-strip .flashcard__word > span[dir="rtl"] { font-family: var(--font-body); font-weight: 800; }

.lesson-lines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
@media (max-width: 880px) {
  .lesson-lines { grid-template-columns: 1fr; max-width: 540px; margin-inline: auto; }
}

.lesson-card {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.lesson-card__topic {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jade-d);
  margin-bottom: 12px;
}
.lesson-card__topic svg { width: 15px; height: 15px; }

.lang-toggle__line {
  transition: opacity 0.3s ease;
}
.lesson-card .lang-toggle__line {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.4;
  min-height: 3.4em;
  margin: 0 0 16px;
}
/* Right-to-left scripts read better a touch larger and looser. */
.lesson-card .lang-toggle__line[dir="rtl"] {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.8;
  text-align: right;
}
.lang-toggle__controls { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- Features grid ------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 48px;
}
.feature h3 { font-size: 1.2rem; margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 0.98rem; margin: 0; }

/* --- How it works -------------------------------------------------------- */
.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
@media (max-width: 880px) { .how { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
.how__col {
  border-radius: var(--r-lg);
  padding: 30px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.how__col--teachers { background: var(--coral-bg); }
.how__col--students { background: var(--jade-bg); }
.how__col--parents { background: var(--plum-bg); }
.how__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.how__head .icon-chip { margin: 0; background: var(--paper); }
.how__col--teachers .icon-chip { color: var(--coral-d); }
.how__col--students .icon-chip { color: var(--jade-d); }
.how__col--parents .icon-chip { color: var(--plum-d); }
.how__steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.how__steps li {
  display: flex; gap: 14px; align-items: flex-start;
  counter-increment: step;
}
.how__steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.95rem;
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.how__steps span { padding-top: 3px; }

/* --- Who it's for -------------------------------------------------------- */
.audience {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 44px;
}
.audience .card { text-align: center; }
.audience .icon-chip { margin-inline: auto; width: 60px; height: 60px; }
.audience .icon-chip svg { width: 34px; height: 34px; }
.audience h3 { font-size: 1.15rem; }
.audience p { color: var(--ink-2); font-size: 0.96rem; margin: 0; }

/* --- Belief / closing ---------------------------------------------------- */
.belief {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-lg);
  padding: clamp(40px, 7vw, 80px);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.belief__quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  line-height: 1.3;
  max-width: 24ch;
  margin: 0 auto;
  color: var(--cream);
}
.belief__quote .hl { color: var(--gold); }
.belief__mark {
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 0.5;
  color: var(--jade);
  opacity: 0.5;
  display: block;
  margin-bottom: 18px;
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--cream-2);
  border-top: 1px solid var(--line);
  padding-block: 44px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__brand .brand { font-size: 1.6rem; }
.footer__tag { font-family: var(--font-display); font-style: italic; color: var(--jade-d); margin: 4px 0 0; }
.footer__copy { color: var(--ink-2); font-size: 0.92rem; }

/* --- Scroll reveal ------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .btn:hover, .flashcard__audio:hover { transform: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
