/* Aftersaid site styles. Hand-written, no framework, no JavaScript.
   Phone first (390 board), then desktop (1440 board) from 960 px.
   Tokens follow the approved boards' design spec §3; every text pair clears WCAG AA. */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/Figtree-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Aftersaid CJK";
  src: url("/assets/fonts/NotoSansSC-subset.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+4E2D, U+6587;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #FFFFFF;          /* Paper */
  --band: #F4F4F5;        /* Mist */
  --text: #0E0F12;        /* Ink: 19.17:1 on Paper, 17.44:1 on Mist */
  --text-2: #5C6167;      /* 6.25:1 Paper, 5.68:1 Mist, 5.05:1 picture grey */
  --accent-text: #9E4E00; /* shipped light text orange: 5.93:1 Paper, 5.39:1 Mist */
  --mark: #C26400;        /* shipped shape orange (graphic, 3:1 floor): 4.1:1 Paper */
  --accent-fill: #9E4E00; /* light AccentColor; white on it 5.93:1 */
  --on-accent: #FFFFFF;
  --rule: #E2E3E6;
  --picture: #E6E7EA;
  --font: "Figtree", "Aftersaid CJK", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  --pad-x: 20px;
  --section-y: 56px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F12;        /* Ink */
    --band: #17181C;      /* Night */
    --text: #FFFFFF;      /* 19.17:1 Ink, 17.74:1 Night */
    --text-2: #A3A7AD;    /* 7.93:1 Ink, 7.34:1 Night, 6.1:1 Graphite */
    --accent-text: #FF8400; /* 7.81:1 Ink, 7.22:1 Night */
    --mark: #FF8400;
    --accent-fill: #B35C00; /* dark AccentColor; white on it 4.72:1 */
    --on-accent: #FFFFFF;
    --rule: #26282E;
    --picture: #26282E;   /* Graphite */
  }
}
@media (min-width: 600px) { :root { --pad-x: 40px; } }
@media (min-width: 960px) { :root { --section-y: 96px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 26px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-text); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 2px;
}
strong, b { font-weight: 700; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }
.skip-link:focus-visible { outline-color: var(--text); }

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
  box-sizing: content-box;
}
.section { padding-block: var(--section-y); }
.band { background: var(--band); }

/* ---------- Type ---------- */
h1, .h1 {
  font-size: 40px;
  line-height: 46px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
h2, .h2 {
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h3, .h3 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.sub { font-size: 18px; line-height: 28px; font-weight: 500; }
.lead { font-size: 18px; line-height: 28px; color: var(--text-2); }
.muted { color: var(--text-2); }
.text-link {
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

@media (max-width: 359px) {
  h1, .h1 { font-size: 34px; line-height: 40px; }
}
@media (min-width: 960px) {
  body { font-size: 18px; line-height: 28px; }
  h1, .h1 { font-size: 64px; line-height: 72px; letter-spacing: -0.02em; }
  h2, .h2 { font-size: 40px; line-height: 48px; letter-spacing: -0.015em; }
  h3, .h3 { font-size: 22px; line-height: 30px; }
  .sub, .lead { font-size: 21px; line-height: 32px; }
}

/* ---------- Header ---------- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 16px;
  min-height: 45px;   /* content box: 45 + 4 + 4 + 1 px rule = the board's 54 */
  padding-block: 4px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark { height: 19px; width: auto; color: var(--mark); flex: none; }
.wordmark {
  font-size: 21px;
  line-height: 25px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.wordmark .dot { color: var(--mark); }
.site-nav ul { display: flex; flex-wrap: wrap; column-gap: 16px; }
.site-nav a {
  display: inline-block;
  padding-block: 11px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-decoration-color: var(--accent-text);
}
@media (min-width: 960px) {
  .site-header .wrap { min-height: 52px; padding-block: 18px; }  /* 52 + 36 + 1 px rule = 89 */
  .brand { gap: 9px; }
  .brand-mark { height: 22px; }
  .wordmark { font-size: 24px; line-height: 29px; }
  .site-nav ul { column-gap: 32px; }
  .site-nav a { font-size: 16px; }
}

/* ---------- Coming-soon CTA (non-interactive; replaces the badge slot) ---------- */
.cta {
  display: inline-block;
  padding: 13px 20px;
  border: 1.5px solid var(--text-2);
  border-radius: 10px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Picture placeholders ---------- */
.pic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0 32px;
  background: var(--picture);
  border-radius: 14px;
  color: var(--text-2);
  text-align: center;
  aspect-ratio: 35 / 23;   /* feature rows: 350×230 phone */
}
.pic-tag {
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.pic-label { font-size: 14px; line-height: 20px; font-weight: 500; }
.pic--hero { aspect-ratio: 35 / 24; }  /* 350×240 */
.pic--tile { aspect-ratio: 5 / 3; }    /* 350×210 */
@media (min-width: 960px) {
  .pic { aspect-ratio: 56 / 38; }      /* 560×380 */
  .pic--hero { aspect-ratio: 4 / 3; }  /* 560×420 */
  .pic--tile { aspect-ratio: 544 / 300; }
}

/* ---------- Two-column rows (hero, feature rows) ---------- */
.row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.row-text { display: grid; gap: 14px; align-content: start; max-width: 496px; }
.hero .row { gap: 32px; }
.hero .row-text { gap: 18px; }
.hero .cta { justify-self: start; }
@media (min-width: 960px) {
  .row {
    grid-template-columns: minmax(0, 496fr) minmax(0, 560fr);
    gap: 64px;
    align-items: center;
  }
  .row--pic-left { grid-template-columns: minmax(0, 560fr) minmax(0, 496fr); }
  .row--pic-left .pic { order: -1; }
  .row-text { gap: 18px; }
  .hero .row { gap: 64px; }
  .hero .row-text { gap: 24px; }
}

/* ---------- Home: promises ---------- */
.promises { display: grid; gap: 24px; }
.promises h2 { max-width: 900px; }
.promise-list { display: grid; gap: 20px; }
.promise-list li { display: grid; gap: 12px; align-content: start; }
.promise-list li::before {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  background: var(--accent-text);
}
@media (min-width: 960px) {
  .promises { gap: 32px; }
  .promise-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
}

/* ---------- Home: four tiles ---------- */
.tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.tile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0; }
.tile p { color: var(--text-2); }
@media (min-width: 960px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; row-gap: 56px; }
}

.row-text p, .hero-body { color: var(--text-2); }
.row-text .sub, .row-text .cta { color: var(--text); }

/* ---------- Page titles (Features, Privacy) ---------- */
.page-title { padding-top: var(--section-y); padding-bottom: 16px; display: grid; gap: 20px; }
@media (min-width: 960px) { .page-title { padding-bottom: 24px; gap: 24px; } }
.placeholder {
  font-weight: 600;
  color: var(--accent-text);
}

/* ---------- Privacy body ---------- */
.prose { padding-top: 16px; padding-bottom: var(--section-y); }
.prose .measure { display: grid; gap: 20px; max-width: 760px; }
@media (min-width: 960px) {
  .prose { padding-top: 24px; }
  .prose .measure { gap: 24px; }
}
/* Run-in section heads: real h2s for heading navigation, drawn exactly as the bold lead-in they replaced. */
.prose .pp > h2,
.prose .pp > p { display: inline; }
.prose .pp > h2 { font: inherit; font-weight: 700; letter-spacing: inherit; color: inherit; }

/* ---------- Support ---------- */
.support-intro { padding-top: var(--section-y); padding-bottom: 40px; display: grid; gap: 24px; }
.support-intro .lead { max-width: 760px; }
@media (min-width: 960px) { .support-intro { padding-bottom: 64px; gap: 32px; } }
.faq-section { display: grid; gap: 24px; }
.faq { display: grid; gap: 22px; max-width: 760px; }
.faq-item { display: grid; gap: 6px; }
.faq-q { font-size: inherit; line-height: inherit; font-weight: 600; letter-spacing: 0; }
.faq-a { color: var(--text-2); }
@media (min-width: 960px) { .faq-section { gap: 32px; } .faq { gap: 28px; } }

/* ---------- 404 ---------- */
.notfound { display: grid; gap: 24px; max-width: 760px; }

/* ---------- Store band ---------- */
.store-band { background: var(--band); padding-block: 40px; }
.store-band .wrap { display: grid; gap: 16px; justify-items: start; }
.store-icon { width: 56px; height: 56px; }
.store-text { display: grid; gap: 16px; }
.store-text p { color: var(--text-2); }
@media (min-width: 960px) {
  .store-band { padding-block: 56px; }
  .store-band .wrap { grid-template-columns: 64px 1fr; align-items: center; column-gap: 32px; }
  .store-icon { width: 64px; height: 64px; }
  .store-text { gap: 6px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--rule); }
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 28px;
  padding-bottom: 36px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--text-2);
}
.site-footer ul { display: flex; gap: 24px; }
.site-footer a {
  display: inline-block;
  padding-block: 12px;
  margin-block: -12px;   /* 44 px tap target without changing the board's spacing */
  color: var(--text-2);
  text-decoration: none;
}
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer a[aria-current="page"] { color: var(--text); }
.site-footer p { margin: 0; }
@media (min-width: 960px) {
  .site-footer .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    padding-bottom: 40px;
  }
  .site-footer ul { gap: 28px; }
}

@media (max-width: 359px) {
  .cta { padding-inline: 14px; font-size: 14px; }  /* keeps the pill on one line at 320 */
}
