/* Glossa — paper white, ink, the app's highlighter yellow and violet→pink accent.
   Headlines in New York (Apple's serif, like a book page); everything else in SF Pro. */
:root {
  --paper: #fafafc; --ink: #1c1b22; --ink-2: #4a4855; --ink-3: #6b6977; --rule: #e6e4ec; --line: #dcdae4;
  --violet: #7b5cff; --violet-ink: #5b3fe0; --pink: #ff6fb1; --yellow: #ffdb3d;
  --accent: linear-gradient(135deg, var(--violet), var(--pink));
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(28,27,34,.06), 0 24px 60px rgba(28,27,34,.10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.glow { display: none; }
a { color: var(--violet-ink); text-underline-offset: 3px; }
a:hover { color: #3f27b8; }
:focus-visible { outline: 3px solid rgba(123,92,255,.45); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap.wide { max-width: 1208px; }

/* nav */
nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 18px; }
.brand img { border-radius: 7px; }
.links { display: flex; align-items: center; gap: 24px; }
.links a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.links a:hover { color: var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 16px/1 var(--sans); text-decoration: none; border: 0; cursor: pointer; }
.btn.primary { color: #fff; background: var(--accent); box-shadow: 0 6px 18px rgba(123,92,255,.28); }
.btn.primary:hover { color: #fff; filter: brightness(1.05); }
.btn.ghost { color: var(--ink); background: #fff; border: 1px solid var(--line); }
.btn.ghost:hover { color: var(--ink); border-color: #c9c6d4; }
.btn.dark { color: #fff; background: var(--ink); }
.btn.dark:hover { color: #fff; background: #33313d; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.links .btn { color: #fff; }

/* hero: the headline, and a page with a highlight and its answer */
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding: 56px 0 72px; }
.hero-text { flex: 1 1 420px; min-width: 0; }
h1 { font: 600 clamp(48px, 7vw, 84px)/1.02 var(--serif); letter-spacing: -.02em; margin: 0; }
.hl { color: inherit; background: linear-gradient(rgba(255,219,61,.78), rgba(255,219,61,.78)) no-repeat 0 50% / 100% 76%; border-radius: 3px; padding: 0 .08em;
  animation: swipe .9s cubic-bezier(.3,.7,.2,1) .25s both; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl.late { animation-delay: 1s; }
@keyframes swipe { from { background-size: 0% 76%; } to { background-size: 100% 76%; } }
.lede { font-size: clamp(18px, 2vw, 20px); color: var(--ink-2); max-width: 30em; margin: 24px 0 32px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { color: var(--ink-3); font-size: 14px; margin: 16px 0 0; }

.mock { flex: 1 1 460px; min-width: 0; position: relative; margin: 0; padding: 8px 0 24px; }
/* a tall book page, with the next sheet peeking out behind it */
.page { position: relative; background: #fff; border-radius: 3px; box-shadow: var(--shadow); max-width: 400px; aspect-ratio: 5 / 7.4;
  padding: 36px 40px 30px; display: flex; flex-direction: column; }
.page::before { content: ""; position: absolute; inset: 6px -7px -6px 7px; z-index: -1; background: #f6f5f9; border-radius: 3px; box-shadow: 0 1px 2px rgba(28,27,34,.08); }
.runhead { display: flex; justify-content: space-between; font: italic 11px/1 var(--serif); color: #8a8896; letter-spacing: .02em; }
.page .body { flex: 1; overflow: hidden; margin-top: 22px; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.page p { font: 15px/1.7 var(--serif); color: #2a2933; margin: 0; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.page p + p { text-indent: 1.4em; }
.folio { text-align: center; font: 11px/1 var(--serif); color: #8a8896; margin-top: 14px; }
.answer { position: absolute; right: 0; top: 44%; width: min(330px, 78%); background: #fff; border: 1px solid #ebe9f1; border-radius: 14px;
  box-shadow: 0 18px 44px rgba(28,27,34,.14); padding: 16px 18px; animation: rise .5s ease-out 1.7s both; }
.answer-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--violet-ink); }
.spark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 7px; background: var(--accent); color: #fff; }
.answer p { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: #2a2933; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cite { display: inline-block; padding: 0 6px; border-radius: 6px; background: #efeaff; color: var(--violet-ink); font-size: .85em; font-weight: 600; white-space: nowrap; line-height: 1.6; }

/* videos */
.frame { position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: #f1f0f5; line-height: 0; aspect-ratio: 16 / 9; }
.frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
.frame.strip { aspect-ratio: auto; border-radius: 16px; box-shadow: none; margin-top: 40px; }
.frame.strip video { height: auto; object-fit: contain; }
.sound { position: absolute; left: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px;
  font: 600 15px/1 var(--sans); color: var(--ink); background: rgba(255,255,255,.92); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(28,27,34,.15); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sound:hover { background: #fff; }
.sound.right { left: auto; right: 16px; bottom: 16px; min-height: 40px; font-size: 14px; padding: 0 14px; }
dialog#demo-dialog { border: 0; padding: 0; border-radius: 16px; width: min(1100px, 94vw); background: #000; overflow: hidden; }
dialog#demo-dialog::backdrop { background: rgba(20,18,30,.6); backdrop-filter: blur(6px); }
dialog#demo-dialog video { width: 100%; display: block; }
dialog .close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); font-size: 15px; cursor: pointer; }

/* sections */
section { padding-top: 120px; }
h2 { font: 600 clamp(32px, 4vw, 44px)/1.1 var(--serif); letter-spacing: -.01em; margin: 0; max-width: 18em; }
h3 { font: 650 18px/1.3 var(--sans); margin: 0; }
p { margin: 0; }
.sub { margin-top: 16px; font-size: 18px; color: var(--ink-2); max-width: 34em; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.steps li { counter-increment: step; border-top: 1px solid var(--line); padding-top: 20px; }
.steps li::before { content: counter(step); display: block; font: 600 14px/1 var(--sans); color: var(--violet-ink); margin-bottom: 12px; }
.steps h3 { font-size: 20px; }
.steps p, .cols p { margin-top: 8px; font-size: 16px; color: var(--ink-2); }

.show { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.show + .show { padding-top: 96px; }
.show .text { flex: 1 1 320px; min-width: 0; max-width: 400px; }
.show h2 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; }
.show .text p { margin-top: 16px; font-size: 17px; color: var(--ink-2); }
.show picture { flex: 2 1 520px; min-width: 0; }
.show.flip .text { order: 2; }
.show .frame.clip { flex: 2 1 520px; min-width: 0; aspect-ratio: 1600 / 1056; border-radius: 14px; box-shadow: 0 0 0 1px rgba(28,27,34,.06), 0 24px 60px rgba(28,27,34,.12); }
.shot { width: 100%; height: auto; display: block; } /* screenshots carry their own canvas and window shadow */

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; margin-top: 40px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); column-gap: 48px; margin: 40px 0 0; }
.facts > div { border-top: 1px solid var(--rule); padding: 20px 0; }
.facts dt { font-weight: 650; }
.facts dd { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.promise { margin-top: 56px; font: clamp(22px, 2.6vw, 28px)/1.35 var(--serif); color: #2a2933; max-width: 26em; }

.narrow { max-width: 712px; margin: 0 auto; }
.faq { margin-top: 32px; }
.faq details { border-top: 1px solid var(--rule); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; 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-weight: 400; font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin-top: 10px; font-size: 16px; }

/* download + waitlist */
.panel { background: #fff; border: 1px solid #ebe9f1; border-radius: 24px; padding: clamp(28px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.panel-dl, .panel-form { flex: 1 1 340px; min-width: 0; }
.panel-dl img { border-radius: 16px; display: block; }
.panel-dl h2 { margin-top: 20px; }
.panel-dl p { margin: 12px 0 24px; font-size: 17px; color: var(--ink-2); max-width: 28em; }
.panel-form h3 { margin-bottom: 14px; }
#waitlist-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input, .field select { font: 16px var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 0 14px; appearance: none; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(123,92,255,.18); }
#waitlist-form button { justify-content: center; margin-top: 4px; }
#waitlist-form button:disabled { opacity: .6; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin-top: 14px; font-weight: 600; min-height: 1.6em; }
.status:empty { min-height: 0; margin: 0; }
.status[data-kind="ok"] { color: #1f7a45; }
.status[data-kind="error"] { color: #b4302a; }
.status[data-kind="busy"] { color: var(--ink-3); font-weight: 400; }
.panel-form .fine { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

footer { margin-top: 72px; padding: 28px 0 48px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.flinks { display: flex; gap: 20px; }
footer a { color: var(--ink-3); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* privacy / support pages */
.prose { max-width: 720px; margin: 0 auto; padding: 24px 24px; }
.prose h1 { font-size: 46px; margin-bottom: 24px; }
.prose h2 { font-size: 26px; margin: 44px 0 14px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--rule); }
.prose th { color: var(--ink); }
.prose code { background: #f0eef6; padding: 1px 6px; border-radius: 5px; font-size: 14px; }

/* beta page */
.beta-page .lead { font-size: 19px; color: var(--ink-2); margin: 0 0 22px; }
.beta-page .btn { margin-top: 4px; }
.install { padding-left: 22px; }
.install li { margin: 12px 0; padding-left: 6px; color: var(--ink-2); }
.install li::marker { color: var(--violet); font-weight: 700; }

@media (max-width: 860px) {
  section { padding-top: 88px; }
  .show + .show { padding-top: 72px; }
  .show, .hero { gap: 32px; }
  .show.flip .text { order: 0; }
  .links a:not(.btn) { display: none; }
  .hero { padding-top: 32px; }
}
@media (max-width: 560px) {
  .page { padding: 28px 26px 24px; aspect-ratio: auto; height: 400px; }
  .answer { position: relative; top: auto; width: auto; margin: -56px 12px 0; }
  .mock { padding-bottom: 0; }
  .sound { left: 12px; bottom: 12px; font-size: 13px; min-height: 40px; padding: 0 14px; }
  .sound.right { right: 10px; bottom: 10px; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .hl, .answer { animation: none; } html { scroll-behavior: auto; } }
