
/* =====================================================================
 * LAYOUT: brochure-formal
 * Variables consumed via map-based template helpers:
 *   #hex     palette slot lookup with fallback
 *   default  typography slot lookup with fallback
 *   default  structure token lookup with fallback
 *
 * Renderer contract:
 *   - This template MUST NOT declare --section-* defaults; the renderer
 *     appends them after rendering based on palette luminance.
 *   - Renderer-managed surface section classes:
 *       .differentiators-section, .features-section, .faq-section,
 *       .services-section, .about-section
 *     These MUST be surface-coloured here.
 *   - Element rules use var(--section-*, var(--color-*)) so dark-section
 *     components can override per-container without restating rules.
 * ===================================================================== */

:root {
  /* ── Palette ── */
  --color-primary:        #1a1410;
  --color-primary-hover:  #1a1410;
  --color-primary-text:   #ede5d8;
  --color-secondary:      #2c2218;
  --color-accent:         #c49a5a;
  --color-background:     #0f0c09;
  --color-surface:        #1f1a14;
  --color-text:           #ede5d8;
  --color-text-muted:     #9a8f82;
  --color-border:         #2e2720;
  --color-card-bg:        #1f1a14;
  --color-header-bg:      #0f0c09;
  --color-header-text:    #ede5d8;
  --color-cta-bg:         #1f1a14;
  --color-cta-text:       #ede5d8;
  --color-footer-bg:      #0f0c09;
  --color-footer-text:    #ede5d8;

  /* ── Typography ── */
  --font-body:        'Lora', Georgia, 'Times New Roman', serif;
  --font-heading:     'Playfair Display', 'Freight Display', Georgia, serif;
  --font-size-base:   17px;
  --line-height-base: 1.7;

  /* ── Structure ── */
  --container-max:    1200px;
  --container-pad-x:  1.5rem;
  --section-pad-y:    5rem;
  --section-pad-y-sm: 3rem;
  --radius:           0.375rem;
  --radius-sm:        0.25rem;
  --radius-lg:        0.5rem;
  --shadow-sm:        0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:        0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg:        0 10px 15px rgba(0,0,0,0.1);
  --transition:       200ms ease;
  --card-pad:         1.5rem;
  --grid-gap:         2rem;

  /* ── Optional palette-driven section overrides ──
   * If the palette declares a 'heading' slot, we emit --section-heading at
   * :root level. Per the Colour Inheritance Model contract, h1-h6 resolve
   * via var(--section-heading, var(--color-primary)). Setting it here makes
   * the palette's heading choice apply in light sections; dark-section
   * components still override it on their container per the Dark Section
   * Variable Contract. Palettes without a 'heading' slot fall through to
   * --color-primary as the contract specifies. */
  --section-heading: #ede5d8;
}

/* ── Base reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }

/* ── Colour Inheritance Model ──
 * Element rules use var(--section-*, var(--color-*)) so dark-section
 * components can override per container without restating rules. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--section-heading, var(--color-primary));
  margin: 0 0 1rem;
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

p, li, blockquote { color: var(--section-text, inherit); margin: 0 0 1rem; }
/* strong/em/cite/span: do NOT set color — they inherit from parent */
a {
  color: var(--color-accent-ink, var(--color-accent));
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-primary); }

/* ── Layout primitives ── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad-x);
  width: 100%;
}
.section { padding-block: var(--section-pad-y); }

/* ── Site header ── */
.site-header {
  background: var(--color-header-bg);
  color: var(--color-header-text);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 1rem var(--container-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-header-text);
  text-decoration: none;
}
.logo-img { max-height: 40px; width: auto; }
.main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--color-header-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
}
.main-nav a:hover,
.main-nav a.active { color: var(--color-accent); }
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  color: var(--color-header-text);
}
.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
}

/* ── Hero (component-coloured) ── */
.hero-section { padding-block: calc(var(--section-pad-y) * 1.2); }
.hero-section .container { text-align: center; max-width: 880px; }
.hero-section h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.hero-subtitle, .hero-section .lead {
  font-size: 1.25rem;
  color: var(--section-text-muted, var(--color-text-muted));
  margin: 0 auto 2rem;
  max-width: 640px;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Renderer-managed surface sections ──
 *
 * TEMPORARY RENDERER COUPLING: these 5 class names must stay in sync
 * with buildSectionDefaults in render_css_from_spec_action.go, which
 * hardcodes the same list to emit dark-surface --section-* overrides
 * when surface is dark.
 *
 * LONG-TERM DIRECTION: move surface painting into the relevant
 * components (features, services, differentiators, about, faq), change
 * the renderer to emit overrides keyed on a data-section-bg attribute
 * instead of hardcoded class names, and remove this block from every
 * layout. Tracked as Phase 4.5 in 025_palette_layout_typography_migration.
 *
 * Until then, these 5 classes MUST be surface-coloured in every layout
 * so the renderer's assumption holds. Hero/CTA/testimonials/contact are
 * NOT in this list — their background is component-owned per the Dark
 * Section Variable Contract. */
.features-section,
.services-section,
.differentiators-section,
.about-section,
.faq-section { background: var(--color-surface); }

/* Generic section grids (3-col → 2 → 1) */
.features-grid,
.services-grid,
.differentiators-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  margin-top: 3rem;
}
.feature-card,
.service-card,
.differentiator-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--card-pad);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.feature-card:hover,
.service-card:hover,
.differentiator-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
}
.feature-icon,
.service-icon,
.differentiator-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

/* ── About ── */
.about-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* ── FAQ ── */
.faq-section .container { max-width: 820px; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-weight: 400; font-size: 1.25rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  padding-top: 0.75rem;
  color: var(--section-text-muted, var(--color-text-muted));
}

/* ── Call to action (component-coloured) ── */
.call-to-action-section { text-align: center; }

/* ── Testimonials (component-coloured) ── */
.testimonials-section .testimonial {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  font-size: 1.125rem;
}
.testimonials-section .testimonial cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  color: var(--section-text-muted, var(--color-text-muted));
  font-size: 0.95rem;
}

/* ── Contact ── */
.contact-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

/* ── Forms ── */
.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
  font-size: 0.9rem;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.75rem;
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-background);
  color: var(--color-text);
  min-height: 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font: inherit;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition);
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-text);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-primary-text);
}
.btn-secondary {
  background: transparent;
  color: var(--section-heading, var(--color-primary));
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-primary-text);
}
.btn-large { padding: 1rem 2rem; font-size: 1.05rem; }

/* ── Site footer ── */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding-top: 4rem;
  margin-top: auto;
}
.footer-container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 0 var(--container-pad-x);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
.site-footer h3, .site-footer h4 { color: #ffffff; }
.site-footer a { color: var(--color-footer-text); }
.site-footer a:hover { color: var(--color-accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .features-grid,
  .services-grid,
  .differentiators-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding-block: var(--section-pad-y-sm); }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }
  .features-grid,
  .services-grid,
  .differentiators-grid,
  .about-section .container,
  .contact-section .container,
  .footer-container { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .main-nav.is-open { display: block; }
  .mobile-menu-toggle { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; }
}

/* ── Accessibility ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* === Component-specific styles === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* ── Renderer-enforced section defaults ── */
/* Text/heading colours are picked from the site palette by contrast ratio. */
/* Themes MUST NOT declare --section-* defaults; the renderer owns this. */

body {
  --section-text: #ede5d8;
  --section-text-muted: rgba(237,229,216,0.75);
  --section-heading: #ede5d8;
  --section-surface: rgba(255,255,255,0.05);
  --section-border: rgba(255,255,255,0.2);
}

.differentiators-section,
.features-section,
.faq-section,
.services-section,
.about-section {
  --section-text: #ede5d8;
  --section-text-muted: rgba(237,229,216,0.75);
  --section-heading: #ede5d8;
  --section-surface: rgba(255,255,255,0.05);
  --section-border: rgba(255,255,255,0.2);
}


/* renderer-enforced compatibility aliases (component vocabulary bridge) */
:root {
  --border-radius: var(--radius, 8px);
  --shadow: var(--shadow-md, 0 2px 12px rgba(0, 0, 0, 0.15));
  --spacing-section: var(--section-pad-y, 4rem);
  --container-max-width: var(--container-max, 1200px);
  --primary-color: var(--color-primary);
  --secondary-color: var(--color-secondary);
  --accent-color: var(--color-accent);
  --color-heading: var(--color-text);
  --color-white: #ffffff;
  --color-error: #d64545;
  --hero-ink: var(--color-text);
}


/* renderer-owned legible-ink companions. Opt in with
   var(--color-primary-ink, var(--color-primary)) — never bare, so a
   stylesheet rendered before this block renders byte-identically. */
:root {
  --color-primary-ink: #ae8f7b;
  --color-accent-ink: #c49a5a;
  --color-accent-text: #3b2f1b;
  --color-cta-bg-ink: #1f1a14;
}


/* css-patch-agent 2026-09-16: contrast */
DIV.footercopyright { color: #a8a8a8; }

/* css-patch-agent 2026-09-16: contrast */
DIV.footercopyright { color: #b0b0b0; }

/* css-patch-agent 2026-09-16: contrast */
/* css-patch-agent: contrast fix for .footercopyright a on dark background */
body .footercopyright A { color: #a0a0a0; }

/* css-patch-agent 2026-09-16: contrast */
/* css-patch-agent: contrast fix for .footercopyright a - minimum 4.5:1 on black background */
body .footercopyright A { color: #a8a8a8; }

/* css-patch-agent 2026-09-16: contrast */
/* css-patch-agent: contrast fix for .footercopyright a - minimum 4.5:1 on black background */
body .footercopyright A { color: #b0b0b0; }

/* css-patch-agent 2026-09-16: contrast */
/* css-patch-agent: contrast fix for DIV.footercopyright - minimum 4.5:1 on rgb(0,0,0) background */
DIV.footercopyright { color: #b8b8b8; }

/* css-patch-agent 2026-09-16: contrast */
/* css-patch-agent: contrast fix for DIV.footercopyright - minimum 4.5:1 on rgb(0,0,0) background */
DIV.footercopyright { color: #bbbbbb; }

/* css-patch-agent 2026-09-16: contrast */
/* css-patch-agent: contrast fix for .footercopyright a - minimum 4.5:1 on rgb(0,0,0) background */
body .footercopyright A { color: #bbbbbb; }

/* css-patch-agent 2026-09-16: contrast */
/* css-patch-agent: contrast fix for .footercopyright a - minimum 4.5:1 on rgb(0,0,0) background */
body .footercopyright A { color: #bbbbbb; }

/* css-patch-agent 2026-09-16: contrast */
/* css-patch-agent: contrast fix for DIV.footercopyright - minimum 4.5:1 on rgb(0,0,0) background */
DIV.footercopyright { color: #bbbbbb; }
/* C5-PROSE-LINK (owner ruling 2026-09-14): a link in running copy needs a cue that is not colour. Unclassed links only - component links carry classes and keep their own styling. */
:where(main) :is(p, li, dd, blockquote) a:not([class]){text-decoration:underline;text-underline-offset:2px}


/* css-patch-agent 2026-09-20: contrast */
/* css-patch-agent: contrast fix for SPAN.swipeable-insight-carousel__eyebrow - minimum 4.5:1 on rgb(31,26,20) background */
SPAN.swipeable-insight-carousel__eyebrow { color: #c49a5a; }

/* css-patch-agent 2026-09-20: contrast */
/* css-patch-agent: contrast fix for SPAN.swipeable-insight-carousel__label - minimum 4.5:1 on rgb(15,12,9) background */
SPAN.swipeable-insight-carousel__label { color: #ede5d8; }

/* css-patch-agent 2026-09-20: contrast */
/* css-patch-agent: contrast fix for A.swipeable-insight-carousel__link - minimum 4.5:1 on rgb(15,12,9) background */
A.swipeable-insight-carousel__link { color: #ede5d8 !important; }

/* css-patch-agent 2026-09-20: contrast */
/* css-patch-agent: contrast fix for BUTTON.form-submit - minimum 4.5:1 on rgb(196,154,90) background */
BUTTON.form-submit { color: #1a1410; }