/* Study Tracker landing page. System fonts, no external requests. */
:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --bg: #ffffff;
  --gray: #f5f5f7;
  --line: #d2d2d7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --night: #000000;
  --night-2: #1d1d1f;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  overflow-x: clip;
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: none; opacity: 0.8; }
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 22px; border-radius: 980px;
  font: 500 17px/1 var(--font); letter-spacing: -0.015em;
  border: 0; cursor: pointer; color: #fff; background: var(--blue);
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: var(--blue-hover); opacity: 1; }
.btn:active { transform: scale(0.98); }
.btn-small { min-height: 30px; padding: 0 14px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--link); padding: 0 6px; }
.btn-ghost:hover { background: transparent; text-decoration: none; opacity: 0.75; }
.btn-ghost::after { content: "›"; font-size: 1.15em; margin-left: 2px; }
.dark-bg .btn-ghost { color: #2997ff; }
.on-blue .btn-ghost { color: #fff; }
.btn-light { background: #fff; color: #0059b8; }
.btn-light:hover { background: #f2f2f7; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: 48px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.brand img { width: 22px; height: 22px; border-radius: 6px; }
.nav-links { display: flex; gap: 28px; font-size: 12px; }
.nav-links a { color: #424245; }
.nav-links a:hover { color: #000; opacity: 1; }

/* ---------- Type ---------- */
.eyebrow { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--muted); margin: 0 0 8px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.05; font-weight: 700; }
h1 { font-size: clamp(48px, 9vw, 96px); letter-spacing: -0.045em; line-height: 1; }
h2 { font-size: clamp(36px, 5.6vw, 64px); }
h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; }
.lead { font-size: clamp(19px, 2.4vw, 28px); line-height: 1.25; letter-spacing: -0.02em; font-weight: 500; color: var(--muted); margin: 18px 0 0; }
.center { text-align: center; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 72px 0 0; overflow: hidden; }
.hero .lead { max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-row { display: flex; gap: 18px; align-items: center; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero-stage {
  position: relative; height: clamp(360px, 62vw, 640px); margin-top: 44px;
  display: flex; justify-content: center; align-items: flex-start; gap: clamp(8px, 2.5vw, 36px);
  -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent);
}
.hero-stage .phone:nth-child(1) { margin-top: 44px; --pw: clamp(104px, 24vw, 260px); }
.hero-stage .phone:nth-child(2) { --pw: clamp(136px, 28vw, 300px); z-index: 2; }
.hero-stage .phone:nth-child(3) { margin-top: 44px; --pw: clamp(104px, 24vw, 260px); }

/* ---------- Phone frame ---------- */
.phone {
  --pw: 280px;
  position: relative; flex: none; width: var(--pw);
  padding: calc(var(--pw) * 0.028); border-radius: calc(var(--pw) * 0.17);
  background: linear-gradient(150deg, #3a3a3d, #0c0c0e 55%, #2a2a2d);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 30px 60px -12px rgba(0, 0, 0, 0.28), 0 18px 36px -18px rgba(0, 0, 0, 0.3);
}
.phone img { width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: calc(var(--pw) * 0.142); background: #111; }
.dark-bg .phone, .on-blue .phone { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 30px 70px -10px rgba(0, 0, 0, 0.6); }

/* ---------- Facts strip ---------- */
.facts { padding: 56px 0 24px; }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.facts li { text-align: center; padding: 8px 12px; }
.facts strong { display: block; font-size: 21px; letter-spacing: -0.02em; font-weight: 700; }
.facts span { color: var(--muted); font-size: 15px; }

/* ---------- Feature sections ---------- */
.section { padding: clamp(80px, 12vw, 140px) 0; }
.section.gray { background: var(--gray); }
.section.dark-bg { background: var(--night); color: #f5f5f7; }
.section.dark-bg .lead, .section.dark-bg .eyebrow { color: #a1a1a6; }
.section.on-blue { background: radial-gradient(120% 90% at 20% 0%, #1a7cf0 0%, #0659ae 55%, #043f7d 100%); color: #fff; }
.section.on-blue .lead, .section.on-blue .eyebrow { color: rgba(255, 255, 255, 0.78); }

.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 7vw, 96px); }
.split.flip .copy { order: 2; }
.split .copy .lead { max-width: 480px; }
.split .art { display: flex; justify-content: center; align-items: flex-start; gap: 24px; }
.split .art .phone { --pw: clamp(220px, 28vw, 300px); }
.split .art.pair .phone { --pw: clamp(170px, 21vw, 240px); }
.split .art.pair .phone:nth-child(2) { margin-top: 56px; }

.points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; max-width: 480px; }
.points li { display: flex; gap: 12px; font-size: 17px; line-height: 1.35; }
.points li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.dark-bg .points li::before { background-color: #2997ff; }
.on-blue .points li::before { background-color: rgba(255, 255, 255, 0.22); }

.trio { margin-top: 64px; display: flex; justify-content: center; align-items: flex-start; gap: clamp(14px, 3vw, 40px); }
.trio .phone { --pw: clamp(100px, 24vw, 260px); }
.trio .phone:nth-child(2) { margin-top: 48px; }

/* ---------- Dynamic Island ---------- */
.island-section { background: radial-gradient(90% 70% at 50% 0%, #1c1c24 0%, #000 70%); color: #f5f5f7; text-align: center; }
.island-stage { margin: 64px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 980px; align-items: stretch; }
.mock {
  position: relative; border-radius: 28px; padding: 22px 18px 20px; min-height: 250px; overflow: hidden;
  background: linear-gradient(160deg, #26324f 0%, #3a2a55 50%, #12131c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; align-items: center;
}
.mock small { margin-top: auto; padding-top: 18px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.island {
  background: #000; color: #fff; border-radius: 22px; margin-top: 2px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px; height: 36px; width: 128px; font-variant-numeric: tabular-nums;
}
.island .dot { width: 12px; height: 12px; border-radius: 50%; background: #34c759; flex: none; }
.island .t { font-weight: 600; font-size: 14px; color: #34c759; letter-spacing: 0; }
.island.minimal { width: 36px; padding: 0; justify-content: center; }
.island.big {
  width: min(100%, 300px); height: auto; border-radius: 34px; padding: 18px 20px 20px; display: block; text-align: left; margin-top: 2px;
}
.island.big .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.island.big .topic { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.island.big .topic i { width: 10px; height: 10px; border-radius: 50%; background: #34c759; display: block; }
.island.big .state { font-size: 11px; letter-spacing: 0.08em; font-weight: 700; color: #34c759; }
.island.big .time { font-size: 46px; font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; margin: 8px 0 12px; }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.bar span { display: block; height: 100%; width: 91%; border-radius: 3px; background: #34c759; }
.island.big .goal { margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, 0.62); display: flex; justify-content: space-between; }
.lock {
  width: min(100%, 300px); border-radius: 22px; padding: 14px 16px 16px; margin-top: 8px; text-align: left;
  background: rgba(255, 255, 255, 0.16); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.lock .row { display: flex; align-items: center; justify-content: space-between; }
.lock .topic { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.lock .topic i { width: 10px; height: 10px; border-radius: 50%; background: #34c759; display: block; }
.lock .time { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lock .bar { margin-top: 12px; }
.lock .goal { margin-top: 7px; font-size: 11.5px; color: rgba(255, 255, 255, 0.68); }
.mock-time { font-variant-numeric: tabular-nums; }
.note { margin: 36px auto 0; max-width: 620px; font-size: 14px; color: #86868b; }
.note b { color: #d2d2d7; font-weight: 600; }

/* ---------- iPhone Duo ---------- */
.fold-switch { display: inline-flex; margin-top: 32px; padding: 3px; border-radius: 980px; background: #e8e8ed; }
.fold-switch button { font: 500 14px/1 var(--font); letter-spacing: -0.01em; color: #424245; background: transparent; border: 0; border-radius: 980px; padding: 10px 22px; cursor: pointer; transition: background .25s ease, color .25s ease; }
.fold-switch button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14); }
.duo-stage { margin-top: 40px; display: grid; justify-items: center; align-items: center; }
.duo { grid-area: 1 / 1; margin: 0; transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.duo-open { width: min(540px, 100%); }
.duo-folded { width: min(300px, 72%); }
.duo-body {
  padding: 10px; border-radius: 40px;
  background: linear-gradient(150deg, #3a3a3d, #0c0c0e 55%, #2a2a2d);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 40px 80px -16px rgba(0, 0, 0, 0.32), 0 20px 40px -20px rgba(0, 0, 0, 0.3);
}
.duo-body img { width: 100%; height: auto; aspect-ratio: 1252 / 1780; border-radius: 31px; background: #111; }
.duo-folded .duo-body { border-radius: 38px; padding: 9px; }
.duo-folded .duo-body img { aspect-ratio: 932 / 1356; border-radius: 30px; }
.duo figcaption { margin-top: 22px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; transition: opacity .5s ease; }
.duo figcaption span { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--muted); }
.duo-stage[data-state="open"] .duo-folded { opacity: 0; transform: scale(0.8); pointer-events: none; }
.duo-stage[data-state="folded"] .duo-open { opacity: 0; transform: scale(0.94); pointer-events: none; }
.duo-facts { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.duo-facts li { padding: 8px 12px; }
.duo-facts strong { display: block; font-size: 21px; letter-spacing: -0.02em; font-weight: 700; }
.duo-facts span { color: var(--muted); font-size: 15px; }

/* ---------- Privacy ---------- */
.privacy-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #1c1c1e; border-radius: 22px; padding: 28px 26px 30px; }
.card h3 { color: #f5f5f7; margin-bottom: 8px; }
.card p { margin: 0; color: #a1a1a6; font-size: 17px; line-height: 1.4; }
.light-cards .card { background: #fff; }
.light-cards .card h3 { color: var(--ink); }
.light-cards .card p { color: var(--muted); }
.card .num { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--blue); margin-bottom: 14px; }

/* ---------- Install ---------- */
.install-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.install-grid ol { margin: 14px 0 0; padding-left: 20px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.install-grid li { margin-bottom: 4px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 48px auto 0; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-size: 21px; font-weight: 600; letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 28px; font-weight: 300; color: var(--muted); transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 20px; color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 640px; }

/* ---------- Support / CTA / footer ---------- */
.support { text-align: center; }
.support .cta-row { margin-top: 28px; }
.btn-warm { background: #ff5e5b; }
.btn-warm:hover { background: #ff7370; }
.btn-line { background: transparent; color: var(--link); box-shadow: 0 0 0 1px var(--link) inset; }
.btn-line:hover { background: rgba(0, 113, 227, 0.08); }
.final { text-align: center; }
.final .cta-row { margin-top: 32px; }
.footer { background: var(--gray); padding: 28px 0 40px; font-size: 12px; color: var(--muted); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; }
.footer a { color: #424245; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; }
.reveal.d2 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .split { grid-template-columns: 1fr; text-align: center; }
  .split.flip .copy { order: 0; }
  .split .copy .lead, .points { margin-left: auto; margin-right: auto; text-align: left; }
  .points { max-width: 440px; }
  .island-stage, .privacy-grid, .install-grid, .duo-facts { grid-template-columns: 1fr; }
  .island-stage { max-width: 380px; }
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .trio .phone:nth-child(2) { margin-top: 24px; }
}
@media (max-width: 520px) {
  .wrap { width: calc(100% - 36px); }
  .hero { padding-top: 48px; }
  .split .art.pair { gap: 12px; }
  .faq summary { font-size: 18px; }
}
