/* ---------------------------------------------------------------
   LRN Your Way — marketing site styles
   Tokens mirror apps/mobile/lib/core/theme/app_colors.dart so the
   web and the app read as the same brand. Don't edit colors here in
   isolation; change them in the Dart source and mirror them back.
--------------------------------------------------------------- */

:root {
  /* Brand — lifted verbatim from the mobile theme */
  --purple: #612b74;
  --purple-accent: #7129cf;
  --purple-light: #74348a;
  --purple-soft: #8b4da0;

  /* Neutrals — warm, never pure white. That warmth is the whole vibe. */
  --background: #f3eee9;
  --surface: #fffaf7;
  --warm-beige: #f5e5de;

  /* Text */
  --text-primary: #1e1e1e;
  --text-secondary: #534d5b;
  --text-muted: #848089;
  --text-on-primary: #ffffff;

  /* Lines & hairlines */
  --border: #d0d5dd;
  --border-muted: #d7d7d7;
  --divider: #cecdd0;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  /* Shadows — kept subtle; this isn't a SaaS landing from 2017 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(97, 43, 116, 0.08);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Georgia", "Times New Roman", serif;

  /* Layout */
  --max-width: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
}

/* Reset — keeping this tight; not pulling in normalize.css for 3 pages */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans), serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--purple);
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover {
  color: var(--purple-accent);
}

/* ---------------------------------------------------------------
   Layout primitives
--------------------------------------------------------------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------------------------------------------------------
   Nav
   Sticky-ish header that stays readable against the beige bg.
--------------------------------------------------------------- */

.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border-muted);
  /* Sticky-over-scroll. z-index keeps the nav above the hero's
     purple radial glow pseudo-element (z-index: 0) and anything
     else that grows a stacking context below. */
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.brand:hover {
  color: var(--text-primary);
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  /* Default treatment is for the opaque app icon: clip it so no
     weird corners show on the beige bg, give it a subtle shadow. */
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* Variant used for the standalone brand logo (transparent PNG).
   The updated artwork is a taller-than-square silhouette, so without
   a container it drifts off-center against the wordmark. Give it a
   subtle tinted tile so the mark is visibly seated inside a square. */
.brand__mark--logo {
  border-radius: 10px;
  /* Same purple wash used by the hero eyebrow pill — quiet, on-brand.
     No overflow: hidden; border-radius clips the background paint on
     its own, and hidden combined with padding was causing the logo
     to get cut off in some render paths. */
  background: rgba(116, 52, 138, 0.08);
  box-shadow: none;
  display: grid;
  place-items: center;
}

.brand__mark--logo img {
  /* Intrinsic sizing, capped to the tile with a bit of visual padding.
     Using max-width/height rather than width: 100% dodges the
     box-sizing + padding + object-fit interaction that was clipping
     the logo at smaller render sizes. */
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 70%;
}

.brand__wordmark {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--purple);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.98rem;
}

.nav-links a:hover {
  color: var(--purple);
}

/* ---------------------------------------------------------------
   Hero
--------------------------------------------------------------- */

.hero {
  padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px);
  text-align: center;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-light);
  background: rgba(116, 52, 138, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 3.75rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--text-primary);
}

.hero__title .accent {
  color: var(--purple);
  /* The brand wordmark gets the color; subtle but keeps hierarchy clear */
}

.hero__sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px;
}

/* Store badges — official Apple/Google SVG artwork, used as-is.
   Anything more than a hover-opacity nudge would be modifying
   brand assets, which both vendors prohibit. Same pattern as the
   shiftpass.com reference. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-bottom: 48px;
}

.store-badge-link {
  display: inline-flex;
  align-items: center;
  transition: opacity 160ms ease, transform 160ms ease;
  /* The SVG has its own shadow and rounding baked in, so no border,
     no background, no padding — just let the asset render. */
}

.store-badge-link:hover,
.store-badge-link:focus-visible {
  opacity: 0.85;
  transform: translateY(-1px);
}

.store-badge-link img {
  display: block;
  /* Fluid within the wrapper so the 220x64 render collapses gracefully
     on narrow screens without distorting the badge aspect ratio. The
     natural size matches the shiftpass.com reference. */
  height: auto;
  max-width: 100%;
}

/* Hero artwork — uses the brand logo so visitors know what they'll
   install. Purple radial glow behind it evokes the mobile splash.
   Shrunk from the original 180–260px range: the logo was dominating
   the fold and stealing attention from the actual headline. Smaller
   also reads more grown-up, less corporate-template. */
.hero__art {
  position: relative;
  width: clamp(140px, 22vw, 200px);
  margin: 0 auto 8px;
  /* Forced square container keeps the non-square logo centered with
     equal whitespace on every side, regardless of the PNG's own ratio. */
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.hero__art::before {
  content: "";
  position: absolute;
  inset: -18%;
  background: radial-gradient(
    closest-side,
    rgba(113, 41, 207, 0.22),
    rgba(113, 41, 207, 0) 70%
  );
  z-index: 0;
}

.hero__art img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  /* Preserve the logo's native aspect; it's a silhouette, not a tile.
     No border-radius or box-shadow: both were right for the square
     app icon but would look weird riding the transparent edges of
     the brand mark. The purple glow behind does the lifting. */
  object-fit: contain;
}

/* ---------------------------------------------------------------
   Feature grid
--------------------------------------------------------------- */

.features {
  padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 100px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 200ms ease, box-shadow 200ms ease,
    border-color 200ms ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(116, 52, 138, 0.35);
}

.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(113, 41, 207, 0.12);
  color: var(--purple);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.feature-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.feature-card__body {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

/* ---------------------------------------------------------------
   CTA strip — a calm call-back before the footer
--------------------------------------------------------------- */

.cta-strip {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
  color: var(--text-on-primary);
  text-align: center;
  padding: clamp(48px, 7vw, 88px) var(--gutter);
  margin-top: clamp(40px, 6vw, 80px);
}

.cta-strip h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
}

.cta-strip p {
  margin: 0 auto 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
}

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-muted);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.site-footer__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: var(--purple);
}

/* ---------------------------------------------------------------
   Legal-doc prose (terms.html, privacy.html)
   Narrow column, generous leading — long-form reading UX, not
   marketing UX. Different from the hero on purpose.
--------------------------------------------------------------- */

.legal-page {
  background: var(--surface);
}

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(60px, 8vw, 100px);
}

.legal__header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-muted);
}

.legal__kicker {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin: 0 0 10px;
}

.legal__title {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.legal__meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.legal h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 44px 0 12px;
  color: var(--text-primary);
}

.legal h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 28px 0 8px;
  color: var(--text-primary);
}

.legal p,
.legal li {
  color: var(--text-primary);
}

.legal ul,
.legal ol {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 8px;
}

.legal a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Draft banner — internal-visible-only cue. Remove before production. */
.draft-banner {
  border: 1px dashed rgba(229, 57, 53, 0.55);
  background: rgba(229, 57, 53, 0.06);
  color: #8a1f1c;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 32px;
}

.draft-banner strong {
  color: #7a1b19;
}

/* ---------------------------------------------------------------
   Reusable button primitive
   Built once so future CTAs (newsletter, pilot signup, etc.) can
   lean on the same visual vocabulary without re-deriving it.
--------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease,
    background 160ms ease;
}

.btn--primary {
  background: var(--purple);
  color: var(--text-on-primary);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--purple-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:focus-visible {
  outline: 2px solid var(--purple-accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------
   Coming-soon dialog
   Uses native <dialog>, so focus trap, Escape-to-close, and
   backdrop rendering all come from the browser. We style the
   ::backdrop for a soft dim, and pad the inner form generously
   — this is a reading surface, not a form UX.
--------------------------------------------------------------- */

.coming-soon {
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: min(440px, calc(100vw - 32px));
  width: 100%;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 24px 60px rgba(35, 12, 45, 0.22);
  /* Reset the UA-drawn border/outline so the rounded corners read
     cleanly against the dim backdrop. */
}

.coming-soon::backdrop {
  /* Warm, semi-opaque wash that fits the beige palette better than
     the browser default's flat black. Firefox + Chromium both
     support custom ::backdrop styles; Safari needs the webkit prefix
     on backdrop-filter or it silently ignores the blur. */
  background: rgba(30, 22, 38, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.coming-soon__inner {
  /* The form wrapper lets the button's method="dialog" close semantics
     work without any JS. padding-top is slightly taller to make room
     for the absolutely-positioned close button. */
  position: relative;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.coming-soon__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 160ms ease, color 160ms ease;
}

.coming-soon__close:hover,
.coming-soon__close:focus-visible {
  background: rgba(116, 52, 138, 0.1);
  color: var(--purple);
  outline: none;
}

.coming-soon__kicker {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-light);
}

.coming-soon__title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.coming-soon__body {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.coming-soon__body a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.coming-soon__actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

/* ---------------------------------------------------------------
   Small-screen tweaks
   Not a full responsive redesign — just keeping things usable.
--------------------------------------------------------------- */

@media (max-width: 600px) {
  .site-nav__inner {
    height: 64px;
  }
  .brand__wordmark {
    font-size: 1.15rem;
  }
  .nav-links {
    gap: 18px;
  }
  .store-badge-link {
    /* Full-width on phones so thumbs have a real target */
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
  .store-badge-link img {
    width: 100%;
  }
  .coming-soon__inner {
    /* Tighter gutters on phones; the title stays readable, the
       close target stays reachable. */
    padding: 32px 22px 22px;
  }
  .coming-soon__title {
    font-size: 1.3rem;
  }
  .coming-soon__actions {
    justify-content: stretch;
  }
  .coming-soon__actions .btn {
    width: 100%;
  }
  .site-footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Respect the user's reduced-motion preference — cheap to add, rude not to */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
