/* Aster website. Layout lives inline in each page; this file holds the shared base,
   the navigation bar and the few animations. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  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: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 1000;
  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: "DM Sans";
  src: url("/fonts/dm-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 1000;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --sun: #F7C948;
  --ink: #14110C;
  --paper: #FFFCF0;
}

/* Each page paints its own colour bands, so nothing behind them may show. The page
   does not bounce past its edges, and the canvas matches the footer, the last band
   on every page. */
html { -webkit-text-size-adjust: 100%; overscroll-behavior: none; background: var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}
[hidden] { display: none !important; }
a { color: var(--ink); }
a:hover { color: #57524A; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
footer a:focus-visible { outline-color: var(--sun); }
footer a:hover { color: var(--sun) !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }

/* Navigation. The page root is a size container, so the bar collapses on the
   page's own width. */
.n-root { container-type: inline-size; }
/* The bar and its menu stay pinned to the top while the page scrolls. They sit
   above the page, so oversized type (the pricing "0") cannot cover the links. */
.n-top {
  position: sticky; top: 0; z-index: 10; background: var(--sun);
  transition: box-shadow 0.2s;
}
.n-top.is-stuck { box-shadow: 0 2px 0 var(--ink); }
.n-bar { display: flex; align-items: center; gap: 12px; padding: 24px clamp(20px, 5vw, 72px); }
.n-word {
  display: inline-flex; align-items: flex-start; gap: 3px; margin-right: auto;
  text-decoration: none; font-family: "Bricolage Grotesque", "DM Sans", sans-serif;
  font-weight: 800; font-size: 30px; letter-spacing: -0.04em; line-height: 1;
}
.n-links { display: flex; gap: 26px; margin-right: 14px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.n-links a { text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; }
.n-links a:hover { color: var(--ink); border-bottom-color: rgba(20, 17, 12, 0.35); }
.n-links a[aria-current="page"] { border-bottom-color: var(--ink); }
.n-gh, .n-dl, .n-burger {
  flex: none; display: inline-flex; align-items: center; height: 44px; box-sizing: border-box;
  border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 14px;
}
.n-gh { gap: 8px; padding: 0 14px; border: 2px solid var(--ink); }
.n-gh:hover { color: var(--ink); background: rgba(20, 17, 12, 0.08); }
.n-dl { padding: 0 18px; background: var(--ink); color: var(--sun); }
.n-dl:hover { color: #FFE08A; }
/* Download and GitHub buttons have no URL yet: no click, no hover change. */
a[aria-disabled="true"] { pointer-events: none; }
.n-burger {
  display: none; justify-content: center; width: 44px; padding: 0;
  border: 2px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font: inherit;
}
.n-burger[aria-expanded="true"] .n-ico-open,
.n-burger[aria-expanded="false"] .n-ico-close { display: none; }
.n-panel {
  display: flex; flex-direction: column; max-height: calc(100vh - 92px); overflow-y: auto; padding: 0 clamp(20px, 5vw, 72px) 20px;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  font-family: "Bricolage Grotesque", "DM Sans", sans-serif; font-weight: 800; font-size: 28px; letter-spacing: -0.035em;
}
.n-panel a { text-decoration: none; padding: 14px 0; border-bottom: 1px solid rgba(20, 17, 12, 0.22); }
.n-panel a:last-child { border-bottom: 0; }
@container (max-width: 1100px) {
  .n-links { display: none; }
  .n-burger { display: inline-flex; }
}
@container (min-width: 1101px) {
  .n-panel { display: none !important; }
}
@container (max-width: 520px) {
  .n-ghlabel { display: none; }
  .n-bar { gap: 8px; }
}

/* Privacy: "Where your voice goes". Your Mac and the cloud are two boxes with a
   crossed-out link between them. Side by side when there is room, stacked when not. */
.p-flow { display: flex; align-items: stretch; gap: 20px; }
.p-link { flex: none; align-self: center; margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
@container (max-width: 900px) {
  .p-flow { flex-direction: column; }
  .p-flow > * { flex: none !important; }
  .p-link { margin-top: 0; flex-direction: row; gap: 10px; }
  .p-link svg { transform: rotate(90deg); width: 56px; }
}

/* Questions and answers. Plain <details>, so they open without any script. */
.faq { border-bottom: 2px solid var(--ink); }
.faq:first-child { border-top: 2px solid var(--ink); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0;
  cursor: pointer; list-style: none;
  font-family: "Bricolage Grotesque", "DM Sans", sans-serif; font-weight: 800; font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.03em; line-height: 1.15;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 36px; height: 36px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink); border-radius: 50%; font-family: "DM Sans", sans-serif; font-weight: 700; font-size: 22px; line-height: 1;
}
.faq[open] summary::after { content: "\2212"; background: var(--ink); color: var(--sun); }
.faq p { margin: 0; padding: 0 56px 22px 0; max-width: 36em; font-size: 18px; line-height: 1.55; }

/* Cookie note. The site sets no cookies; the note says so, with a cookie Aster. */
.ck {
  position: fixed; left: 20px; bottom: 20px; z-index: 20; box-sizing: border-box; max-width: 440px;
  display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 12px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink); animation: ck-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.ck-art { flex: none; }
.ck-text { flex: 1 1 auto; min-width: 0; }
.ck-text p { margin: 0; font-size: 14px; line-height: 1.4; }
.ck-text .ck-title {
  font-family: "Bricolage Grotesque", "DM Sans", sans-serif; font-weight: 800; font-size: 19px;
  letter-spacing: -0.03em; margin-bottom: 2px;
}
.ck-ok {
  flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--ink); color: var(--sun); font: inherit; font-weight: 700; font-size: 14px;
}
.ck-ok:hover { color: #FFE08A; }
@keyframes ck-in { from { opacity: 0; transform: translateY(24px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) {
  .ck { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .ck-art { width: 48px; height: 48px; }
}

/* Animations */
.d-bar, .k-bar { animation: bar 0.55s ease-in-out infinite alternate; transform-origin: center; }
@keyframes bar { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
.k-caret { animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.r-dot { animation: dot 1.2s ease-in-out infinite alternate; }
@keyframes dot { from { opacity: 0.35; } to { opacity: 1; } }
/* Aster's motion follows the app's table (SplatMotion.swift): the same poses, distances
   and timings, in the mascot's 100-unit box. */
/* At rest: look left, look right, rest, on a 7 s cycle, with a 0.3 s blink. */
.d-glance { animation: glance 7s ease-in-out infinite; }
@keyframes glance {
  0%, 25%, 81%, 100% { transform: translate(0, 0); }
  31%, 48% { transform: translate(-4px, -1px); }
  55%, 74% { transform: translate(4px, 1px); }
}
.d-blink, .a-lid { transform-box: fill-box; transform-origin: center; }
.d-blink { animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.08); } }

/* The pill's Aster, in one of the app's states. */
.a-aster { flex: none; overflow: visible; }
.a-ring { opacity: 0; }
.a-ring, .a-body { transform-box: fill-box; transform-origin: center; }
.a-perk { transform-origin: 50px 56px; }
.a-aster.is-done .a-open, .a-aster:not(.is-done) .a-smile { display: none; }
/* Listening: the body breathes, a ring pulses out, the eyes perk and glance a little. */
.is-listening .a-body { animation: a-breathe 1.4s ease-in-out infinite; }
.is-listening .a-ring { animation: a-ring 1.6s ease-out infinite; }
.is-listening .a-perk { animation: a-perk 0.7s ease-in-out infinite alternate; }
.is-listening .a-gaze { animation: a-glance-small 7s ease-in-out infinite; }
.is-listening .a-lid { animation: blink 5s infinite; }
@keyframes a-breathe { 0%, 100% { transform: scale(0.94); } 50% { transform: scale(1); } }
@keyframes a-ring { from { transform: scale(0.82); opacity: 0.9; } to { transform: scale(1.04); opacity: 0; } }
@keyframes a-perk { from { transform: scaleY(0.95); } to { transform: scaleY(1.05); } }
@keyframes a-glance-small {
  0%, 25%, 81%, 100% { transform: translate(0, 0); }
  31%, 48% { transform: translate(-2px, -0.5px); }
  55%, 74% { transform: translate(2px, 0.5px); }
}
/* Working: the body spins once every 1.4 s and the eyes circle. */
.is-working .a-body { animation: a-spin 1.4s cubic-bezier(0.6, 0.1, 0.4, 0.9) infinite; }
.is-working .a-gaze { animation: a-orbit 1.4s linear infinite; }
@keyframes a-spin { to { transform: rotate(360deg); } }
@keyframes a-orbit {
  0%, 100% { transform: translate(-4px, 0); }
  12.5% { transform: translate(-2.83px, -2.83px); }
  25% { transform: translate(0, -4px); }
  37.5% { transform: translate(2.83px, -2.83px); }
  50% { transform: translate(4px, 0); }
  62.5% { transform: translate(2.83px, 2.83px); }
  75% { transform: translate(0, 4px); }
  87.5% { transform: translate(-2.83px, 2.83px); }
}
/* Done: two hops with a small bounce, and smiling eyes that wiggle. */
.is-done .a-hop { animation: a-hop 1.8s ease-in-out 2; }
.is-done .a-wiggle { animation: a-wiggle 2.4s ease-in-out infinite; }
@keyframes a-hop {
  0%, 35%, 60%, 100% { transform: translateY(0); }
  20% { transform: translateY(-12px); }
  45% { transform: translateY(-4px); }
}
@keyframes a-wiggle {
  0%, 100% { transform: translate(-2.5px, -1px); }
  25%, 75% { transform: translate(0, 0); }
  50% { transform: translate(2.5px, -1px); }
}
@media (prefers-reduced-motion: reduce) {
  .d-bar, .k-bar, .k-caret, .r-dot, .d-glance, .d-blink, .ck,
  .a-aster *, .a-aster { animation: none !important; }
}
