/* DecentDecisions design system — self-hosted fonts, no third-party requests. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin-wght.woff2") format("woff2");
}

:root {
  --paper: #f8f0dd;
  --paper-deep: #efe2c8;
  --cream: #fffaf0;
  --cream-strong: #fffdf8;
  --ink: #182321;
  --muted: #4d5b57;
  --petrol: #1e6663;
  --petrol-dark: #17514e;
  --petrol-deep: #123f3d;
  --petrol-soft: #dceae5;
  --copper: #98663b;
  --copper-soft: #e9d6bd;
  --line: #d8c9aa;
  --focus: #8a4d20;
  --error: #9c2f28;
  --shadow: 0 18px 45px rgb(52 62 53 / 10%);
  --shadow-soft: 0 6px 18px rgb(52 62 53 / 7%);
  --radius-sm: .35rem;
  --radius: .75rem;
  --radius-lg: 1.25rem;
  --max-width: 74rem;
  --content-width: 46rem;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", ui-serif, Georgia, Cambria, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream-strong);
  font: 1.0625rem/1.72 var(--font-sans);
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

a {
  color: var(--petrol-dark);
  text-decoration-thickness: .09em;
  text-underline-offset: .2em;
}

a:hover { color: var(--ink); }

:focus-visible {
  outline: .2rem solid var(--focus);
  outline-offset: .22rem;
  border-radius: .12rem;
}

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  color: #fff;
  background: var(--petrol-dark);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgb(152 102 59 / 22%);
  background: rgb(255 253 248 / 92%);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 650;
  letter-spacing: -.02em;
  text-decoration: none;
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: block;
  padding: .65rem 0 .5rem;
  border-bottom: .16rem solid transparent;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 650;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--copper);
  color: var(--ink);
}

/* Typography */
h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 620;
  letter-spacing: -.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5.2vw, 4.2rem);
  line-height: 1.06;
}

.eyebrow {
  margin: 0 0 1.15rem;
  color: var(--petrol-dark);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.lede {
  max-width: 44rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
  line-height: 1.6;
}

/* Buttons */
.button,
.action a {
  display: inline-block;
  padding: .85rem 1.35rem;
  border: 2px solid var(--petrol);
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--petrol);
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  box-shadow: 0 .4rem 1rem rgb(23 81 78 / 14%);
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.button:hover,
.action a:hover {
  border-color: var(--petrol-dark);
  color: #fff;
  background: var(--petrol-dark);
  transform: translateY(-1px);
}

.text-link { font-weight: 700; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--cream-strong), var(--paper) 72%);
}

.hero::after {
  position: absolute;
  right: max(-10rem, calc((100vw - var(--max-width)) / 2 - 7rem));
  bottom: -12rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgb(30 102 99 / 18%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(4rem, 9vw, 7rem);
}

.hero-text { max-width: 52rem; }

.hero--media .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero--media h1 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); }

.hero-media {
  position: relative;
}

.hero-media::before {
  position: absolute;
  inset: 1.1rem -1.1rem -1.1rem 1.1rem;
  border: 2px solid var(--copper);
  border-radius: var(--radius-lg);
  content: "";
}

.hero-media img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2.2rem;
}

/* Trust bar */
.trust {
  color: #fff;
  background: var(--petrol-deep);
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem 2rem;
  margin: 0;
  padding: 1.15rem 0;
  list-style: none;
  font-size: .95rem;
  font-weight: 650;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.trust-list li::before {
  width: .5rem;
  height: .5rem;
  flex: none;
  border-radius: 50%;
  background: var(--copper-soft);
  content: "";
}

/* Bands */
.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.band--plain { background: var(--cream-strong); }
.band--muted { background: var(--paper); }
.band--form { padding-top: 0; background: var(--cream-strong); scroll-margin-top: 5rem; }

.band--text .prose,
.band--plain .prose,
.band--muted .prose { max-width: var(--content-width); }

.band-lead { font-size: 1.12rem; }

.band--accent {
  color: #e8f1ee;
  background: var(--petrol-deep);
}

.band--accent .prose {
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}

.band--accent h2 { color: #fff; }
.band--accent h2::before { margin-inline: auto; background: var(--copper-soft); }
.band--accent .action { margin-top: 2rem; }
.band--accent .action a {
  border-color: var(--cream-strong);
  color: var(--petrol-deep);
  background: var(--cream-strong);
  font-size: 1.05rem;
}
.band--accent .action a:hover {
  border-color: var(--paper);
  color: var(--ink);
  background: var(--paper);
}

/* Prose */
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose h2 {
  scroll-margin-top: 6rem;
  margin: 0 0 1.25rem;
  font-size: clamp(1.85rem, 3.6vw, 2.6rem);
  line-height: 1.15;
}

.prose h2::before {
  display: block;
  width: 3rem;
  height: .18rem;
  margin-bottom: 1rem;
  background: var(--copper);
  content: "";
}

.prose h3 {
  margin: 2.2rem 0 .45rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

.prose p { margin: 0 0 1.25rem; }
.prose strong { color: inherit; }

.prose ul {
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.prose ul li {
  position: relative;
  margin: .7rem 0;
  padding-left: 1.9rem;
}

.prose ul li::before {
  position: absolute;
  top: .62em;
  left: .1rem;
  width: 1rem;
  height: .18rem;
  border-radius: .1rem;
  background: var(--copper);
  content: "";
}

/* Ordered lists render as numbered step tiles. */
.prose ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.prose ol li {
  position: relative;
  padding: 3.6rem 1.35rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream-strong);
  box-shadow: var(--shadow-soft);
  counter-increment: step;
}

.prose ol li::before {
  position: absolute;
  top: 1.1rem;
  left: 1.35rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--petrol);
  font-weight: 750;
  content: counter(step);
}

.band--muted .prose ol li { background: var(--cream-strong); }
.band--plain .prose ol li { background: var(--paper); }

.prose blockquote {
  margin: 1rem 0 1.75rem;
  padding: 1.25rem 1.5rem;
  border-left: .25rem solid var(--copper);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
  background: var(--cream-strong);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.6;
}

.band--plain .prose blockquote { background: var(--paper); }
.prose blockquote p:last-child { margin-bottom: 0; }

.prose blockquote p:last-child:not(:first-child) {
  margin-top: .9rem;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .9rem;
  font-style: normal;
}

/* Pageable examples: stacked without JS, one at a time with JS. */
.examples { display: grid; gap: 1rem; margin: 1rem 0 1.75rem; }
.examples blockquote { margin: 0; }
.examples.is-paged { gap: .75rem; }
.examples.is-paged [data-example] { grid-area: 1 / 1; }
.examples.is-paged [data-example].is-inactive { visibility: hidden; }
.examples.is-paged blockquote { height: 100%; }

.examples-nav {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.examples-btn {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--petrol-dark);
  background: var(--cream-strong);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}

.examples-btn:hover { border-color: var(--petrol); color: #fff; background: var(--petrol); }
.examples-count { color: var(--muted); font-size: .9rem; font-weight: 650; }

.prose img {
  width: 100%;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.action { margin: 1.75rem 0 0; }

/* Split bands: image beside text */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.split--reverse .split-media { order: 2; }

.split-media {
  position: sticky;
  top: 6.5rem;
}

.split-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Card grid */
.band-head { max-width: var(--content-width); margin-bottom: 2.5rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem;
}

.card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cream-strong);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.75rem;
}

.card-body h3 { margin: 0 0 .75rem; }
.card-body p { margin: 0 0 1rem; }
.card-body strong { color: var(--petrol-dark); }
.card-body .action { margin-top: auto; padding-top: .5rem; }
.card-body .action a { width: 100%; text-align: center; }

/* Footer */
.site-footer {
  color: #cfdeda;
  background: var(--ink);
}

.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--copper-soft); }
.site-footer .brand { color: #fff; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(14rem, 1fr);
  gap: 2rem 4rem;
  padding-block: 3.2rem;
}

.footer-brand { display: inline-block; margin-bottom: .5rem; }
.site-footer p { margin: .35rem 0; }
.footer-meta { text-align: right; }
.footer-legal a { display: inline-block; }

/* Contact form */
.contact-form {
  display: grid;
  max-width: var(--content-width);
  gap: 1.1rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.field { display: grid; gap: .4rem; }
.field label { font-weight: 700; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--cream-strong);
  font: inherit;
}
.field input:focus,
.field textarea:focus { border-color: var(--petrol); }
.field textarea { min-height: 9rem; resize: vertical; }
.field--check { grid-template-columns: auto 1fr; align-items: start; }
.field--check label { font-weight: 400; }
.form-hint { color: var(--muted); font-size: .92rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn { justify-self: start; padding: .9rem 1.5rem; border: 0; border-radius: var(--radius-sm); color: #fff; background: var(--petrol); font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--petrol-dark); }
.btn[disabled] { opacity: .6; cursor: progress; }
.form-status.is-error { color: var(--error); }
.form-thanks {
  max-width: var(--content-width);
  margin-top: 1.5rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--petrol);
  border-radius: var(--radius);
  color: var(--petrol-dark);
  background: var(--petrol-soft);
}

@media (max-width: 60rem) {
  .hero--media .hero-inner,
  .split { grid-template-columns: 1fr; }
  .hero-media { max-width: 34rem; }
  .split--reverse .split-media { order: 0; }
  .split-media { position: static; }
  .trust-list { justify-content: flex-start; }
}

@media (max-width: 46rem) {
  .container { width: min(100% - 2rem, var(--max-width)); }
  .site-header { position: relative; }
  .header-inner { align-items: flex-start; flex-direction: column; gap: .2rem; padding-block: 1rem; }
  .main-nav { width: 100%; overflow-x: auto; }
  .main-nav ul { width: max-content; min-width: 100%; gap: .25rem 1.15rem; }
  .main-nav a { padding-block: .45rem; }
  .hero-inner { padding-block: 3.5rem; }
  .hero::after { right: -17rem; }
  .hero-media::before { inset: .7rem -.7rem -.7rem .7rem; }
  h1 { font-size: clamp(2.2rem, 11vw, 3.2rem); }
  .trust-list { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .site-header, .hero-actions, .site-footer, .hero-media, .trust { display: none; }
  body { color: #000; background: #fff; }
  .hero, .band { border: 0; color: #000; background: #fff; }
  .hero-inner, .band { padding-block: 1rem; }
}
