/* ═══════════════════════════════════════════════════════════════
   VERACORPUS — styles.css
   Direction A: Warm ivory · Antique bronze · Verdigris · EB Garamond
   ═══════════════════════════════════════════════════════════════ */

/* ── FONTS ──────────────────────────────────────────────────────
   Self-hosted in /fonts/. See fonts/README.txt for download steps.
   Fallback stacks ensure the site is fully readable before fonts load.
   ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond[wght].woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond-Italic[wght].woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3[wght].woff2') format('woff2-variations');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* ── DESIGN TOKENS ───────────────────────────────────────────── */
:root {
  /* Palette */
  --ivory:       #F5F0E8;
  --ivory-alt:   #EBE4D4;
  --charcoal:    #2C2A26;
  --bronze:      #8B6914;
  --bronze-dark: #6E5210;
  --verdigris:   #4A7C6F;
  --error:       #9B2626;

  /* Typography */
  --font-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'Source Sans 3', system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-width:    1100px;
  --content-pad:  clamp(1.25rem, 5vw, 3rem);
  --section-pad:  clamp(4rem, 9vw, 7.5rem);

  /* Transitions */
  --transition: 0.18s ease;
}

/* ── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* account for sticky nav */
}

body {
  background-color: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

ul, ol { list-style: none; }

a { color: inherit; }

/* ── ACCESSIBILITY: SKIP LINK ────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--charcoal);
  color: var(--ivory);
  padding: 0.6rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 0 0 3px 3px;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 0;
}

/* ── ACCESSIBILITY: FOCUS STYLES ─────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}
/* Remove default outline when focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}

/* ── LAYOUT UTILITY ──────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--content-pad);
}

/* ══════════════════════════════════════════════════════════════
   HEADER / NAV
   ══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--ivory);
  border-bottom: 1px solid rgba(44, 42, 38, 0.1);
  transition: box-shadow var(--transition);
}
.site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(44, 42, 38, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--content-pad);
  height: 72px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Wordmark */
.wordmark {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--charcoal);
  text-decoration: none;
  flex-shrink: 0;
  transition: color var(--transition);
}
.wordmark:hover { color: var(--bronze); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-links li { display: flex; align-items: center; }
.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--charcoal);
  padding: 0.4rem 0.75rem;
  opacity: 0.7;
  transition: opacity var(--transition);
}
.nav-links a:hover { opacity: 1; }

/* Language switcher */
.nav-lang-item { margin-left: 0.75rem; }
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: rgba(44, 42, 38, 0.4);
}
.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--charcoal);
  cursor: pointer;
  padding: 0.25rem 0.3rem;
  opacity: 0.45;
  transition: opacity var(--transition);
  line-height: 1;
}
.lang-btn[aria-pressed="true"] {
  opacity: 1;
  font-weight: 700;
  border-bottom: 1.5px solid var(--bronze);
}
.lang-btn:hover { opacity: 0.9; }

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  color: var(--charcoal);
}
.hamburger {
  display: block;
  position: relative;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: background var(--transition);
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform var(--transition), top var(--transition);
}
.hamburger::before { top: -7px; }
.hamburger::after  { top:  7px; }

/* Animated to X when open */
.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ══════════════════════════════════════════════════════════════
   TYPOGRAPHY SCALE
   ══════════════════════════════════════════════════════════════ */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--charcoal);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin-bottom: 0; }

/* Section label (I, II, III / decorative rule) */
.section-label {
  font-family: var(--font-serif);
  font-size: 0.8125rem;
  letter-spacing: 0.3em;
  color: var(--bronze);
  text-transform: uppercase;
  margin-bottom: 0.875rem;
  display: block;
}

/* ══════════════════════════════════════════════════════════════
   BUTTON
   ══════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-block;
  padding: 0.875rem 2.25rem;
  background-color: var(--bronze);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition), transform 0.1s;
  -webkit-appearance: none;
}
.btn-primary:hover  { background-color: var(--bronze-dark); }
.btn-primary:active { transform: translateY(1px); }

/* ══════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 82vh;
  display: flex;
  align-items: center;
  padding-block: var(--section-pad);
  position: relative;
}
/* Faint bronze rule at hero bottom */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--content-pad);
  right: var(--content-pad);
  height: 1px;
  background: rgba(139, 105, 20, 0.18);
}

.hero-inner {
  max-width: 820px;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--bronze);
  margin-bottom: 1.75rem;
}

.value-prop {
  font-size: 1.125rem;
  max-width: 58ch;
  line-height: 1.7;
  margin-bottom: 2.75rem;
  color: rgba(44, 42, 38, 0.85);
}

/* ══════════════════════════════════════════════════════════════
   SECTIONS — GENERIC
   ══════════════════════════════════════════════════════════════ */
.section {
  padding-block: var(--section-pad);
}
.section--alt {
  background-color: var(--ivory-alt);
}

/* ══════════════════════════════════════════════════════════════
   WHAT WE DO — PROSE
   ══════════════════════════════════════════════════════════════ */
.prose-section h2 {
  margin-bottom: 2rem;
}
.prose {
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.prose p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgba(44, 42, 38, 0.9);
}

/* ══════════════════════════════════════════════════════════════
   HOW IT WORKS — TECH GRID
   ══════════════════════════════════════════════════════════════ */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem 4rem;
  margin-top: 3rem;
}

.tech-block h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(139, 105, 20, 0.2);
}
.tech-block p + p {
  margin-top: 1rem;
}
.tech-block p {
  font-size: 1rem;
  line-height: 1.78;
  color: rgba(44, 42, 38, 0.88);
}

/* Assessment list */
.assess-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 0.25rem;
}
.assess-list li {
  padding-left: 1rem;
  border-left: 2px solid var(--verdigris);
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(44, 42, 38, 0.88);
}
.assess-list strong {
  display: block;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.2rem;
}

/* ══════════════════════════════════════════════════════════════
   CONTACT FORM
   ══════════════════════════════════════════════════════════════ */
.contact-container h2 {
  margin-bottom: 1rem;
}
.contact-intro {
  max-width: 58ch;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: rgba(44, 42, 38, 0.85);
  margin-bottom: 0;
}

.contact-form {
  max-width: 560px;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Turnstile widget — collapsed so it never creates layout space */
.cf-turnstile { height: 0; overflow: hidden; }

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
}
.label-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.75rem;
  opacity: 0.55;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(44, 42, 38, 0.22);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--charcoal);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: rgba(44, 42, 38, 0.35);
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.12);
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(155, 38, 38, 0.1);
}

textarea { resize: vertical; min-height: 130px; }

.field-error {
  font-size: 0.8125rem;
  color: var(--error);
  font-family: var(--font-sans);
}

/* Form feedback messages */
.form-feedback {
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  border-left: 3px solid;
}
.form-feedback--success {
  border-color: var(--verdigris);
  background: rgba(74, 124, 111, 0.08);
  color: var(--verdigris);
}
.form-feedback--error {
  border-color: var(--error);
  background: rgba(155, 38, 38, 0.06);
  color: var(--error);
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.site-footer {
  background-color: var(--charcoal);
  color: var(--ivory);
  padding-block: clamp(3rem, 6vw, 5rem);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2.5rem 3rem;
  align-items: start;
}

.footer-brand { grid-column: 1; grid-row: 1; }
.footer-nav   { grid-column: 2; grid-row: 1; }
.footer-copyright { grid-column: 1 / -1; grid-row: 2; }

.wordmark--footer {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--bronze);
  text-decoration: none;
}
.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.5;
  opacity: 0.65;
}
.footer-location {
  margin-top: 0.4rem;
  font-size: 0.8125rem !important;
  opacity: 0.45 !important;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  opacity: 0.55;
  transition: opacity var(--transition);
}
.footer-nav a:hover { opacity: 1; }

.footer-copyright {
  font-size: 0.8125rem;
  opacity: 0.35;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 900px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .tech-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 700px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {

  /* Show hamburger, hide inline nav */
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ivory);
    border-bottom: 1px solid rgba(44, 42, 38, 0.1);
    box-shadow: 0 6px 20px rgba(44, 42, 38, 0.1);
    padding: 1rem 0 1.5rem;
  }
  .nav-links.is-open { display: flex; }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.75rem var(--content-pad);
    opacity: 0.8;
  }

  .nav-lang-item { padding: 0.75rem var(--content-pad) 0; }

  /* Hero */
  .hero { min-height: 75vh; }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .footer-nav { grid-column: 1; grid-row: 2; }
  .footer-nav ul { flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
  .footer-copyright { grid-row: 3; }
}

/* ══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
