/* =====================================================================
   Lutastic+ — landing page

   Built on the shared design tokens (palette, type, spacing, motion).
   Page-level theme tokens (`--page-*`) bridge the design system to this
   page and swap on `[data-theme-mode]`. Light is the default — no
   attribute required; dark is opt-in via the theme toggle.

   The `.site-lutastic` body class plays the role of the page shell
   (flex column, shared horizontal padding, decorative glow). nav, hero
   and footer are direct flex children rendered through base.html.
   ===================================================================== */

@import url('./design-tokens.css');

/* ----- 1. Page theme tokens (swap via [data-theme-mode]) ----------- */
:root {
  --page-bg: var(--surface-basic);
  --page-text: var(--page-text, var(--text-primary));
  --page-text-muted: var(--text-primary-muted);
  --page-text-soft: var(--text-tertiary);
  --page-brand-text: var(--text-secondary-brand);
  --page-eyebrow: var(--text-secondary-brand);
  --page-divider: var(--blue-100);
  --page-store-bg: var(--neutral-900);
  --page-store-text: var(--white);
  --page-store-border: transparent;
  --page-link: var(--text-secondary);
  --page-link-hover: var(--blue-600);
  --page-logo-text: var(--blue-900);
  --page-floor-line: rgba(31, 94, 115, 0.18);
  --page-accent-glow:
    radial-gradient(120% 90% at 80% 100%,
      rgba(152, 196, 203, 0.35) 0%,
      rgba(152, 196, 203, 0) 60%);
  --page-toggle-bg: var(--white);
  --page-toggle-border: var(--blue-100);
  --page-toggle-active-bg: var(--blue-700);
  --page-toggle-active-text: var(--white);
}

[data-theme-mode="dark"] {
  --page-bg: transparent;
  --page-text: var(--white);
  --page-text-muted: rgba(255, 255, 255, 0.78);
  --page-text-soft: rgba(255, 255, 255, 0.55);
  --page-brand-text: var(--blue-150);
  --page-eyebrow: var(--blue-200);
  --page-divider: rgba(255, 255, 255, 0.14);
  --page-store-bg: var(--white);
  --page-store-text: var(--blue-800);
  --page-link: rgba(255, 255, 255, 0.78);
  --page-link-hover: var(--white);
  --page-logo-text: var(--white);
  --page-floor-line: rgba(255, 255, 255, 0.18);
  --page-accent-glow:
    radial-gradient(120% 90% at 80% 100%,
      rgba(152, 196, 203, 0.22) 0%,
      rgba(152, 196, 203, 0) 60%);
  --page-toggle-bg: rgba(255, 255, 255, 0.10);
  --page-toggle-border: rgba(255, 255, 255, 0.18);
  --page-toggle-active-bg: var(--white);
  --page-toggle-active-text: var(--blue-800);
}

/* ----- 2. Base / reset --------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ----- 3. Page shell (the body element) ---------------------------- */
.site-lutastic {
  position: relative;
  min-height: 100vh;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 5vw, 64px) 0;
  display: flex;
  flex-direction: column;
  color: var(--page-text);
  background: var(--page-bg);
  overflow-x: hidden;
  transition:
    background var(--dur-base) var(--ease-standard),
    color var(--dur-base) var(--ease-standard);
}

/* Light wash — sits below content. Visible by default; dark mode hides it. */
.site-lutastic::before {
  content: "";
  position: fixed;
  inset: 30% 0 0 0;
  background: linear-gradient(to bottom, transparent 0%, var(--blue-50) 100%);
  z-index: -1;
  pointer-events: none;
}
[data-theme-mode="dark"] .site-lutastic::before { display: none; }

/* Deep brand gradient on dark mode */
[data-theme-mode="dark"] .site-lutastic {
  background: linear-gradient(to bottom, var(--blue-800) 0%, var(--blue-500) 100%);
  background-attachment: fixed;
}

/* Radial accent behind the hero image */
.site-lutastic::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--page-accent-glow);
  pointer-events: none;
  z-index: 0;
}

/* ----- 4. Nav ------------------------------------------------------ */
.nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--page-logo-text);
}

.nav__logo {
  height: 36px;
  width: auto;
  display: block;
  transition: filter var(--dur-base) var(--ease-standard);
}
[data-theme-mode="dark"] .nav__logo {
  /* knock the dark wordmark to white on the deep gradient */
  filter: brightness(0) invert(1);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-left: auto;
}

.nav__link {
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--page-link);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-standard);
}
.nav__link:hover { color: var(--page-link-hover); }

@media (max-width: 720px) {
  .nav__links .nav__link:not(.nav__link--cta) { display: none; }
}

/* Light/dark toggle */
.theme-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--page-toggle-bg);
  border: 1px solid var(--page-toggle-border);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.theme-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--page-link);
  font: inherit;
  font-size: var(--fs-13);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}
/* Active button is driven by the resolved mode (set on <html>), not aria-pressed,
   so the highlight is correct from the first paint. aria-pressed is kept in sync
   by main.js for screen readers. */
[data-theme-mode="light"] .theme-toggle button[data-set-mode="light"],
[data-theme-mode="dark"] .theme-toggle button[data-set-mode="dark"] {
  background: var(--page-toggle-active-bg);
  color: var(--page-toggle-active-text);
}
.theme-toggle svg { width: 14px; height: 14px; }

/* ----- 5. Hero ----------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding-top: clamp(20px, 4vw, 56px);
  padding-bottom: clamp(40px, 8vw, 96px);
}

.hero__text {
  max-width: 620px;
  position: relative;
  z-index: 3;
}

/* Brand lockup — app icon + product name */
.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-6);
}
.brand-chip__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow:
    0 4px 14px -4px rgba(22, 39, 51, 0.25),
    0 1px 2px rgba(22, 39, 51, 0.08);
}
[data-theme-mode="dark"] .brand-chip__icon {
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.45);
}
.brand-chip__label {
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--page-text);
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}
.brand-chip__plus {
  color: var(--orange-350);
  font-weight: 700;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-8);
  color: var(--page-text);
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--page-brand-text);
}

/* Store badges */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 16px;
  height: 56px;
  background: var(--page-store-bg);
  color: var(--page-store-text);
  border: 1px solid var(--page-store-border);
  border-radius: var(--radius-lg);
  transition:
    transform var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard),
    background var(--dur-fast) var(--ease-standard);
}
.store:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(22, 39, 51, 0.25);
}
.store:active { transform: scale(0.98); }
.store__icon { width: 26px; height: 26px; flex: none; }
.store__copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}
.store__sup {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0.78;
  margin-bottom: 4px;
}
.store__main {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: var(--fs-13);
  color: var(--page-text-soft);
}
.meta > span:not(.meta__dot) { white-space: nowrap; }
.meta__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* Hero media — phones + pod composition, anchored bottom-right */
.hero__media {
  position: absolute;
  right: clamp(-40px, -3vw, 0px);
  bottom: 0;
  width: clamp(560px, 62vw, 1180px);
  pointer-events: none;
  z-index: 1;
}
.hero__media-inner { position: relative; }
.hero__media img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(22, 39, 51, 0.18));
}
[data-theme-mode="dark"] .hero__media img {
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.55));
}

/* ----- 6. Footer --------------------------------------------------- */
.footer {
  position: relative;
  z-index: 2;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--page-divider);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  font-size: var(--fs-13);
  color: var(--page-text-soft);
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--page-text-muted);
  white-space: nowrap;
}
.footer__mark {
  width: 22px;
  height: 22px;
  display: block;
}
.footer__sep {
  width: 1px;
  height: 12px;
  background: var(--page-divider);
}
.footer__links {
  display: inline-flex;
  gap: var(--space-5);
  margin-left: auto;
}
.footer__links a:hover { color: var(--page-link-hover); }

/* ----- 7. Responsive ----------------------------------------------- */
@media (max-width: 980px) {
  .site-lutastic { padding: 20px 24px 0; }
  .hero { padding-bottom: 0; padding-top: 24px; }
  .hero__text { max-width: 100%; }
  .hero__media {
    position: relative;
    right: auto;
    bottom: auto;
    width: calc(100% + 48px);
    margin: 32px -24px 0;
  }
  .hero__floor { display: none; }
  .footer { margin-top: 32px; }
}

@media (max-width: 520px) {
  .nav { padding-bottom: 16px; }
  .nav__logo { height: 28px; }
  .stores { gap: 10px; }
  .store { padding: 8px 14px; height: 52px; }
  .store__main { font-size: 15px; }
  .hero__title { font-size: 2.5rem; }
}

/* ----- 8. Motion --------------------------------------------------- */
/* Subtle entrance — translate only. Elements stay at opacity 1 so
   screenshots, print, and reduced-motion fallbacks always render. */
@keyframes rise {
  0%   { transform: translateY(10px); }
  100% { transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .brand-chip, .hero__title, .stores, .meta, .hero__media {
    animation: rise 600ms var(--ease-out-soft) both;
  }
  .hero__title { animation-delay: 60ms; }
  .stores      { animation-delay: 140ms; }
  .meta        { animation-delay: 200ms; }
  .hero__media { animation-duration: 900ms; animation-delay: 160ms; }
}
