/* Runs Itself. Night shift at dawn.
   The page runs from night (top) to morning (bottom). One world, four skies. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-var.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/onest-var.woff2") format("woff2");
}

:root {
  --night-0: #07080f;
  --night-1: #0d0f1e;
  --night-2: #171a33;
  --dusk: #3a1f4a;
  --ember: #ff5b1f;
  --ember-deep: #d8410c;
  --sun: #ffae3d;
  --glow: #ffd9a0;
  --morning: #fff1dc;
  --morning-2: #fbe3c2;
  --ink: #160b06;
  --ink-soft: #4a3327;
  --text: #f4eee6;
  --text-dim: #bdb7cc;
  --line: rgba(244, 238, 230, 0.16);
  --line-ink: rgba(22, 11, 6, 0.18);

  --display: "Bricolage Grotesque", "Onest", sans-serif;
  --body: "Onest", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 66ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--ember) var(--night-0);
  scrollbar-width: thin;
}
body {
  margin: 0;
  background: var(--night-0);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--ember);
}
::selection { background: var(--ember); color: var(--ink); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--night-0); }
::-webkit-scrollbar-thumb { background: var(--ember); border-radius: 10px; border: 2px solid var(--night-0); }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-light :focus-visible, .on-ember :focus-visible { outline-color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 100;
  background: var(--sun); color: var(--ink); padding: 0.6rem 1rem; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top 0.2s var(--ease-out);
}
.skip:focus { top: 0.75rem; }

.wrap { width: min(100% - 2 * var(--gutter), 78rem); margin-inline: auto; }

/* ---------- Type ---------- */
.display {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.03em;
  line-height: 0.98;
  text-wrap: balance;
}
h2.display { font-size: clamp(2.1rem, 1.2rem + 4.2vw, 4.6rem); }
h3 {
  font-family: var(--display);
  font-weight: 650;
  font-variation-settings: "opsz" 28;
  letter-spacing: -0.015em;
  line-height: 1.15;
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.55rem);
}
.lede {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.5;
  max-width: 40ch;
  color: var(--text-dim);
}
.on-light .lede, .on-ember .lede { color: var(--ink-soft); }
.on-ember .lede { color: #3a1204; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 3rem; padding: 0.8rem 1.35rem;
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--body); font-weight: 600; font-size: 1rem; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.25s var(--ease-out), background-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.btn-primary { background: var(--ember); color: var(--ink); box-shadow: 0 10px 30px -12px rgba(255, 91, 31, 0.9); }
.btn-primary:hover { background: var(--sun); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: rgba(13, 15, 30, 0.72); color: var(--text); box-shadow: inset 0 0 0 1px rgba(244, 238, 230, 0.34); }
.btn-ghost:hover { background: rgba(13, 15, 30, 0.92); transform: translateY(-2px); }
.on-light .btn-primary, .on-ember .btn-primary { background: var(--ink); color: var(--morning); box-shadow: 0 12px 30px -14px rgba(22, 11, 6, 0.8); }
.on-light .btn-primary:hover, .on-ember .btn-primary:hover { background: #2b160c; }
.btn .arrow { width: 1.05em; height: 1.05em; transition: transform 0.25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-head {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  padding-block: clamp(1rem, 2.5vw, 1.75rem);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand svg { width: 2.4rem; height: 2.4rem; }
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 1.3rem;
  letter-spacing: -0.025em; font-variation-settings: "opsz" 24;
}
.mark-orbit { transform-origin: 24px 24px; animation: orbit 9s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 2rem); }
.nav a:not(.btn) { text-decoration: none; font-size: 0.97rem; color: var(--text-dim); transition: color 0.2s; }
.nav a:not(.btn):hover { color: var(--text); }
.nav .btn { min-height: 2.6rem; padding: 0.6rem 1.1rem; font-size: 0.95rem; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* ---------- Hero: the night shift ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(100svh, 40rem);
  display: grid; align-items: start;
  background:
    radial-gradient(120% 70% at 50% 118%, rgba(58, 31, 74, 0.9), transparent 60%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 55%, #140f25 100%);
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 62% at 22% 36%, rgba(7, 8, 15, 0.82), rgba(7, 8, 15, 0) 72%),
    radial-gradient(34% 58% at 88% 34%, rgba(7, 8, 15, 0.7), rgba(7, 8, 15, 0) 75%);
}
.hero-copy {
  padding-top: clamp(6rem, 15vh, 11rem);
  padding-bottom: clamp(15rem, 38vh, 24rem);
}
.hero-copy > * { max-width: 46rem; }
.hero h1 {
  font-size: min(clamp(2.7rem, 1.1rem + 7.4vw, 6rem), 12.5vh + 1rem);
  margin-bottom: clamp(1.1rem, 2.5vw, 1.75rem);
}
.hero h1 .fixed { display: block; }
.rotor {
  display: block; position: relative;
  color: var(--sun);
  height: 1.06em; overflow: hidden;
}
.rotor-word {
  position: absolute; inset: auto auto 0 0; white-space: nowrap;
  transform: translateY(110%); opacity: 0; filter: blur(6px);
  transition: transform 0.8s var(--ease-out), opacity 0.6s var(--ease-out), filter 0.8s var(--ease-out);
}
.rotor-word.is-on { transform: translateY(0); opacity: 1; filter: blur(0); }
.rotor-word.is-off { transform: translateY(-110%); opacity: 0; filter: blur(6px); }
.hero .lede { max-width: 36ch; color: #ece6f2; text-shadow: 0 1px 18px rgba(7, 8, 15, 0.7); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); }

/* Clock and the night's work */
.shift {
  position: absolute; z-index: 2;
  right: var(--gutter); top: clamp(6rem, 15vh, 11rem);
  width: min(22rem, 34vw);
  font-variant-numeric: tabular-nums;
}
.clock {
  font-family: var(--display); font-weight: 700; font-variation-settings: "opsz" 96;
  font-size: clamp(2.2rem, 1rem + 3.4vw, 4rem); line-height: 1; letter-spacing: -0.03em;
  color: var(--text);
}
.clock small { font-size: 0.36em; letter-spacing: 0.02em; font-weight: 500; color: var(--text-dim); margin-left: 0.35em; }
.shift-state { margin-top: 0.4rem; font-size: 0.95rem; color: var(--text-dim); }
.feed { margin-top: 1.25rem; display: grid; gap: 0.55rem; }
.feed li {
  display: grid; grid-template-columns: 4.6rem 1fr; gap: 0.75rem; align-items: baseline;
  padding: 0.6rem 0.85rem;
  background: rgba(13, 15, 30, 0.94);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 10px;
  font-size: 0.92rem; line-height: 1.35;
  opacity: 0; transform: translateY(10px); filter: blur(4px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), filter 0.7s var(--ease-out), box-shadow 0.7s var(--ease-out);
}
.feed li.is-done { opacity: 1; transform: none; filter: none; }
.feed li.is-new { box-shadow: inset 0 0 0 1px var(--sun); }
.feed time { color: var(--sun); font-weight: 600; font-size: 0.85rem; }
.example-tag { font-size: 0.82rem; font-weight: 600; color: var(--sun); margin-bottom: 0.35rem; }
.example-note { margin-top: 0.9rem; padding: 0.55rem 0.85rem; font-size: 0.82rem; color: #d6d0e2; background: rgba(13, 15, 30, 0.94); border-radius: 10px; }
.fine { margin-top: 1.5rem; font-size: 0.92rem; color: var(--text-dim); max-width: 60ch; }
.no-js .feed li { opacity: 1; transform: none; filter: none; }

@media (max-width: 900px) {
  .hero { min-height: 100svh; }
  .hero-copy { padding-top: 5.75rem; padding-bottom: 1.5rem; }
  .hero-actions .btn-ghost { display: none; }
  .shift { position: relative; right: auto; top: auto; width: auto; margin: 0 var(--gutter) clamp(12rem, 50vw, 18rem); padding: 0.9rem 1rem 1rem; background: rgba(13, 15, 30, 0.84); border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; align-items: center; }
  .feed li, .feed li.is-new { background: none; box-shadow: none; padding: 0; border-radius: 0; grid-template-columns: 4.4rem 1fr; }
  .clock { font-size: 2.1rem; }
  .shift-state { margin: 0; font-size: 0.88rem; }
  .feed { grid-column: 1 / -1; margin-top: 0.7rem; }
  .js .feed li { display: none; }
  .js .feed li.is-new { display: grid; }
  .example-note { grid-column: 1 / -1; margin-top: 0.5rem; padding: 0; background: none; border-radius: 0; }
}
@media (max-width: 560px) {
  .chat-launch { padding: 0.5rem; min-height: 3.4rem; }
  .chat-launch .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .chat-launch svg { width: 2.4rem; height: 2.4rem; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(4.5rem, 10vw, 9rem); margin-top: -1px; }
.section-head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
@media (min-width: 900px) {
  .section-head.split { grid-template-columns: 1.15fr 0.85fr; align-items: end; gap: 4rem; }
}

/* After hours: the ledger */
.after { background: linear-gradient(180deg, #140f25 0%, var(--night-1) 30%, #1a1230 100%); }
.ledger { border-top: 1px solid var(--line); }
.ledger-row {
  display: grid; gap: 0.5rem 2.5rem; padding-block: clamp(1.1rem, 2.2vw, 1.75rem);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s var(--ease-out);
}
.ledger-row:hover { background: rgba(255, 174, 61, 0.05); }
.ledger-row h3 { color: var(--text); }
.ledger-row .before { color: var(--text-dim); }
.ledger-row .after-txt { color: var(--glow); }
.ledger-row .after-txt::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--sun); margin-right: 0.6rem; translate: 0 -0.08em; }
.ledger-head { display: none; }
@media (min-width: 900px) {
  .ledger-row, .ledger-head { grid-template-columns: 0.7fr 1fr 1fr; align-items: baseline; }
  .ledger-head {
    display: grid; gap: 0 2.5rem; padding-bottom: 0.9rem;
    font-size: 0.9rem; color: var(--text-dim);
  }
}

/* Connect: the sunrise field */
.connect {
  background: linear-gradient(180deg, #1a1230 0, #4a1f3f 3rem, #a8331f 6rem, var(--ember) 9.5rem, var(--ember) 100%);
  color: var(--ink);
  padding-top: clamp(12.5rem, 18vw, 15rem);
  overflow-x: clip;
}
.connect h2 { color: var(--ink); }
.planes { position: relative; height: clamp(15rem, 34vw, 23rem); margin-bottom: 0; background: var(--night, #07080f); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.planes canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.planes-tag { position: absolute; left: 1.1rem; top: 1rem; font: 600 0.72rem/1 ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: #ffae3d; }
.planes + .track { padding-top: 1.6rem; }
@media (max-width: 899px) { .planes { border-radius: var(--radius); margin-bottom: 2rem; } .planes + .track { padding-top: 0; } }
.track { counter-reset: stop; display: grid; gap: 0; position: relative; margin-bottom: clamp(3rem, 6vw, 5rem); }
.track li { position: relative; padding: 0 0 1.75rem 2.6rem; }
.track li:last-child { padding-bottom: 0; }
.track li::before { content: ""; position: absolute; left: 0.2rem; top: 0.3rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--ember), 0 0 0 5px rgba(22, 11, 6, 0.45); z-index: 1; }
.track li::after { content: ""; position: absolute; left: 0.68rem; top: 0.9rem; bottom: -0.3rem; width: 1px; background: rgba(22, 11, 6, 0.45); }
.track li:last-child::after { display: none; }
.track p { color: #3a1204; font-size: 0.95rem; }
@media (min-width: 900px) {
  .track { grid-template-columns: repeat(5, 1fr); }
  .track li { padding: 2.6rem 1.5rem 0 0; }
  .track li::before { left: 0; top: 0; }
  .track li::after { left: 1.05rem; right: 0; top: 0.5rem; bottom: auto; width: auto; height: 1px; }
  .track::after { content: ""; position: absolute; top: 0.5rem; left: 0; height: 3px; width: 4.5rem; margin-top: -1px; border-radius: 3px; background: var(--morning); transform: translateX(-5rem); z-index: 2; }
  .track.is-in::after { animation: travel 5.5s cubic-bezier(0.45, 0, 0.25, 1) 0.6s infinite; }
}
@keyframes travel { from { transform: translateX(-5rem); opacity: 0; } 8% { opacity: 1; } 78% { opacity: 1; } to { transform: translateX(min(78rem, calc(100vw - 2 * var(--gutter)))); opacity: 0; } }
.connect-points { display: grid; gap: 1.6rem 3rem; }
@media (min-width: 900px) { .connect-points { grid-template-columns: repeat(3, 1fr); } }
.connect-points p { color: #3a1204; }
.connect-points h3 { margin-bottom: 0.35rem; }

/* How a job runs */
.steps-sec { background: linear-gradient(180deg, var(--ember) 0%, #ff8a3a 12%, var(--glow) 30%, var(--morning) 52%); color: var(--ink); }
.steps { counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line-ink); }
.step {
  counter-increment: step;
  display: grid; grid-template-columns: 3.2rem 1fr; gap: 0.25rem 1.25rem;
  padding-block: clamp(1.3rem, 2.6vw, 2rem);
  border-bottom: 1px solid var(--line-ink);
}
.step::before {
  content: counter(step);
  font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem);
  line-height: 1; color: var(--ember-deep); font-variant-numeric: tabular-nums;
  grid-row: span 2;
}
.step p { color: var(--ink-soft); max-width: 58ch; }
@media (min-width: 900px) {
  .step { grid-template-columns: 5rem 0.6fr 1fr; align-items: baseline; }
  .step::before { grid-row: auto; }
}

/* Small business only */
.only { background: var(--morning); color: var(--ink); }
.only .big {
  font-size: clamp(2.3rem, 1rem + 6.2vw, 6rem);
  max-width: 16ch;
}
.only .big em { font-style: normal; color: var(--ember-deep); }
.only-grid { display: grid; gap: 2.5rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 900px) { .only-grid { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.only-grid h3 { margin-bottom: 0.9rem; }
.ticks li, .crosses li { position: relative; padding: 0.55rem 0 0.55rem 1.9rem; border-bottom: 1px solid var(--line-ink); color: var(--ink-soft); }
.ticks li::before, .crosses li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem; width: 1rem; height: 1rem;
  background: currentColor; color: var(--ember-deep);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.ticks { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.crosses { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.crosses li::before { color: var(--ink-soft); }

/* Yours to keep */
.keep { background: var(--morning); color: var(--ink); padding-top: 0; }
.keep-panel {
  background: var(--ink); color: var(--morning);
  border-radius: clamp(18px, 3vw, 32px);
  padding: clamp(2rem, 5vw, 4.5rem);
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  box-shadow: 0 40px 80px -50px rgba(22, 11, 6, 0.7);
}
@media (min-width: 900px) { .keep-panel { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }
.keep-panel h2 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.6rem); }
.keep-list { display: grid; gap: 1.5rem; }
.keep-list h3 { color: var(--sun); margin-bottom: 0.3rem; }
.keep-list p { color: #d9cfc3; }

/* Questions */
.faq { background: var(--morning); color: var(--ink); }
.faq-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: 0.8fr 1.2fr; gap: 5rem; } }
.faq details { border-bottom: 1px solid var(--line-ink); }
.faq details:first-of-type { border-top: 1px solid var(--line-ink); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1.15rem 3rem 1.15rem 0;
  font-family: var(--display); font-weight: 650; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  letter-spacing: -0.015em; line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.25rem; top: 50%; width: 0.85rem; height: 0.85rem;
  border-right: 2px solid var(--ember-deep); border-bottom: 2px solid var(--ember-deep);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.35s var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq details p { padding: 0 0 1.4rem; color: var(--ink-soft); max-width: 62ch; }

/* Book */
.book {
  background:
    radial-gradient(90% 120% at 50% 120%, rgba(255, 174, 61, 0.55), transparent 62%),
    linear-gradient(180deg, var(--morning) 0%, var(--morning-2) 100%);
  color: var(--ink);
  overflow: hidden;
}
.book-grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
@media (min-width: 900px) { .book-grid { grid-template-columns: 1fr 1fr; } }
.book h2 { font-size: clamp(2.4rem, 1.2rem + 5vw, 5.2rem); }
.book-lede { margin-top: 1.25rem; }
.book-action { margin-top: 2rem; }
.book-list { margin-top: 2rem; display: grid; gap: 0.2rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.book-form {
  background: #fffaf2; border-radius: clamp(16px, 2.5vw, 24px);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  box-shadow: 0 30px 70px -40px rgba(120, 50, 10, 0.55);
  display: grid; gap: 1.1rem;
}
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: 10px;
  border: 1px solid rgba(22, 11, 6, 0.28); background: #fff;
  color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #7a6659; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ember-deep); box-shadow: 0 0 0 3px rgba(255, 91, 31, 0.28); }
.field .err { color: #9b1c00; font-size: 0.88rem; min-height: 1.2em; }
.two { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: 0.88rem; color: var(--ink-soft); }
.form-status { font-weight: 600; min-height: 1.4em; }

/* Footer */
.site-foot { background: var(--ink); color: #d9cfc3; padding-block: clamp(3rem, 6vw, 5rem); }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-foot .brand-name { color: var(--morning); }
.foot-line { margin-top: 0.6rem; max-width: 34ch; }
.site-foot a { color: var(--morning); }
.site-foot small { display: block; margin-top: 2.5rem; font-size: 0.85rem; color: #a8998c; }
.foot-grid h3 { font-size: 0.95rem; font-family: var(--body); font-weight: 600; letter-spacing: 0; color: #a8998c; margin-bottom: 0.6rem; }
.foot-grid li { padding-block: 0.2rem; }

/* ---------- Scroll reveal (content is visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Chat ---------- */
.chat-launch {
  position: fixed; right: clamp(1rem, 2.5vw, 2rem); bottom: clamp(1rem, 2.5vw, 2rem); z-index: 60;
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 3.4rem; padding: 0.6rem 1.2rem 0.6rem 0.75rem;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--night-1); color: var(--text); font-weight: 600;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(255, 174, 61, 0.55);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.chat-launch:hover { transform: translateY(-3px); box-shadow: 0 24px 46px -16px rgba(0, 0, 0, 0.8), inset 0 0 0 1px var(--sun); }
.chat-launch svg { width: 2.1rem; height: 2.1rem; }
.chat-launch[aria-expanded="true"] { opacity: 0; pointer-events: none; }
.chat {
  position: fixed; z-index: 61;
  right: clamp(0.75rem, 2.5vw, 2rem); bottom: clamp(0.75rem, 2.5vw, 2rem);
  width: min(25rem, calc(100vw - 1.5rem)); height: min(38rem, calc(100svh - 1.5rem));
  display: grid; grid-template-rows: auto 1fr auto;
  background: var(--night-1); color: var(--text);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85), inset 0 0 0 1px var(--line);
  opacity: 0; transform: translateY(16px) scale(0.98); pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.chat[hidden] { display: none; }
.chat.is-open { opacity: 1; transform: none; pointer-events: auto; }
.chat-log:focus-visible { outline-offset: -3px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1rem 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
.chat-head strong { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.chat-head span { display: block; font-size: 0.8rem; color: var(--text-dim); }
.chat-close { width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: rgba(244, 238, 230, 0.08); cursor: pointer; display: grid; place-items: center; }
.chat-close:hover { background: rgba(244, 238, 230, 0.18); }
.chat-close svg { width: 1rem; height: 1rem; }
.chat-log { overflow-y: auto; padding: 1rem 1.1rem; display: grid; gap: 0.7rem; align-content: start; scrollbar-width: thin; scrollbar-color: var(--night-2) transparent; overscroll-behavior: contain; }
.msg { max-width: 88%; padding: 0.7rem 0.95rem; border-radius: 16px; font-size: 0.95rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot { background: var(--night-2); border-bottom-left-radius: 5px; justify-self: start; }
.msg.me { background: var(--ember); color: var(--ink); border-bottom-right-radius: 5px; justify-self: end; }
.msg.note { background: none; padding: 0; font-size: 0.8rem; color: var(--text-dim); max-width: 100%; }
.msg.bot.is-typing::after { content: ""; display: inline-block; width: 0.5rem; height: 1em; margin-left: 2px; background: var(--sun); vertical-align: -0.15em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips button { border: 0; cursor: pointer; padding: 0.5rem 0.8rem; border-radius: 999px; font-size: 0.85rem; background: transparent; color: var(--glow); box-shadow: inset 0 0 0 1px rgba(255, 174, 61, 0.5); transition: background-color 0.2s; }
.chips button:hover { background: rgba(255, 174, 61, 0.14); }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; padding: 0.75rem; border-top: 1px solid var(--line); }
.chat-form textarea { resize: none; height: 2.9rem; max-height: 7rem; padding: 0.75rem 0.9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--night-0); color: var(--text); font-size: 0.95rem; line-height: 1.35; }
.chat-form textarea::placeholder { color: #9d97ad; }
.chat-form textarea:focus-visible { outline: none; border-color: var(--sun); }
.chat-send { width: 2.9rem; height: 2.9rem; border: 0; border-radius: 12px; background: var(--ember); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.chat-send:disabled { opacity: 0.45; cursor: not-allowed; }
.chat-send svg { width: 1.15rem; height: 1.15rem; }

/* ---------- Plain pages (privacy) ---------- */
.plain { background: var(--morning); color: var(--ink); min-height: 100svh; }
.plain .site-head { position: static; background: var(--ink); color: var(--morning); }
.plain .site-head .nav a:not(.btn) { color: #d9cfc3; }
.plain .site-head .btn-ghost { color: var(--morning); }
.prose { padding-block: clamp(3rem, 7vw, 6rem); max-width: 68ch; }
.prose h1 { font-size: clamp(2.2rem, 1.4rem + 3.5vw, 4rem); margin-bottom: 1.5rem; }
.prose h2 { font-family: var(--display); font-weight: 650; font-size: 1.5rem; letter-spacing: -0.02em; margin: 2.5rem 0 0.6rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p + p { margin-top: 0.9rem; }
.prose ul { list-style: disc; padding-left: 1.25rem; display: grid; gap: 0.35rem; margin-top: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .track::after { display: none; }
  .feed li { opacity: 1; transform: none; filter: none; }
}
