/* Data Forge — Quench Blue design system */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap');

:root {
  --ink: #12161C;
  --steel: #1E2A38;
  --paper: #F1EEE7;
  --quench: #35708C;
  --ash: #8A8F97;
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --section-pad: clamp(4rem, 9vw, 8.75rem);
  --header-h: 4.5rem;
  --radius: 2px;
  --transition: 0.35s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.68;
  font-weight: 400;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { opacity: 0.85; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  margin-top: 0;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 500; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

/* Surface system — paired bg + text only */
.surface-paper { background-color: var(--paper); color: var(--ink); }
.surface-ink { background-color: var(--ink); color: var(--paper); }
.surface-steel { background-color: var(--steel); color: var(--paper); }
.surface-quench { background-color: var(--quench); color: var(--paper); }

.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2rem, 42rem);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--quench);
  margin-bottom: 0.75rem;
}

.surface-quench .eyebrow { color: var(--paper); }
.surface-ink .eyebrow,
.surface-steel .eyebrow { color: #6BA3BE; }

/* Quench-blue rules & folio marks */
.quench-rule {
  height: 1px;
  background: var(--ash);
  position: relative;
  opacity: 0.45;
  border: none;
}

.quench-rule::after {
  content: '';
  position: absolute;
  left: 22%;
  top: -2px;
  width: 32px;
  height: 5px;
  background: var(--quench);
}

.hairline {
  height: 1px;
  background: var(--ink);
  opacity: 0.14;
  width: 100%;
  border: none;
}

.surface-ink .hairline,
.surface-steel .hairline {
  background: var(--paper);
  opacity: 0.18;
}

.folio-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quench);
}

.folio-mark::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--quench);
  transform: rotate(45deg);
}

/* Drop-cap on lead paragraphs */
.drop-cap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.25rem;
  line-height: 0.85;
  font-weight: 600;
  color: var(--quench);
  padding-right: 0.5rem;
  margin-top: 0.1rem;
}

/* Column grid editorial layout */
.column-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.column-grid > .col-6 { grid-column: span 6; }
.column-grid > .col-8 { grid-column: span 8; }
.column-grid > .col-4 { grid-column: span 4; }
.column-grid > .col-12 { grid-column: span 12; }

@media (max-width: 900px) {
  .column-grid > .col-6,
  .column-grid > .col-8,
  .column-grid > .col-4 { grid-column: span 12; }
}

/* Pull-quote */
.pull-quote {
  border-left: 3px solid var(--quench);
  padding: 1rem 0 1rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  margin: 2rem 0;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color var(--transition), box-shadow var(--transition), color var(--transition);
}

.site-header.is-transparent {
  background: transparent;
  color: var(--ink);
}

.site-header.is-sticky {
  background-color: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(18, 22, 28, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo span { color: var(--quench); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid currentColor;
  padding: 0.4rem 0.65rem;
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius);
}

.main-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.main-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 1rem;
    display: none;
  }
  .site-header.is-sticky .main-nav,
  .main-nav.is-open {
    display: block;
    background: var(--paper);
    color: var(--ink);
    border-bottom: 1px solid rgba(18, 22, 28, 0.1);
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter var(--transition), box-shadow var(--transition);
}

.btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  opacity: 1;
}

.btn--primary {
  background-color: var(--quench);
  color: var(--paper);
  border-color: var(--quench);
}

.btn--secondary {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Hero — Foundry Masthead */
.hero-masthead {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
}

.hero-masthead__masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.5rem 0 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-masthead__masthead .folio-mark { font-size: inherit; }

.hero-masthead h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  max-width: 18ch;
  margin-bottom: 2rem;
  line-height: 1.08;
}

.hero-masthead h1 em {
  font-style: normal;
  color: var(--quench);
}

.hero-masthead__plate {
  margin-bottom: 2rem;
  border: 1px solid rgba(18, 22, 28, 0.22);
  overflow: hidden;
}

.hero-masthead__plate img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
}

.hero-masthead .lead {
  max-width: 35rem;
  font-size: 1.125rem;
  color: rgba(18, 22, 28, 0.82);
  margin-bottom: 0;
}

.hero-trust {
  margin-top: auto;
  padding: 0.85rem 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ash);
  border-top: 1px solid rgba(138, 143, 151, 0.35);
}

@media (max-width: 768px) {
  .hero-masthead { min-height: 78vh; }
  .hero-masthead__plate img { aspect-ratio: 16/10; }
}

/* Sections */
.section {
  padding-block: var(--section-pad);
}

.section-header {
  margin-bottom: 3rem;
  max-width: 40rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Cards */
.card {
  padding: 1.75rem;
  border: 1px solid rgba(138, 143, 151, 0.28);
  border-radius: var(--radius);
}

.surface-paper .card {
  background: #fff;
  border-color: rgba(18, 22, 28, 0.08);
}

.surface-steel .card,
.surface-ink .card {
  background: rgba(241, 238, 231, 0.05);
}

/* Editorial folio stat cards */
.folio-stat {
  padding: 1.5rem;
  border-top: 1px solid rgba(18, 22, 28, 0.12);
  border-left: 3px solid var(--quench);
}

.surface-steel .folio-stat,
.surface-ink .folio-stat {
  border-top-color: rgba(241, 238, 231, 0.12);
}

.folio-stat__num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quench);
  margin-bottom: 0.35rem;
}

.folio-stat__value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.25rem;
}

.folio-stat__label {
  font-size: 0.875rem;
  color: var(--ash);
}

.surface-paper .folio-stat__label { color: #5E636B; }

/* Pillar rail */
.pillar-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(138, 143, 151, 0.28);
  border-radius: var(--radius);
  overflow: hidden;
}

.pillar-rail__item {
  padding: 1.5rem;
  border-right: 1px solid rgba(138, 143, 151, 0.18);
}

.pillar-rail__item:last-child { border-right: none; }

.pillar-rail__num {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--quench);
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .pillar-rail { grid-template-columns: 1fr; }
  .pillar-rail__item {
    border-right: none;
    border-bottom: 1px solid rgba(138, 143, 151, 0.18);
  }
  .pillar-rail__item:last-child { border-bottom: none; }
}

/* Photo frames */
.photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(18, 22, 28, 0.18);
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.photo-caption {
  font-size: 0.8125rem;
  margin-top: 0.5rem;
  color: var(--ash);
}

.surface-paper .photo-caption { color: #5E636B; }

/* Capabilities folio list */
.folio-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 3px solid var(--quench);
}

.folio-list li {
  padding: 0.85rem 0 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(138, 143, 151, 0.18);
  font-weight: 600;
}

.folio-list li::before {
  content: attr(data-folio);
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--quench);
  margin-bottom: 0.2rem;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid rgba(18, 22, 28, 0.1);
  padding-block: 1.25rem;
}

.surface-steel .faq-item,
.surface-ink .faq-item {
  border-color: rgba(241, 238, 231, 0.12);
}

.faq-item summary {
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  padding-right: 1.5rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item[open] summary { margin-bottom: 0.75rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font: inherit;
  border: 1px solid rgba(18, 22, 28, 0.22);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.checkbox-group {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.9375rem;
}

.checkbox-group input { width: auto; margin-top: 0.25rem; }

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Footer */
.site-footer {
  padding: var(--section-pad) 0 2rem;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li { margin-bottom: 0.4rem; }

.footer-nav a { text-decoration: none; font-size: 0.875rem; }

.disclaimer {
  font-size: 0.8125rem;
  color: var(--ash);
  line-height: 1.55;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(138, 143, 151, 0.28);
}

.surface-paper .disclaimer {
  border-color: rgba(18, 22, 28, 0.1);
  color: #5E636B;
}

.footer-meta {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--ash);
}

.surface-paper .footer-meta { color: #5E636B; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1.25rem;
  background: var(--steel);
  color: var(--paper);
  border-top: 1px solid rgba(138, 143, 151, 0.3);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

.cookie-banner[hidden] { display: none; }

.cookie-banner__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner p {
  flex: 1 1 20rem;
  margin: 0;
  font-size: 0.875rem;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-banner .btn {
  padding: 0.55rem 1rem;
  font-size: 0.8125rem;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(18, 22, 28, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-modal[hidden] { display: none; }

.cookie-modal__panel {
  background: var(--paper);
  color: var(--ink);
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 28rem;
  width: 100%;
}

.cookie-modal__panel label {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding-top: calc(var(--header-h) + var(--section-pad));
  padding-bottom: 3rem;
}

.page-hero h1 { margin-bottom: 0.75rem; }

/* Case study */
.case-study {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(138, 143, 151, 0.22);
}

.case-study:last-child { border-bottom: none; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  color: var(--ash);
}

/* Legal prose */
.legal-prose h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-prose h2:first-child { margin-top: 0; }

.legal-prose h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

/* Scroll reveal */
.js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    transition: transform 0.65s ease;
  }

  .js .reveal:not(.is-visible) {
    transform: translateY(16px);
  }

  .js .reveal.is-visible {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    transform: none !important;
  }
}

/* Utility */
.text-muted { color: var(--ash); }
.surface-paper .text-muted { color: #5E636B; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-lg { margin-bottom: 2rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

main { padding-top: 0; }

body:not(.page-home) main {
  padding-top: var(--header-h);
}

.cta-band {
  text-align: center;
  padding: var(--section-pad) 0;
}

.cta-band h2 { margin-bottom: 0.75rem; }

.service-block {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(18, 22, 28, 0.08);
}

.service-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.price-note {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--quench);
  margin-top: 0.75rem;
}

.surface-steel .price-note,
.surface-ink .price-note {
  color: #6BA3BE;
}
