/* Vestigium Core — site styles. No external requests: fonts are self-hosted. */

@font-face { font-family: "Archivo Narrow"; src: url("../fonts/archivo-narrow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo Narrow"; src: url("../fonts/archivo-narrow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --paper: #ECEEEA;     /* cool evidence-board grey */
  --ink: #18232C;       /* case-file ink */
  --slate: #51606A;     /* secondary text */
  --seal: #7B2230;      /* oxblood wax-seal accent */
  --manila: #E6DCBF;    /* folder tab */
  --rule: #C6CCC6;
  --white: #F8F9F6;

  --display: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;

  --measure: 64ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--seal); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--seal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0 0 0.6em; letter-spacing: -0.005em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: var(--measure); }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 0.55rem; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 1.4rem; flex-wrap: wrap; font-family: var(--display); font-weight: 600; font-size: 1.02rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--seal); text-decoration: underline; }

/* Buttons */
.btn { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1.08rem; padding: 0.8rem 1.3rem; border: 2px solid var(--ink); text-decoration: none; border-radius: 3px; }
.btn-primary { background: var(--seal); border-color: var(--seal); color: var(--white); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-plain { color: var(--ink); background: transparent; }
.btn-plain:hover { background: var(--ink); color: var(--white); }
.actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.8rem; }

/* Hero: a dictionary entry */
.hero { padding-block: clamp(3rem, 9vw, 7rem) clamp(3rem, 7vw, 5rem); }
.entry { border-left: 6px solid var(--seal); padding-left: clamp(1rem, 3vw, 2rem); margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.headword { font-family: var(--display); font-weight: 700; font-size: clamp(3.6rem, 13vw, 9.5rem); line-height: 0.88; letter-spacing: -0.02em; margin: 0; }
.gloss { font-style: italic; color: var(--slate); font-size: clamp(1.1rem, 2.2vw, 1.4rem); margin: 0.9rem 0 0; }
.gloss b { font-style: normal; font-weight: 600; color: var(--ink); }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); max-width: 20ch; }
.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); max-width: 56ch; color: var(--ink); }

/* Sections */
section { padding-block: clamp(3rem, 8vw, 5.5rem); border-top: 1px solid var(--rule); }
.intro { max-width: 60ch; margin-bottom: 2.5rem; color: var(--slate); }

/* Steps: a trace line, because this is a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.steps li { position: relative; padding: 2.4rem 1.4rem 0 0; counter-increment: step; }
.steps li::before { content: ""; position: absolute; top: 0.62rem; left: 0; right: 0; border-top: 2px dashed var(--slate); }
.steps li:last-child::before { right: auto; width: 1.4rem; }
.steps li::after { content: counter(step); position: absolute; top: 0; left: 0; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--ink); color: var(--white); font-family: var(--display); font-weight: 700; font-size: 0.85rem; display: grid; place-items: center; }
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--slate); font-size: 1.02rem; }

/* Local / privacy block */
.local { background: var(--ink); color: var(--white); border-top: 0; }
.local h2 { color: var(--white); max-width: 22ch; }
.local p { color: #C9D2D8; }
.local-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 2.5rem; margin-top: 2.5rem; }
.local-grid h3 { color: var(--manila); }

/* Who it's for */
.uses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 3rem; }
.uses dt { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.uses dd { margin: 0.2rem 0 0; color: var(--slate); }

/* Pricing ledger */
.ledger { border-top: 2px solid var(--ink); }
.row { display: grid; grid-template-columns: 1.2fr 0.9fr 2fr auto; gap: 1rem 2rem; align-items: baseline; padding-block: 1.4rem; border-bottom: 1px solid var(--rule); }
.row h3 { margin: 0; }
.price { font-family: var(--display); font-weight: 700; font-size: 1.5rem; white-space: nowrap; }
.price small { font-size: 0.95rem; font-weight: 600; color: var(--slate); }
.row p { margin: 0; color: var(--slate); font-size: 1.02rem; }
.row .btn { font-size: 0.98rem; padding: 0.55rem 1rem; white-space: nowrap; }
.row.featured { background: var(--manila); margin-inline: -1rem; padding-inline: 1rem; border-bottom-color: var(--manila); }
.fine { font-size: 0.95rem; color: var(--slate); margin-top: 1.4rem; }

/* System requirements */
.specs { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); font-size: 1.02rem; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 0.9rem 1.5rem 0.9rem 0; border-bottom: 1px solid var(--rule); }
.specs thead th { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.specs tbody th { font-family: var(--display); font-weight: 600; width: 22%; }
.specs td { color: var(--slate); width: 39%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); padding-block: 1.1rem; max-width: 72ch; }
.faq summary { font-family: var(--display); font-weight: 600; font-size: 1.25rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 700; color: var(--seal); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0.8rem 0 0; color: var(--slate); }

/* Contact */
.contact .address { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 4vw, 2.2rem); word-break: break-word; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 2.5rem 3rem; font-size: 0.95rem; color: var(--slate); }
.site-footer .wrap { display: grid; gap: 1rem; }
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-footer p { max-width: 90ch; margin: 0; }

/* Legal pages */
.legal { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.legal .updated { color: var(--slate); font-style: italic; }
.legal ul { max-width: var(--measure); padding-left: 1.2rem; }
.legal li { margin-bottom: 0.4rem; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 1.5rem; }
  .local-grid { grid-template-columns: 1fr; }
  .uses { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr auto; }
  .row p { grid-column: 1 / -1; }
  .row .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 640px) {
  .specs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .specs, .specs tbody, .specs tr, .specs th, .specs td { display: block; width: auto; }
  .specs tr { border-bottom: 1px solid var(--rule); padding-block: 0.8rem; }
  .specs tbody th, .specs td { border: 0; padding: 0.15rem 0; width: auto; }
  .specs td:nth-of-type(1)::before { content: "Minimum: "; font-weight: 600; color: var(--ink); }
  .specs td:nth-of-type(2)::before { content: "Recommended: "; font-weight: 600; color: var(--ink); }
  .specs td[colspan]::before { content: ""; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .steps li::before { display: none; }
  .nav { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
html { scroll-behavior: smooth; }
.local .more { margin-top: 2.5rem; }
.local .more a { color: var(--manila); }
.local .more a:hover { color: var(--white); }
