/* Interval website. One stylesheet for every page. */

@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --brand: #1789b2;          /* logo and graphics (3:1+), not small text */
  --brand-strong: #0f7aa0;   /* buttons: white text on it is 4.9:1 */
  --brand-hover: #0c6585;
  --link: #0f6e91;           /* small text on white: 5.7:1 */
  --ink: #0b4a61;            /* text on tints */
  --bg: #fbfdfe;
  --surface: #f0f6f9;
  --tint: #e8f4f9;
  --tint-strong: #d3eaf3;
  --text: #13232b;
  --muted: #4b5d66;
  --line: #dbe7ec;
  --warm: #f2b8c6;
  --warm-ink: #7d5260;
  --overdue: #c2483f;
  --overdue-tint: #fbe7e5;
  --on-brand: #ffffff;
  --phone: #11191d;
  --glow: rgba(23, 137, 178, 0.22);
  --radius: 22px;
  --font-head: "Figtree", "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Roboto", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4fb8de;
    --brand-strong: #6cc7e8;
    --brand-hover: #8fd5ee;
    --link: #7fcdeb;
    --ink: #bfe6f5;
    --bg: #0d1316;
    --surface: #152024;
    --tint: #102e3a;
    --tint-strong: #17414f;
    --text: #e3eef2;
    --muted: #a5b6bd;
    --line: #22343b;
    --warm: #efb8c8;
    --warm-ink: #f3c9d5;
    --overdue: #f2a39c;
    --overdue-tint: #3a1f1d;
    --on-brand: #062a38;
    --phone: #050809;
    --glow: rgba(79, 184, 222, 0.18);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

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

.icon { width: 1.5rem; height: 1.5rem; fill: currentColor; flex: none; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--brand-strong); color: var(--on-brand);
  padding: 0.6rem 1rem; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); text-decoration: none; font: 750 1.3rem var(--font-head); letter-spacing: -0.01em; }
.brand svg { width: 34px; height: 34px; }
.brand .mark { fill: var(--brand); }

.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 0.45rem 0.8rem; border-radius: 999px; }
.nav a:hover { color: var(--text); background: var(--surface); }
@media (max-width: 640px) { .nav .nav-hide { display: none; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.75rem 1.4rem;
  border-radius: 999px; border: 0;
  font: 650 1rem var(--font-head); text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--brand-strong); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-tonal { background: var(--tint); color: var(--ink); }
.btn-tonal:hover { background: var(--tint-strong); }
.btn:active { transform: scale(0.97); }
.btn-small { min-height: 40px; padding: 0.4rem 1rem; font-size: 0.95rem; }

.play-badge { display: inline-block; border-radius: 12px; }
/* The official badge has transparent padding built in; this keeps its visible part ~60px tall. */
.play-badge img { height: 82px; width: auto; margin: -11px -10px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.2rem; }
.fine { color: var(--muted); font-size: 0.95rem; }
.cta-row + .fine { margin-top: 1.1rem; }

/* ---------- Hero ---------- */

.hero { position: relative; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: -120px 0 auto;
  height: 720px;
  background:
    radial-gradient(40% 45% at 22% 30%, var(--glow), transparent 70%),
    radial-gradient(35% 40% at 80% 20%, color-mix(in srgb, var(--warm) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } }

.eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--tint); color: var(--ink); font: 600 0.9rem var(--font-head); padding: 0.35rem 0.85rem; border-radius: 999px; margin-bottom: 1.25rem; }
.eyebrow .icon { width: 1.1rem; height: 1.1rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 34em; margin-bottom: 1.8rem; }
.hero h1 .soft { color: var(--brand); }

/* ---------- Phone mockup (live HTML, not a screenshot) ---------- */

.phone {
  width: min(340px, 100%); margin-inline: auto;
  background: var(--phone); border-radius: 44px; padding: 12px;
  box-shadow: 0 30px 60px -20px rgba(11, 74, 97, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.screen { background: var(--bg); border-radius: 34px; overflow: hidden; padding: 1.1rem 1rem 1.3rem; position: relative; }
.screen-top { display: flex; align-items: center; justify-content: space-between; margin: 0.4rem 0.3rem 1rem; }
.screen-title { font: 750 1.55rem var(--font-head); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--warm); color: var(--warm-ink); display: grid; place-items: center; font: 700 0.95rem var(--font-head); }
@media (prefers-color-scheme: dark) { .avatar { color: #4a2531; } }
.screen-label { font: 650 0.8rem var(--font-head); color: var(--muted); margin: 0.9rem 0.4rem 0.45rem; }

.task { display: flex; align-items: center; gap: 0.75rem; background: var(--surface); border-radius: 18px; padding: 0.7rem 0.8rem; margin-bottom: 0.5rem; }
.task-check {
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  border: 2px solid var(--brand); background: transparent; padding: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--on-brand);
  transition: background-color 0.2s;
}
.task-check svg { width: 18px; height: 18px; fill: currentColor; opacity: 0; transform: scale(0.4); transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.task-check[aria-pressed="true"] { background: var(--brand-strong); border-color: var(--brand-strong); }
.task-check[aria-pressed="true"] svg { opacity: 1; transform: scale(1); }
.task-body { flex: 1; min-width: 0; line-height: 1.3; }
.task-name { font: 600 1rem/1.3 var(--font-head); display: block; transition: color 0.2s; }
.task-meta { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
.task-meta .icon { width: 0.95rem; height: 0.95rem; }
.task.done .task-name { color: var(--muted); text-decoration: line-through; }
.task.overdue { background: var(--overdue-tint); }
.task.done .still-on { visibility: hidden; }
.task.overdue .task-check { border-color: var(--overdue); }
.task.overdue .task-meta { color: var(--overdue); }
.still-on { margin-left: auto; flex: none; font: 650 0.75rem var(--font-head); color: var(--overdue); border: 1.5px solid currentColor; border-radius: 999px; padding: 0.15rem 0.55rem; }
.fab { display: flex; justify-content: flex-end; margin-top: 0.9rem; }
.fab span { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--tint-strong); color: var(--ink); font: 650 0.9rem var(--font-head); padding: 0.7rem 1rem; border-radius: 18px; }
.phone-caption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); font-size: 1.15rem; }
.tonal { background: var(--surface); border-radius: clamp(24px, 4vw, 40px); }
.panel { padding: clamp(1.5rem, 5vw, 3.5rem); }
.panel .section-head:last-child, #privacy .section-head { margin-bottom: 0; }
.after-promise { margin: 2rem 0 0; }

/* Just type it */
.type-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 880px) { .type-demo { grid-template-columns: 1fr; } }
.type-box { background: var(--bg); border-radius: var(--radius); padding: 1.25rem; }
.type-input { display: flex; align-items: center; gap: 0.6rem; background: var(--tint); color: var(--ink); border-radius: 999px; padding: 0.8rem 1.1rem; font: 600 1.05rem var(--font-head); min-height: 54px; }
.type-input .caret { width: 2px; height: 1.2em; background: currentColor; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.parsed { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.9rem; min-height: 2.2rem; }
.chip { display: inline-flex; align-items: center; gap: 0.3rem; background: var(--surface); color: var(--text); border-radius: 999px; padding: 0.3rem 0.75rem; font-size: 0.9rem; }
.chip .icon { width: 1rem; height: 1rem; color: var(--brand); }
.examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.examples li { background: var(--bg); border-radius: 18px; padding: 0.8rem 1rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; }
.examples q { font: 600 1rem var(--font-head); quotes: "\201C" "\201D"; }
.examples span { color: var(--muted); font-size: 0.92rem; }
.tokens { margin-top: 1.25rem; color: var(--muted); font-size: 0.95rem; }
.tokens code { font: 600 0.9rem var(--font-head); background: var(--bg); color: var(--ink); padding: 0.1rem 0.45rem; border-radius: 6px; }

/* Feature cards */
/* Nine cards: 3 x 3 on wide screens, so no card is left alone on a row. */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; }
.card .icon-wrap { width: 48px; height: 48px; border-radius: 16px; background: var(--tint); color: var(--brand); display: grid; place-items: center; margin-bottom: 1rem; }
.card p { color: var(--muted); margin: 0; }

/* Personas */
.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 880px) { .personas { grid-template-columns: 1fr; } }
.persona h3 { margin-bottom: 0.9rem; }
.notif { background: var(--bg); border-radius: 20px; padding: 0.9rem 1rem; display: grid; grid-template-columns: 30px 1fr; gap: 0.15rem 0.75rem; box-shadow: 0 6px 18px -10px rgba(11, 74, 97, 0.35); }
.notif-icon { grid-row: span 3; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; }
.notif-icon svg { width: 18px; height: 18px; fill: #fff; }
.notif-app { font-size: 0.78rem; color: var(--muted); }
.notif-title { font-weight: 600; line-height: 1.3; }
.notif-text { color: var(--muted); font-size: 0.93rem; line-height: 1.4; }

/* Privacy band */
.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2rem; }
.promise div { display: flex; gap: 0.75rem; align-items: flex-start; }
.promise .icon { color: var(--brand); margin-top: 0.1rem; }
.promise p { margin: 0; }

/* FAQ */
.faq { display: grid; gap: 0.6rem; }
.faq details { background: var(--surface); border-radius: 20px; padding: 0 1.25rem; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 0; font: 650 1.08rem var(--font-head); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--brand); transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1.1rem; margin: 0; }

/* Final call to action */
.final { text-align: center; background: var(--tint); color: var(--ink); border-radius: clamp(24px, 4vw, 40px); padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; }
.final p { font-size: 1.15rem; }
.final .cta-row { justify-content: center; margin-top: 1.5rem; }

/* ---------- Footer ---------- */

.site-footer { margin-top: clamp(3rem, 8vw, 5rem); padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.trademark { flex-basis: 100%; font-size: 0.85rem; margin: 0; }

/* ---------- Legal pages ---------- */

.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 1rem; }
.doc h1 { font-size: clamp(2.1rem, 5vw, 3rem); }
.doc h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.doc h3 { margin-top: 1.6rem; }
.doc ul { padding-left: 1.3rem; }
.doc li { margin-bottom: 0.4rem; }
.updated { color: var(--muted); }
.summary { background: var(--tint); color: var(--ink); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 1.5rem 0 2rem; }
.summary h2 { margin-top: 0; font-size: 1.2rem; }
.summary p:last-child, .summary ul:last-child { margin-bottom: 0; }
.toc { background: var(--surface); border-radius: var(--radius); padding: 1.2rem 1.6rem; margin-bottom: 1rem; }
.toc ol { margin: 0.5rem 0 0; padding-left: 1.3rem; columns: 2 16rem; }
.table-wrap { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); }
.doc th { font-family: var(--font-head); }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: 0.9rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -0.1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--tint); color: var(--ink); display: grid; place-items: center; font: 700 0.95rem var(--font-head); }

/* ---------- Motion ---------- */

/* site.js staggers siblings ~70ms apart, like the app's sign-in screen. */
.js [data-rise] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.js [data-rise].in { opacity: 1; transform: none; }
.hero .logo-pop { animation: pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } }

.confetti { position: fixed; z-index: 50; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-rise] { opacity: 1; transform: none; transition: none; }
  .hero .logo-pop, .type-input .caret { animation: none; }
}
