/* ==========================================================================
   Beattier marketing site: shared shell
   Tokens mirror the app design system (violet accent, gold highlights, dark
   surfaces). Page-specific styles live in css/. No build step.
   ========================================================================== */

:root {
  /* surfaces */
  --void: #07070c;
  --obsidian: #0f0f16;
  --surface: #17171f;
  --surface-2: #1f1f2a;

  /* text */
  --text: #f2f0fa;
  --text-secondary: #aaa8c0;
  --text-muted: #77768a;
  --border: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-frame: rgba(255, 255, 255, 0.15);

  /* accent */
  --accent-soft: #c4bfff;
  --accent-muted: #9b93ff;
  --accent: #7b6eff;
  --accent-deep: #5a50d4;
  --accent-glow: rgba(123, 110, 255, 0.34);
  --accent-selected-bg: rgba(123, 110, 255, 0.14);
  --accent-selected-border: rgba(123, 110, 255, 0.55);

  /* gold */
  --gold: #e8a220;
  --gold-honey: #f5c96a;
  --gold-selected-bg: rgba(232, 162, 32, 0.14);
  --gold-selected-border: rgba(232, 162, 32, 0.55);

  /* Rating ramp: the app's "Classic" preset, indexed like the app does it,
     floor(rating / 10 * 8), with a 10 landing on the last swatch. */
  --score-0: #8a8d96;
  --score-1: #ef4444;
  --score-2: #f97316;
  --score-3: #eab308;
  --score-4: #a3e635;
  --score-5: #22c55e;
  --score-6: #3b82f6;
  --score-7: #9b93ff;

  /* gradients */
  --brand-gradient: linear-gradient(to right, #5a50d4, #7b6eff, #9b93ff);

  /* shape & elevation */
  --radius-chip: 8px;
  --radius-input: 12px;
  --radius-card: 20px;
  --radius-xl: 28px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-float: 0 30px 80px rgba(0, 0, 0, 0.55);

  /* type */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* layout */
  --page-width: 1180px;
  --page-inline: clamp(16px, 4vw, 40px);
  --nav-height: 72px;

  /* motion */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* --------------------------------------------------------------- base ---- */

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

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

body {
  margin: 0;
  background-color: var(--void);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent-soft);
  text-decoration: none;
}

a:hover {
  color: var(--text);
}

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

button {
  font: inherit;
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent-glow);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Film grain, so gradients don't band and flat panels feel like material.
   It is a body background layer with the opacity baked into the SVG tile,
   not a fixed overlay: a fixed overlay rendered as a lighter band over
   Safari's composited scrollers (the showcase row) and over Chromium's
   3D-transformed phones. */
.page {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.shell {
  max-width: var(--page-width);
  margin: 0 auto;
  padding-inline: var(--page-inline);
}

/* ---------------------------------------------------------- typography -- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.eyebrow--plain::before {
  display: none;
}

.display {
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  text-wrap: balance;
}

.section-title {
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

.section-lede {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 54ch;
  text-wrap: pretty;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 760px;
}

.section-head--center {
  align-items: center;
  text-align: center;
  margin-inline: auto;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- nav ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 14px var(--page-inline) 0;
  pointer-events: none;
}

.nav__inner {
  pointer-events: auto;
  max-width: var(--page-width);
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 8px 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out), backdrop-filter 0.35s;
}

.nav.is-scrolled .nav__inner {
  background: rgba(15, 15, 22, 0.66);
  border-color: var(--border-subtle);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}

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

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(123, 110, 255, 0.35);
}

.brand__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav__links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.is-current {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* The header's Download button is a transparent outline; the white primary
   style stays for the hero, menu panel and closing CTA. */
.nav__inner .nav__cta {
  flex-shrink: 0;
  background: transparent;
  color: var(--text);
  border-color: transparent;
  box-shadow: none;
}

.nav__inner .nav__cta:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: transparent;
  box-shadow: none;
}

/* Hamburger + menu panel, phone widths only. The scrim sits below the pill
   inside the nav's own stacking context, so it still covers the page. */
.nav__burger {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.nav__burger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav__burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease-out);
}

.nav__burger span:first-child {
  transform: translateY(-4px);
}

.nav__burger span:last-child {
  transform: translateY(3px);
}

.nav.is-open .nav__burger span:first-child {
  transform: rotate(45deg);
}

.nav.is-open .nav__burger span:last-child {
  transform: rotate(-45deg);
}

.nav.is-open .nav__inner {
  background: rgba(15, 15, 22, 0.9);
  border-color: var(--border-subtle);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.nav__scrim {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(7, 7, 12, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}

.nav.is-open .nav__scrim {
  opacity: 1;
  pointer-events: auto;
}

.nav__menu {
  display: none;
  pointer-events: auto;
  max-width: var(--page-width);
  margin: 10px auto 0;
  padding: 10px;
  border-radius: 28px;
  background: rgba(15, 15, 22, 0.9);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  flex-direction: column;
  gap: 8px;
  transform-origin: top center;
}

.nav.is-open .nav__menu {
  display: flex;
  animation: menu-in 0.4s var(--ease-out);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.nav__menu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}

.nav__menu-link svg {
  color: var(--text-muted);
}

.nav__menu-link:hover,
.nav__menu-link:active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav__menu-link.is-current {
  color: var(--accent-soft);
}

.nav__menu-cta {
  margin-top: 4px;
  width: 100%;
}

.nav__menu-social {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 4px;
}

.nav__menu-handle {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

html.nav-open {
  overflow: hidden;
}

/* ------------------------------------------------------------ buttons ---- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.35s var(--spring), background 0.25s, border-color 0.25s,
    box-shadow 0.35s var(--ease-out), color 0.25s;
  will-change: transform;
}

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

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  flex-shrink: 0;
}

.btn--primary {
  background: #fff;
  color: var(--void);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 12px 32px rgba(255, 255, 255, 0.08);
}

.btn--primary:hover {
  color: var(--void);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 18px 44px rgba(255, 255, 255, 0.14);
}

.btn--glow {
  background: var(--brand-gradient);
  background-size: 200% 100%;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 12px 36px var(--accent-glow);
}

.btn--glow:hover {
  background-position: 100% 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 18px 50px var(--accent-glow);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-frame);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn--sm {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.btn--xl {
  height: 60px;
  padding: 0 30px;
  font-size: 16px;
}

/* The App Store button is two lines, like Apple's badge, but drawn in our
   own type so it sits with the rest of the system. */
.btn--store {
  gap: 11px;
  padding-left: 18px;
  padding-right: 24px;
}

.btn--store .btn__lines {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.btn--store .btn__small {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

.btn--store .btn__big {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-row--center {
  justify-content: center;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

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

.text-link svg {
  transition: transform 0.3s var(--ease-out);
}

.text-link:hover svg {
  transform: translateX(3px);
}

/* Small inline status pill: green dot + label. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.badge strong {
  color: var(--text);
  font-weight: 600;
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  flex-shrink: 0;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1.5px solid #22c55e;
  opacity: 0;
  animation: pulse-ring 2.2s var(--ease-out) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }
  70%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* -------------------------------------------------------------- cards ---- */

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* Spotlight that follows the pointer. main.js writes --mx / --my in px. */
.card--spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(123, 110, 255, 0.14),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card--spot:hover::before {
  opacity: 1;
}

/* ------------------------------------------------------------- footer ---- */

.footer {
  position: relative;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.footer__inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 64px var(--page-inline) 40px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 300px;
}

.footer__tagline {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer__link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.footer__social {
  display: flex;
  gap: 8px;
}

.social-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: transform 0.3s var(--spring), border-color 0.2s, color 0.2s, background 0.2s;
}

.social-icon:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-frame);
  transform: translateY(-2px);
}

/* Giant wordmark bleeding off the bottom of the footer. */
.footer__wordmark {
  position: relative;
  display: block;
  font-size: clamp(88px, 19vw, 260px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.78;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.015));
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  margin-bottom: -0.16em;
  pointer-events: none;
}

/* ------------------------------------------------------------- motion ---- */

/* Scroll reveal: the hidden state is added by main.js so the page renders
   complete when JavaScript is off. Siblings stagger through --reveal-delay. */
[data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(28px);
}

[data-reveal="scale"].is-hidden {
  transform: translateY(20px) scale(0.96);
}

[data-reveal="left"].is-hidden {
  transform: translateX(-32px);
}

[data-reveal="right"].is-hidden {
  transform: translateX(32px);
}

[data-reveal="fade"].is-hidden {
  transform: none;
}

[data-reveal] {
  transition: opacity 0.9s var(--ease-out) var(--reveal-delay, 0ms),
    transform 0.9s var(--ease-out) var(--reveal-delay, 0ms);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Word-by-word headline reveal. main.js wraps each word in .w > span. */
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.split .w > span {
  display: inline-block;
  transform: translateY(110%);
  animation: word-in 1s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}

@keyframes word-in {
  to {
    transform: none;
  }
}

.fade-in {
  opacity: 0;
  animation: fade-in 1.1s var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------- responsive ---- */

@media (max-width: 900px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-height: 64px;
  }

  .nav {
    padding-top: 10px;
  }

  .nav__inner {
    height: 52px;
    gap: 12px;
  }

  .nav__links {
    display: none;
  }

  .nav__burger {
    display: inline-flex;
  }

  .nav__inner {
    padding-right: 6px;
  }

  /* Links are hidden here, so push the button and hamburger to the right. */
  .nav__cta {
    margin-left: auto;
    padding: 0 14px;
  }

  .nav__links--keep {
    display: flex;
    justify-content: flex-end;
  }

  .btn {
    height: 50px;
    padding: 0 20px;
  }

  .btn--xl {
    height: 56px;
  }

  .footer__inner {
    padding-top: 48px;
    gap: 36px;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }
}

@media (min-width: 641px) {
  .nav__menu,
  .nav__scrim {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .split .w > span {
    transform: none;
  }

  .fade-in {
    opacity: 1;
  }
}
