/* ==========================================================================
   AFLDB coming-soon page — apex (afldb.com)

   The application's design system, "the almanac", reproduced for a page that
   is served as a static file and therefore cannot import src/styles/globals.css
   or the next/font faces. Colour tokens are copied verbatim from that file so
   the two look like one site; the type stacks fall back to the same system
   faces the app names after its webfonts.

   Keep the tokens in step with src/styles/globals.css if that palette moves.
   ========================================================================== */

:root {
  --bg:            #e8e3d8;
  --bg-subtle:     #ded8cc;
  --bg-raised:     #f1ede4;
  --border:        #ccc4b6;
  --border-strong: #a99f90;

  --text:          #211f1b;
  --text-muted:    #5e584f;
  --text-faint:    #746c61;

  --accent:        #765913;
  --accent-hover:  #57400b;
  --focus:         #765913;

  --radius: 2px;

  --font-serif: Newsreader, Georgia, "Times New Roman", serif;
  --font-sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono:  ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  --measure: 1180px;
  --gutter: clamp(1rem, 3vw, 2rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #090a0b;
    --bg-subtle:     #111315;
    --bg-raised:     #151719;
    --border:        #292d30;
    --border-strong: #42484c;

    --text:          #e8e5de;
    --text-muted:    #aaa69d;
    --text-faint:    #85827b;

    --accent:        #d1ad55;
    --accent-hover:  #e4c46e;
    --focus:         #d1ad55;

    color-scheme: dark;
  }
}

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

html { min-width: 320px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 10;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  padding: 0.5rem 0.75rem;
}

/* --- Masthead ---------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.masthead {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-block: 1rem;
}
.brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

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

.hero {
  padding-block: clamp(2.5rem, 8vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 6.5vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1.25rem;
}

.lede {
  max-width: 46rem;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.1rem);
}

.cta-row {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* --- Statistics strip -------------------------------------------------- */

.stats {
  list-style: none;
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
  padding: 1.25rem 0;
  border-block: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: left;
}
.stats li {
  padding-inline: 1rem;
  border-left: 1px solid var(--border);
}
.stats li:first-child { border-left: 0; }
.stats strong {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.stats span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 1.25rem; }
  .stats li:nth-child(odd) { border-left: 0; }
}

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

h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: clamp(2.5rem, 7vw, 4rem) 0 1.5rem;
}

h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

p { margin: 0 0 1rem; }

img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.shot-wide { padding-top: 0.5rem; }

/* Two columns at full width, so the four features land as a clean 2x2 and
   each screenshot is wide enough to read. A 320px minimum gave three columns
   and an orphan on the second row. */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
}
.feature p { color: var(--text-muted); }
.feature img { margin-top: 0.75rem; }

/* --- Notes band -------------------------------------------------------- */

.band {
  margin-top: clamp(2rem, 6vw, 3.5rem);
}
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.note p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* --- Light / mobile pair ----------------------------------------------- */

.pair {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: end;
  margin-top: clamp(2.5rem, 7vw, 4rem);
}
.pair figure { margin: 0; }
.pair figcaption {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.phone img { max-width: 260px; margin-inline: auto; }

@media (max-width: 720px) {
  .pair { grid-template-columns: 1fr; }
}

/* --- Buttons and the early-access form --------------------------------- */

.btn {
  display: inline-block;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg);
}
.btn:disabled { opacity: 0.6; cursor: default; }

.btn-secondary {
  background: transparent;
  color: var(--accent);
}
.btn-secondary:hover {
  background: transparent;
  color: var(--accent-hover);
}

.request-form {
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  padding: 1.25rem;
}
.request-form .intro {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.request-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}
.request-form .hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 0.2rem;
}
.request-form .field { margin-bottom: 0.9rem; }
.request-form input[type="text"],
.request-form input[type="email"],
.request-form textarea,
.request-form select {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 0.6rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.request-form textarea { resize: vertical; min-height: 5rem; }

/* The honeypot. Hidden from people and from screen readers, but a bot
   parsing the HTML fills it in and gives itself away. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-message {
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-raised);
  font-size: 0.9rem;
}
.form-message[data-kind="error"] { border-left-color: #9c3b2e; }
@media (prefers-color-scheme: dark) {
  .form-message[data-kind="error"] { border-left-color: #d97a68; }
}

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

.site-footer {
  margin-top: clamp(3rem, 8vw, 5rem);
  border-top: 1px solid var(--border);
  padding-block: 2rem;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.site-footer p { margin: 0 0 0.35rem; }
