/* Jobbsignal
   Paper #F4F4F1, ink #1B1D1F, graphite #5C6064, rule #D3D4CF,
   accent (pine) #1E5A48, accent tint #E3ECE7 */

@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --paper: #F4F4F1;
  --ink: #1B1D1F;
  --graphite: #5C6064;
  --rule: #D3D4CF;
  --accent: #1E5A48;
  --accent-ink: #164536;
  --accent-tint: #E3ECE7;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Scale ~1.333 from 18px */
  --step-0: 1.125rem;
  --step-1: 1.5rem;
  --step-2: 2rem;
  --step-3: clamp(1.9rem, 1.2rem + 2.4vw, 2.8rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 76rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip { position: absolute; left: var(--gutter); top: -3rem; background: var(--ink); color: var(--paper); padding: .5rem .75rem; z-index: 10; }
.skip:focus { top: .75rem; }

/* Masthead */
.masthead, main, .footer {
  width: min(calc(var(--max) - 2 * var(--gutter)), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.5rem 1.25rem;
  border-bottom: 2px solid var(--ink);
}
.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.masthead-contact { font-size: 1rem; color: var(--ink); }

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5.5rem); }

.hero h1 {
  font-size: var(--step-3);
  line-height: 1.16;
  letter-spacing: -0.012em;
  max-width: 26ch;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.figure {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "num waffle"
    "cap cap";
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.figure-number {
  grid-area: num;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(6.5rem, 4rem + 13vw, 15rem);
  line-height: 0.78;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}

.waffle {
  grid-area: waffle;
  display: grid;
  grid-template-columns: repeat(32, minmax(0, 1fr));
  gap: 3px;
  max-width: 34rem;
  justify-self: end;
  width: 100%;
}
.waffle span {
  aspect-ratio: 1;
  background: var(--accent);
}

.figure-caption {
  grid-area: cap;
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.3;
  max-width: 34ch;
}
.figure-caption small {
  display: block;
  margin-top: .75rem;
  font-family: var(--sans);
  font-size: .9rem;
  line-height: 1.5;
  color: var(--graphite);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
}

.button {
  display: inline-block;
  font: 600 1rem/1 var(--sans);
  padding: 1rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent); color: var(--paper); }
.text-link { font-weight: 600; font-size: 1rem; color: var(--ink); }

/* Sections: section name in the left column, content on the right */
.section {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(0, 3fr);
  column-gap: var(--gutter);
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--ink);
}
.section > h2 {
  font-size: var(--step-1);
  line-height: 1.2;
  padding-top: .15rem;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  column-gap: 1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.steps li:first-child { padding-top: 0; }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}
.steps h3 { font-size: var(--step-1); line-height: 1.25; margin-bottom: .4rem; }
.steps p { margin: 0; max-width: 58ch; color: var(--ink); }

/* Pricing */
.price {
  font-family: var(--serif);
  font-size: var(--step-2);
  line-height: 1.15;
  margin-bottom: 2rem;
}
.price-amount {
  display: block;
  font-size: clamp(3.5rem, 2rem + 6vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: lining-nums tabular-nums;
}

.ledger {
  width: 100%;
  max-width: 36rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  margin-bottom: 1.5rem;
}
.ledger th, .ledger td {
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}
.ledger tr:first-child th, .ledger tr:first-child td { border-top: 1px solid var(--ink); }
.ledger th { text-align: left; font-weight: 400; }
.ledger td { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 1rem; }

.note { color: var(--graphite); max-width: 52ch; font-size: 1rem; }

/* Offer */
.offer {
  /* full-bleed tinted band */
  background: var(--accent-tint);
  box-shadow: 0 0 0 100vmax var(--accent-tint);
  clip-path: inset(0 -100vmax);
  border-top-color: var(--accent-tint);
}
.offer + .section { border-top-color: var(--accent-tint); }
.offer-body > p { max-width: 56ch; }
.offer-lead {
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-bottom: 1.25rem;
}

.offer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 40rem;
  margin-top: 2rem;
  align-items: end;
}
.field { display: grid; gap: .4rem; }
.field label { font-size: 1rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--graphite); }
.field select, .field input {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--graphite);
  border-radius: 2px;
  padding: .8rem .85rem;
  width: 100%;
  min-height: 3.1rem;
}
.field select:focus-visible, .field input:focus-visible { outline-offset: 0; border-color: var(--accent); }
.offer-form .button { justify-self: start; grid-column: 1 / -1; }
.form-hint { grid-column: 1 / -1; font-size: .95rem; color: var(--graphite); margin: 0; max-width: 56ch; }
.form-hint.is-error { color: #8A1C1C; }

/* Contact */
.contact-email {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 1rem + 3.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  margin: 0;
}
.contact-email a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.contact-email a:hover { color: var(--accent); }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 2px solid var(--ink);
  font-size: .9rem;
  color: var(--graphite);
}
.footer p { margin: 0; }

/* Load moment: the waffle fills once */
@media (prefers-reduced-motion: no-preference) {
  .waffle.is-animated span {
    opacity: 0;
    animation: fill .35s ease-out forwards;
    animation-delay: calc(var(--i) * 3ms + 150ms);
  }
  @keyframes fill { to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Narrow screens */
@media (max-width: 52rem) {
  .section { grid-template-columns: 1fr; row-gap: 1.5rem; }
  .figure {
    grid-template-columns: 1fr;
    grid-template-areas: "num" "cap" "waffle";
  }
  .waffle { justify-self: start; margin-top: 1.5rem; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
}
@media (max-width: 34rem) {
  .masthead { flex-direction: column; gap: .25rem; }
  .offer-form { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: .25rem; }
}
