/* Archivo variable (wdth 62–125, wght 100–900), SIL Open Font License: fonts/OFL.txt */
@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-wdth.woff2) format('woff2-variations');
}

/* LumaGrader download site (lumagrader.app). One family (Archivo), its width axis carries
   the personality: expanded for display type, normal for reading. The zone scale in the
   hero is the one bold element; everything else stays quiet. */
:root {
  color-scheme: dark;
  --navy: #011326;
  --navy-2: #0a2238;
  --blue: #30b2f7;
  --blue-light: #8cd7fa;
  --blue-ink: #6cc8fa; /* links on the dark page (AA contrast) */
  --paper: #0a1828; /* page background below the hero */
  --surface: #12263a; /* raised: keys, tips, cards */
  --ink: #eef3f8; /* headings */
  --text: #c3d1dd; /* body copy */
  --ink-soft: #8ea4b8;
  --rule: #213a52;
  --rule-strong: #3d5a76;
  --font: 'Archivo Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 62ch;
  /* Left edge shared by header, hero and sections: centred 1240 px column. */
  --edge: max(var(--gutter), calc((100% - 1240px) / 2 + var(--gutter)));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variation-settings: 'wdth' 100;
}
a { color: var(--blue-ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.1; margin: 0; color: var(--ink); }
h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 750;
  font-variation-settings: 'wdth' 118;
  letter-spacing: -0.01em;
}
p { margin: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--blue); color: var(--navy); padding: 8px 14px; }

/* Header */
.top {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--edge);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.mark { width: 30px; height: 30px; flex: none; }
.wordmark { font-weight: 800; font-size: 1.25rem; font-variation-settings: 'wdth' 100; letter-spacing: -0.01em; }
.wordmark .grader { color: var(--blue); }
.top nav { display: flex; gap: clamp(14px, 2.4vw, 28px); flex-wrap: wrap; }
.top nav a { color: #c8d6e3; text-decoration: none; font-size: 0.95rem; }
.top nav a:hover { color: #fff; text-decoration: underline; }

/* Hero */
.hero { background: var(--navy); color: #fff; padding-top: clamp(40px, 8vw, 96px); }
.hero-copy { padding: 0 var(--edge); }
.hero h1 {
  font-size: clamp(2.6rem, 8.4vw, 6.5rem);
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  letter-spacing: -0.025em;
  line-height: 0.98;
}
.hero h1 .for { display: block; font-weight: 400; color: #c8d6e3; }
.lede { margin-top: 24px; max-width: 46ch; font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: #d6e2ec; line-height: 1.5; }
.cta { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 32px; }
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--blue);
  color: var(--navy);
  font-weight: 750;
  font-size: 1.1rem;
  padding: 14px 24px;
  border-radius: 10px;
  text-decoration: none;
}
.btn-download:hover { background: var(--blue-light); text-decoration: none; }
.btn-download svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-support {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1.5px solid #ff5e5b;
  color: #ff8e8b;
  font-weight: 650;
  text-decoration: none;
}
.btn-support:hover { background: #ff5e5b; color: #fff; text-decoration: none; }
.meta { margin-top: 14px; color: #93a8bb; font-size: 0.95rem; }

/* Zone scale: 11 tones from black (0) to white (X), with a slight cool cast. */
.wedge { margin: clamp(48px, 8vw, 88px) 0 0; }
.zones { display: grid; grid-template-columns: repeat(11, 1fr); height: clamp(120px, 22vw, 240px); }
.zones span {
  --l: calc(var(--z) * 10%);
  background: hsl(206 22% var(--l));
  color: hsl(206 22% calc(var(--l) + 38%));
  display: flex;
  align-items: flex-end;
  padding: 0 0 12px 12px;
  font-size: clamp(0.7rem, 1.4vw, 0.95rem);
  font-weight: 600;
  font-variation-settings: 'wdth' 110;
}
.zones span:nth-child(n + 6) { color: hsl(206 22% calc(var(--l) - 42%)); }
.zones span:first-child { background: #000; }
.zones span:last-child { background: #fff; }
.wedge figcaption {
  background: var(--paper);
  padding: 14px var(--edge) 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
@media (prefers-reduced-motion: no-preference) {
  .zones span { animation: develop 1.4s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--z) * 70ms); }
  @keyframes develop { from { filter: brightness(0); } to { filter: none; } }
}
@media (max-width: 520px) {
  .zones span { padding: 0 0 8px 0; justify-content: center; }
}

/* Sections on paper */
main > section:not(.hero) { padding: clamp(56px, 9vw, 112px) var(--gutter) 0; max-width: 1240px; margin: 0 auto; }
.section-lede { margin-top: 14px; max-width: var(--measure); color: var(--ink-soft); }

.flow {
  list-style: none;
  padding: 0;
  margin: 44px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
}
.flow li { border-top: 2px solid var(--rule-strong); padding-top: 18px; position: relative; }
.flow li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -15px;
  left: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--rule-strong);
  border-radius: 50%;
}
.flow h3 { font-size: 1.2rem; font-weight: 750; font-variation-settings: 'wdth' 112; margin: 12px 0 10px; }
.flow p { color: var(--text); font-size: 1rem; }
.privacy { color: var(--ink); margin-top: 24px; font-size: 1.15rem; font-weight: 600; max-width: var(--measure); }

.first-open { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 64px; }
.first-open-intro p { margin-top: 14px; color: var(--ink-soft); max-width: 46ch; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.steps li::before { content: counter(s); font-weight: 800; font-size: 1.35rem; font-variation-settings: 'wdth' 120; color: var(--blue-ink); }
.damaged { grid-column: 2; color: var(--ink-soft); font-size: 0.97rem; }
.cmd {
  margin: 12px 0;
  display: flex;
  align-items: stretch;
  background: var(--navy);
  border-radius: 8px;
  overflow: hidden;
}
.cmd code {
  flex: 1;
  min-width: 0;
  color: #d6e2ec;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: nowrap;
}
.copy {
  border: 0;
  background: var(--navy-2);
  color: var(--blue-light);
  font: inherit;
  font-weight: 650;
  padding: 0 18px;
  cursor: pointer;
}
.copy:hover { background: #12324f; }
.hint { font-size: 0.92rem; }

.open { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 64px; }
.open > div { border-top: 2px solid var(--rule-strong); padding-top: 24px; }
.open p { margin-top: 14px; max-width: 52ch; color: var(--text); }
.links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 650; }

.foot {
  margin-top: clamp(64px, 10vw, 120px);
  padding: 28px var(--edge) 40px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* Thank-you dialog after Download */
.thanks {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(460px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.thanks::backdrop { background: rgba(0, 6, 14, 0.7); }
.thanks form { padding: 28px 28px 24px; position: relative; display: grid; gap: 12px; }
.thanks h2 { font-size: 1.45rem; padding-right: 32px; }
.thanks p { color: var(--text); }
.thanks-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 6px; }
.thanks .btn-support { background: #ff5e5b; color: #fff; border-color: #ff5e5b; }
.thanks .btn-support:hover { background: #e94845; }
.thanks-help { font-weight: 600; }
.thanks-retry { font-size: 0.9rem; }
.close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
@media (prefers-reduced-motion: no-preference) {
  .thanks[open] { animation: rise 0.25s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* Tablet / phone */
@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr 1fr; gap: 40px 28px; }
  .first-open, .open { grid-template-columns: minmax(0, 1fr); }
  .damaged { grid-column: 1; }
}
@media (max-width: 560px) {
  .flow { grid-template-columns: minmax(0, 1fr); }
  .top nav { gap: 14px; }
  .top nav .nav-gh { display: none; }
  .btn-download { width: 100%; justify-content: center; }
}

/* ---------- Feature pages (features/<name>/index.html) ---------- */
.page-hero { background: var(--navy); color: #fff; padding: clamp(28px, 5vw, 56px) var(--edge) clamp(40px, 6vw, 72px); }
.page-hero h1 {
  margin-top: clamp(28px, 4vw, 48px);
  font-size: clamp(2.4rem, 6.4vw, 4.75rem);
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  letter-spacing: -0.02em;
}
.page-hero .lede { max-width: 58ch; }
.tabs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #23415e;
  color: #c8d6e3;
  text-decoration: none;
  font-size: 0.95rem;
}
.tabs a:hover { border-color: var(--blue); color: #fff; }
.tabs a[aria-current='page'] { background: var(--blue); border-color: var(--blue); color: var(--navy); font-weight: 650; }
.top nav a[aria-current] { color: #fff; }

.shot { margin: clamp(28px, 4vw, 44px) 0 0; }
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  background: #0a1a2b;
}
.page-hero .shot { max-width: 1180px; }

/* The zone scale again, as a thin rule between the hero and the content. */
.zone-rule { display: grid; grid-template-columns: repeat(11, 1fr); height: 10px; }
.zone-rule i { background: hsl(206 22% calc(var(--z) * 10%)); }
.zone-rule i:first-child { background: #000; }
.zone-rule i:last-child { background: #fff; }

.feats { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.feat {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 20px 56px;
  padding: clamp(40px, 6vw, 64px) 0;
  border-bottom: 1px solid var(--rule);
}
.feat:last-child { border-bottom: 0; }
.feat h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
.feat-text > p { margin-top: 12px; max-width: var(--measure); color: var(--text); }
.feat .steps { margin-top: 20px; }
.feat .shot { grid-column: 1 / -1; margin-top: 8px; }
.feat .shot img { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); }
.ticks { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; max-width: var(--measure); }
.ticks li { position: relative; padding-left: 22px; color: var(--text); }
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--blue);
}
.tip { margin-top: 18px; padding: 12px 16px; background: var(--surface); border-left: 3px solid var(--blue); border-radius: 8px; font-size: 0.97rem; max-width: var(--measure); }
.keys { margin: 4px 0 0; align-self: start; display: grid; gap: 10px; }
.keys div { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 12px; align-items: baseline; }
.keys dt, .keys dd { margin: 0; }
.keys dd { color: var(--ink-soft); font-size: 0.95rem; }
kbd {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  color: var(--ink);
  white-space: nowrap;
}

.page-end { max-width: 1240px; margin: 0 auto; padding: 24px var(--gutter) 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager a {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
  font-variation-settings: 'wdth' 112;
}
.pager a span { font-size: 0.85rem; font-weight: 500; color: var(--ink-soft); font-variation-settings: 'wdth' 100; }
.pager a:hover { border-color: var(--blue-ink); }
.pager .next { grid-column: 2; text-align: right; }
.get {
  margin-top: clamp(40px, 6vw, 64px);
  padding: 28px;
  border-radius: 12px;
  background: var(--navy);
  border: 1px solid var(--rule);
  color: #d6e2ec;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
}

/* Home: feature names link to their pages */
.flow h3 a { color: inherit; text-decoration: none; }
.flow h3 a:hover { color: var(--blue-ink); text-decoration: underline; }
.flow .more { display: inline-block; margin-top: 12px; font-weight: 650; }

@media (max-width: 900px) {
  .feat { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { grid-column: 1; }
  .get .btn-download { width: 100%; justify-content: center; }
}
.all-features { margin-top: 32px; font-weight: 650; }
.shot-small img { width: auto; max-width: 100%; }
.page-hero .shot-small img { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); }
/* Home: the app in use, between the zone scale and the feature list */
.home-shot { max-width: 1240px; margin: clamp(48px, 8vw, 88px) auto 0; padding: 0 var(--gutter); }
.home-shot img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); }
.home-shot figcaption { margin-top: 12px; color: var(--ink-soft); font-size: 0.9rem; }
