/* StudyRank website — design tokens follow the app (Theme.swift / ThemeManager.swift).
   Light, calm, rounded, soft shadows. Always light (like the app's free look). */

:root {
  --page: #F7F7FA;
  --canvas: #F4F4F8;
  --surface: #FFFFFF;
  --surface-2: #F1F1F6;
  --separator: #E7E7EE;
  --text: #14141A;
  --text-2: #6B6B7A;
  --text-3: #A3A3B0;

  --brand: #5B7CB0;
  --brand-g1: #7193C2;
  --brand-g2: #4F6EA6;
  --brand-soft: #E9EEF7;
  --brand-ink: #3F5D90;

  --live: #30D158;
  --live-ink: #1B8F40;
  --versus: #C67E76;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --shadow: 0 10px 36px rgba(20, 20, 40, .06), 0 1px 3px rgba(20, 20, 40, .04);
  --shadow-lift: 0 24px 60px rgba(20, 20, 40, .10), 0 2px 6px rgba(20, 20, 40, .05);
  --glow: 0 10px 30px rgba(79, 110, 166, .32);

  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: max(20px, env(safe-area-inset-left));
  --header-h: 64px;
  color-scheme: light only;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent);
  outline-offset: 3px;
  border-radius: 8px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

p { margin: 0; }

/* Even line lengths in headings, no lonely last words in paragraphs. */
h1, h2, h3, .lead { text-wrap: balance; }
p, li { text-wrap: pretty; }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-weight: 600;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ── Type ─────────────────────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--brand);
}

.eyebrow--pill {
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--separator), 0 4px 14px rgba(20, 20, 40, .04);
  letter-spacing: .06em;
  font-size: 12.5px;
}

.eyebrow__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 22%, transparent);
}

.h-display {
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.038em;
}

.h-section {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
}

.text-gradient {
  background: linear-gradient(120deg, var(--brand-g1) 0%, var(--brand-g2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-2);
}

.muted { color: var(--text-2); }

/* ── Buttons & badge ──────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-g1), var(--brand-g2));
  box-shadow: var(--glow);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  cursor: pointer;
}
.button:hover { text-decoration: none; filter: brightness(1.06); box-shadow: 0 14px 34px rgba(79, 110, 166, .38); }
.button:active { transform: scale(.98); }

.button--small { min-height: 38px; padding: 0 18px; font-size: 14.5px; }

.button--ghost {
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--separator), var(--shadow);
}
.button--ghost:hover { box-shadow: inset 0 0 0 1px var(--separator), var(--shadow-lift); filter: none; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}
.text-link span[aria-hidden] { transition: transform .2s ease; }
.text-link:hover { text-decoration: none; }
.text-link:hover span[aria-hidden] { transform: translateY(2px); }

.store-badge { display: inline-block; border-radius: 10px; transition: transform .2s ease, opacity .2s ease; }
.store-badge img { width: 156px; height: auto; }
.store-badge--small img { width: 120px; }
.store-badge:hover { transform: translateY(-1px); opacity: .9; }

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--page) 76%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-bottom-color: color-mix(in srgb, var(--separator) 85%, transparent); }

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(40, 60, 110, .22);
}
.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}
.site-nav a {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  transition: color .2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  margin-left: 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.nav-toggle__bar {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .25s ease, top .25s ease;
}
.nav-toggle__bar:nth-of-type(2) { top: 16px; }
.nav-toggle__bar:nth-of-type(3) { top: 23px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-of-type(2) { top: 19.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-of-type(3) { top: 19.5px; transform: rotate(-45deg); }

@media (max-width: 760px) {
  .site-header__inner { gap: 12px; }
  .site-header__cta { margin-left: auto; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 12px; right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px;
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--separator);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { padding: 12px 14px; border-radius: 14px; font-size: 17px; color: var(--text); }
  .site-nav a:hover { background: var(--surface-2); }
}

/* ── Sections ─────────────────────────────────────────────────────────── */

.section { padding-block: clamp(72px, 10vw, 136px); }
.section--tight { padding-block: clamp(56px, 7vw, 100px); }
.section__head { max-width: 700px; margin-bottom: clamp(36px, 5vw, 60px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head .lead { margin-top: 18px; }
.section__head .eyebrow + h2 { margin-top: 14px; }

/* ── Phone frame ──────────────────────────────────────────────────────── */
/* The screenshot sets the height (no cropping); the frame is a thin black
   bezel with a titanium edge and the Dynamic Island on top. */

.phone {
  --phone-w: 300px;
  position: relative;
  isolation: isolate;
  flex: none;
  width: var(--phone-w);
  max-width: 100%;
  padding: calc(var(--phone-w) * .034);
  border-radius: calc(var(--phone-w) * .163);
  background: #0C0C0F;
  box-shadow:
    inset 0 0 0 calc(var(--phone-w) * .004) #34343C,
    0 0 0 calc(var(--phone-w) * .0055) #B9BBC3,
    0 0 0 calc(var(--phone-w) * .0085) #8F919A,
    0 28px 56px -16px rgba(28, 36, 78, .28),
    0 64px 120px -36px rgba(28, 36, 78, .30);
}
.phone::after {   /* Dynamic Island */
  content: "";
  position: absolute;
  top: calc(var(--phone-w) * .058);
  left: 50%;
  width: 29.5%;
  height: calc(var(--phone-w) * .082);
  transform: translateX(-50%);
  border-radius: 999px;
  background: #050506;
  z-index: 2;
}
.phone > img,
.phone__stack {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--phone-w) * .128);
  background: #E9E9EF;
}

/* Several screens in one phone (the design switcher): a cross-fade. */
.phone__stack {
  position: relative;
  aspect-ratio: 720 / 1565;
  overflow: hidden;
  background: #5C4DE0;
}
.phone__stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .6s ease;
}
.phone__stack img.is-active { opacity: 1; }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(36px, 6vw, 80px) clamp(64px, 8vw, 112px);
  overflow: hidden;
  background:
    radial-gradient(52% 58% at 76% 38%, color-mix(in srgb, var(--brand-g1) 22%, transparent), transparent 70%),
    radial-gradient(36% 40% at 96% 8%, color-mix(in srgb, #9B5CF6 10%, transparent), transparent 70%),
    radial-gradient(40% 40% at 6% 0%, color-mix(in srgb, #F59A5B 7%, transparent), transparent 70%),
    linear-gradient(180deg, #FBFBFD 0%, var(--page) 100%);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
}

.hero__copy h1 { margin-top: 22px; }
.hero__copy .lead { margin-top: 22px; max-width: 34ch; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 26px;
  margin-top: 34px;
}

.hero__note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}
.hero__note li { display: inline-flex; align-items: center; gap: 7px; }
.hero__note svg { width: 16px; height: 16px; color: var(--brand); flex: none; }

.hero__visual { position: relative; display: flex; justify-content: center; min-width: 0; }

/* Three phones, fanned: a session, Home, the leaderboard. */
.fan {
  --w: clamp(216px, 19vw, 266px);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-top: 8px;
  isolation: isolate;
}
.fan::before {   /* a soft glow behind the phones */
  content: "";
  position: absolute;
  inset: 10% 6% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-g1) 26%, transparent), transparent);
  filter: blur(10px);
  z-index: -1;
}
.fan .phone { --phone-w: var(--w); }
.fan__center { z-index: 2; }
.fan .fan__side {
  --phone-w: calc(var(--w) * .84);
  margin-bottom: calc(var(--w) * .05);
  z-index: 1;
}
.fan__side--left { margin-right: calc(var(--w) * -.34); transform: rotate(-6deg); transform-origin: 100% 100%; }
.fan__side--right { margin-left: calc(var(--w) * -.34); transform: rotate(6deg); transform-origin: 0 100%; }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { text-align: center; }
  .hero__copy .lead { margin-inline: auto; }
  .hero__actions, .hero__note { justify-content: center; }
  .hero__visual { margin-top: 8px; }
  .fan { --w: clamp(196px, 46vw, 270px); }
}

/* ── Friends ──────────────────────────────────────────────────────────── */

.section--friends { padding-top: clamp(56px, 8vw, 112px); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(30px, 3.6vw, 46px) clamp(22px, 3vw, 40px) 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
}
.tile::before {   /* light from above */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 45% at 50% 0%, rgba(255, 255, 255, .75), transparent 70%);
  z-index: -1;
}
.tile--blue   { background: linear-gradient(180deg, #EEF3FB 0%, #DFE8F6 100%); }
.tile--coral  { background: linear-gradient(180deg, #FCF2EE 0%, #F5E1DA 100%); }
.tile--violet { background: linear-gradient(180deg, #F2EFFF 0%, #E2DCFF 100%); }
.tile--indigo { background: linear-gradient(180deg, #EFEEFC 0%, #DEDEF8 100%); }

.tile__text { max-width: 420px; }
.tile__text h3 { font-size: clamp(1.45rem, 2.3vw, 1.9rem); letter-spacing: -0.025em; line-height: 1.12; }
.tile__text p { margin-top: 10px; font-size: 16.5px; line-height: 1.5; color: var(--text-2); }

.tile__device {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: clamp(26px, 3vw, 36px);
}
.tile .phone {
  --phone-w: clamp(232px, 25vw, 300px);
  margin-bottom: calc(var(--phone-w) * -.86);   /* only the top of the phone shows */
}

.extras {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.extra {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 .5px var(--separator);
}
.extra__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 13px;
  color: #fff;
}
.extra__icon svg { width: 23px; height: 23px; }
.extra h3 { font-size: 17.5px; letter-spacing: -0.01em; }
.extra p { margin-top: 5px; font-size: 15.5px; line-height: 1.5; color: var(--text-2); }

@media (max-width: 860px) {
  .tiles, .extras { grid-template-columns: 1fr; }
  .tile { padding-top: 34px; }
  .tile .phone { --phone-w: clamp(220px, 62vw, 290px); }
}

/* ── Feature rows ─────────────────────────────────────────────────────── */

.section--features { padding-top: clamp(24px, 4vw, 48px); }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
}
.feature + .feature { margin-top: clamp(84px, 11vw, 150px); }
.feature--reverse .feature__copy { order: 2; }

.feature__copy h2 { margin-top: 14px; }
.feature__copy .lead { margin-top: 18px; max-width: 46ch; }

.checklist {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 13px;
}
.checklist li {
  position: relative;
  padding-left: 34px;
  font-size: 16.5px;
  line-height: 1.5;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B7CB0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* The light "world" a phone sits in; the phone runs off its bottom edge. */
.stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: clamp(440px, 46vw, 590px);
  padding-top: clamp(38px, 4.4vw, 56px);
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 40% at 50% 0%, rgba(255, 255, 255, .7), transparent 70%);
  z-index: -1;
}
.stage .phone { --phone-w: clamp(240px, 24vw, 296px); }

.stage--focus  { background: linear-gradient(180deg, #F1EEFF 0%, #DED8FF 100%); }
.stage--lock   { background: linear-gradient(180deg, #EFF1FA 0%, #DCE2F4 100%); }
.stage--flight { background: linear-gradient(180deg, #EAF3FC 0%, #D6E6F7 100%); }
.stage--stats  { background: linear-gradient(180deg, #EEF3FA 0%, #DBE5F4 100%); }

/* Two phones in one stage: one in front, one tucked behind. */
.duo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.duo .phone { --phone-w: clamp(214px, 21.5vw, 270px); }
.duo__back {
  margin-top: calc(var(--phone-w) * .14);
  margin-right: calc(var(--phone-w) * -.30);
  transform: rotate(-6deg);
  transform-origin: 100% 0;
  z-index: 0;
}
.duo__front { z-index: 1; }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature--reverse .feature__copy { order: 0; }
  .feature__copy { max-width: 620px; }
  .stage { height: clamp(420px, 108vw, 560px); }
  .stage .phone { --phone-w: clamp(230px, 64vw, 290px); }
  .duo .phone { --phone-w: clamp(196px, 52vw, 262px); }
}

/* ── Timer designs ────────────────────────────────────────────────────── */

.designs { margin-top: 30px; }
.designs__label {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.designs__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.design-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px 0 13px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--separator);
  cursor: pointer;
  transition: box-shadow .25s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.design-chip:hover { box-shadow: inset 0 0 0 1px #D3D4DE, 0 6px 16px rgba(20, 20, 40, .06); }
.design-chip:active { transform: scale(.97); }
.design-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-g1), var(--brand-g2));
  box-shadow: 0 8px 20px rgba(79, 110, 166, .30);
}
.design-chip__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.design-chip.is-active .design-chip__dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }

/* ── Details grid ─────────────────────────────────────────────────────── */

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.detail-card {
  padding: 24px 22px 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 .5px var(--separator);
}
.detail-card__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  color: #fff;
  margin-bottom: 18px;
}
.detail-card__icon svg { width: 22px; height: 22px; }
.detail-card h3 { font-size: 17px; letter-spacing: -0.01em; }
.detail-card p { margin-top: 7px; font-size: 15px; line-height: 1.5; color: var(--text-2); }

.i-blue   { background: linear-gradient(135deg, #7193C2, #4F6EA6); }
.i-violet { background: linear-gradient(135deg, #9B8CFF, #6A5CF0); }
.i-green  { background: linear-gradient(135deg, #5FD38A, #23A86B); }
.i-orange { background: linear-gradient(135deg, #FFB25C, #FF8A00); }
.i-pink   { background: linear-gradient(135deg, #FF8AC4, #E95495); }
.i-sky    { background: linear-gradient(135deg, #6DB8FF, #3C8DF0); }
.i-mint   { background: linear-gradient(135deg, #5FE3D3, #22B8A6); }
.i-slate  { background: linear-gradient(135deg, #8D93A6, #5E6478); }

@media (max-width: 1020px) { .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .details-grid { grid-template-columns: 1fr; gap: 12px; }
  /* A row each on a phone: the icon beside the words. */
  .detail-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
    padding: 18px 20px;
  }
  .detail-card__icon { grid-row: span 2; margin-bottom: 0; }
  .detail-card p { margin-top: 3px; }
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq {
  max-width: 820px;
  margin-inline: auto;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 .5px var(--separator);
  overflow: hidden;
}
.faq details { border-top: 1px solid var(--separator); }
.faq details:first-child { border-top: 0; }
.faq summary {
  position: relative;
  display: block;
  padding: 22px 64px 22px 26px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.005em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 24px; top: 50%;
  width: 24px; height: 24px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2370707E' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 7v10M7 12h10'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.faq .faq__answer { padding: 0 26px 24px; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.faq .faq__answer p + p { margin-top: 10px; }

/* ── CTA band ─────────────────────────────────────────────────────────── */

.section--cta { padding-top: 0; }

.cta-band {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 22px;
  padding: clamp(46px, 6vw, 80px) clamp(24px, 5vw, 64px);
  border-radius: var(--r-xl);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(255, 255, 255, .24), transparent 70%),
    linear-gradient(135deg, #7799C8 0%, #5474AB 55%, #42619A 100%);
  box-shadow: 0 30px 70px -24px rgba(60, 90, 147, .55);
}
.cta-band__icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 12px 30px rgba(10, 20, 50, .3); }
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.03em; }
.cta-band p { max-width: 46ch; color: rgba(255, 255, 255, .86); font-size: 17px; }

/* ── Page header (support, legal, blog) ───────────────────────────────── */

.page-hero {
  padding-block: clamp(48px, 7vw, 92px) clamp(28px, 4vw, 44px);
  background:
    radial-gradient(50% 80% at 85% 0%, color-mix(in srgb, var(--brand-g1) 12%, transparent), transparent 70%),
    linear-gradient(180deg, #FBFBFD, var(--page));
}
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.035em; line-height: 1.05; }
.page-hero .lead { margin-top: 16px; max-width: 58ch; }
.page-hero .eyebrow + h1 { margin-top: 14px; }

/* ── Prose (privacy, imprint, blog posts) ─────────────────────────────── */

.prose {
  max-width: 720px;
  font-size: 17.5px;
  line-height: 1.7;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 2.1em;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.prose h3 { margin-top: 1.7em; font-size: 1.2rem; letter-spacing: -0.01em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--brand); }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose strong { font-weight: 700; }
.prose blockquote {
  margin-left: 0;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--text);
}
.prose .callout {
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 .5px var(--separator);
  font-size: 16px;
}
.prose .callout strong { display: block; margin-bottom: 4px; font-family: var(--font-display); }
.prose .placeholder {
  padding: 2px 6px;
  border-radius: 6px;
  background: #FFF3C4;
  color: #6B4E00;
  font-weight: 600;
}
.prose hr { border: 0; height: 1px; background: var(--separator); margin-block: 2.4em; }

.legal-meta { margin-top: 14px; font-size: 14.5px; color: var(--text-2); }

/* ── Support ──────────────────────────────────────────────────────────── */

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.contact-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding: 26px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 .5px var(--separator);
}
.contact-card h2 { font-size: 20px; }
.contact-card p { margin-top: 8px; color: var(--text-2); font-size: 15.5px; }
.contact-card .button { margin-top: 18px; width: 100%; }
.contact-card__mail { display: block; margin-top: 12px; font-size: 14.5px; text-align: center; word-break: break-all; }

.faq-group + .faq-group { margin-top: 44px; }
.faq-group h2 { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 16px; }
.faq-group .faq { max-width: none; margin: 0; }

@media (max-width: 900px) {
  .support-grid { grid-template-columns: 1fr; }
  .contact-card { position: static; order: -1; }
}

/* ── Blog ─────────────────────────────────────────────────────────────── */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 .5px var(--separator);
  color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lift), inset 0 0 0 .5px var(--separator); }
.post-card__meta { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--text-2); }
.post-card__title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; }
.post-card__text { font-size: 15.5px; line-height: 1.55; color: var(--text-2); }
.post-card__more { margin-top: auto; padding-top: 6px; font-family: var(--font-display); font-size: 14.5px; font-weight: 700; color: var(--brand); }

@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

.post__header { max-width: 760px; }
.post__header h1 { margin-top: 18px; font-size: clamp(2.1rem, 4.6vw, 3.3rem); letter-spacing: -0.03em; line-height: 1.08; }
.post__header .lead { margin-top: 16px; }
.post__meta { margin-top: 18px; font-family: var(--font-display); font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.post__back { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; }
.post__body { margin-top: clamp(32px, 4vw, 48px); }

.post-app {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 2.4em;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 .5px var(--separator);
}
.post-app img.post-app__icon { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.post-app p { font-size: 15.5px; line-height: 1.5; color: var(--text-2); }
.post-app strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 16.5px; }
.post-app .store-badge { margin-left: auto; flex: none; }
@media (max-width: 560px) {
  .post-app { flex-wrap: wrap; }
  .post-app .store-badge { margin-left: 0; }
}

.more-posts.is-empty { display: none; }
.more-posts__title { margin-bottom: 24px; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.025em; }

/* ── Invite ───────────────────────────────────────────────────────────── */

.invite {
  min-height: calc(100vh - var(--header-h) - 1px);
  display: grid;
  place-items: center;
  padding: 48px var(--gutter) 72px;
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--brand-g1) 20%, transparent), transparent 70%),
    var(--page);
}
.invite__card {
  width: min(100%, 460px);
  padding: 36px 28px 30px;
  border-radius: var(--r-xl);
  text-align: center;
  background: var(--surface);
  box-shadow: var(--shadow-lift), inset 0 0 0 .5px var(--separator);
}
.invite__icon { width: 84px; height: 84px; margin: 0 auto; border-radius: 20px; box-shadow: 0 12px 30px rgba(40, 60, 110, .25); }
.invite__card h1 { margin-top: 22px; font-size: 1.75rem; letter-spacing: -0.025em; }
.invite__card .lead { margin-top: 10px; font-size: 16.5px; }
.invite__steps {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  text-align: left;
  display: grid;
  gap: 12px;
}
.invite__steps li {
  position: relative;
  padding-left: 40px;
  font-size: 15.5px;
  line-height: 1.45;
  counter-increment: step;
}
.invite__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--brand);
  background: var(--brand-soft);
}
.invite__code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
  padding: 10px 10px 10px 18px;
  border-radius: 16px;
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .01em;
}
.invite__code button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--separator);
  cursor: pointer;
}
.invite__badge { margin-top: 26px; }
.invite__open { display: inline-block; margin-top: 16px; font-family: var(--font-display); font-weight: 700; font-size: 15px; }

/* ── 404 ──────────────────────────────────────────────────────────────── */

.not-found {
  min-height: calc(100vh - var(--header-h) - 1px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px var(--gutter);
}
.not-found__code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}
.not-found h1 { margin-top: 12px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.not-found p { margin-top: 12px; color: var(--text-2); }
.not-found .button { margin-top: 28px; }

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: clamp(40px, 6vw, 80px);
  padding-block: 56px calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--separator);
  background: var(--surface);
}
.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.site-footer__brand p { margin: 12px 0 18px; color: var(--text-2); font-size: 15px; }
.site-footer__links { display: flex; gap: clamp(40px, 8vw, 96px); }
.site-footer__links h2 {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.site-footer__links a {
  display: block;
  padding: 4px 0;
  font-size: 15px;
  color: var(--text-2);
}
.site-footer__links a:hover { color: var(--text); text-decoration: none; }
.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px 32px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--separator);
  font-size: 13px;
  color: var(--text-3);
}
.site-footer__legal { max-width: 62ch; }

/* ── Reveal on scroll ─────────────────────────────────────────────────── */

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media print {
  .site-header, .site-footer, .cta-band { display: none; }
  body { background: #fff; }
}

/* ── Small helpers used by the pages ──────────────────────────────────── */
.section--after-hero { padding-top: 8px; }
.placeholder-block { margin-top: 1.2em; }
