/* Tokens from the BackRoom app's Design System (backroom-app/lib/app/core/theme). */
@font-face { font-family: Manrope; font-weight: 400; font-display: swap; src: url(/fonts/Manrope-Regular.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 500; font-display: swap; src: url(/fonts/Manrope-Medium.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 600; font-display: swap; src: url(/fonts/Manrope-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(/fonts/Manrope-Bold.woff2) format("woff2"); }
@font-face { font-family: Manrope; font-weight: 800; font-display: swap; src: url(/fonts/Manrope-ExtraBold.woff2) format("woff2"); }

:root {
  /* Colours */
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-surface: #1C1C1C;
  --bg-elevated: #212121;
  --bg-card: #1E1E1E;
  --text-primary: #FFFFFF;
  --text-secondary: #B3B3B3;
  --text-muted: #999999;
  --text-subtle: #5B5B5B;
  --border-default: #444444;
  --border-subtle: #212121;
  --action-primary: #FAFAFA;
  --on-action-primary: #0A0A0A;
  --brand-accent: #57B4E5;

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Spacing (4px grid) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-24: 96px; --s-32: 128px;

  /* Motion (AppMotion) */
  --dur-fast: 150ms;
  --dur-medium: 250ms;
  --dur-slow: 350ms;
  --dur-slower: 450ms;
  --ease-enter: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-emphasized: cubic-bezier(0.32, 0.72, 0, 1);

  --wrap: 1160px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2 { font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; }
h3 { font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.lede { color: var(--text-secondary); font-size: clamp(16px, 1.5vw, 18px); max-width: 34em; text-wrap: pretty; }
.eyebrow { color: var(--text-muted); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--s-4); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s-6); }
@media (max-width: 600px) { .wrap { padding: 0 var(--s-4); } }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 var(--s-6);
  border-radius: var(--radius-pill);
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
  transition: transform var(--dur-fast) var(--ease-enter), background-color var(--dur-medium) var(--ease-enter), opacity var(--dur-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--light { background: var(--action-primary); color: var(--on-action-primary); }
.btn--light:hover { background: #fff; }
.btn--ghost { border: 1px solid var(--border-default); color: var(--text-primary); }
.btn--ghost:hover { background: var(--bg-surface); }
.btn--sm { height: 40px; padding: 0 var(--s-5); font-size: 14px; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 10;
  transition: background-color var(--dur-slow) var(--ease-enter), border-color var(--dur-slow);
  border-bottom: 1px solid transparent;
}
.nav--solid { background: rgba(10, 10, 10, 0.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom-color: var(--border-subtle); }
.nav__inner { display: flex; align-items: center; gap: var(--s-8); height: 72px; }
.brand { display: inline-flex; align-items: center; }
.brand__lockup { height: 22px; width: auto; }
@media (max-width: 600px) { .brand__lockup { height: 18px; } }
.nav__links { display: flex; gap: var(--s-8); margin-left: auto; font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.nav__links a { transition: color var(--dur-fast); }
.nav__links a:hover { color: var(--text-primary); }
@media (max-width: 820px) { .nav__links { display: none; } .nav .btn { margin-left: auto; } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 var(--s-16); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: 0.42; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--bg-primary) 0%, rgba(10,10,10,0.85) 38%, rgba(10,10,10,0.35) 100%),
              linear-gradient(180deg, rgba(10,10,10,0) 60%, var(--bg-primary) 100%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: var(--s-16); }
.hero__copy { display: grid; gap: var(--s-6); }
.hero__copy .eyebrow { margin: 0; color: var(--text-secondary); display: inline-flex; align-items: center; gap: var(--s-2); }
.hero__copy .eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-accent); box-shadow: 0 0 0 4px rgba(87, 180, 229, 0.18); }
.hero__phone { justify-self: center; width: min(360px, 100%); filter: drop-shadow(0 40px 80px rgba(0,0,0,0.6)); }
@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 112px; }
  .hero__inner { grid-template-columns: 1fr; gap: var(--s-12); }
  .hero__bg::after { background: linear-gradient(180deg, rgba(10,10,10,0.55) 0%, var(--bg-primary) 70%); }
  .hero__phone { width: min(300px, 80%); }
}

/* Coming-soon store badges */
.badges { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.badges--center { justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: var(--s-3);
  height: 56px; padding: 0 var(--s-5) 0 var(--s-4);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  background: rgba(17, 17, 17, 0.7);
  font-weight: 700; font-size: 17px; line-height: 1.1; letter-spacing: -0.01em;
  cursor: default;
}
.badge small { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }

/* Sections */
.section { padding: var(--s-32) 0; }
.section--alt { background: var(--bg-secondary); }
@media (max-width: 700px) { .section { padding: var(--s-24) 0; } }

.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); margin-top: var(--s-12); }
.cat {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: var(--s-8) var(--s-6); display: grid; gap: var(--s-3); align-content: start;
  transition: transform var(--dur-slow) var(--ease-emphasized), border-color var(--dur-slow);
}
.cat:hover { transform: translateY(-4px); border-color: var(--border-default); }
.cat img { width: 60px; height: 60px; object-fit: contain; margin-bottom: var(--s-2); }
.cat p { color: var(--text-secondary); font-size: 15px; }
@media (max-width: 960px) { .cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cats { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-16); align-items: center; }
.split--reverse .split__media { order: -1; }
.split__copy { display: grid; gap: var(--s-6); }
.split__copy .eyebrow { margin: 0; }
.split__media { display: flex; justify-content: center; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--s-12); }
  .split--reverse .split__media { order: 0; }
}

.device {
  width: min(320px, 82vw); aspect-ratio: 402 / 874;
  border-radius: 44px; padding: 10px;
  background: #1a1a1a; border: 1px solid #2e2e2e;
  box-shadow: 0 40px 80px rgba(0,0,0,0.55), inset 0 0 0 2px #0d0d0d;
}
.device img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 34px; }

.steps { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-8); }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: var(--s-4); align-items: start; }
.steps__n {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-elevated); border: 1px solid var(--border-default);
  font-weight: 700; font-size: 16px;
}
.steps h3 { margin: 10px 0 var(--s-1); }
.steps p { color: var(--text-secondary); }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); color: var(--text-secondary); }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.providers { display: grid; grid-template-columns: 1fr auto; gap: var(--s-12); align-items: end; }
.providers > div { display: grid; gap: var(--s-6); max-width: 720px; }
.providers .eyebrow { margin: 0; }
@media (max-width: 800px) { .providers { grid-template-columns: 1fr; } .providers .btn { justify-self: start; } }

/* Final CTA */
.cta { padding: var(--s-32) 0; text-align: center; background: radial-gradient(60% 70% at 50% 0%, #1c1c1c 0%, var(--bg-primary) 70%); }
.cta__inner { display: grid; justify-items: center; gap: var(--s-6); }
.cta .lede { margin: 0 auto; }
.cta__logo { width: 72px; height: auto; margin-bottom: var(--s-2); }
.cta .btn { margin-top: var(--s-2); }

/* Footer */
.footer { border-top: 1px solid var(--border-subtle); padding: var(--s-16) 0 var(--s-8); color: var(--text-secondary); font-size: 15px; }
.footer__inner { display: flex; justify-content: space-between; gap: var(--s-12); flex-wrap: wrap; }
.footer__brand { display: grid; gap: var(--s-3); }
.footer__brand .brand { color: var(--text-primary); }
.footer__cols { display: flex; gap: var(--s-16); flex-wrap: wrap; }
.footer__cols div { display: grid; gap: var(--s-2); align-content: start; }
.footer h4 { color: var(--text-primary); font-size: 14px; font-weight: 700; margin-bottom: var(--s-1); }
.footer__cols a { transition: color var(--dur-fast); }
.footer__cols a:hover { color: var(--text-primary); }
.footer__legal { margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid var(--border-subtle); color: var(--text-subtle); font-size: 13px; }

/* Entrances: fade and rise 12px (AppMotion.entranceOffset), only when JS motion is on. */
.js-motion .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-slower) var(--ease-enter), transform var(--dur-slower) var(--ease-emphasized); }
.js-motion .reveal.is-in { opacity: 1; transform: none; }
.js-motion .hero__phone.reveal { transform: translateY(32px) scale(0.98); transition-duration: 700ms; }
.js-motion .hero__phone.reveal.is-in { transform: none; }

/* Legal pages */
.legal { padding: 152px 0 var(--s-24); }
.legal__inner { max-width: 820px; display: grid; gap: var(--s-5); }
.legal__inner .eyebrow { margin: 0; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); }
.legal__body { margin-top: var(--s-8); padding-top: var(--s-8); border-top: 1px solid var(--border-subtle); color: var(--text-secondary); }
.legal__body h2 { color: var(--text-primary); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: var(--s-10) 0 var(--s-3); }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p, .legal__body ul, .legal__body ol { margin: 0 0 var(--s-4); }
.legal__body ul, .legal__body ol { padding-left: 1.25em; display: grid; gap: var(--s-2); }
.legal__body strong { color: var(--text-primary); font-weight: 600; }
.legal__body a, .footer__brand p a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--border-default); text-underline-offset: 3px; }
.legal__body a:hover { text-decoration-color: var(--text-primary); }
.nav__links a[aria-current="page"] { color: var(--text-primary); }
.footer__brand p { max-width: 340px; color: var(--text-muted); font-size: 14px; }
@media (max-width: 600px) { .legal { padding-top: 120px; } }
