/* ──────────────────────────────────────────────────────────────────────────
   Lingual waitlist page — standalone static app, no build step.

   Design tokens are copied from client/src/app/globals.css (source of truth).
   Component values mirror the client's Tailwind utilities exactly:
   buttons  → client/src/components/ui/Button.tsx
   inputs   → client/src/app/(auth)/login/page.tsx
   layout   → client/src/app/page.tsx (the marketing splash)
   ────────────────────────────────────────────────────────────────────────── */

:root {
  /* Surfaces */
  --color-paper: #f4f1ea;
  --color-card: #fffdf9;
  --color-sand: #efe7db;
  --color-sand-line: #e0d8c8;
  --color-night: #232220;

  /* Ink / text */
  --color-ink: #2b2a26;
  --color-ink-soft: #3d3b35;
  --color-muted: #6f6a60;
  --color-faint: #a09a8d;

  /* Brand accent (clay/tan) */
  --color-accent: #8a7350;
  --color-accent-strong: #6b5a42;
  --color-gold: #c9b592;

  /* Semantic */
  --color-success: #5a6d4a;
  --color-success-bg: #e4ead9;
  --color-danger: #9c4a3c;

  /* Typography */
  --font-sans: 'Hanken Grotesk', 'Noto Sans KR', system-ui, sans-serif;
  --font-hangul: 'Noto Sans KR', sans-serif;
  --font-mono: ui-monospace, Menlo, monospace;

  /* Shared shadows (splash card shadows) */
  --shadow-tile: 0 10px 28px rgba(43, 42, 38, 0.07);
  --shadow-hero: 0 20px 46px rgba(43, 42, 38, 0.22);
}

@keyframes lglWord {
  0%,
  27% {
    transform: translateY(0);
  }
  33.3%,
  60.3% {
    transform: translateY(-1.4em);
  }
  66.6%,
  93.6% {
    transform: translateY(-2.8em);
  }
  100% {
    transform: translateY(-4.2em);
  }
}
@keyframes lglBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

/* ── Base ─────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

::placeholder {
  color: var(--color-faint);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.hangul {
  font-family: var(--font-hangul);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Layout primitives (splash grammar) ───────────────────────────────── */

.container {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4.5vw, 56px);
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-accent);
}

.kicker--gold {
  color: var(--color-gold);
}

.h2 {
  font-size: clamp(27px, 4.8vw, 42px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ── Buttons (mirrors ui/Button.tsx) ──────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  transition:
    color 0.15s,
    background-color 0.15s,
    border-color 0.15s;
}

.btn--primary {
  background: var(--color-ink);
  color: var(--color-paper);
}
.btn--primary:hover {
  background: var(--color-accent);
}

.btn--outline {
  background: transparent;
  border: 1.5px solid rgba(43, 42, 38, 0.25);
  color: var(--color-ink);
}
.btn--outline:hover {
  border-color: var(--color-accent);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 13.5px;
}
.btn--md {
  padding: 12px 28px;
  font-size: 15px;
}
.btn--lg {
  padding: 16px 32px;
  font-size: 15.5px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Nav ──────────────────────────────────────────────────────────────── */

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
}

.nav__brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 14px;
  color: var(--color-muted);
}

.nav__links a:not(.btn) {
  transition: color 0.15s;
}
.nav__links a:not(.btn):hover {
  color: var(--color-ink);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding-top: clamp(32px, 6vw, 64px);
  padding-bottom: 80px;
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
  }
}

.hero__kicker {
  margin-bottom: 20px;
}

.hero__title {
  margin-bottom: 20px;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.rotator {
  display: inline-block;
  height: 1.4em;
  overflow: hidden;
  vertical-align: -0.363em;
  color: var(--color-accent);
}

.rotator__track {
  display: block;
  animation: lglWord 7.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.rotator__track > span {
  display: flex;
  height: 1.4em;
  align-items: center;
}

.hero__lede {
  margin-bottom: 32px;
  max-width: 480px;
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--color-muted);
}

/* ── Waitlist form card ───────────────────────────────────────────────── */

.signup {
  max-width: 480px;
  border: 1px solid rgba(43, 42, 38, 0.1);
  border-radius: 20px;
  background: var(--color-card);
  box-shadow: var(--shadow-tile);
  padding: 24px;
  scroll-margin-top: 24px;
}

.signup__title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.signup__sub {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-muted);
  margin-bottom: 18px;
}

.signup__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Segmented student/tutor toggle — the app's sand-tinted chip pattern */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seg__btn {
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(43, 42, 38, 0.18);
  background: var(--color-card);
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.seg__btn:hover {
  border-color: var(--color-accent);
}

.seg__btn[aria-pressed='true'] {
  background: var(--color-sand);
  border-color: rgba(138, 115, 80, 0.35);
  color: var(--color-accent-strong);
  font-weight: 600;
}

.field-label {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-faint);
}

/* Inputs — mirrors the login page fields */
.input {
  width: 100%;
  border: 1px solid rgba(43, 42, 38, 0.18);
  border-radius: 12px;
  background: var(--color-card);
  padding: 15px 18px;
  font-family: var(--font-sans);
  font-size: 15.5px;
  color: var(--color-ink);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f6a60' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  cursor: pointer;
}

.signup__submit {
  margin-top: 6px;
}

/* Honeypot field — hidden from humans (and taken out of tab/reader flow in
   the markup), but present in the DOM for bots to fill. */
.gotcha {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  display: none;
  font-size: 13px;
  line-height: 1.5;
}
.form-status--error {
  display: block;
  color: var(--color-danger);
}
.form-status--notice {
  display: block;
  color: var(--color-muted);
}

.signup__fine {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--color-faint);
}

/* Success state (replaces the form after a successful signup) */
.signup__success {
  display: none;
  padding: 8px 0 4px;
}
.signup__success.is-visible {
  display: block;
}
.signup__success-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.signup__success p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-muted);
}

/* ── Floating language tiles (hero right column) ──────────────────────── */

.float-stage {
  display: flex;
  height: 460px;
  flex-direction: column;
  justify-content: center;
}

.float-stage__inner {
  position: relative;
  margin-inline: auto;
  height: 320px;
  width: 100%;
  max-width: 560px;
}

.float {
  position: absolute;
}

.float__bob {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 16px;
  animation: lglBob 5.5s ease-in-out infinite;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 16px;
  border: 1px solid rgba(43, 42, 38, 0.1);
  background: var(--color-card);
  box-shadow: var(--shadow-tile);
}

.tile--sand {
  border-color: rgba(138, 115, 80, 0.25);
  background: var(--color-sand);
  box-shadow: none;
}

.tile--dark {
  border: 0;
  border-radius: 20px;
  background: var(--color-ink);
  color: var(--color-paper);
  box-shadow: var(--shadow-hero);
  gap: 8px;
}

.tile__glyph {
  font-weight: 600;
  line-height: 1;
}

.tile__label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-faint);
}

.tile--sand .tile__label {
  color: var(--color-accent);
}
.tile--dark .tile__label {
  color: var(--color-gold);
}

.pill-note {
  white-space: nowrap;
  border-radius: 9999px;
  border: 1px solid rgba(43, 42, 38, 0.1);
  background: var(--color-card);
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-accent-strong);
  box-shadow: var(--shadow-tile);
  animation: lglBob 5.5s ease-in-out infinite;
}

.pill-note span {
  font-weight: 400;
  color: var(--color-faint);
}

/* ── How it works ─────────────────────────────────────────────────────── */

.section {
  padding-top: 32px;
  padding-bottom: 90px;
}

.section__kicker {
  margin-bottom: 12px;
}

.section__title {
  max-width: 680px;
}

.section__lede {
  margin-top: 12px;
  max-width: 600px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--color-muted);
}

.steps {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.step {
  border-top: 2px solid var(--color-accent);
  padding-top: 20px;
}

.step__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.step__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step__body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-muted);
}

/* ── After-class engine (dark section) ────────────────────────────────── */

.engine {
  background: var(--color-ink);
  color: var(--color-paper);
}

.engine__inner {
  padding-block: clamp(48px, 8vw, 90px);
}

.engine__kicker {
  margin-bottom: 14px;
}

.engine__title {
  margin-bottom: 14px;
  max-width: 640px;
}

.engine__lede {
  margin-bottom: 48px;
  max-width: 580px;
  font-size: 16.5px;
  line-height: 1.65;
  color: rgba(244, 241, 234, 0.6);
}

.engine__feature {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  border-radius: 18px;
  border: 1px solid rgba(201, 181, 146, 0.4);
  background: rgba(201, 181, 146, 0.07);
  padding: 28px;
}

@media (min-width: 1024px) {
  .engine__feature {
    grid-template-columns: minmax(0, 1fr) 400px;
  }
}

.icon-box {
  display: flex;
  height: 42px;
  width: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(201, 181, 146, 0.15);
  font-size: 18px;
  color: var(--color-gold);
  margin-bottom: 18px;
}

.engine__feature-title,
.engine-card__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.engine__feature-body,
.engine-card__body {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(244, 241, 234, 0.55);
}

.engine__feature-body {
  max-width: 520px;
}

.skills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-self: center;
}

@media (min-width: 640px) {
  .skills {
    grid-template-columns: 1fr 1fr;
  }
}

.skill {
  border-radius: 12px;
  background: rgba(244, 241, 234, 0.06);
  padding: 14px 16px;
}

.skill__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-gold);
  margin-bottom: 6px;
}

.skill__body {
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(244, 241, 234, 0.7);
}

.engine__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.engine-card {
  border-radius: 18px;
  border: 1px solid rgba(244, 241, 234, 0.15);
  padding: 28px;
}

/* ── Comparison table ─────────────────────────────────────────────────── */

.compare-section {
  padding-top: clamp(48px, 8vw, 90px);
  padding-bottom: 32px;
}

.compare-scroll {
  margin-top: 44px;
  overflow-x: auto;
}

.compare {
  min-width: 720px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(43, 42, 38, 0.1);
  background: var(--color-card);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
}

.compare > div {
  padding: 20px 24px;
}

.compare__head {
  padding-block: 18px !important;
  border-bottom: 1px solid rgba(43, 42, 38, 0.1);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-faint);
}

.compare__head--ours {
  background: var(--color-sand);
  font-weight: 700;
  color: var(--color-accent-strong);
}

.compare__feat {
  font-size: 14.5px;
  font-weight: 600;
}

.compare__typical {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-muted);
}

.compare__ours {
  background: var(--color-sand);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-ink-soft);
}

.compare > .has-edge {
  border-bottom: 1px solid rgba(43, 42, 38, 0.08);
}

/* ── For tutors ───────────────────────────────────────────────────────── */

.tutors {
  padding-block: clamp(48px, 8vw, 90px);
  scroll-margin-top: 24px;
}

.tutor-cards {
  margin-top: 44px;
  margin-bottom: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.tutor-card {
  border-radius: 18px;
  border: 1px solid rgba(43, 42, 38, 0.1);
  background: var(--color-card);
  padding: 28px;
}

.tutor-card .icon-box {
  background: var(--color-sand);
  color: var(--color-accent-strong);
}

.tutor-card__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tutor-card__body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-muted);
}

/* ── Footer CTA + footer ──────────────────────────────────────────────── */

.footer-cta {
  border-top: 1px solid rgba(43, 42, 38, 0.1);
}

.footer-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: clamp(40px, 6vw, 70px);
}

.footer-cta__title {
  margin-bottom: 8px;
  font-size: clamp(23px, 3.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-cta__sub {
  font-size: 14.5px;
  color: var(--color-muted);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 32px;
  font-size: 12.5px;
  color: var(--color-faint);
}

.footer-bar a {
  transition: color 0.15s;
}
.footer-bar a:hover {
  color: var(--color-ink);
}

/* ── Motion preferences ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .rotator__track,
  .float__bob,
  .pill-note {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}
