/* BrainDrop website. Same tokens as the app (Theme.swift) and the App Store screenshots:
   near-black canvas, sage accent, off-white pills, soft opaque borderless cards,
   one rounded sans (Nunito stands in for SF Rounded). Admin pages use admin.css. */
/* Nunito, self-hosted (SIL OFL, assets/fonts/OFL.txt) */
@font-face { font-family: "Nunito"; font-weight: 600; font-display: swap; src: url(assets/fonts/Nunito-600.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url(assets/fonts/Nunito-700.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url(assets/fonts/Nunito-800.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: swap; src: url(assets/fonts/Nunito-900.woff2) format("woff2"); }

:root {
  --bg: #0A0B09;
  --card: #171A15;
  --card-hi: #20241E;
  --text: #F7F5F2;
  --muted: rgba(247, 245, 242, 0.64);
  --dim: rgba(247, 245, 242, 0.42);
  --line: rgba(247, 245, 242, 0.08);
  --accent: #6FB58E;
  --accent-deep: #3F7D5E;
  --accent-soft: #B9DCC6;
  --pill: #F7F5F2;
  --ink: #10130C;
  --flame: #E8935A;
  --max: 1160px;
  --gutter: 24px;
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin: 0 auto; }
.wrap.narrow { --max: 720px; }

/* ---------- type ---------- */
.display, .h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: .98;
  text-wrap: balance;
}
.display { font-size: clamp(52px, 9.4vw, 128px); }
.h2 { font-size: clamp(40px, 6.2vw, 84px); }
.display em, .h2 em { font-style: normal; color: var(--accent); }
/* hand-drawn sage strike, as on the first App Store slide */
.display s { text-decoration: none; position: relative; white-space: nowrap; color: rgba(247, 245, 242, .38); }
.display s::after {
  content: ""; position: absolute; left: -3%; right: -3%; top: 50%; height: .2em;
  transform: translateY(-30%) rotate(-2.5deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 24' preserveAspectRatio='none'%3E%3Cpath d='M4 15 C 70 6, 140 18, 210 10 S 330 4, 396 12' fill='none' stroke='%236FB58E' stroke-width='11' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.lede { margin: 22px 0 0; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); font-weight: 600; max-width: 30em; }

/* ---------- buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--pill); color: var(--ink);
  font-weight: 800; font-size: 15px; letter-spacing: -0.01em;
  transition: transform .25s var(--ease), background .25s;
}
.pill:hover { transform: translateY(-1px); background: #fff; }
.pill.lg { height: 60px; padding: 0 30px; font-size: 17px; }
.pill svg { width: 20px; height: 20px; flex: none; }
.pill.lg svg { width: 22px; height: 22px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 11, 9, .78);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 21px; letter-spacing: -0.02em; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.pill) { color: var(--muted); font-size: 15px; font-weight: 700; transition: color .2s; }
.nav-links a:not(.pill):hover { color: var(--text); }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 112px) 0 0; text-align: center; overflow: hidden; }
.hero .lede { margin-left: auto; margin-right: auto; }
.hero .actions { margin-top: 36px; }
.glow {
  position: absolute; left: 50%; bottom: -10%; width: min(1200px, 140vw); height: 70%;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse 50% 50% at 50% 60%, rgba(111, 181, 142, .18), rgba(111, 181, 142, 0) 70%);
}

/* three phones, fanned; the bottom fades into the page */
.phones {
  position: relative; margin: clamp(56px, 7vw, 88px) auto 0; height: clamp(440px, 52vw, 640px);
  max-width: 1040px;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.phones .phone { position: absolute; top: 0; left: 50%; }
.phones .p-center { width: clamp(270px, 30vw, 340px); transform: translateX(-50%); z-index: 3; }
.phones .p-left, .phones .p-right { width: clamp(230px, 25vw, 290px); top: 60px; z-index: 2; opacity: .9; }
.phones .p-left { transform: translateX(calc(-50% - clamp(220px, 26vw, 310px))) rotate(-6deg); }
.phones .p-right { transform: translateX(calc(-50% + clamp(220px, 26vw, 310px))) rotate(6deg); }

.phone {
  padding: 9px; border-radius: 52px; background: #050604;
  box-shadow: 0 0 0 1.5px #2A2D28, 0 50px 100px rgba(0, 0, 0, .55), 0 18px 36px rgba(0, 0, 0, .35);
}
.phone .glass { position: relative; aspect-ratio: 402 / 874; border-radius: 43px; overflow: hidden; background: var(--ink); }
.phone .glass img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .glass::before {
  content: ""; position: absolute; top: 2.2%; left: 50%; width: 30%; height: 3.6%;
  transform: translateX(-50%); border-radius: 99px; background: #000; z-index: 2;
}

/* ---------- sections ---------- */
.section { padding: clamp(96px, 12vw, 160px) 0; }
.section.tight { padding-top: 0; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* illustrated art band: two rows drifting in opposite directions */
.band { padding-bottom: 0; }
.band .h2 { margin-bottom: clamp(48px, 6vw, 72px); }
.marquee { display: flex; flex-direction: column; gap: 18px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.track { display: flex; gap: 18px; width: max-content; animation: drift 80s linear infinite; }
.track.rev { animation-direction: reverse; animation-duration: 95s; }
.tile { position: relative; width: clamp(200px, 22vw, 280px); aspect-ratio: 5 / 6; border-radius: 28px; overflow: hidden; background: var(--card); flex: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: var(--op, 60% 50%); }
.tile span {
  position: absolute; left: 14px; bottom: 14px; padding: 7px 14px; border-radius: 999px;
  background: rgba(16, 19, 12, .78); font-weight: 800; font-size: 14px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
@keyframes drift { to { transform: translateX(-50%); } }

/* split feature: headline beside a phone */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.split.flip .split-copy { order: 2; }
.split .phone { width: min(340px, 100%); margin: 0 auto; }
.stage {
  position: relative; display: flex; justify-content: center; align-items: flex-start;
  height: clamp(480px, 50vw, 620px); padding-top: clamp(40px, 5vw, 64px);
  border-radius: 40px; background: var(--card); overflow: hidden;
}
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(111, 181, 142, .16), rgba(111, 181, 142, 0) 70%);
}
.stage.short { height: clamp(440px, 42vw, 540px); }
.stage .phone { position: relative; flex: none; width: min(320px, 78%); }
.stage .float-try {
  position: absolute; left: 50%; bottom: 32px; width: min(340px, 84%); transform: translateX(-50%) rotate(-2deg);
  padding: 18px 20px 18px 26px; border-radius: 22px; background: var(--card-hi); z-index: 3; text-align: left;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}
.float-try::before { content: ""; position: absolute; left: 12px; top: 18px; bottom: 18px; width: 3px; border-radius: 2px; background: var(--accent); }
.float-try small { display: block; color: var(--accent); font-weight: 800; font-size: 13px; margin-bottom: 4px; }
.float-try p { margin: 0; font-size: 16px; line-height: 1.45; font-weight: 700; }

/* habit: streak card + widget */
.habit { position: relative; margin: clamp(56px, 7vw, 80px) auto 112px; width: min(560px, 100%); }
.streak { padding: 30px 28px 28px; border-radius: 32px; background: var(--card); text-align: left; }
.streak-top { display: flex; align-items: center; gap: 16px; }
.streak-top svg { width: 58px; height: 58px; }
.streak-num { font-weight: 900; font-size: 52px; line-height: .9; letter-spacing: -0.03em; }
.streak-lbl { margin-top: 6px; font-weight: 800; font-size: 13px; letter-spacing: .14em; color: var(--dim); }
.week { display: flex; justify-content: space-between; margin: 28px 0 24px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; color: var(--dim); }
.week i { width: clamp(32px, 7vw, 42px); height: clamp(32px, 7vw, 42px); border-radius: 50%; display: grid; place-items: center; background: var(--card-hi); }
.week i.on { background: var(--flame); }
.week i.today { background: transparent; box-shadow: inset 0 0 0 2.5px var(--flame); }
.week i svg { width: 45%; height: 45%; }
.goal { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; color: var(--muted); }
.goal b { color: var(--text); font-weight: 900; }
.bar { height: 10px; border-radius: 999px; background: var(--card-hi); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 60%; border-radius: 999px; background: var(--accent); }
.widget {
  position: absolute; right: -132px; bottom: -112px; width: 168px; height: 168px; padding: 18px; border-radius: 38px;
  background: var(--pill); color: var(--ink); transform: rotate(5deg);
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55);
}
.widget svg { width: 36px; height: 36px; }
.widget b { display: block; font-weight: 900; font-size: 42px; line-height: .9; letter-spacing: -0.03em; }
.widget small { display: block; font-weight: 800; font-size: 11px; letter-spacing: .1em; opacity: .55; margin-top: 4px; }
.widget .wm { font-weight: 800; font-size: 13px; opacity: .55; }

/* closing call to action with the mascot */
.closing .mascot { width: clamp(120px, 14vw, 168px); margin: 0 auto 40px; }
.mascot .eyes { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.closing .actions { margin-top: 40px; }

/* ---------- footer ---------- */
.footer { padding: 48px 0 64px; color: var(--dim); font-size: 14px; font-weight: 700; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 32px; border-top: 1px solid var(--line); }
.footer .brand { color: var(--text); font-size: 18px; }
.footer .brand svg { width: 22px; height: 22px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ---------- legal + support pages ---------- */
.doc { padding: clamp(56px, 8vw, 96px) 0 clamp(80px, 10vw, 128px); }
.doc h1 { margin: 0; font-weight: 900; font-size: clamp(44px, 7vw, 72px); letter-spacing: -0.035em; line-height: 1; }
.doc .meta { margin: 16px 0 44px; color: var(--dim); font-size: 14px; font-weight: 700; }
.doc h2 { margin: 48px 0 12px; font-weight: 800; font-size: 22px; letter-spacing: -0.015em; }
.doc p, .doc li { color: var(--muted); font-size: 16.5px; line-height: 1.7; font-weight: 600; }
.doc strong { color: var(--text); font-weight: 800; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--accent); }
.doc a { color: var(--accent-soft); text-decoration: underline; text-decoration-color: rgba(185, 220, 198, .35); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: currentColor; }
.doc .card { margin: 0 0 8px; padding: 24px 26px; border-radius: 26px; background: var(--card); }
.doc .card p { margin: 0; }
.doc .card .big { margin-top: 6px; font-size: 20px; font-weight: 800; }
.doc .card .big a { color: var(--text); }

/* ---------- motion (restrained; off for reduced motion) ---------- */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
.hero .phones { animation: rise 1.2s var(--ease) both .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .hero .phones, .track, .mascot .eyes { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; text-align: center; }
  .split .lede { margin-left: auto; margin-right: auto; }
  .split.flip .split-copy { order: 0; }
  .widget { right: 4px; bottom: -118px; width: 136px; height: 136px; border-radius: 32px; padding: 15px; }
  .widget b { font-size: 34px; }
  .habit { margin-bottom: 128px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav-links a:not(.pill) { display: none; }
  .nav-inner { height: 64px; }
  .phones { height: 520px; }
  .phones .p-center { width: 250px; }
  .phones .p-left, .phones .p-right { width: 210px; top: 48px; opacity: .55; }
  .phones .p-left { transform: translateX(calc(-50% - 150px)) rotate(-6deg); }
  .phones .p-right { transform: translateX(calc(-50% + 150px)) rotate(6deg); }
  .stage { border-radius: 32px; }
  .streak { padding: 24px 20px 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
