/* Subagency coming-soon site.
   Colour tokens follow the Brand Guide. The site follows the visitor's light or
   dark setting (prefers-color-scheme); dark is the default. */

:root {
  color-scheme: dark light;
  --bg: #0E0F0F;
  --text: #E8E4DA;
  --muted: #8A867D;
  --success: #9FBF9A;
  --stop: #E5484D;
  --amber-fill: #FFB000;      /* the sign-up button only */
  --on-amber: #0E0F0F;
  --ring: #FFB000;            /* focus ring on the sign-up controls */
  --field-bg: #161818;
  --border: #77736A;          /* 3:1 or better on bg and field-bg */
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #E8E4DA;
    --text: #171817;
    --muted: #5E5B54;
    --success: #386331;
    --stop: #A52F35;
    --ring: #8A5700;          /* the brand's amber as text/line on paper */
    --field-bg: #F3F0E8;
    --border: #7A766C;
  }
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

/* author display rules (flex on form, .checkbox-label, etc.) would
   otherwise beat the browser's default [hidden] and leave elements visible */
[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  /* keep the scrollbar gutter stable so it never overlaps content */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px 64px;
  min-height: 100vh;
}

/* ---------------------------------------------------------------------
   Page content. Everything is in the HTML from the start; the motion below
   is CSS only and only ever hides something while its own animation is
   waiting to run, so if animations never run, everything is simply visible.
   ------------------------------------------------------------------- */

.title {
  margin: 0 0 10px;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 500;
  font-size: clamp(24px, 8vw, 48px);
  line-height: 1.15;
  letter-spacing: 0.06em;
  color: var(--text);
}

.line {
  margin: 0 0 6px;
  color: var(--text);
}

.dots {
  color: var(--muted);
}

.val {
  color: var(--success);
}

.qa {
  margin-top: 26px;
}

.cmd {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.say,
.note {
  margin: 4px 0 0;
  max-width: 640px;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
}

.note {
  color: var(--muted);
  font-size: 15px;
}

/* `ls -1`: one Bot per line, so it never wraps badly on a phone */
.bots {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.bots li {
  white-space: nowrap;
}

.panel {
  margin-top: 28px;
}

.closing {
  margin: 48px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.blink {
  animation: blink 1.1s steps(1, end) 5.2s 5;   /* five blinks, then solid */
}

/* while js/main.js holds the closing line still between scrambles, the cursor
   blinks on its own; while the words scramble, it stays solid. */
.blink.resting {
  animation: blink 1s steps(1, end) infinite;
}

/* ---------------------------------------------------------------------
   Motion. 1) the boot lines type in quickly, with a cursor on the line being
   typed; 2) each question and answer fades in; 3) the sign-up block; 4) the
   closing line, whose trailing _ blinks. No layout ever moves: typed lines
   keep their full box and only a clip grows, and fades only change opacity.
   ------------------------------------------------------------------- */

/* .type is the line's box; .t is its text, clipped while typing. */
.type {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  max-width: 100%;
}

.t {
  display: inline-block;
}

.type .t {
  animation: type var(--dur) steps(var(--n), end) var(--delay) backwards;
}

/* the cursor: a block that rides the reveal edge and only shows while typing */
.type::after {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 0;
  width: 0.55ch;
  background: currentColor;
  opacity: 0;
  animation:
    caret-move var(--dur) steps(var(--n), end) var(--delay) backwards,
    caret-show var(--dur) steps(1, end) var(--delay);
}

@keyframes type {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes caret-move {
  from { left: 0; }
  to   { left: 100%; }
}
/* no fill: the cursor is only ever visible while its own line is typing */
@keyframes caret-show {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* The sign-up block also starts visibility:hidden, so its controls can't be
   focused or clicked while it is still invisible. Visibility interpolates as
   "visible" as soon as the fade starts, so it is usable from its first frame. */
@keyframes fade-controls {
  from { opacity: 0; visibility: hidden; }
  to   { opacity: 1; visibility: visible; }
}
@keyframes blink {
  50% { opacity: 0; }
}

/* 14 ms per character; 40 ms between lines; the block is done in about 2 s.
   --n is the character count of the line. */
.l1 { --n: 16; --dur: 0.224s; --delay: 0.15s; }
.l2 { --n: 27; --dur: 0.378s; --delay: 0.414s; }
.l3 { --n: 24; --dur: 0.336s; --delay: 0.832s; }
.l4 { --n: 28; --dur: 0.392s; --delay: 1.208s; }
.l5 { --n: 26; --dur: 0.364s; --delay: 1.64s; }

.qa1, .qa2, .qa3, .closing {
  animation: fade 0.4s ease-out backwards;
}
.panel {
  animation: fade-controls 0.4s ease-out backwards;
}
.qa1     { animation-delay: 2.25s; }
.qa2     { animation-delay: 2.75s; }
.qa3     { animation-delay: 3.25s; }
.panel   { animation-delay: 3.75s; }
.closing { animation-delay: 4.25s; }

/* Tighter vertical rhythm on desktop so the folded page fits one laptop
   screen (Muj, 2026-10-02). Phones keep their own spacing below. */
@media (min-width: 720px) {
  .wrap { padding-top: 28px; padding-bottom: 20px; }
  .qa { margin-top: 14px; }
  .panel { margin-top: 18px; }
  .closing { margin-top: 18px; }
  .site-footer { margin-top: 14px; }
}

/* The sign-up block starts folded so the page reads as one screen; the
   button opens it (Muj, 2026-10-02). Without JavaScript the form simply
   shows, because only js/main.js folds it. */
.join-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ring);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 15px;
  cursor: pointer;
}
.join-toggle:hover {
  background: color-mix(in srgb, var(--ring) 12%, transparent);
}
.join-toggle:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
/* the leading > turns to point down while the form is open */
.join-toggle .caret {
  display: inline-block;
  transition: transform 0.15s ease-out;
}
.join-toggle[aria-expanded="true"] .caret {
  transform: rotate(90deg);
}
.join-toggle[aria-expanded="true"] + #form-area {
  margin-top: 18px;
}

/* On phones a long bot line ("customer-support/ (answers + follow-ups)") ran
   past the screen edge; let its note wrap under the name instead. */
@media (max-width: 480px) {
  .bots li {
    white-space: normal;
  }
  .bots li .muted {
    white-space: nowrap;   /* the note moves down whole, never split mid-word */
  }
}

/* Reduced motion: everything is there at once, nothing moves. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------------------------------------------------------------------
   Sign-up form. Amber appears only here: the enter button and the focus ring.
   ------------------------------------------------------------------- */

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Label and field share one line; on a phone the label wraps above the field. */
.field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.field-row label {
  flex: 0 0 100%;   /* label on its own line, so the email box lines up on the left */
}

.field-row input[type="email"] {
  flex: 0 1 320px;
  max-width: 320px;
}

label {
  color: var(--text);
  font-weight: 500;
}

label.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  color: var(--text);
  font-weight: 400;
  min-height: 44px;
  cursor: pointer;
}

input[type="email"],
input[type="text"],
textarea {
  width: 100%;
  max-width: 360px;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font: inherit;
}

textarea {
  max-width: 480px;
  min-height: 88px;
  resize: vertical;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  accent-color: var(--text);
}

input[type="email"]:focus-visible,
input[type="text"]:focus-visible,
textarea:focus-visible,
input[type="checkbox"]:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

input[type="email"]:focus-visible,
input[type="text"]:focus-visible,
textarea:focus-visible {
  border-color: var(--ring);
}

button[type="submit"] {
  min-height: 44px;
  padding: 0 20px;
  background: var(--amber-fill);
  color: var(--on-amber);
  border: 1px solid var(--ring);
  border-radius: 4px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  align-self: flex-start;
}

button[type="submit"]:hover {
  filter: brightness(1.08);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* room for the spam-check widget so it doesn't push the page when it loads */
#turnstile-widget {
  min-height: 65px;
}

/* "which AI subscription do you have?" */
.ai-question {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.ai-question legend {
  padding: 0;
  margin-bottom: 2px;
  font-weight: 500;
  color: var(--text);
}

.ai-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.beta-block,
.other-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 480px;
}

.other-block {
  max-width: 360px;
  margin-top: 4px;
}

.counter {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  color: var(--muted);
  align-self: flex-end;
}

/* at the limit the counter takes the text colour; red is for errors only */
.counter.limit {
  color: var(--text);
}

.fine-print {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--muted);
}

.fine-print a {
  color: var(--text);
  /* a 44px tall tap area without changing how the line looks */
  display: inline-block;
  padding: 11px 0;
  margin: -11px 0;
}

.field-error {
  margin-top: -8px;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--stop);
}

.other-block .field-error,
.beta-block .field-error {
  margin-top: 0;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--stop);
}

.status {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  min-height: 1.4em;
}

.status.ok {
  white-space: pre-line;
  color: var(--success);
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 16px;
}

/* focused programmatically after the form is swapped for this message;
   it is not a control, so no focus ring */
.status:focus {
  outline: none;
}

.status.error {
  color: var(--stop);
}

/* ---------------------------------------------------------------------
   Privacy page
   ------------------------------------------------------------------- */

.prose {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  max-width: 640px;
  line-height: 1.7;
}

.prose h1 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 22px;
}

.prose h2 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 17px;
  margin-top: 32px;
}

.prose p,
.prose li {
  color: var(--text);
}

.back-link {
  display: inline-block;
  margin-top: 32px;
}

.legal-meta {
  font-size: 14px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 56px;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--muted);
}

.site-footer a {
  color: var(--text);
  /* a 44px tall tap area without changing how the line looks */
  display: inline-block;
  padding: 11px 0;
  margin: -11px 0;
}

@media (max-width: 480px) {
  .wrap {
    padding: 40px 16px 48px;
  }
  input[type="email"],
  textarea {
    max-width: 100%;
  }
  .beta-block,
  .other-block {
    max-width: 100%;
  }
  /* Label wraps to its own line, the field fills the row below it. */
  .field-row label {
    flex-basis: 100%;
  }
  .field-row input[type="email"] {
    flex-basis: 100%;
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  body {
    font-size: 15px;
  }
}

/* Print: show everything, no animation, ink on paper. */
@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --muted: #444;
    --success: #1f4d1a;
    --stop: #8a1f24;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
  }
  .type::after {
    display: none;
  }
}
