/* © 2026 Copyright Autoic AI, Inc.: Lead Architect: Michail Bachlitzanakis */

@font-face {
  font-family: "Zen Maru Gothic";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/zen-maru-gothic-500-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Zen Maru Gothic";
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/zen-maru-gothic-700-latin.woff2") format("woff2");
}

:root {
  --ink: #1d2533;
  --ink-soft: #4a5566;
  --paper: #fffdf8;
  --line: #e4ddcf;
  --vermilion: #e0523a;
  --vermilion-deep: #c2412b;
  --focus: #2f6fde;
  --error: #b42318;
  --display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", ui-rounded, system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- brand and navigation ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 27px;
  letter-spacing: -0.015em;
  text-decoration: none;
  color: #2d3650;
}
/* the mark: a speech bubble that is also the Autoic robot's face, its tail
   pointing at the name */
.brand-mark { width: 38px; height: 38px; flex: none; }

.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 18px;
}
.nav-link {
  font-weight: 600;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid rgba(29, 37, 51, 0.12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.nav-link:hover { background: #fff; }

/* ---------- buttons ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--vermilion);
  color: #fff;
  font: 600 16px/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(224, 82, 58, 0.28);
  transition: background 0.15s, transform 0.15s;
}
.cta:hover { background: var(--vermilion-deep); transform: translateY(-1px); }
.cta:disabled { opacity: 0.6; cursor: progress; transform: none; }
.cta-block { width: 100%; min-height: 50px; }

/* ---------- landing page ---------- */

.hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}
.hero-art, .hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-art img { object-fit: cover; object-position: 50% 70%; }

/* the words sit on a frosted paper panel so they stay readable on the art */
.hero-copy {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  max-width: 600px;
  margin: clamp(92px, 13vh, 140px) var(--gutter) 48px;
  padding: clamp(24px, 2.4vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.8);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  box-shadow: 0 18px 48px rgba(29, 37, 51, 0.1);
}
.hero-copy h1 { font-size: clamp(36px, 4.2vw, 58px); margin-bottom: 18px; }
.hero-copy p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.55;
  text-wrap: pretty;
}
.hero-copy .lead {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.3;
}
/* the call to action is an underlined link, not a button */
.text-link {
  display: inline-block;
  margin-top: 14px;
  padding: 0 2px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(transparent 62%, rgba(224, 82, 58, 0.38) 62%) no-repeat;
  transition: background-color 0.15s;
}
.text-link:hover { background-color: rgba(224, 82, 58, 0.12); }
.hero-copy .text-link { display: block; width: fit-content; margin-left: auto; }

/* phones: the panel sits on a sky that matches the art, and the whole street
   scene follows below it; only the scene's own sky tucks under the panel, so
   no character is ever covered whatever the length of the text */
@media (max-aspect-ratio: 4/5) {
  .hero {
    flex-direction: column;
    min-height: 0;
    background: linear-gradient(#aad6f1, #c8e4f5 60%, #d8eaf7);
  }
  .hero-copy {
    order: 0;
    margin: 84px 12px 0;
    padding: 22px 20px;
    border-radius: 20px;
  }
  .hero-art {
    order: 1;
    position: relative;
    inset: auto;
    height: auto;
    margin-top: -72vw;
    padding-bottom: 44px;
  }
  .hero-art img {
    position: relative;
    height: auto;
    -webkit-mask-image: linear-gradient(transparent, #000 22%);
    mask-image: linear-gradient(transparent, #000 22%);
  }
}

/* ---------- sign-in ---------- */

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
}
.auth-art { position: relative; overflow: hidden; background: #eef4f8; }
.auth-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.auth-panel {
  display: flex;
  flex-direction: column;
  padding: max(24px, env(safe-area-inset-top)) var(--gutter) 32px;
}
.auth-form {
  width: 100%;
  max-width: 360px;
  margin: auto;
  padding: 32px 0;
}
.auth-form h1 { font-size: clamp(32px, 3.4vw, 42px); }
.auth-form .cta { min-height: 44px; padding: 0 18px; border-radius: 10px; box-shadow: 0 3px 10px rgba(224, 82, 58, 0.2); }
.auth-form .lede { margin-bottom: 22px; }
.lede { margin: 0 0 28px; color: var(--ink-soft); font-size: 17px; }

.coming-soon-kicker {
  margin: 0 0 22px;
  color: var(--vermilion-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.coming-soon h1 { margin-bottom: 24px; }
.coming-soon .lede { line-height: 1.7; margin-bottom: 24px; }
.coming-soon-note { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; }
.coming-soon .text-link { font-size: 16px; }

.phone-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.phone-field:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 222, 0.18);
}
.country {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 600;
}
.country img { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.phone-field input {
  flex: 1;
  min-width: 0;
  padding: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 16px/1.2 var(--text);
}
.phone-field input:focus { outline: none; }
.phone-field input::placeholder { color: #9aa3ae; }

.field-message { margin: 10px 2px 0; font-size: 15px; }
.field-message[data-kind="error"] { color: var(--error); }
.field-message[data-kind="info"] { color: var(--ink); }

.consent { margin: 20px 0 28px; color: var(--ink-soft); font-size: 14px; }
.consent a { color: var(--ink); text-underline-offset: 3px; }

/* Code screen (Working Spec 3.3.5): one real input laid over six drawn boxes,
   so the phone can fill the code from the text message and pasting works */
.code-field { position: relative; }
.code-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.code-boxes span {
  display: grid;
  place-items: center;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 600 23px/1 var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.code-boxes span.is-active {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 222, 0.18);
}
.code-field[data-error] .code-boxes span { border-color: var(--error); }
.code-field input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  opacity: 0.01;
}
.code-field input:focus { outline: none; }
.code-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(224, 82, 58, 0.45);
  text-underline-offset: 4px;
  cursor: pointer;
}
.link-button:disabled { color: var(--ink-soft); font-weight: 400; text-decoration: none; cursor: default; }
.link-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.code-actions[hidden] { display: none; }
.code-hint { margin: 14px 2px 0; color: var(--ink-soft); font-size: 14px; }
.fine-print { margin: 18px 0 0; color: var(--ink-soft); font-size: 14px; }
.fine-print a { color: var(--ink); text-underline-offset: 3px; }

/* About you (Working Spec 3.3.7) */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin: 0 0 16px; min-width: 0; }
.field label { display: block; margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.field input {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 16px/1.2 var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 111, 222, 0.18);
}
.field input::placeholder { color: #9aa3ae; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.invitation-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 8px repeat(2, minmax(0, 1fr)) 8px repeat(2, minmax(0, 1fr)); align-items: center; gap: 6px; }
.invitation-boxes .invitation-character { min-width: 0; height: 46px; padding: 0; text-align: center; font-size: 22px; font-weight: 600; text-transform: uppercase; }
.invitation-dash { text-align: center; color: var(--ink-soft); }
#invitation-hint { margin-top: 10px; font-size: 13px; }
#about-step .field-message { margin: 0 2px 16px; }

/* Text Autoic (Working Spec 3.3.8): a QR code on a computer, a button on a
   phone, and the number on both */
.text-step { text-align: center; }
.text-step .lede { text-wrap: balance; }
.text-step .code-actions { justify-content: center; }
.text-step[data-device="phone"] .for-computer,
.text-step[data-device="computer"] .for-phone { display: none; }
.qr-box {
  width: 216px;
  margin: 0 auto 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.qr-box img { width: 200px; height: 200px; image-rendering: pixelated; }
.text-or { margin: 18px 0 10px; color: var(--ink-soft); font-size: 15px; }
.number-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 17px;
}
.copy-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.copy-button:hover { background: rgba(29, 37, 51, 0.06); color: var(--ink); }
.nowrap { white-space: nowrap; }

@media (max-width: 400px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-art { height: clamp(200px, 34vh, 320px); }
  .auth-art img { object-position: 50% 35%; }
  .auth-panel { padding-top: 20px; }
  .auth-form { margin: 0 auto; padding-top: 28px; }
}

/* ---------- footer ---------- */

/* copyright on the left, legal links on the right, no box around them */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  color: var(--ink-soft);
  font-size: 13px;
}
.footer-links { display: flex; gap: 20px; }
.site-footer a { color: var(--ink-soft); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--ink); }
.hero .site-footer {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  right: var(--gutter);
  bottom: max(16px, env(safe-area-inset-bottom));
  color: var(--ink);
  text-shadow: 0 0 6px rgba(255, 253, 248, 0.95), 0 0 14px rgba(255, 253, 248, 0.8);
}
.hero .site-footer a { color: var(--ink); }
.auth-panel .site-footer { width: 100%; max-width: 400px; margin: 0 auto; }

@media (max-aspect-ratio: 4/5) {
  .hero .site-footer { left: 16px; right: 16px; font-size: 12px; }
  .footer-links { gap: 14px; }
}

/* ---------- story art beside the legal pages ---------- */

/* wide screens: two tall scenes stay fixed on the left and right while the
   cream text column scrolls between them; narrow screens: a banner on top */
.rail, .doc-banner { display: none; }
@media (min-width: 1180px) {
  .rail {
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    width: calc((100vw - 800px) / 2);
    overflow: hidden;
  }
  .rail-left { left: 0; }
  .rail-right { right: 0; }
  .rail img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
  .rail::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    pointer-events: none;
  }
  .rail-left::after { right: 0; background: linear-gradient(to right, rgba(255, 253, 248, 0), var(--paper)); }
  .rail-right::after { left: 0; background: linear-gradient(to left, rgba(255, 253, 248, 0), var(--paper)); }
  .doc { position: relative; }
}
@media (max-width: 1179px) {
  .doc-banner { display: block; margin: -24px 0 32px; }
  .doc-banner img {
    width: 100%;
    height: clamp(170px, 34vw, 300px);
    object-fit: cover;
    object-position: 50% 58%;
    border-radius: 18px;
  }
}

/* ---------- documents: legal pages, 404 ---------- */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 16px 80px;
}
.doc .brand { margin-bottom: 56px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 6px; }
.doc h2 {
  margin: 40px 0 10px;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.3;
  color: var(--ink);
}
.doc h3 { margin: 22px 0 6px; font-size: 17px; color: var(--ink); }
.doc p, .doc li, .doc address { color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }
.doc a { color: var(--ink); text-underline-offset: 3px; }
.doc address { font-style: normal; margin: 0 0 12px; }
.doc .meta { margin-bottom: 28px; font-size: 14px; }
.doc .summary {
  margin: 24px 0 8px;
  padding: 18px 22px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.doc .summary p { margin-bottom: 6px; }
.doc table { width: 100%; margin: 8px 0 16px; border-collapse: collapse; font-size: 14.5px; }
.doc th, .doc td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-soft); }
.doc th { color: var(--ink); font-weight: 700; }
.doc td:first-child { width: 34%; color: var(--ink); font-weight: 600; }
.doc .related { margin-top: 28px; }
.doc .back { font-weight: 600; }
.doc .site-footer { margin-top: 56px; }
