/* Vigil product page. Colours, type and spacing follow the Amplifier Constellation
   site so the two read as one family. */
:root {
  color-scheme: light;
  --paper: #fff7ee;
  --panel: #f3e6d5;
  --card: #fffdf9;
  --ink: #382316;
  --muted: #6c503e;
  --line: #d7bfa8;
  --rust: #a63c17;
  --rust-dark: #803019;
  --blush: #f5d0b9;
  --sage: #3e6753;
  --focus: #126d72;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }

a { color: inherit; text-underline-offset: .23em; text-decoration-thickness: 1px; }
a:hover { color: var(--sage); }
a:focus-visible, summary:focus-visible, .map-scroll:focus-visible, pre:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 5px;
}

.skip { position: absolute; top: -80px; left: 20px; padding: 12px; background: white; z-index: 5; }
.skip:focus { top: 12px; }

.masthead, main, footer { max-width: 1240px; margin: auto; padding-inline: 32px; }

.masthead { min-height: 92px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 19px; font-weight: 700; }
.brand svg { width: 22px; height: 22px; flex: none; }
.masthead nav { display: flex; flex-wrap: wrap; gap: 4px 26px; font-size: 16px; }
.masthead nav a { padding-block: 12px; }

/* Introduction */
.intro { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 5%; padding: 40px 0 64px; }
.intro h1 { font-size: clamp(40px, 4.5vw, 62px); line-height: 1.06; letter-spacing: -.04em; margin: 0 0 26px; }
.intro p { font-size: 20px; line-height: 1.6; margin: 0 0 22px; max-width: 33em; }
.intro .family { font-size: 16px; color: var(--muted); margin-bottom: 0; }
.intro .actions { font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-block: 30px 24px; }
.cta { display: inline-block; background: var(--rust); color: white; padding: 13px 22px; border-radius: 7px; font-weight: 700; text-decoration: none; }
.cta:hover { background: var(--rust-dark); color: white; }
.hero-art { margin: 0; }
.hero-art svg { display: block; width: 100%; height: auto; }

section { margin-bottom: 88px; scroll-margin-top: 24px; }
section.intro { margin-bottom: 24px; }
h2 { font-size: clamp(25px, 3vw, 38px); line-height: 1.2; letter-spacing: -.025em; margin: 0 0 18px; text-wrap: balance; }
h3 { font-size: 21px; line-height: 1.3; margin: 0 0 10px; }
p { font-size: 18px; line-height: 1.65; margin: 0 0 22px; max-width: 72ch; }
.section-copy { color: var(--muted); }
figure { margin: 32px 0 0; }
figcaption, .small { font-size: 15px; line-height: 1.6; color: var(--muted); }
figcaption { margin-top: 12px; }

/* What it adds */
.adds { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 40px; }
.adds li { border-top: 1px solid var(--line); padding-top: 22px; }
.adds p { font-size: 17px; line-height: 1.6; color: var(--muted); margin: 0; }

/* How a turn goes */
.turn { padding: 34px; background: var(--panel); border-radius: 18px; }
.steps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px 20px 20px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 16px;
  border-radius: 50%; background: var(--blush); border: 1.5px solid var(--rust);
  font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 19px; }
.steps p { font-size: 16px; line-height: 1.55; color: var(--muted); margin: 0; }
.turn .small { margin: 22px 0 0; }

/* Where it fits */
.map-scroll { overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff5ea; }
.map-scroll img { display: block; min-width: 960px; width: 100%; height: auto; }
.relations { margin: 26px 0 0; padding-left: 23px; font-size: 17px; line-height: 1.6; }
.relations li { margin-bottom: 8px; }
.role-summary { font-size: 16px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 16px; margin: 26px 0 0; padding: 0; list-style: none; }

/* Get started */
.start ol { list-style: none; margin: 30px 0 0; padding: 0; counter-reset: start; }
.start ol > li { counter-increment: start; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 48px; border-top: 1px solid var(--line); padding-block: 30px; }
.start ol > li:last-child { padding-bottom: 0; }
.start h3::before { content: counter(start) ". "; color: var(--rust); }
.start li p { font-size: 17px; line-height: 1.6; color: var(--muted); margin: 0 0 12px; }
.start li p:last-child { margin-bottom: 0; }
pre { margin: 0; padding: 18px 20px; background: var(--panel); border-radius: 10px; overflow-x: auto; font-size: 14.5px; line-height: 1.6; tab-size: 2; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; }
p code, li code { font-size: .92em; background: var(--panel); border-radius: 4px; padding: .08em .35em; }
pre code { background: none; padding: 0; font-size: inherit; }

/* Limits */
.next { border-top: 1px solid var(--line); padding-top: 38px; }
.next dl { margin: 28px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 40px; }
.next dt { font-size: 19px; line-height: 1.3; font-weight: 700; margin-bottom: 10px; }
.next dd { margin: 0; font-size: 17px; color: var(--muted); line-height: 1.55; }

footer { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px 24px; padding-block: 24px 40px; font-size: 14px; color: var(--muted); }
footer span { margin-right: auto; max-width: 62ch; line-height: 1.5; }

@media (max-width: 980px) {
  .adds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start ol > li { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .masthead, main, footer { padding-inline: 20px; }
  .masthead { align-items: flex-start; flex-direction: column; gap: 4px; padding-block: 20px; }
  .intro { grid-template-columns: 1fr; gap: 28px; padding-block: 24px 40px; }
  .intro h1 { font-size: 44px; }
  .intro p { font-size: 19px; }
  .hero-art { max-width: 460px; }
  section { margin-bottom: 56px; }
  p { font-size: 17px; }
  .adds, .next dl { grid-template-columns: 1fr; gap: 26px; }
  .turn { padding: 20px 16px; }
  .start ol > li { padding-block: 24px; }
  figure { margin-top: 24px; }
}

@media (max-width: 420px) {
  .masthead, main, footer { padding-inline: 16px; }
  .intro h1 { font-size: 36px; }
  .masthead nav { gap: 4px 20px; }
  .masthead nav a:last-child { display: none; } /* the same link is in the introduction and the footer */
  .steps { grid-template-columns: 1fr; }
  pre { padding: 14px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
