/* getagency.dev, hand-written against the design system in the site design
   record (kept privately, outside this repo — see site/README.md).
   Tokens are named as the app names them (ui/src/lib/themes.ts); keep them in step. */

/* ---------- Fonts, self-hosted. Nothing loads from a third-party server. ---------- */

@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/geist-latin-wght-normal.woff2) format('woff2-variations');
  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: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/geist-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0306,
    U+0500-052F, 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: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
  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;
}

/* ---------- Tokens. Dark (Catppuccin Mocha) is the default in every state
   where the visitor has expressed no preference. ---------- */

:root {
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --s0: #313244;
  --s1: #45475a;
  --s2: #585b70;
  --line: #25253a;
  --o0: #6c7086;
  --o1: #7f849c;
  --o2: #9399b2;
  --text: #cdd6f4;
  --sub1: #bac2de;
  --sub0: #a6adc8;
  --blue: #89b4fa;
  --lav: #b4befe;
  --mauve: #cba6f7;
  --green: #a6e3a1;
  --teal: #94e2d5;
  --yellow: #f9e2af;
  --peach: #fab387;
  --red: #f38ba8;

  --sans: 'Geist Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(.2, 0, 0, 1);
  --dur: 160ms;

  color-scheme: dark;
}

/* Light: Paperback's ink and accents on a background lifted two steps. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --base: #eceee9;
    --mantle: #e2e5dd;
    --crust: #d5dad2;
    --s0: #dfe2da;
    --s1: #c2c9bf;
    --s2: #aeb6ab;
    --line: #c2c9bf;
    --o0: #8a8078;
    --o1: #6f6459;
    --o2: #6f6459;
    --text: #382b26;
    --sub1: #4a3d35;
    --sub0: #5c4f45;
    --blue: #3f6175;
    --lav: #33505f;
    --mauve: #6d5a7a;
    --green: #4f6a45;
    --teal: #3f6a63;
    --yellow: #8a6a1e;
    --peach: #8a5a2e;
    --red: #97402f;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --base: #eceee9;
  --mantle: #e2e5dd;
  --crust: #d5dad2;
  --s0: #dfe2da;
  --s1: #c2c9bf;
  --s2: #aeb6ab;
  --line: #c2c9bf;
  --o0: #8a8078;
  --o1: #6f6459;
  --o2: #6f6459;
  --text: #382b26;
  --sub1: #4a3d35;
  --sub0: #5c4f45;
  --blue: #3f6175;
  --lav: #33505f;
  --mauve: #6d5a7a;
  --green: #4f6a45;
  --teal: #3f6a63;
  --yellow: #8a6a1e;
  --peach: #8a5a2e;
  --red: #97402f;
  color-scheme: light;
}

/* ---------- Reset and base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--lav); }
p { margin: 0 0 16px; }
h1, h2, h3 { margin: 0; font-weight: 600; }
code, kbd { font-family: var(--mono); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: color-mix(in srgb, var(--blue) 30%, transparent); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1360px; }
.prose { max-width: 68ch; }

/* ---------- Type roles ---------- */

.display {
  font-size: clamp(40px, 3.2vw + 24px, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.h2 {
  font-size: clamp(29px, 1.6vw + 20px, 40px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.h3 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 550;
}
.lead {
  font-size: clamp(18px, 0.5vw + 15px, 21px);
  line-height: 1.55;
  color: var(--sub1);
  max-width: 62ch;
}
.eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sub0);
  margin-bottom: 12px;
}
.meta {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--sub0);
}
.meta .dot { color: var(--o0); }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-block;
  background: var(--blue);
  color: var(--crust);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 550;
  line-height: 1;
  padding: 14px 24px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.btn:hover { background: var(--lav); color: var(--crust); }
.btn[aria-disabled="true"] {
  background: var(--s0);
  color: var(--o1);
  cursor: default;
  pointer-events: none;
}

.textlink { font-weight: 500; }
.textlink::after { content: " \2192"; }
.textlink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  background: color-mix(in srgb, var(--mantle) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.brand:hover { color: var(--text); }
.brand svg { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--sub1);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.theme-toggle {
  background: none;
  border: 0;
  color: var(--o1);
  font-size: 17px;
  line-height: 1;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.theme-toggle:hover { color: var(--text); }

/* ---------- Sections ---------- */

.section { padding: 128px 0; }
.section-band { background: var(--mantle); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section + .section { border-top: 1px solid var(--line); }

/* ---------- Hero ---------- */

.hero { padding: 96px 0 0; }
.hero .lead { margin: 24px 0 32px; }
.hero-cta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-meta { margin-top: 16px; }
.hero-shot { margin-top: 64px; }
/* Full bleed past the column, per the wireframe, once the viewport has room. */
@media (min-width: 1281px) {
  .hero-shot { margin-left: -120px; margin-right: -120px; }
}

/* Screenshots carry their own window chrome, rounded corners included, in the
   image's alpha. `drop-shadow` traces that silhouette, so the shadow follows
   the window's real corners at every column width. `box-shadow` traced the
   element's rectangle instead, and the captures used to carry a baked drop
   shadow in a transparent margin around the window, which made the rectangle
   ~27px wider than the window on each side and 53px taller below. On the light
   ground that composited to a convincing shadow and hid the mismatch. On the
   dark ground it composited to a flat box a few steps darker than the page,
   with square edges and no relation to the corners inside it, while the CSS
   shadow underneath it was black on near-black and invisible. The margin is
   cropped out of the images now; a `border-radius` here cannot replace it,
   because the image scales with the column and a CSS radius does not. */
.shot img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.55));
}
:root[data-theme="light"] .shot img {
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.22));
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .shot img {
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.22));
  }
}

/* ---------- Agent strip ---------- */

.strip { padding: 48px 0; text-align: center; }
.strip .eyebrow { margin-bottom: 16px; }
.strip-names {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 2;
  color: var(--sub0);
  max-width: 56ch;
  margin: 0 auto;
}
.strip-names .dot { color: var(--o0); padding: 0 6px; }
.strip-note { margin: 16px auto 0; max-width: 60ch; font-size: 15px; color: var(--sub0); }

/* ---------- Local-first block ---------- */

.local-lines {
  font-size: clamp(29px, 1.6vw + 20px, 40px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 40px 0;
}
.local-lines span { display: block; }
.local-body { max-width: 64ch; color: var(--sub1); }

/* ---------- Alternating blocks ---------- */

/* The image always takes the 8fr track. A flipped block swaps the template
   too; ordering alone was observed shrinking the image into the text side. */
.alt {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 40px;
  align-items: center;
}
.alt + .alt { margin-top: 128px; }
.alt.flip { grid-template-columns: 4fr 8fr; }
.alt.flip .alt-media { order: 2; }
.alt-text .h2 { margin-bottom: 16px; }
.alt-text .body { color: var(--sub1); margin-bottom: 24px; }
.points { list-style: none; margin: 0; padding: 0; }
.points li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--sub1);
  font-size: 15px;
  line-height: 1.6;
}
.points li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--blue);
  opacity: 0.7;
}

/* ---------- Card grid ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--s0);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  transition: border-color var(--dur) var(--ease);
}
.card:hover { border-color: var(--s1); }
.card-glyph {
  font-size: 20px;
  line-height: 1;
  color: var(--o2);
  font-family: var(--mono);
  margin-bottom: 16px;
}
.card .h3 { margin-bottom: 8px; }
.card p { color: var(--sub1); font-size: 15px; line-height: 1.6; margin: 0; }

/* ---------- Closing CTA ---------- */

.closing { text-align: center; }
.closing .h2 { margin-bottom: 32px; }
.closing-cta { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; }
.closing-note { margin-top: 24px; font-size: 15px; color: var(--sub0); }

/* ---------- Footer ---------- */

.footer {
  background: var(--mantle);
  border-top: 1px solid var(--line);
  padding: 64px 0;
}
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer .brand { margin-right: 0; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--sub1); font-size: 15px; }
.footer-links a:hover { color: var(--text); }
.footer-fine { font-size: 14px; color: var(--sub0); margin: 0; }

/* ---------- Download page ---------- */

.dl-hero { padding: 96px 0 64px; text-align: center; }
.dl-hero .display { margin-bottom: 40px; }
.dl-button-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dl-sub { font-family: var(--mono); font-size: 13px; color: var(--sub0); }
.dl-platform-note { font-size: 15px; color: var(--sub0); margin-bottom: 16px; }
.dl-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 64px 0;
  text-align: left;
}
.dl-card {
  background: var(--s0);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.dl-card .h3 { margin-bottom: 12px; }
.dl-card ul { margin: 0; padding-left: 20px; color: var(--sub1); font-size: 15px; line-height: 1.7; }
.dl-card p { color: var(--sub1); font-size: 15px; line-height: 1.7; margin: 0; }
.install { text-align: left; max-width: 640px; margin: 0 auto; }
.install .h2 { margin-bottom: 24px; }
.install ol { margin: 0 0 24px; padding-left: 24px; color: var(--sub1); line-height: 1.8; }
.small-print { font-size: 14px; color: var(--sub0); }

/* ---------- Prose pages (privacy) ---------- */

.page { padding: 96px 0 128px; }
.page .display { margin-bottom: 40px; }
.page h2 {
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
}
.page p { color: var(--sub1); max-width: 68ch; }
.page .lead { color: var(--sub1); }

/* ---------- 404 ---------- */

.notfound { padding: 160px 0; }
.notfound .display { margin-bottom: 32px; }
.shell-line {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--sub0);
  background: var(--crust);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 24px;
  max-width: 520px;
  margin-bottom: 32px;
  overflow-x: auto;
}
.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--text);
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .section { padding: 80px 0; }
  .alt, .alt.flip { grid-template-columns: 1fr; gap: 32px; }
  .alt.flip .alt-media { order: 0; }
  .alt + .alt { margin-top: 80px; }
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 0; }
  .cards { grid-template-columns: 1fr; }
  .dl-cards { grid-template-columns: 1fr; }
  .nav-inner { gap: 16px; }
  .nav-links { gap: 16px; }
  /* The hero screenshot is the one place a horizontal scroll container is
     acceptable, so the app window stays legible instead of shrinking. */
  .hero-shot { overflow-x: auto; }
  .hero-shot img { min-width: 720px; }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
