/* ============================================================
   PROCURATA — public site
   Palette and type mirror apps/web/src/styles/tokens.css so the
   site and the cockpit read as one product. Terracotta stays on
   the mark and on focus; the citation pink is the page's accent,
   because a cited claim is what the product is.
   ============================================================ */

:root {
  --canvas: #f4f3f0;
  --surface: #ffffff;
  --surface-sunken: #f7f6f3;

  --ink: #1b1a17;
  --ink-2: #5e5b54;
  --ink-3: #908c83;

  --line: #e5e3dd;
  --line-2: #dcdad2;
  --line-strong: #c9c6bc;

  --accent: #c9633f;
  --accent-grad: linear-gradient(140deg, #e8a06b 0%, #d2693f 100%);

  --cite-bg: #fbe6ef;
  --cite-bg-on: #f6cfdf;
  --cite-line: #d98aae;

  --danger: #bc4636;
  --ok: #3c7237;

  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;

  --sh-md: 0 1px 2px rgba(31, 28, 22, 0.05), 0 6px 16px rgba(31, 28, 22, 0.06);

  --page: 1040px;
  --measure: 66ch;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Language switching. Both languages ship in the markup, so the
   page is complete before JavaScript runs. ---- */
html[data-lang="nl"] [lang="en"] {
  display: none;
}
html[data-lang="en"] [lang="nl"] {
  display: none;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 20;
}
.skip:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- Brand mark ---- */
.mark-square {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--ink);
  display: inline-grid;
  place-items: center;
  flex: none;
}
.mark-dot {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: var(--accent-grad);
}

/* ---- Top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px max(24px, calc((100vw - var(--page)) / 2));
  background: rgba(244, 243, 240, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}

.topnav {
  display: flex;
  gap: 22px;
  margin-right: auto;
}
.topnav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
}
.topnav a:hover {
  color: var(--ink);
}

.topbar-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.langswitch {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.langswitch button {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 9px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.langswitch button + button {
  border-left: 1px solid var(--line-2);
}
.langswitch button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
.btn-solid {
  background: var(--ink);
  color: #fff;
}
.btn-solid:hover {
  background: #2f2c27;
}
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-quiet:hover {
  border-color: var(--ink-3);
  background: var(--surface);
}
.btn-sm {
  padding: 7px 14px;
  font-size: 13.5px;
}

/* ---- Layout bands ---- */
.hero,
.hero-details,
.band-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding-left: max(24px, calc((100vw - var(--page)) / 2));
  padding-right: max(24px, calc((100vw - var(--page)) / 2));
}
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 500px;
  padding-top: 56px;
  padding-bottom: 56px;
  max-width: none;
  overflow: hidden;
  background: #e7eaea;
  color: #233c34;
}
.hero-image {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.hero-copy {
  width: 44%;
  max-width: 420px;
}
.hero-label {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
}
.hero-title {
  margin: 0;
  max-width: 22ch;
  font-size: 30px;
  line-height: 1.3;
  text-wrap: balance;
}
.hero .btn-solid {
  background: #234638;
}
.hero .btn-solid:hover {
  background: #183427;
}
.hero .btn-quiet {
  color: #233c34;
  border-color: #66786f;
  background: rgba(255, 255, 255, 0.4);
}
.hero .btn-quiet:hover {
  background: #fff;
}
.hero-details {
  max-width: none;
  padding-top: 40px;
  padding-bottom: 64px;
}
.band {
  border-top: 1px solid var(--line);
}
.band-inner {
  max-width: none;
  padding-top: 76px;
  padding-bottom: 76px;
}
.band-contact {
  background: var(--surface-sunken);
}

h1 {
  margin: 0 0 20px;
  font-size: 64px;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0;
}
h2 {
  margin: 0 0 26px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.018em;
}
h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0;
  max-width: 66ch;
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---- The demo: a cited answer you can open ---- */
.demo {
  margin: 32px 0 0;
  max-width: 820px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  padding: 24px 26px 20px;
}

.demo-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.demo-client {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.demo-tag {
  font-size: 12px;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 1px 8px;
}

.demo-q {
  margin: 18px 0 14px;
  color: var(--ink-2);
  font-size: 15px;
}
.demo-q::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--ink-3);
  margin-right: 9px;
  vertical-align: 2px;
}

.demo-a {
  margin: 0 0 22px;
  font-size: 17px;
  line-height: 1.72;
  max-width: 60ch;
}

.cite {
  font: inherit;
  display: inline;
  padding: 1px 4px;
  margin: 0 -1px;
  border: none;
  border-bottom: 2px solid var(--cite-line);
  border-radius: 3px 3px 0 0;
  background-color: var(--cite-bg);
  color: inherit;
  cursor: pointer;
  transition: background-color 0.14s ease;
}
.cite:hover {
  background-color: var(--cite-bg-on);
}
.cite[aria-current="true"] {
  background-color: var(--cite-bg-on);
  border-bottom-width: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .demo-a .cite {
    animation: cite-in 460ms ease-out backwards;
  }
  .demo-a .cite:nth-of-type(1) {
    animation-delay: 520ms;
  }
  .demo-a .cite:nth-of-type(2) {
    animation-delay: 680ms;
  }
  .demo-a .cite:nth-of-type(3) {
    animation-delay: 840ms;
  }
}
@keyframes cite-in {
  from {
    background-color: transparent;
    border-bottom-color: transparent;
  }
}

.source {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--cite-line);
  border-radius: var(--r-md);
  background: #fffafc;
}
.source[hidden] {
  display: none;
}
.source header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.source-app {
  font-weight: 600;
  color: var(--ink);
}
.source-line {
  margin: 0;
  font-size: 14px;
  color: var(--ink-2);
}
.source-line .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin-right: 10px;
}

.demo figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-2);
}

/* ---- Two-column prose band ---- */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 26ch) minmax(0, var(--measure));
  gap: 20px 64px;
  align-items: start;
}
.two-col h2 {
  margin: 0;
}
.prose p {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--ink-2);
}
.prose p:last-child {
  margin-bottom: 0;
}

/* ---- Steps: a real sequence, so it is numbered ---- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-width: none;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  padding-top: 3px;
}
.steps p {
  margin: 0;
  color: var(--ink-2);
  max-width: var(--measure);
}

/* ---- Spec rows: the ledger, not a card grid ---- */
.spec {
  margin: 0;
  display: grid;
  max-width: none;
}
.spec > div {
  display: grid;
  grid-template-columns: minmax(0, 22ch) minmax(0, 1fr);
  gap: 4px 40px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.spec-tight > div {
  padding: 15px 0;
}
.spec dt {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.spec dd {
  margin: 0;
  color: var(--ink-2);
  max-width: var(--measure);
}

.note {
  margin: 26px 0 0;
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 14px;
}

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 48px 72px;
  align-items: start;
}
.contact-intro p {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-2);
  font-size: 16px;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 24px 20px;
  box-shadow: var(--sh-md);
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  width: 100%;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field textarea {
  resize: vertical;
  min-height: 110px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink-3);
  box-shadow: 0 0 0 3px rgba(201, 99, 63, 0.14);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .btn {
  width: 100%;
  margin-top: 4px;
}
.contact-form .btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}

.form-status {
  margin: 12px 0 0;
  min-height: 1.4em;
  font-size: 13.5px;
  color: var(--ink-2);
}
.form-status[data-state="ok"] {
  color: var(--ok);
}
.form-status[data-state="error"] {
  color: var(--danger);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--line);
  padding: 26px max(24px, calc((100vw - var(--page)) / 2));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .topnav {
    display: none;
  }
  .topbar {
    justify-content: space-between;
  }
  .topbar-end {
    margin-left: auto;
  }
  .two-col,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .spec > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .hero {
    min-height: 0;
    padding-top: 32px;
    padding-bottom: 302px;
  }
  .hero-copy {
    width: 100%;
    max-width: none;
  }
  .hero-image {
    top: auto;
    height: 270px;
    object-position: right 52%;
  }
  .hero-details {
    padding-top: 32px;
    padding-bottom: 52px;
  }
  .band-inner {
    padding-top: 52px;
    padding-bottom: 52px;
  }
  .demo {
    margin-top: 40px;
    padding: 20px 18px 16px;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 12px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .topbar-end {
    gap: 8px;
  }
  .topbar .btn-sm {
    padding: 7px 10px;
  }
  .langswitch button {
    padding: 5px 7px;
  }
  h1 {
    font-size: 48px;
    margin-bottom: 14px;
  }
  .hero {
    --banner-photo-height: clamp(144px, calc(100svh - 440px), 240px);
    padding-top: 28px;
    padding-bottom: calc(var(--banner-photo-height) + 24px);
  }
  .hero-image {
    left: auto;
    width: 150%;
    height: var(--banner-photo-height);
  }
  .hero-label {
    margin-bottom: 12px;
    font-size: 13px;
  }
  .hero-title {
    font-size: 26px;
  }
  .hero-actions {
    gap: 8px;
    margin-top: 24px;
  }
  .hero-actions .btn {
    padding: 10px 8px;
    font-size: 12px;
  }
  .lead {
    font-size: 16px;
  }
  .steps li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 0 12px;
  }
}
