/* Ada's site (README.md): every page is one frame, the way Ada's own apps
   are drawn: a glass rail on the left (pages, then "On this page"), a pearl
   page beside it, both over the Ceramic Waves wallpaper. On a phone the rail
   becomes a bar above the page with the pages as a row of pills.
   The CSP allows no inline styles: everything is a class here. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --pearl: #f8f6f2;
  --sunk: #ebe6de;
  --card: #ffffff;
  --ink: #1c1d1f;
  --ink-2: #4f5258;
  --ink-3: #6a6d73;
  --graphite: #1f2226;
  --graphite-ink: #b9bdc3;
  --mint: #83d9c8;
  --mint-ink: #146f5d;
  --mint-soft: #dff5ee;
  --glass: rgba(250, 248, 244, 0.64);
  --glass-edge: rgba(255, 255, 255, 0.62);
  --r-page: 28px;
  --r-card: 20px;
  --shadow-page: 0 30px 80px -40px rgba(40, 30, 20, 0.45);
  --shadow-shot: 0 22px 60px -30px rgba(30, 30, 30, 0.45);
  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: #d9d2c6;
  -webkit-font-smoothing: antialiased;
}
/* The wallpaper stays put while the page scrolls (a fixed layer, since
   background-attachment: fixed is ignored on phones). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #d9d2c6 url("/img/room-waves-2400.webp") center / cover no-repeat;
  background-image: image-set(url("/img/room-waves-2400.avif") type("image/avif"), url("/img/room-waves-2400.webp") type("image/webp"));
}
@media (max-width: 900px) {
  body::before { background-image: image-set(url("/img/room-waves-1280.avif") type("image/avif"), url("/img/room-waves-1280.webp") type("image/webp")); }
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--mint-ink); text-underline-offset: 3px; }
a:hover { color: #0c4f42; }
:focus-visible { outline: 2px solid var(--mint-ink); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; }
code { font-family: var(--mono); font-size: 0.92em; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--graphite); color: #fff; text-decoration: none; }
.skip:focus { top: 16px; }

/* --- The frame ---------------------------------------------------------- */

.frame {
  max-width: 1376px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 22px 14px 18px;
  border-radius: 24px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(1.25);
  backdrop-filter: blur(26px) saturate(1.25);
  border: 1px solid var(--glass-edge);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.rail::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 26px; height: 26px; }
.pages { display: flex; flex-direction: column; gap: 2px; }
.pages a { display: block; padding: 9px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: 15px; transition: background 0.15s ease, color 0.15s ease; }
.pages a:hover { background: rgba(31, 34, 38, 0.05); color: var(--ink); }
.pages a[aria-current="page"] { background: rgba(31, 34, 38, 0.08); color: var(--ink); font-weight: 600; }
.toc { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; font-size: 13.5px; }
.toc-title { font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.toc a { color: var(--ink-3); text-decoration: none; padding: 3px 0; }
.toc a:hover { color: var(--ink); }
.rail-foot { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.rail-foot .btn { width: 100%; }
.byline { padding: 0 12px; font-size: 12.5px; color: var(--ink-3); }
.byline a { color: var(--ink-3); }

.page {
  min-width: 0;
  border-radius: var(--r-page);
  background: var(--pearl);
  box-shadow: var(--shadow-page);
  padding: 56px 56px 40px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

@media (max-width: 900px) {
  .frame { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
  .rail { position: static; max-height: none; overflow: visible; padding: 12px; gap: 10px; border-radius: 20px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand { padding: 0 6px; }
  .rail-foot { margin: 0 0 0 auto; flex-direction: row; }
  .rail-foot .btn { width: auto; }
  .byline, .toc { display: none; }
  .pages { order: 3; flex-basis: 100%; flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
  .pages::-webkit-scrollbar { display: none; }
  .pages a { flex: none; padding: 8px 12px; font-size: 14px; }
  .page { padding: 32px 20px 28px; gap: 56px; border-radius: 22px; }
}

/* --- Type and buttons ------------------------------------------------------ */

.intro { display: flex; flex-direction: column; gap: 18px; max-width: 780px; }
.tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--mint-soft); color: #0c4f42; font-size: 13px; font-weight: 600; }
.display { font-size: clamp(40px, 2.2rem + 2.6vw, 66px); line-height: 1.02; letter-spacing: -0.032em; }
.display em { font-style: normal; color: var(--mint-ink); }
.lead { font-size: clamp(17px, 1rem + 0.3vw, 20px); color: var(--ink-2); max-width: 640px; }
.kicker { font-size: 14px; font-weight: 600; color: var(--mint-ink); }
.h2 { font-size: clamp(26px, 1.2rem + 1vw, 34px); }
.h3 { font-size: 20px; letter-spacing: -0.01em; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; color: var(--ink-3); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--graphite); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: #33373d; color: #fff; }
.btn:active { transform: scale(0.98); }
.btn-soft { background: var(--sunk); color: var(--ink); }
.btn-soft:hover { background: #e2dcd2; color: var(--ink); }
.btn-light { background: var(--pearl); color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--ink); }
.btn-ghost-dark { background: rgba(255, 255, 255, 0.1); color: #f6f3ee; }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 14px; height: 14px; }
.more-link { font-weight: 600; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* --- Pieces ---------------------------------------------------------------- */

.section { display: flex; flex-direction: column; gap: 22px; scroll-margin-top: 24px; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }

/* A film behind its poster; a click swaps in the player, with sound. */
.film { position: relative; overflow: hidden; border-radius: 22px; aspect-ratio: 16 / 9; background: #10171a; box-shadow: var(--shadow-shot); }
.film img, .film video { width: 100%; height: 100%; object-fit: cover; }
.film .play {
  position: absolute; left: 24px; bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 20px 0 16px; border: 0; border-radius: 999px;
  background: rgba(248, 246, 242, 0.9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.film .play:hover { background: #fff; }
.film .play:active { transform: scale(0.98); }
.film .play svg { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .film { border-radius: 16px; }
  .film .play { left: 12px; bottom: 12px; min-height: 38px; padding: 0 14px 0 12px; font-size: 13.5px; }
}

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tile { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: var(--r-card); background: var(--card); color: var(--ink); text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.tile:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 16px 40px -26px rgba(30, 30, 30, 0.4); }
.tile .thumb { flex: 0 0 96px; width: 96px; height: 72px; border-radius: 14px; object-fit: cover; }
.tile .thumb-code { display: flex; align-items: center; justify-content: center; background: var(--graphite); color: #9be8d6; font-family: var(--mono); font-size: 13px; }
.tile-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile-title { font-size: 17px; font-weight: 600; }
.tile-sub { font-size: 14px; color: var(--ink-3); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { padding: 22px; border-radius: var(--r-card); background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.card p { font-size: 15px; color: var(--ink-2); }
.card-sunk { background: var(--sunk); }
a.card { color: var(--ink); text-decoration: none; transition: background 0.15s ease; }
a.card:hover { color: var(--ink); background: #e2dcd2; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split-copy { display: flex; flex-direction: column; gap: 12px; }
.split-copy p { color: var(--ink-2); }
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .split.flip > :first-child { order: 0; }
}

.shot { overflow: hidden; border-radius: 22px; box-shadow: var(--shadow-shot); background: var(--card); }
.shot img, .shot video { width: 100%; }

/* A piece of Ada (a pill, a card, a widget) shown on one of her wallpapers. */
.stage {
  display: flex; align-items: center; justify-content: center;
  min-height: 300px; padding: 40px; border-radius: 22px;
  background: #1b2a2f url("/img/panes-1600.webp") center 62% / cover no-repeat;
  background-image: image-set(url("/img/panes-1600.avif") type("image/avif"), url("/img/panes-1600.webp") type("image/webp"));
}
.stage-light { background: #e9e2d6 url("/img/room-waves-1280.webp") center / cover no-repeat; background-image: image-set(url("/img/room-waves-1280.avif") type("image/avif"), url("/img/room-waves-1280.webp") type("image/webp")); }
.stage img { box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55); }
.stage .pill { width: min(100%, 620px); border-radius: 999px; }
.stage .card-img { width: min(100%, 560px); border-radius: 18px; }
.stage .widget { width: min(78%, 420px); border-radius: 24px; }

.facts { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.facts li { padding: 20px 22px; border-radius: var(--r-card); background: var(--card); display: flex; flex-direction: column; gap: 6px; }
.facts h3 { font-size: 17px; letter-spacing: -0.01em; }
.facts p { font-size: 15px; color: var(--ink-2); }
.ticks { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; color: var(--ink-2); }
.ticks li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 999px; background: var(--mint-ink); transform: translateY(-2px); }

.dark { border-radius: 22px; background: var(--graphite); color: #f6f3ee; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.dark .muted, .dark p { color: var(--graphite-ink); }
.dark-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.license { font-size: 13px; font-weight: 600; color: #9be8d6; }
.code { display: block; overflow-x: auto; white-space: nowrap; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); color: #d7f5ec; font-family: var(--mono); font-size: 15px; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.cols3 h3 { font-size: 20px; margin-bottom: 6px; color: #fff; }

.strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; border-radius: 22px; background: var(--sunk); }
.strip-text { display: flex; flex-direction: column; gap: 3px; }
a.strip { color: var(--ink); text-decoration: none; transition: background 0.15s ease; }
a.strip:hover { color: var(--ink); background: #e2dcd2; }
a.strip .more-link { font-size: 22px; color: var(--mint-ink); }

figure { margin: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.gallery figcaption { padding: 12px 16px 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.card code.small { align-self: flex-start; padding: 3px 8px; border-radius: 8px; background: var(--sunk); color: var(--ink-2); }
.card-sunk code.small { background: rgba(255, 255, 255, 0.6); }

/* A muted loop, with its own pause button (shown once the script runs). */
.loop-wrap { position: relative; }
.vid-toggle { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border: 0; border-radius: 999px; background: rgba(20, 22, 26, 0.55); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.vid-toggle[hidden] { display: none; }
.vid-toggle svg { width: 16px; height: 16px; }
.vid-toggle .i-play, .vid-toggle.paused .i-pause { display: none; }
.vid-toggle.paused .i-play { display: block; }

/* --- Get Ada ------------------------------------------------------------- */

.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.way { padding: 28px; border-radius: 24px; background: var(--card); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px -34px rgba(30, 30, 30, 0.4); }
.way .h3 { font-size: 24px; letter-spacing: -0.02em; }
.way p { font-size: 15.5px; color: var(--ink-2); }
.way .file { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--ink-3); }
.way-label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.way-label.best { color: var(--mint-ink); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 15.5px; }
.sums { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.sums b { font-weight: 600; color: var(--ink); }

/* The waitlist form and the card it turns into. */
.join { width: 100%; max-width: 560px; }
.field { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 18px; border-radius: 999px; background: var(--card); box-shadow: 0 12px 34px -22px rgba(30, 30, 30, 0.45); border: 1px solid rgba(31, 34, 38, 0.08); }
.field:focus-within { border-color: rgba(20, 111, 93, 0.5); }
.field input[type="email"] { flex: 1 1 auto; min-width: 0; height: 44px; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.field input::placeholder { color: var(--ink-3); }
.field .btn { flex: none; }
.field.invalid { animation: nudge 0.32s ease; border-color: #c0573f; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.status { min-height: 22px; margin-top: 8px; padding: 0 18px; font-size: 14px; color: #a2432e; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
@media (max-width: 520px) {
  .field { flex-direction: column; align-items: stretch; padding: 8px; border-radius: 22px; }
  .field input[type="email"] { padding: 0 10px; }
}

.joined { max-width: 560px; padding: 24px 26px; border-radius: 22px; background: var(--card); display: flex; flex-direction: column; gap: 10px; outline: none; }
.joined-title { font-size: 20px; font-weight: 600; }
.joined-text { color: var(--ink-2); }
.more { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.more-q { font-size: 15px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; border: 1px solid rgba(31, 34, 38, 0.14); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.more textarea { width: 100%; min-height: 76px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(31, 34, 38, 0.14); background: var(--pearl); font: inherit; font-size: 15px; color: var(--ink); resize: vertical; }
.more-done { color: var(--mint-ink); font-weight: 600; }
.joined-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px; }
.linkish { padding: 0; border: 0; background: none; font: inherit; color: var(--mint-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* --- Documents (privacy, 404) ------------------------------------------------ */

.doc { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.doc h2 { font-size: 22px; margin-top: 18px; }
.doc ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.doc p { color: var(--ink-2); }
.doc-date { font-size: 14px; color: var(--ink-3); margin-top: 12px; }

.foot { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.foot strong { color: var(--ink); font-weight: 600; }
.foot a { color: var(--ink-3); text-decoration: none; }
.foot a:hover { color: var(--ink); }

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

.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .tile, .btn, .film .play { transition: none; }
  .tile:hover { transform: none; }
}
