/* Lilac. White paper, luminous lilac, violet-black ink; San Francisco; type and air. See docs/BRAND.md. */
:root {
  --paper: #ffffff; --mist: #f7f6fb; --rule: #e8e7ef; --ink: #161325; --grey: #636073; --violet: #8355ce;
  --lilac: #bb96ee; --pink: #f3bee1; --rose: #de82b7; --lavender: #ddcffa; --solid: #161325; --on-solid: #ffffff; --bloomtext: #9874de;
  --tile: #f1ebfd; --tile2: #fcedf6; --edge: rgba(22, 19, 37, .08); --fall: rgba(22, 19, 37, .14);
  --deep: 0 2px 4px rgba(22, 19, 37, .08), 0 32px 56px -18px rgba(22, 19, 37, .32);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Inter, Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Inter, Roboto, sans-serif;
  --gutter: clamp(24px, 6vw, 72px);
  --width: 1120px;
  --open: cubic-bezier(.16, .84, .3, 1);
  /* Petals are translucent so they deepen where they overlap. On the dark paper translucency lets the
     dark through and turns them dusty, so there they are nearly opaque (as in the app). */
  --petal: .8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e0b19; --mist: #17142a; --rule: #262236; --ink: #f6f4fb; --grey: #a4a2b6; --violet: #ad87ed;
    --lilac: #c7a4f7; --rose: #e79ac6; --lavender: #3a2f5c; --solid: #f6f4fb; --on-solid: #0e0b19; --bloomtext: #b796f0;
    --tile: #1d1834; --tile2: #261b3c; --edge: rgba(255, 255, 255, .16); --fall: rgba(0, 0, 0, .5);
    --deep: 0 2px 4px rgba(0, 0, 0, .3), 0 32px 56px -18px rgba(0, 0, 0, .7);
    --petal: .95;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); overflow-x: hidden;
  font: 400 17px/1.5 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--lavender); }

.wrap { width: 100%; max-width: calc(var(--width) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.soft { color: var(--bloomtext); }

/* The bloom: four petals that open one after another, the way a lilac floret does. Every bloom on
   the page is the same drawing; only its size and when it opens change. */
.bloom { overflow: visible; display: block; }
.bloom .turn, .bloom .p, .bloom use, .bloom .eye { transform-box: view-box; transform-origin: 0 0; }
.bloom use { fill-opacity: var(--petal); animation: open 1.5s var(--open) both; animation-delay: calc(.12s + var(--i) * .12s); }
.bloom .p { transform: rotate(var(--r)); }
.bloom .eye { fill: #fff; animation: eye .6s ease-out .75s both; }
@keyframes open { from { transform: rotate(-60deg) scale(.1); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes eye { from { transform: scale(0); } to { transform: none; } }
/* A bloom further down waits until it is seen. */
.bloom.later use, .bloom.later .eye { animation-play-state: paused; }
.bloom.later.open use, .bloom.later.open .eye { animation-play-state: running; }

.top { display: flex; align-items: center; justify-content: space-between; height: 88px; }
/* The wordmark: the floret and lowercase "lilac", set tight. Hovered, the floret makes a slow quarter turn. */
.mark { display: inline-flex; align-items: center; gap: 8px; font: 600 18px/1 var(--display); letter-spacing: -0.02em; }
.mark svg { width: 22px; height: 22px; flex: none; }
.mark .turn { transition: transform 1.4s var(--open); }
.mark:hover .turn { transform: rotate(90deg); }
.nav { font: 500 14px/1 var(--sans); color: var(--grey); transition: color .2s; }
.nav:hover { color: var(--ink); }

/* The one line, in two tones: settled, then still settling. */
.hero { position: relative; padding-top: clamp(24px, 9vh, 140px); padding-bottom: clamp(56px, 9vh, 104px); }
h1 {
  font: 500 clamp(50px, 9.2vw, 116px)/0.98 var(--display); letter-spacing: -0.048em;
  max-width: 11em; text-wrap: balance;
}
h1 .soft { display: block; }
.hero > :not(.blossom) { position: relative; }
/* The hero's bloom opens as the page arrives, breathes slowly, and lets its petals go as you scroll on. */
.blossom { width: 88px; height: 88px; margin: 0 0 28px -4px; --k: 0; transform: rotate(calc(var(--k) * 50deg)); }
.blossom .p { transform: rotate(var(--r)) translateY(calc(var(--k) * -.7px)) rotate(calc(var(--k) * var(--spin))); opacity: calc(1 - var(--k) * 1.1); }
.blossom .eye { opacity: calc(1 - var(--k) * 2); }
.blossom .turn { animation: breathe 9s ease-in-out 2s infinite; }
@keyframes breathe { 50% { transform: rotate(5deg) scale(.965); } }
@media (min-width: 900px) {
  .blossom { position: absolute; right: calc(var(--gutter) + 4px); top: clamp(48px, 9vh, 112px); width: clamp(220px, 23vw, 300px); height: auto; aspect-ratio: 1; margin: 0; }
}
.lede { margin-top: clamp(24px, 3vw, 36px); max-width: 30em; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--grey); text-wrap: pretty; }

.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: clamp(32px, 4vw, 44px); }
.solid {
  display: inline-flex; align-items: center; height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--solid); color: var(--on-solid); font: 500 16px/1 var(--sans); letter-spacing: -0.01em;
  transition: opacity .2s;
}
.solid:hover { opacity: .86; }
.quiet { font: 500 16px/1 var(--sans); color: var(--ink); display: inline-flex; gap: 8px; align-items: center; }
.quiet span { color: var(--grey); transition: transform .2s; }
.quiet:hover span { transform: translateX(3px); }
.req { margin-top: 18px; font-size: 13px; color: var(--grey); letter-spacing: 0.01em; }

/* Captions, as the app sets them: a dot in the speaker's colour on the first line's cap height, the
   words, and once the sentence settles, the original under them. */
.cap { --dot: clamp(9px, .8vw, 11px); display: grid; grid-template-columns: var(--dot) 1fr; column-gap: var(--fg, clamp(14px, 1.6vw, 20px)); align-items: start; }
.cap > .dot { width: var(--dot); aspect-ratio: 1; border-radius: 50%; background: var(--sp, var(--rule)); margin-top: calc(var(--cs, clamp(26px, 3.5vw, 42px)) * .54 - var(--dot) / 2); }
.cap > div { min-width: 0; }
.cap[data-sp="0"] { --sp: var(--lilac); }
.cap[data-sp="1"] { --sp: var(--rose); }
.cap[data-sp="2"] { --sp: var(--violet); }
.cap .t { color: var(--violet); transition: color .45s ease-out; text-wrap: pretty; }
.cap.settled .t { color: var(--ink); }
.cap .s { color: var(--grey); }

/* The stage: the words themselves, no device. Always two captions deep and always the same height,
   so a new line rolls the others up without the page moving. */
.stage-in {
  position: relative; background: var(--mist); border-radius: 28px;
  padding: clamp(28px, 5vw, 64px);
  display: flex; flex-direction: column;
}
.pair { display: flex; align-items: center; gap: 10px; font: 500 13px/1 var(--sans); letter-spacing: 0.02em; color: var(--grey); }
.pair svg { width: 14px; height: 14px; color: var(--lilac); animation: listen 2.8s ease-in-out infinite; }
@keyframes listen { 0%, 100% { transform: scale(.84); } 50% { transform: scale(1) rotate(8deg); } }
.pair span { transition: opacity .4s ease-out; }
.pair span.swap { opacity: 0; }
.captions {
  margin-top: 28px; height: 380px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(22px, 2.6vw, 32px);
  /* Lines leave softly at the top. */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%); mask-image: linear-gradient(to bottom, transparent, #000 30%);
}
@media (min-width: 700px) { .captions { height: clamp(300px, 22vw, 330px); } }
.captions .cap { flex: none; }
.captions .cap.rising { transition: transform .7s cubic-bezier(.3, 0, .2, 1); }
.captions .cap > .dot { transition: opacity .4s ease-out; }
.captions .cap.waiting > .dot { opacity: 0; }
.captions .t { font: 400 clamp(26px, 3.5vw, 42px)/1.16 var(--display); letter-spacing: -0.022em; }
/* Every word has its place from the start; it fades in there, so nothing reflows. */
.captions .t i { font-style: normal; opacity: 0; transition: opacity .18s ease-out; }
.captions .t i.on { opacity: 1; }
.captions .settled .t i { opacity: 1; }
.captions .s { margin-top: 8px; font-size: 15px; line-height: 1.45; }
.captions .s i { font-style: normal; opacity: 0; transition: opacity .18s ease-out; }
.captions .s i.on, .captions .settled .s i { opacity: 1; }

/* Three small notes on what the stage is showing. */
.legend { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 24px; padding: 0 clamp(4px, 1vw, 12px); font-size: 15px; color: var(--grey); }
.legend li { display: flex; align-items: center; gap: 12px; }
.cue { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 34px; height: 22px; }
.cue i { width: 9px; height: 9px; border-radius: 50%; }
.cue.voices { gap: 6px; }
.settle b { font: 500 15px/1 var(--display); letter-spacing: -0.02em; color: var(--violet); }
.settle b + b { color: var(--ink); }
.mean { font: 500 30px/1 var(--display); color: var(--lilac); padding-top: 12px; }

/* Privacy, said once and plainly, in a room of its own: a petal-tinted panel, centred, with the three
   promises side by side. */
.private { padding-top: clamp(112px, 14vw, 184px); }
.private-in {
  background: var(--tile); border-radius: 32px; padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 88px);
  display: grid; gap: clamp(44px, 5vw, 64px); justify-items: center; text-align: center;
}
.private h2 { margin: 0 auto; }
.private p { margin: 20px auto 0; max-width: 28em; font-size: clamp(17px, 1.5vw, 19px); color: var(--grey); text-wrap: pretty; }
.facts { display: grid; gap: 32px; width: 100%; max-width: 920px; }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts li { display: grid; justify-items: center; gap: 14px; }
.facts svg { width: 48px; height: 48px; padding: 11px; border-radius: 16px; background: var(--paper); fill: none; stroke: var(--violet); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.facts b { display: block; font: 500 17px/1.3 var(--display); letter-spacing: -0.01em; }
.facts span { display: block; margin-top: 4px; font-size: 15px; color: var(--grey); max-width: 16em; }

h2 { font: 500 clamp(34px, 4.8vw, 58px)/1.04 var(--display); letter-spacing: -0.038em; max-width: 13em; text-wrap: balance; }
h2 .soft { display: block; }

/* The two apps on real hardware: Apple's own bezels around real screenshots of the build
   (scripts/site-scene.mjs). The Mac on a call, large, the way Darkroom shows its Mac; the iPhone on
   a petal-tinted tile beside what it does. */
.calls, .table { padding-top: clamp(112px, 14vw, 184px); }
.intro p { margin-top: 20px; max-width: 30em; font-size: clamp(17px, 1.5vw, 19px); color: var(--grey); text-wrap: pretty; }
.calls .intro { display: grid; gap: 0 clamp(40px, 6vw, 96px); }
@media (min-width: 900px) { .calls .intro { grid-template-columns: 1fr 1fr; align-items: end; } .calls .intro p { margin-top: 0; } }
.macbook { margin: clamp(40px, 5vw, 72px) auto 0; position: relative; isolation: isolate; max-width: 1080px; }
.macbook img, .table img { display: block; width: 100%; height: auto; }
/* A soft shadow where the Mac meets the page. */
.macbook::after {
  content: ""; position: absolute; z-index: -1; left: 6%; right: 6%; bottom: -1.2%; height: 5%;
  background: radial-gradient(closest-side, var(--fall), transparent); filter: blur(6px);
}
/* On a phone the Mac runs past the edges, so the call and its captions stay large enough to read. */
@media (max-width: 700px) {
  .calls { overflow-x: clip; }
  .macbook { width: 140%; max-width: none; margin-left: -20%; }
}
.table { display: grid; gap: clamp(40px, 5vw, 64px); align-items: center; }
@media (min-width: 860px) { .table { grid-template-columns: 1fr 1fr; } }
.art { position: relative; overflow: hidden; border-radius: 28px; background: var(--tile); aspect-ratio: 1 / 1.04; }
.art img {
  position: absolute; inset: 0; margin: auto; height: 90%; width: auto;
  filter: drop-shadow(0 30px 40px var(--fall));
}

/* Every language, in its own script, as a wall of words: the names are the headline. One at a time
   turns violet and settles back, the way a heard word does. */
.langs { padding-top: clamp(112px, 14vw, 184px); text-align: center; }
.eyebrow { font: 500 15px/1.4 var(--sans); letter-spacing: 0.01em; color: var(--grey); text-wrap: balance; }
.list {
  margin: clamp(24px, 3vw, 36px) auto 0; max-width: 18em;
  font: 500 clamp(30px, 5vw, 64px)/1.18 var(--display); letter-spacing: -0.035em; text-wrap: balance;
}
.list span { display: inline-block; white-space: nowrap; margin: 0 .18em; color: var(--ink); transition: color .9s ease-out; }
.list span:nth-child(3n + 2) { color: var(--grey); }
.list span.heard { color: var(--violet); transition-duration: .3s; }

.end { padding-top: clamp(112px, 14vw, 200px); padding-bottom: clamp(96px, 12vw, 160px); }
.end .bloom { width: 56px; height: 56px; margin-bottom: 28px; }
.mission { margin-top: 20px; max-width: 30em; font-size: clamp(17px, 1.5vw, 19px); color: var(--grey); text-wrap: pretty; }
.end .ctas { margin-top: 36px; }

footer { border-top: 1px solid var(--rule); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding-top: 28px; padding-bottom: 40px; font-size: 13px; color: var(--grey); }
footer .mark { color: var(--ink); margin-right: auto; font-size: 16px; }
footer a:hover { color: var(--ink); }

/* Small pages: privacy, iPhone. */
.page { padding-top: clamp(56px, 10vh, 120px); padding-bottom: clamp(80px, 12vh, 140px); max-width: calc(720px + var(--gutter) * 2); }
.page h1 { font-size: clamp(40px, 6vw, 68px); }
.page h1 .soft { display: inline; }
.page h2 { font-size: clamp(22px, 2.4vw, 26px); letter-spacing: -0.02em; margin-top: 48px; }
.page p { margin-top: 16px; color: var(--grey); }
.page p strong { color: var(--ink); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  .bloom use, .bloom .eye, .blossom .turn, .pair svg { animation: none; }
  .blossom, .blossom .p { --k: 0 !important; }
  .mark .turn, .cap .t, .captions .cap { transition: none; }
  .captions .t i { opacity: 1; }
}
