/* Allcora teaser site
   Palette: pine (ink/brand), sage (quiet surfaces), leaf (budget used),
   amber (80% alert), brick (ceiling). Amber and brick are signals only. */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("/assets/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --pine: #173a33;
  --pine-2: #245247;
  --leaf: #3d8a67;
  --leaf-soft: #b9d6c4;
  --sage: #e3ebe5;
  --field: #f6f8f6;
  --paper: #ffffff;
  --ink: #18221e;
  --muted: #4f5f57;
  --line: #c6d3ca;
  --amber: #b97f00;
  --brick: #b3412b;

  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);

  --gutter: 16px;
  --radius-s: 4px;
  --radius-m: 10px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--field);
  font-feature-settings: "ss01";
}
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; color: var(--pine); letter-spacing: -0.015em; }
h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.03em; max-width: 16ch; }
h2 { font-size: var(--step-3); font-weight: 650; }
h3 { font-size: var(--step-1); font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 66ch; }
a { color: var(--pine-2); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow > * { max-width: 720px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.45; }
.fine { font-size: var(--step--1); color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 600; font-size: 1rem;
  border-radius: var(--radius-s); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-2); }
.btn-secondary { background: transparent; color: var(--pine); border-color: var(--pine); }
.btn-secondary:hover { background: var(--sage); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--pine-2); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; cursor: pointer; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--field); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--pine); text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.03em; }
.site-nav { display: flex; gap: 24px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .site-nav { display: none; }
  .header-inner .btn { margin-left: auto; }
}

/* Forms */
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid #8fa398; border-radius: var(--radius-s);
  padding: 11px 12px; width: 100%; min-height: 48px;
}
textarea { min-height: 112px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--amber); outline-offset: 0; border-color: var(--pine); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--brick); }
.inline-field { display: flex; gap: 8px; max-width: 520px; }
.inline-field input { flex: 1; min-width: 0; }
@media (max-width: 520px) { .inline-field { flex-direction: column; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--step--1); color: var(--muted); margin-top: 12px; max-width: 520px; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--pine); }
.form-status { min-height: 1.5em; margin: 10px 0 0; font-size: var(--step--1); font-weight: 600; }
.form-status.is-error { color: var(--brick); }
.form-status.is-ok { color: var(--leaf); }
.stack-form { display: grid; gap: 16px; }
.stack-form > label, .field-row > label { display: grid; gap: 6px; font-weight: 600; font-size: 0.9375rem; color: var(--pine); }
.stack-form > label.check { display: flex; margin-top: 0; font-weight: 400; font-size: var(--step--1); color: var(--muted); }
.stack-form .btn { justify-self: start; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.card-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(20px, 4vw, 36px); }
.card-form h2 { margin-bottom: 0; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 0.9375rem; color: var(--pine); padding: 0; margin-bottom: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.checks .check { margin-top: 6px; color: var(--ink); font-size: 1rem; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); scroll-margin-top: 16px; }
.hero-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); } }
.hero .lede { margin: 20px 0 28px; }
.hero .fine { margin-top: 14px; }

.hero-plot { margin: 0; justify-self: center; width: min(100%, 380px); }
.hero-plot .plot-grid { width: 64%; margin: 0 auto; gap: 8px; }
.report-card { margin-top: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px 10px; }
.report-title { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 650; color: var(--pine); display: flex; justify-content: space-between; gap: 8px; }
.report-tag { font-weight: 500; color: var(--muted); }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.report-table td:nth-child(2), .report-table td:nth-child(3) { white-space: nowrap; }
.report-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 0 6px 6px 0; border-bottom: 1px solid var(--line); }
.report-table td { padding: 7px 6px 7px 0; border-bottom: 1px solid #e6ece8; color: var(--ink); }
.report-table tr:last-child td { border-bottom: 0; }
.report-table th:nth-child(2), .report-table td:nth-child(2), .report-table th:nth-child(3), .report-table td:nth-child(3) { text-align: right; padding-right: 12px; }
.report-table td:first-child { font-weight: 600; color: var(--pine); }
.used-high { color: var(--amber); font-weight: 650; }
.plot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; aspect-ratio: 1; }
.plot-grid span {
  border-radius: 6px; background: var(--sage); border: 1.5px solid var(--line);
  transition: background-color 260ms ease, border-color 260ms ease;
}
.plot-grid span.is-used { background: var(--leaf); border-color: var(--leaf); }
.plot-grid span.is-alert { background: var(--amber); border-color: var(--amber); }
.plot-grid .plot-ceiling { display: grid; place-items: center; color: transparent; background: transparent; border: 2px dashed var(--line); }
.plot-grid .plot-ceiling.is-locked { color: var(--brick); border: 2.5px solid var(--brick); background: #fff; }
.plot-grid .plot-ceiling svg { transition: transform 300ms ease; transform: scale(0.6); }
.plot-grid .plot-ceiling.is-locked svg { transform: scale(1); }
.hero-plot figcaption { display: flex; justify-content: center; gap: 6px; white-space: nowrap; margin-top: 14px; font-size: var(--step--1); color: var(--muted); }
.plot-label { font-weight: 600; color: var(--pine); }
.plot-meter { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .plot-grid span, .plot-grid .plot-ceiling svg { transition: none; } }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-title { max-width: 22ch; }
.section-lede { color: var(--muted); font-size: var(--step-1); }
.problem { background: var(--pine); color: #e6efe9; }
.problem .section-title, .problem h3 { color: #fff; }
.problem-list { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 860px) { .problem-list { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.problem-list > div { border-top: 2px solid #4f7d70; padding-top: 20px; }
.problem-list p { color: #cfdcd4; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 0; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; position: relative; padding: 56px 24px 8px 0; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--leaf); color: #fff; font-weight: 700; border-radius: 4px;
}
.steps li:last-child::before { background: var(--paper); color: var(--brick); border: 2px solid var(--brick); }
@media (min-width: 860px) {
  .steps li::after { content: ""; position: absolute; top: 17px; left: 46px; right: 10px; height: 2px; background: var(--line); }
  .steps li:last-child::after { display: none; }
}

/* Demo */
.demo { background: var(--sage); }
.demo-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 32px; background: var(--paper); border-radius: var(--radius-m); padding: clamp(20px, 4vw, 40px); border: 1px solid var(--line); }
@media (min-width: 960px) { .demo-panel { grid-template-columns: 320px minmax(0, 1fr); gap: 48px; } }
.demo-controls { display: grid; gap: 24px; align-content: start; }
.control { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: baseline; }
.control label[for], .control legend { font-weight: 600; color: var(--pine); font-size: 0.9375rem; }
.control output { font-variant-numeric: tabular-nums; font-weight: 600; }
.control input[type="range"] { grid-column: 1 / -1; padding: 0; min-height: 32px; border: 0; background: transparent; accent-color: var(--pine); }
.control fieldset, fieldset.control { display: block; }
.segmented { display: flex; border: 1.5px solid var(--pine); border-radius: var(--radius-s); overflow: hidden; }
.segmented label { flex: 1; position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; min-height: 0; cursor: pointer; }
.segmented span { display: grid; place-items: center; min-height: 42px; padding: 4px 6px; font-size: 0.875rem; font-weight: 600; text-align: center; color: var(--pine); line-height: 1.2; }
.segmented label + label span { border-left: 1.5px solid var(--pine); }
.segmented input:checked + span { background: var(--pine); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: -3px; }
.demo-summary { font-size: var(--step-1); font-weight: 600; color: var(--pine); min-height: 3em; max-width: none; }
.demo-summary .over { color: var(--brick); }
.demo-chart { width: 100%; min-height: 240px; }
.demo-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.demo-chart .axis text { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.demo-chart .grid line { stroke: #e3e9e5; }
.demo-chart .zero { stroke: var(--ink); stroke-width: 1.25; }
.demo-chart .area { fill: var(--leaf-soft); opacity: 0.55; }
.demo-chart .line { fill: none; stroke: var(--leaf); stroke-width: 3; stroke-linejoin: round; }
.demo-chart .overrun { fill: rgba(179, 65, 43, 0.12); }
.demo-chart .line-over { fill: none; stroke: var(--brick); stroke-width: 3; stroke-linejoin: round; }
.demo-chart .alert-line { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 5 4; }
.demo-chart .stop-line { stroke: var(--pine-2); stroke-width: 2; }
.demo-chart .marker-label { font-size: 12px; font-weight: 600; }
.demo-chart .marker-label.alert { fill: var(--amber); }
.demo-chart .marker-label.stop { fill: var(--pine-2); }
.demo-chart .pause-line { stroke: var(--brick); stroke-width: 2; }
.demo-chart .marker-label.pause { fill: var(--brick); }
.demo-chart .line-paused { fill: none; stroke: var(--brick); stroke-width: 3; stroke-dasharray: 6 5; }
.demo-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 12px 0 16px; font-size: var(--step--1); color: var(--muted); }
.demo-legend li { display: flex; align-items: center; gap: 8px; }
.key { display: inline-block; width: 18px; height: 0; border-top: 3px solid; }
.key-line { border-color: var(--leaf); }
.key-alert { border-top: 2px dashed var(--amber); }
.key-approve { border-color: var(--pine-2); border-top-width: 2px; }
.key-stop { border-top: 3px dashed var(--brick); }
.demo-output .btn { margin-top: 8px; white-space: normal; text-align: center; }

/* Audiences */
.audience-list { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
.audience-list article { display: grid; gap: 4px 48px; padding: 28px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .audience-list article { grid-template-columns: 300px minmax(0, 1fr) auto; align-items: baseline; } }
.audience-list article:first-child h3 { color: var(--leaf); }
.audience-list p { margin: 0; color: var(--muted); }
.audience-list a { font-weight: 600; white-space: nowrap; }

/* White paper teaser */
.paper-teaser { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.paper-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 860px) { .paper-grid { grid-template-columns: 280px minmax(0, 1fr); gap: 72px; } }
.paper-cover {
  aspect-ratio: 210 / 297; width: min(100%, 280px); background: var(--pine); color: #fff;
  border-radius: 3px; padding: 28px 24px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 10px 12px 0 var(--sage);
  background-image: linear-gradient(var(--pine), var(--pine)), radial-gradient(circle, #2f6457 1.5px, transparent 1.6px);
  background-size: 100% 100%, 14px 14px;
  background-blend-mode: normal;
}
.paper-cover-kicker { font-size: 0.8125rem; color: var(--leaf-soft); }
.paper-cover-title { font-size: 2.1rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin-top: auto; }
.paper-cover-sub { font-size: 0.9375rem; color: #d5e3da; line-height: 1.35; }
.ticks { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; max-width: 60ch; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 12px; height: 12px; background: var(--leaf); border-radius: 2px; }

/* Partner callout */
.partner-callout { background: var(--field); }
.partner-grid { display: grid; gap: 32px; align-items: end; }
@media (min-width: 960px) { .partner-grid { grid-template-columns: 1.1fr 1.3fr auto; gap: 48px; } }
.give-get { margin: 0; display: grid; gap: 16px; }
.give-get div { display: grid; grid-template-columns: 80px 1fr; gap: 12px; }
.give-get dt { font-weight: 700; color: var(--pine); }
.give-get dd { margin: 0; color: var(--muted); }

/* Inner pages */
.page-head { padding: clamp(48px, 8vw, 96px) 0 8px; }
.page-head h1 { max-width: 20ch; }
.prose h2 { margin-top: 1.6em; font-size: var(--step-2); }
.prose h2:first-child { margin-top: 0; }
.prose ul:not(.ticks) { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 0.9375rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--pine); font-weight: 650; }
.paper-layout, .partner-layout { display: grid; gap: 48px; align-items: start; }
@media (min-width: 960px) {
  .paper-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 72px; }
  .partner-layout { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 72px; }
  .gate-card { position: sticky; top: 24px; }
}
.gate-card { background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--pine); border-radius: var(--radius-m); padding: 28px; scroll-margin-top: 24px; }
.next-steps { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.page-thanks .next-steps { margin-top: 24px; }

/* Footer */
.site-footer { background: var(--pine); color: #d7e3db; padding: 64px 0 32px; }
.site-footer h2 { color: #fff; font-size: var(--step-2); }
.site-footer a, .site-footer .link-button { color: #fff; }
.site-footer .check { color: #c3d3c9; }
.site-footer .check a { color: #fff; }
.site-footer input[type="email"] { border-color: #fff; }
.site-footer .btn-primary { background: #fff; color: var(--pine); }
.site-footer .btn-primary:hover { background: var(--sage); }
.site-footer .form-status.is-error { color: #ffb4a3; }
.site-footer .form-status.is-ok { color: var(--leaf-soft); }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr 1fr; gap: 80px; } }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-content: start; }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid #3c6a5e; font-size: var(--step--1); color: #a9bfb2; }

/* Dialog */
.dialog { border: 0; border-radius: var(--radius-m); padding: 32px; width: min(92vw, 460px); color: var(--ink); background: var(--paper); }
.dialog::backdrop { background: rgba(14, 33, 29, 0.6); }
.dialog h2 { color: var(--pine); }
.dialog .stack-form > label { color: var(--pine); }
.dialog .btn-primary { background: var(--pine); color: #fff; }
.dialog .form-status.is-ok { color: var(--leaf); }
.dialog .form-status.is-error { color: var(--brick); }
.dialog-close-form { position: absolute; top: 10px; right: 10px; margin: 0; }
.dialog-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; cursor: pointer; color: var(--muted); }
.page-head + .section { padding-top: clamp(24px, 4vw, 48px); }
.form-intro { margin: -8px 0 0; color: var(--muted); font-size: 0.9375rem; }
