/* ==========================================================================
   GoAgentic — design system stylesheet
   Implements the spec in /UI Guide/07-ui-design-instructions.md.
   Mobile-first. Custom properties expose every design token.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Self-hosted fonts
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/fraunces-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/fraunces-500.woff2') format('woff2');
}


/* --------------------------------------------------------------------------
   2. Design tokens (custom properties)
   -------------------------------------------------------------------------- */

:root {
  /* Colour ----------------------------------------------------------- */
  --bg:               #FAF7F2;
  --bg-alt:           #F3EEE5;
  --surface:          #FFFFFF;

  --text-primary:     #141413;
  --text-secondary:   #5C5A55;
  --text-muted:       #8B8882;

  --border-subtle:    #E8E2D5;
  --border-defined:   #D4CDBE;

  --accent:           #CC5500;
  --accent-hover:     #A84500;
  --accent-active:    #8E3A00;

  --success:          #2E6F40;
  --error:            #9B2D1F;

  /* Type ------------------------------------------------------------- */
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Layout ----------------------------------------------------------- */
  --container-max:    1200px;
  --prose-max:        680px;
  --page-margin:      20px;
  --section-gap:      80px;
  --subsection-gap:   48px;
  --header-height:    64px;

  /* Motion ----------------------------------------------------------- */
  --ease:             cubic-bezier(.2, .8, .2, 1);
  --t-fast:           0.15s;
  --t-medium:         0.2s;
  --t-slow:           0.4s;
}

@media (min-width: 768px) {
  :root {
    --page-margin:    48px;
    --section-gap:    120px;
    --subsection-gap: 64px;
    --header-height:  72px;
  }
}


/* --------------------------------------------------------------------------
   3. Reset and base
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern', 'liga', 'calt';
}

@media (min-width: 768px) {
  body { font-size: 17px; }
}

img, svg, video, picture { display: block; max-width: 100%; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

ul, ol { padding: 0; margin: 0; }


/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  color: var(--text-primary);
}

h1, h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 32px;
  line-height: 1.1;
}

h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
}

@media (min-width: 768px) {
  h1 { font-size: 72px; }
  h2 { font-size: 48px; }
  h3 { font-size: 24px; }
}

p {
  margin: 0 0 20px;
  max-width: var(--prose-max);
}

.lede,
.body-large {
  font-size: 18px;
  line-height: 1.6;
}
@media (min-width: 768px) {
  .lede,
  .body-large { font-size: 20px; }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.caption {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
}

.small,
small {
  font-size: 14px;
  line-height: 1.5;
}

strong, b { font-weight: 600; }


/* --------------------------------------------------------------------------
   5. Links
   -------------------------------------------------------------------------- */

/* Inline body links */
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-thickness var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
a:hover { text-decoration-thickness: 2px; }

/* Links that act as nav / wrappers / buttons reset to inherit colour */
.logo,
.nav-link,
.mobile-nav-link,
.footer-links a,
.legal-links a,
.btn,
.link-arrow {
  text-decoration: none;
  color: inherit;
}

/* "Learn more →" style link inside cards */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
}
.link-arrow svg { transition: transform var(--t-fast) var(--ease); }
.link-arrow:hover svg { transform: translateX(2px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

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


/* --------------------------------------------------------------------------
   6. Layout helpers
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container-max) + (2 * var(--page-margin)));
  margin-inline: auto;
  padding-inline: var(--page-margin);
}

.prose { max-width: var(--prose-max); }

.section { padding-block: var(--section-gap); }
.section--alt { background: var(--bg-alt); }
.section--bordered + .section--bordered { border-top: 1px solid var(--border-subtle); }

.section-header { margin-bottom: var(--subsection-gap); }
.section-header > p { color: var(--text-secondary); }

.divider {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 0;
}


/* --------------------------------------------------------------------------
   7. Skip link
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  padding: 12px 20px;
  background: var(--text-primary);
  color: var(--bg) !important;
  font-weight: 500;
  text-decoration: none;
  z-index: 1000;
  border-radius: 6px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}


/* --------------------------------------------------------------------------
   8. Site header / primary nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border-subtle);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 24px;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Slightly larger in the footer where there's more breathing room */
.footer-brand .logo {
  font-size: 28px;
}

.primary-nav {
  display: none;
}
@media (min-width: 768px) {
  .primary-nav {
    display: flex;
    align-items: center;
    gap: 32px;
  }
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-link {
  position: relative;
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-secondary);
  padding: 10px 0;
  transition: color var(--t-fast) var(--ease);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.is-active { color: var(--text-primary); }
.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}


/* --------------------------------------------------------------------------
   9. Hamburger (mobile only)
   -------------------------------------------------------------------------- */

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  padding: 10px;
  margin: 0;
  border-radius: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform var(--t-medium) var(--ease),
              opacity var(--t-fast) var(--ease);
}
@media (min-width: 768px) {
  .hamburger { display: none; }
}


/* --------------------------------------------------------------------------
   10. Mobile nav overlay
   -------------------------------------------------------------------------- */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-nav[hidden] { display: none; }

.mobile-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  flex-shrink: 0;
}

.mobile-nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  padding: 0;
  margin-right: -10px;
  border-radius: 6px;
}

.mobile-nav-links {
  padding-block: 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.mobile-nav-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 56px;
}
.mobile-nav-link.is-active { color: var(--accent); }

.mobile-nav-cta {
  align-self: flex-start;
  margin-top: 8px;
}

body.is-mobile-nav-open { overflow: hidden; }


/* --------------------------------------------------------------------------
   11. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  padding: 14px 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #FFFFFF;
}
.btn-primary:active {
  background: var(--accent-active);
  border-color: var(--accent-active);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-defined);
  padding: 14px 24px;
}
.btn-secondary:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Smaller variant used in the header CTA */
.btn-sm {
  padding: 12px 20px;
  min-height: 40px;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* --------------------------------------------------------------------------
   12. Hero section
   -------------------------------------------------------------------------- */

.hero {
  padding-block: var(--section-gap);
}
.hero h1 {
  max-width: 16ch;
  margin-bottom: 24px;
}
.hero .lede {
  max-width: 520px;
  color: var(--text-secondary);
  margin-bottom: 0;
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-trust {
  margin-top: 32px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
}


/* --------------------------------------------------------------------------
   13. Bento card grid
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: var(--subsection-gap);
}
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  /* Fifth card spans full width: 2 + 2 + 1 layout */
  .card-grid > .card:nth-child(5) {
    grid-column: 1 / -1;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--t-fast) var(--ease);
}
.card:hover { border-color: var(--border-defined); }
.card h3 { margin: 0; }
.card p {
  margin: 0;
  color: var(--text-secondary);
  max-width: none;
}
.card .link-arrow { margin-top: auto; }


/* --------------------------------------------------------------------------
   14. FAQ accordion (native <details>)
   -------------------------------------------------------------------------- */

.faq {
  max-width: var(--prose-max);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--subsection-gap);
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 40px 24px 0;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: translateY(-75%) rotate(45deg);
  transition: transform var(--t-medium) var(--ease);
}
.faq-item[open] summary::after {
  transform: translateY(-25%) rotate(-135deg);
}
.faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}
.faq-answer {
  padding: 0 40px 24px 0;
  color: var(--text-secondary);
}
.faq-answer p { margin: 0 0 16px; }
.faq-answer p:last-child { margin: 0; }


/* --------------------------------------------------------------------------
   15. Forms
   -------------------------------------------------------------------------- */

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 28px;
}

.form-label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.form-required { color: var(--accent); margin-left: 2px; }

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border-defined);
  background: transparent;
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--text-primary);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--t-fast) var(--ease);
}
.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
  padding-bottom: 9px;
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%235C5A55' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 1.5 6 6.5 11 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 32px;
}

.form-help {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.form-actions {
  margin-top: 32px;
}


/* --------------------------------------------------------------------------
   16. Process steps
   -------------------------------------------------------------------------- */

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--subsection-gap);
  counter-reset: step;
  margin-top: var(--subsection-gap);
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
  padding-top: 4px;
}
@media (min-width: 768px) {
  .step::before { font-size: 36px; }
  .step { gap: 40px; }
}
.step h3 { margin: 0 0 8px; }
.step p { margin: 0 0 12px; color: var(--text-secondary); }
.step p:last-child { margin: 0; }


/* --------------------------------------------------------------------------
   17. Three-column "why us" pattern
   -------------------------------------------------------------------------- */

.three-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--subsection-gap);
  margin-top: var(--subsection-gap);
}
@media (min-width: 768px) {
  .three-col {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }
}
.three-col h3 { margin-bottom: 12px; }
.three-col p { color: var(--text-secondary); margin: 0; }


/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-subtle);
  padding: 80px 0 40px;
  margin-top: var(--section-gap);
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 768px) {
  .site-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
  }
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 16px;
}
.footer-tagline {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 36ch;
  margin: 0;
}

.footer-heading {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.footer-links,
.legal-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a,
.legal-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color var(--t-fast) var(--ease);
  line-height: 1.4;
}
.footer-links a:hover,
.legal-links a:hover { color: var(--text-primary); }

.site-footer-bottom {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}
.site-footer-bottom p { margin: 0; }
@media (min-width: 768px) {
  .site-footer-bottom {
    flex-direction: row;
    align-items: center;
  }
}
.site-footer-bottom .legal-links {
  flex-direction: row;
  gap: 24px;
}
.site-footer-bottom .legal-links a {
  font-size: 13px;
  color: var(--text-muted);
}
.site-footer-bottom .legal-links a:hover { color: var(--text-primary); }


/* --------------------------------------------------------------------------
   19. Reveal-on-scroll utility
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-slow) var(--ease),
              transform var(--t-slow) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* --------------------------------------------------------------------------
   19b. Page patterns added in Phase 2
   -------------------------------------------------------------------------- */

/* Vertical stack of editorial text blocks (about page, "what we believe") */
.text-stack {
  display: flex;
  flex-direction: column;
  gap: var(--subsection-gap);
  margin-top: var(--subsection-gap);
  max-width: var(--prose-max);
}
.text-stack > div h3 { margin: 0 0 12px; }
.text-stack > div p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}
.text-stack > div p:last-child { margin: 0; }

/* Editorial bullet list with thin accent dash markers */
.styled-list {
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
  max-width: var(--prose-max);
}
.styled-list li {
  position: relative;
  padding: 6px 0 6px 28px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.styled-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 14px;
  height: 1px;
  background: var(--accent);
}

/* Two-column layout (contact page) */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  margin-top: var(--subsection-gap);
}
@media (min-width: 1024px) {
  .two-col {
    grid-template-columns: 1.2fr 1fr;
    gap: 96px;
    align-items: start;
  }
}

/* Service block (services page) — hairline divider between, anchor-friendly */
.service-block {
  padding-block: var(--subsection-gap);
  border-top: 1px solid var(--border-subtle);
  scroll-margin-top: calc(var(--header-height) + 24px);
}
.service-block:first-of-type {
  border-top: 0;
  padding-top: 24px;
}
.service-block h2 { margin-bottom: 24px; }
.service-block h4 {
  margin-top: 32px;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.service-block .btn { margin-top: 24px; }

/* "Or email …" supporting line under a primary CTA row */
.cta-or {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
  max-width: none;
}
.cta-or a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.cta-or a:hover { color: var(--text-primary); }

/* Thank-you panel that replaces the contact form on success */
.thankyou-panel {
  padding-top: 8px;
}
.thankyou-panel .eyebrow {
  margin-bottom: 16px;
  color: var(--success);
}
.thankyou-panel h2 {
  margin: 0 0 20px;
}
.thankyou-panel p {
  color: var(--text-secondary);
  margin: 0 0 16px;
  max-width: none;
}
.thankyou-panel .thankyou-confirm {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: 8px;
}
.thankyou-panel .thankyou-confirm strong {
  color: var(--text-secondary);
  font-weight: 500;
}
.thankyou-panel .thankyou-actions {
  margin-top: 32px;
  margin-bottom: 0;
}

/* Form messages (contact page) */
.form-message {
  margin-bottom: 32px;
  padding: 16px 20px;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.5;
  border: 1px solid;
}
.form-message--success {
  background: rgba(46, 111, 64, 0.06);
  border-color: rgba(46, 111, 64, 0.25);
  color: var(--success);
}
.form-message--error {
  background: rgba(155, 45, 31, 0.06);
  border-color: rgba(155, 45, 31, 0.25);
  color: var(--error);
}

/* Visually hidden — used for honeypot field, screen-reader-only text */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Anchor-friendly section IDs (account for sticky header) */
[id] { scroll-margin-top: calc(var(--header-height) + 16px); }


/* --------------------------------------------------------------------------
   19c. Logo marquee — "models we build with" strip on the home page
   -------------------------------------------------------------------------- */

.logo-strip {
  padding-block: 56px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg);
}
.logo-strip-caption {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin: 0 auto 32px;
  max-width: none;
}

.logo-marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.logo-track {
  display: flex;
  width: max-content;
  animation: logo-marquee 45s linear infinite;
}
.logo-marquee:hover .logo-track { animation-play-state: paused; }

.logo-set {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 72px;
  margin: 0;
  padding: 0 36px;
}

.logo-item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  flex-shrink: 0;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}
.logo-item:hover { color: var(--text-primary); }

.logo-mark {
  display: block;
  width: 40px;
  height: 40px;
  background-color: currentColor;
  -webkit-mask-image: var(--logo);
          mask-image: var(--logo);
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  flex-shrink: 0;
}

.logo-name {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
}

@keyframes logo-marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-marquee {
    -webkit-mask-image: none;
            mask-image: none;
  }
  .logo-track {
    animation: none;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
  .logo-set {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 24px;
    column-gap: 32px;
  }
  .logo-set[aria-hidden="true"] { display: none; }
}


/* --------------------------------------------------------------------------
   19d. Blog — listing cards and single-post layout
   -------------------------------------------------------------------------- */

/* Listing grid (and "continue reading" grid) */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: var(--subsection-gap);
}
@media (min-width: 700px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
}
@media (min-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none !important;
  color: var(--text-primary);
}
.blog-card-image {
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: border-color var(--t-fast) var(--ease);
}
.blog-card:hover .blog-card-image { border-color: var(--border-defined); }
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card-meta,
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.post-meta-divider {
  color: var(--border-defined);
  font-weight: 400;
}
.blog-card h3 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text-primary);
  transition: color var(--t-fast) var(--ease);
}
.blog-card:hover h3 { color: var(--accent); }
.blog-card-excerpt {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* Single post layout */
.post-hero {
  padding-block: var(--section-gap) var(--subsection-gap);
}
.post-hero h1 {
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin: 16px 0 24px;
}
@media (min-width: 768px) {
  .post-hero h1 { font-size: 56px; }
}
.post-hero-excerpt {
  font-family: var(--font-sans);
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  max-width: 60ch;
}

.post-image {
  margin: 0 auto;
  max-width: var(--container-max);
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-body {
  max-width: var(--prose-max);
  margin: var(--subsection-gap) auto 0;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-primary);
}
.post-body > p:first-child {
  font-size: 22px;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 32px;
}
.post-body p {
  margin: 0 0 24px;
  max-width: none;
  color: var(--text-primary);
}
.post-body h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 64px 0 16px;
}
@media (min-width: 768px) {
  .post-body h2 { font-size: 36px; }
}
.post-body h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin: 40px 0 12px;
}
.post-body ul, .post-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
  color: var(--text-primary);
}
.post-body li { margin-bottom: 10px; }
.post-body li::marker { color: var(--accent); }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.post-body blockquote p { margin: 0; }
.post-body strong { font-weight: 600; }
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.post-body a:hover { text-decoration-thickness: 2px; }

.post-cta {
  border-top: 1px solid var(--border-subtle);
  padding: 56px 0;
  margin-top: 64px;
}

.post-related {
  margin-top: 0 !important;
  padding-top: var(--section-gap);
  padding-bottom: var(--section-gap);
}
.post-related-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}


/* --------------------------------------------------------------------------
   20. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
