/*
 * Amiico — amiicoapp.com landing page styles.
 *
 * Plain CSS, no build step, no framework. Colour tokens mirror
 * src/theme/tokens.ts (cream / brick, WCAG-AA-fixed values). Fonts are
 * self-hosted woff2 (OFL 1.1) — no external requests, so the page embodies
 * the "no tracking, no third parties" promise it makes. See site/README.md.
 *
 * AA note: the brand brick #BE5F46 on cream is ~3.98:1 — fine for large
 * headings and UI (needs 3:1) but NOT normal text. All brick-coloured body
 * text / links therefore use the deepened accentTextBg (#A84B33 = 5.24:1 on
 * cream). White-on-#A84B33 buttons are 5.65:1. Both pass AA.
 */

/* ---- Self-hosted fonts (OFL 1.1, see site/fonts/OFL-*.txt) ---------------- */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/hanken-grotesk-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/hanken-grotesk-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/hanken-grotesk-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/hanken-grotesk-800.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono-600.woff2') format('woff2');
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --text: #241e1b;
  --text-secondary: #615c54;
  --text-muted: #777065; /* AA 4.5:1 on cream */
  --accent: #be5f46; /* brick — headings / UI / decorative only */
  --accent-text: #a84b33; /* AA 5.24:1 on cream — brick body text & links */
  --accent-pressed: #8a3a26;
  --on-accent: #ffffff;
  --border: #e7decf;
  --border-inner: #f0e9dc;
  --icon-tile: #ede3d2;
  --success: #5f8a6b;
  --warning: #b8860b; /* amber — max warning intensity, never red */
  --offline-bg: #f6efe0;
  --offline-border: #e9dec8;
  --offline-text: #8a7d5e;
  /* Small-text (badge / status) label colour — darker than --offline-text so
     it clears AA 4.5:1 on --offline-bg (5.79:1) where offline-text is only
     ~3.5:1. Used only for the small badge + waitlist-status labels. */
  --badge-text: #615c54;

  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', 'Menlo', monospace;

  --radius-card: 14px;
  --radius-button: 12px;
  --radius-tile: 9px;
  --radius-pill: 999px;

  --shadow-card: 0 16px 38px rgba(40, 33, 25, 0.12), 0 2px 6px rgba(40, 33, 25, 0.05);

  --maxw: 62rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1815;
    --surface: #262120;
    --text: #f4ebe2;
    --text-secondary: #8b8378;
    --text-muted: #948c80; /* AA on dark */
    --accent: #d2785c;
    --accent-text: #d2785c; /* brightened brick passes AA on dark */
    --accent-pressed: #b5583c;
    --on-accent: #1b1815;
    --border: #322b26;
    --border-inner: #3c342e;
    --icon-tile: #322a25;
    --success: #7fb48e;
    --warning: #c79a3a;
    --offline-bg: #262120;
    --offline-border: #3c342e;
    --offline-text: #a39a8c;
    --badge-text: #a39a8c; /* 5.74:1 on dark --offline-bg — AA */
    --shadow-card: 0 16px 38px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
  }
}

/* ---- Reset-ish ----------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg {
  max-width: 100%;
  display: block;
}
a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--accent-pressed);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link for keyboard users. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 0 0 var(--radius-button) 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ---- Layout -------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section {
  padding-block: clamp(3rem, 8vw, 6rem);
}
.numeric {
  font-family: var(--mono);
  font-feature-settings: 'tnum' 1;
}

/* ---- Header -------------------------------------------------------------- */
.site-header {
  padding-block: 1.25rem;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.wordmark .ii {
  color: var(--accent);
}
.header-cta {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-text);
  text-decoration: none;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-button);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.header-cta:hover {
  background: var(--icon-tile);
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  padding-top: clamp(2rem, 6vw, 4rem);
}
.hero .wrap {
  display: grid;
  gap: clamp(2rem, 6vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 56rem) {
  .hero .wrap {
    grid-template-columns: 1.05fr 0.95fr;
  }
}
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(2.4rem, 6.5vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.hero .time {
  color: var(--accent);
}
.subhead {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin: 0 0 2rem;
  max-width: 34ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  background: var(--accent-text);
  color: var(--on-accent);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-button);
  text-decoration: none;
  cursor: pointer;
}
.button-primary:hover {
  background: var(--accent-pressed);
  color: var(--on-accent);
}
.hero-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---- Brief card illustration (stylised, not a screenshot) ---------------- */
.brief-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  max-width: 22rem;
  margin-inline: auto;
}
.brief-card .brief-label {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}
.brief-card .brief-day {
  font-weight: 800;
  font-size: 1.15rem;
  margin: 0 0 1.25rem;
}
.brief-weather {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-inner);
}
.brief-weather .temp {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 3rem;
  line-height: 1;
  color: var(--text);
}
.brief-weather .cond {
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.brief-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--border-inner);
}
.brief-row:last-child {
  border-bottom: none;
}
.brief-row .tile {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-tile);
  background: var(--icon-tile);
  flex: none;
  display: grid;
  place-items: center;
}
.brief-row .tile svg {
  width: 18px;
  height: 18px;
}
.brief-row .r-main {
  flex: 1;
  min-width: 0;
}
.brief-row .r-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.brief-row .r-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.brief-row .r-num {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
}
.brief-row .r-num.pos {
  color: var(--success);
}
.brief-attribution {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.brief-attribution .who {
  font-family: var(--mono);
}

/* ---- Generic section heads ---------------------------------------------- */
.section-eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 0.85rem;
}
h2 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  max-width: 20ch;
}
.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 0 1rem;
}

/* ---- Moment section ------------------------------------------------------ */
.moment {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.moment p {
  max-width: 60ch;
  color: var(--text-secondary);
}
.moment p strong {
  color: var(--text);
  font-weight: 700;
}

/* ---- Feature grid -------------------------------------------------------- */
.features .grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}
@media (min-width: 40rem) {
  .features .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 60rem) {
  .features .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  position: relative;
}
.feature .tile {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-tile);
  background: var(--icon-tile);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.feature .tile svg {
  width: 22px;
  height: 22px;
}
.feature h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}
.feature p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.badge {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--badge-text);
  background: var(--offline-bg);
  border: 1px solid var(--offline-border);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* ---- Privacy section ----------------------------------------------------- */
.privacy {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.privacy .promises {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) {
  .privacy .promises {
    grid-template-columns: repeat(3, 1fr);
  }
}
.privacy .promises li {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
}
.privacy .promises .p-title {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.privacy .promises .p-title svg {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex: none;
}
.privacy .promises p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ---- Waitlist ------------------------------------------------------------ */
.waitlist .wrap {
  max-width: 40rem;
}
.waitlist-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-top: 2rem;
}
.waitlist-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--badge-text);
  background: var(--offline-bg);
  border: 1px solid var(--offline-border);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.9rem;
  margin-bottom: 1.5rem;
  width: fit-content;
}
.waitlist-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  flex: none;
}
.field {
  margin-bottom: 1.25rem;
}
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
.field input[type='email'] {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  min-height: 48px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
}
.field input[type='email']::placeholder {
  color: var(--text-muted);
}
.field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.consent input[type='checkbox'] {
  margin-top: 0.2rem;
  width: 20px;
  height: 20px;
  flex: none;
  accent-color: var(--accent);
}
.consent label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.button-primary:disabled,
.button-primary[aria-disabled='true'] {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.8;
}
.button-primary[aria-disabled='true']:hover {
  background: var(--text-muted);
}
.form-full {
  width: 100%;
}
.fineprint {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.fineprint p {
  margin: 0 0 0.5rem;
}
.form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.form-message.error {
  color: var(--warning);
}
.form-message.success {
  color: var(--success);
}

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.site-footer .wrap {
  display: grid;
  gap: 1.5rem;
}
.site-footer .foot-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}
.site-footer nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}
.site-footer nav a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}
.site-footer .disclaimer {
  max-width: 60ch;
  line-height: 1.6;
}

/* ---- Privacy notice (privacy.html; ruling 155 §3) ------------------------ */
.notice section {
  padding-block: clamp(2rem, 6vw, 4rem);
}
.notice .wrap {
  max-width: 46rem;
}
.notice h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}
.notice h2 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  max-width: none;
  margin: 2.25rem 0 0.75rem;
}
.notice p,
.notice li {
  max-width: 65ch;
}
.notice ul {
  padding-inline-start: 1.25rem;
}
/* A wide table scrolls inside its own box, never the page. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}
.notice table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  font-size: 0.95rem;
}
.notice th,
.notice td {
  text-align: start;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.notice th {
  font-weight: 700;
  color: var(--text-secondary);
}
/* The hold: amber at most, never red (design non-negotiables). */
.hold-banner {
  border: 1px solid var(--warning);
  background: var(--offline-bg);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.hold-banner p {
  margin: 0;
}
/* An unsettled item: body-colour text in a dashed amber box, so it is seen and still AA. */
.tbc {
  font-family: var(--mono);
  font-size: 0.85em;
  border: 1px dashed var(--warning);
  border-radius: 4px;
  padding: 0 0.3em;
  white-space: nowrap;
}
