/* Mhory site — Archive Blue, matching lib/core/theme.dart and docs/design.md. */

:root {
  --ink-blue: #1e3a5f;
  --ink-blue-deep: #16294a;
  --slate: #4e6e8e;
  --brass: #b08034;
  --brass-deep: #8a5e1e;
  --brass-light: #d9a65b;
  --ink: #17202b;
  --paper: #f5f6f8;
  --paper-low: #eef1f5;
  --card: #e7eaf0;
  --tint: #d6e3f3;
  --on-tint: #0b1b2e;
  --muted: #444e5c;
  --outline: #6a7484;
  --hairline: #c8cfd9;
  --on-band: #f2f5f9;
  --on-band-muted: #b8c7da;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink-blue: #86add8;
    --ink-blue-deep: #16294a;
    --brass: #d9a65b;
    --brass-deep: #d9a65b;
    --ink: #e6eaf0;
    --paper: #0f1621;
    --paper-low: #141c29;
    --card: #182131;
    --tint: #2a4a70;
    --on-tint: #d6e3f3;
    --muted: #b7c2d1;
    --outline: #93a0b3;
    --hairline: #2c3a4e;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}

a { color: var(--ink-blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brass-deep); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }
p.lede { font-size: 1.2rem; color: var(--muted); max-width: 40ch; }

.wrap { width: min(100% - 40px, 1040px); margin-inline: auto; }
.prose { max-width: var(--measure); }

/* Band: the ink-blue header with the brass rule, as in the app. */
.band {
  background: var(--ink-blue-deep);
  color: var(--on-band);
  border-bottom: 2px solid var(--brass-light);
}
.band a { color: var(--on-band); text-decoration: none; }
.band a:hover { color: var(--brass-light); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  color: var(--on-band-muted);
}
.nav ul a { color: inherit; }
.nav ul a[aria-current="page"] { color: var(--brass-light); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  padding: clamp(48px, 9vw, 112px) 0;
}
.hero p.lede { max-width: 46ch; }

/* Phone: a screenshot in a plain dark bezel. The image is 1206x2622, so the
   bezel's radius scales with its width to keep the corners in proportion. */
.phone {
  --w: 300px;
  width: var(--w);
  max-width: 100%;
  margin: 0;
  padding: calc(var(--w) * 0.03);
  border-radius: calc(var(--w) * 0.16);
  background: #0d1420;
  box-shadow: 0 24px 60px rgba(11, 27, 46, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.13);
  background: var(--paper);
}
.hero-phone { --w: clamp(220px, 26vw, 300px); }
.hero .rule { width: 56px; height: 3px; background: var(--brass); border: 0; margin: 0 0 20px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.1;
}
.store small { display: block; font-weight: 400; font-size: 0.72rem; opacity: 0.8; }
.store svg { width: 22px; height: 22px; fill: currentColor; }
.store.soon { background: transparent; color: var(--muted); border: 1px solid var(--hairline); cursor: default; }

/* Sections */
.section { padding: clamp(40px, 7vw, 80px) 0; border-top: 1px solid var(--hairline); }
.section .wrap > h2 { margin-bottom: 0.6em; }
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin: 0 0 12px;
}

/* Numbered steps: what the app does, in order. */
.steps { display: grid; gap: 28px; max-width: 760px; margin-top: 8px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 20px; }
.step-n {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--on-tint);
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
}
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); }

/* The three views, as columns divided by hairlines rather than cards. */
.views { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 8px; }
.view { padding: 4px 28px; border-left: 1px solid var(--hairline); }
.view:first-child { padding-left: 0; border-left: 0; }
.view .phone { --w: 100%; margin-bottom: 22px; }
.view h3 { color: var(--ink-blue); margin-bottom: 6px; }
.view p { margin: 0; color: var(--muted); }

/* Tiles: short facts laid out side by side. */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.tile {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
}
.tile h3 { font-size: 1.15rem; margin-bottom: 6px; }
.tile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tile-k {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--outline);
  margin-bottom: 8px;
}
.tile-by { margin-top: auto; padding-top: 12px; font-size: 0.8rem; color: var(--outline); }
.tile.plus { border-top: 3px solid var(--brass); }
.tile.plus .tile-k { color: var(--brass-deep); }
.plans { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sources { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* The dig: one place read down through time. */

.strata {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  position: relative;
  max-width: 760px;
}
.strata::before {
  content: "";
  position: absolute;
  left: 118px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--hairline);
}
.stratum {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 32px;
  position: relative;
  padding: 0 0 40px;
}
.stratum:last-child { padding-bottom: 0; }
.stratum::before {
  content: "";
  position: absolute;
  left: 113px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-blue);
  box-shadow: 0 0 0 4px var(--paper);
}
.stratum.you::before { background: var(--brass); width: 14px; height: 14px; left: 112px; top: 7px; }
.year {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink-blue);
  text-align: right;
  line-height: 1.6;
  white-space: nowrap;
}
.stratum.you .year { color: var(--brass-deep); }
.stratum h3 { font-size: 1.35rem; margin-bottom: 6px; }
.stratum p { margin: 0; color: var(--muted); }
.stratum.you .stratum-body { border-left: 3px solid var(--brass); padding-left: 16px; margin-left: -19px; }
.stratum.you h3 { color: var(--brass-deep); }

/* Long-form pages */
.page-head { padding: clamp(36px, 6vw, 64px) 0 8px; }
.page-head .meta { color: var(--outline); font-size: 0.95rem; }
.legal { padding-bottom: 64px; }
.legal h2 { font-size: 1.45rem; margin-top: 2.2em; }
.legal h3 { font-size: 1.1rem; font-family: var(--sans); font-weight: 600; margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.4em; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 12px 0 20px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hairline); }
.legal th { color: var(--outline); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.note {
  background: var(--card);
  border-left: 3px solid var(--brass);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 20px 0;
}
.note p:last-child { margin: 0; }

.faq dt { font-weight: 600; margin-top: 1.4em; }
.faq dd { margin: 0.3em 0 0; color: var(--muted); }

/* Footer */
.foot {
  margin-top: 40px;
  padding: 28px 0 40px;
  border-top: 2px solid var(--brass-light);
  background: var(--ink-blue-deep);
  color: var(--on-band-muted);
  font-size: 0.9rem;
}
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot a { color: var(--on-band); text-decoration: none; }
.foot a:hover { color: var(--brass-light); }
.foot ul { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero > div:first-child { order: 2; }
  .hero-phone { --w: 200px; margin-inline: auto; }
  .view .phone { --w: 240px; margin-inline: auto; }
  .views { grid-template-columns: 1fr; gap: 24px; }
  .view { padding: 0; border-left: 0; }
  .strata::before { left: 5px; }
  .stratum { grid-template-columns: 1fr; gap: 4px; padding-left: 28px; }
  .stratum::before { left: 0; }
  .stratum.you::before { left: -1px; }
  .year { text-align: left; }
  .stratum.you .stratum-body { margin-left: 0; }
  .nav { flex-direction: column; align-items: flex-start; gap: 10px; }
}
