/* Whense — whense.app. The app's own language: ink on paper, colour only for timing.
   System fonts only (no web-font requests) and no scripts: the site keeps the app's privacy promise.
   Editorial serif for headlines comes from the OS (New York on Apple devices, Georgia elsewhere). */

:root {
  --paper: #F4F3F1;
  --paper-2: #ECEAE6;
  --card: #FFFFFF;
  --ink: #17181A;
  --ink-2: #4A4B4E;
  --ink-3: #6B6C70;
  --rule: #E4E2DE;
  --late: #9E2419;
  --late-bg: #FBEBE9;
  --soon: #7A5410;
  --soon-bg: #F7F1E4;
  --ok: #2E6A5E;
  --ok-bg: #EFF4F2;
  --bar-late: #B02A1F;
  --bar-soon: #A9762A;
  --bar-ok: #2E6A5E;
  --on-ink: #FFFFFF;
  --glass: rgba(255, 255, 255, 0.72);
  --panel-a: #EFE6E1;   /* soft tint behind phones */
  --panel-b: #E4ECE8;
  --panel-c: #EDE8DA;
  --radius: 22px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101312;
    --paper-2: #151917;
    --card: #191D1B;
    --ink: #ECEFEE;
    --ink-2: #B7BEBB;
    --ink-3: #99A19E;
    --rule: #272C2A;
    --late: #F09A9E;
    --late-bg: #2E1D1E;
    --soon: #E3BD7E;
    --soon-bg: #2B2519;
    --ok: #8CC7BF;
    --ok-bg: #18272A;
    --bar-late: #E07076;
    --bar-soon: #D2A052;
    --bar-ok: #58A9A2;
    --on-ink: #101312;
    --glass: rgba(25, 29, 27, 0.72);
    --panel-a: #211C1B;
    --panel-b: #17211E;
    --panel-c: #201F18;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 16px; }

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

/* ---- floating header ---- */

.site-header { position: sticky; top: 12px; z-index: 50; padding: 0 12px; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(1120px, 100%); padding: 8px 10px 8px 18px;
  background: var(--glass); border: 1px solid var(--rule); border-radius: 999px;
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: 0 8px 30px -18px rgba(0, 0, 0, 0.35);
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 600 22px/1 var(--serif); letter-spacing: -0.02em; }
.brand img { width: 26px; height: 26px; }
@media (prefers-color-scheme: dark) { .brand img, .mark-img { filter: invert(1) brightness(1.1); } }
.nav { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--ink-2); padding: 9px 14px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.nav .nav-hide { }
.nav a.pill-cta { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.nav a.pill-cta:hover { opacity: 0.9; background: var(--ink); }

.site-footer { border-top: 1px solid var(--rule); margin-top: 96px; padding: 32px 0 48px; color: var(--ink-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--ink-2); }
.foot-brand { font: 600 18px var(--serif); color: var(--ink); letter-spacing: -0.02em; }

/* ---- type ---- */

h1, h2, h3 { line-height: 1.06; margin: 0; font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(48px, 8vw, 92px); letter-spacing: -0.04em; }
h2 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.032em; }
h3 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.15; }
h1 em, h2 em { font-style: italic; color: var(--ink-3); }
.lede { font-size: clamp(18px, 2.1vw, 21px); color: var(--ink-2); max-width: 32em; margin: 22px 0 0; }
.eyebrow { font: 12px/1.3 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--late); margin: 0 0 16px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---- hero ---- */

.hero { padding: 56px 0 32px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px;
  background: var(--ink); color: var(--on-ink); border-radius: 999px; font-weight: 600; text-decoration: none;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.soon-badge {
  margin: 0; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule);
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.soon-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bar-soon); }
.privacy-line { display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0; font-size: 14px; color: var(--ink-3); }

.stage { position: relative; display: grid; place-items: center; padding: 28px 0; }
.stage::before {
  content: ""; position: absolute; inset: 4% 4%; border-radius: 48px;
  background: radial-gradient(120% 90% at 30% 10%, var(--panel-a), var(--panel-b) 70%);
}
.stage .phone { position: relative; z-index: 1; }
.float {
  position: absolute; z-index: 2; background: var(--card); border: 1px solid var(--rule); border-radius: 18px;
  padding: 12px 16px; box-shadow: 0 24px 44px -24px rgba(0, 0, 0, 0.45); font-size: 14px; line-height: 1.35;
}
.float b { display: block; font-size: 15px; }
.float span { color: var(--ink-3); }
.float.f1 { left: -2%; top: 18%; }
.float.f2 { right: -2%; bottom: 14%; }
.float .pill { margin-top: 6px; }

/* phone frame */
.phone {
  border-radius: 46px; overflow: hidden; background: #0d0e0f;
  padding: 9px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 40px 70px -34px rgba(0, 0, 0, 0.5);
  max-width: 300px; margin-inline: auto;
}
.phone img { width: 100%; border-radius: 37px; }
.hero .phone { max-width: 310px; }

/* ---- sections ---- */

section { padding: 96px 0 0; }
section.tight { padding-top: 56px; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p:not(.eyebrow) { color: var(--ink-2); margin: 16px 0 0; font-size: 19px; }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature.flip .copy { order: 2; }
.feature .copy p { color: var(--ink-2); margin: 18px 0 0; max-width: 30em; font-size: 18px; }
.feature .copy h2 { max-width: 12em; }
.panel {
  position: relative; border-radius: 40px; padding: 48px 24px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 0%, var(--panel-a), var(--panel-b) 75%);
}
.panel.b { background: radial-gradient(120% 90% at 80% 0%, var(--panel-c), var(--panel-b) 80%); }
.panel.c { background: radial-gradient(120% 90% at 50% 0%, var(--panel-b), var(--panel-a) 80%); }
.panel .phone { max-width: 270px; }

/* three steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--card); border: 1px solid var(--rule); border-radius: 32px; padding: 28px 28px 0; display: flex; flex-direction: column; overflow: hidden; }
.step .num { font: 12px var(--mono); letter-spacing: 0.14em; color: var(--late); text-transform: uppercase; margin-bottom: 14px; }
.step p { color: var(--ink-2); margin: 10px 0 24px; font-size: 16px; }
.step .shot { margin-top: auto; height: 300px; overflow: hidden; border-radius: 26px 26px 0 0; background: #0d0e0f; padding: 8px 8px 0; }
.step .shot img { border-radius: 20px 20px 0 0; }

/* drift demo */
.drift { max-width: 480px; }
.drift-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; background: var(--card); border-radius: 18px; padding: 16px 18px; margin-bottom: 12px; border: 1px solid var(--rule); }
.drift-row strong { font-size: 16px; }
.drift-row .note { grid-column: 1 / -1; font: 13px var(--mono); }
.bar { grid-column: 1 / -1; height: 5px; border-radius: 5px; background: var(--rule); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; transform-origin: left; }
.late .bar i { width: 100%; background: var(--bar-late); } .late .note { color: var(--late); }
.soon .bar i { width: 82%; background: var(--bar-soon); } .soon .note { color: var(--soon); }
.ok .bar i { width: 18%; background: var(--bar-ok); } .ok .note { color: var(--ink-3); }

/* notification */
.notif {
  background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--rule); border-radius: 24px; padding: 16px 18px; width: min(360px, 100%);
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.5); position: relative; z-index: 1;
}
.notif .top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.notif .top img { width: 20px; height: 20px; border-radius: 5px; background: var(--paper); padding: 2px; }
.notif .title { font-weight: 650; margin-top: 8px; }
.notif .body { color: var(--ink-2); font-size: 15px; }
.notif .actions { display: flex; gap: 22px; margin-top: 12px; font-size: 15px; font-weight: 600; }
.notif.n2 { margin-top: -6px; transform: scale(0.94); opacity: 0.6; }

/* what it isn't */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 28px; }
.card p { color: var(--ink-2); margin: 12px 0 0; font-size: 16px; }
.pill { display: inline-block; font: 13px var(--mono); padding: 5px 9px; border-radius: 8px; }
.pill.late { background: var(--late-bg); color: var(--late); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.soon { background: var(--soon-bg); color: var(--soon); }

/* rhythms chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.chips li { background: var(--card); border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; font-size: 15px; color: var(--ink-2); }

/* privacy band: always dark, like a closed drawer */
.privacy-band {
  --p-ink: #ECEFEE; --p-2: #B7BEBB;
  background: #141816; color: var(--p-ink); border-radius: 44px; padding: clamp(32px, 6vw, 72px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px 64px; align-items: start;
}
.privacy-band .eyebrow { color: #E3BD7E; }
.privacy-band h2 { color: var(--p-ink); }
.privacy-band .lede { color: var(--p-2); }
.privacy-band a { color: var(--p-ink); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.checks li { display: flex; gap: 14px; color: var(--p-2); padding: 18px 0; border-top: 1px solid #2a302d; font-size: 18px; }
.checks li:first-child { border-top: 0; padding-top: 0; }
.checks li::before { content: "✓"; color: #8CC7BF; font-weight: 700; }
.checks b { color: var(--p-ink); font-weight: 600; }

/* faq */
.faq { margin-top: 32px; }
.faq details { border-top: 1px solid var(--rule); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font: 500 22px/1.25 var(--serif); letter-spacing: -0.015em; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font: 300 28px/1 var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq details p, .faq details ul { color: var(--ink-2); margin: 12px 0 0; }

/* closing */
.closing { text-align: center; padding-top: 112px; }
.closing .lede { margin-inline: auto; }
.closing .cta-row { justify-content: center; }
.closing .mark { width: 56px; height: 56px; margin: 0 auto 26px; }
@media (prefers-color-scheme: dark) { .closing .mark { filter: invert(1) brightness(1.1); } }

/* ---- legal / support pages ---- */

.doc { padding: 56px 0 0; }
.doc h1 { font-size: clamp(40px, 6vw, 60px); }
.doc h2 { font-size: 28px; margin-top: 48px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 22px; }
.doc .updated { font: 13px var(--mono); color: var(--ink-3); margin-top: 14px; }
.doc .summary { background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 20px 22px; margin-top: 28px; }
.doc .summary p { margin: 0; color: var(--ink); }

/* ---- small screens ---- */

@media (max-width: 860px) {
  section { padding-top: 72px; }
  .hero { padding-top: 32px; }
  .hero .wrap, .feature { grid-template-columns: 1fr; gap: 36px; }
  .feature.flip .copy { order: 0; }
  .steps, .cards { grid-template-columns: 1fr; }
  .privacy-band { grid-template-columns: 1fr; border-radius: 32px; }
  .float.f1 { left: 0; } .float.f2 { right: 0; }
  .nav .nav-hide { display: none; }
}
@media (max-width: 420px) {
  .float { display: none; }
  .brand { font-size: 20px; }
  .nav a { padding: 8px 9px; font-size: 14px; }
  .site-header .wrap { padding-left: 14px; }
  .nav a.pill-cta { display: none; }
}

/* ---- motion: CSS only, respects reduced motion ---- */

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav a { transition: opacity 0.15s, color 0.15s, background 0.15s; }

  @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

  .hero .wrap > div:first-child > * { animation: rise 0.8s cubic-bezier(.2,.7,.2,1) both; }
  .hero .wrap > div:first-child > :nth-child(2) { animation-delay: 0.1s; }
  .hero .wrap > div:first-child > :nth-child(3) { animation-delay: 0.2s; }
  .hero .wrap > div:first-child > :nth-child(4) { animation-delay: 0.3s; }
  .stage { animation: rise 1s 0.15s cubic-bezier(.2,.7,.2,1) both; }
  .float.f1 { animation: bob 7s ease-in-out infinite; }
  .float.f2 { animation: bob 8s 1.5s ease-in-out infinite; }

  /* scroll-driven reveals where supported; elsewhere content simply shows */
  @supports (animation-timeline: view()) {
    .reveal, .step, .card, .drift-row, .panel, .faq details, .privacy-band {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%;
    }
    .bar i { animation: grow linear both; animation-timeline: view(); animation-range: entry 10% entry 80%; }
  }
}

/* answer-first definition under the hero (also read by search and AI assistants) */
.def { font: 400 clamp(22px, 3vw, 30px)/1.35 var(--serif); letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.def strong { font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- extra motion (all CSS, compositor-friendly, off for reduced-motion) ---- */

@property --n { syntax: "<integer>"; initial-value: 0; inherits: false; }
.late .num { --to: 9; } .soon .num { --to: 12; } .ok .num { --to: 3; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card, .step, .drift-row { transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s; }
  .card:hover, .step:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgba(0, 0, 0, 0.35); }
  .faq summary::after { transition: transform 0.2s; }
  .faq details[open] summary::after { transform: rotate(180deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .btn:active, .nav a:active, .soon-badge:active { transform: scale(0.97); }

  /* fade between pages instead of a hard cut; the header stays put */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }

  /* the numbers count up to their value as the demo scrolls into view: it's a "days since" site */
  @supports (animation-timeline: view()) {
    .num { font-size: 0; }
    .num::before {
      content: counter(n) " days" / ""; counter-reset: n var(--n); font-size: 16px;
      animation: count linear both; animation-timeline: view(); animation-range: entry 10% entry 90%;
    }
    @keyframes count { from { --n: 0; } to { --n: var(--to); } }
  }
}

/* a cropped screenshot (not a phone frame) inside a panel */
.wide-shot { width: min(100%, 460px); border-radius: 28px; box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.5); }
