/* ============================================================
   ASNEL THE PAINTER — GLOBAL STYLESHEET
   Design tokens, typography, layout primitives, header/footer.
   Page-specific styles live in css/pages/*.css — see README.md
   ============================================================ */

:root {
  /* ---- Brand colors (derived from Asnel's existing logo) ---- */
  --pine: #2E4A38;         /* primary brand green */
  --pine-deep: #1C2E23;    /* darker green, headers/panels */
  --ink: #211F1B;          /* near-black text */
  --paper: #F4EFE4;        /* warm off-white background */
  --ochre: #955A22;        /* paint-can accent, used sparingly */
  --ochre-light: #E0A868;  /* for ochre-colored text on DARK backgrounds */
  --field-border: #7F7A6A;
  --canvas: #CDBB92;       /* muted tan, hairline dividers */
  --border: #201e19;       /* structural border color */
  --white: #FFFFFF;

  /* ---- Type ---- */
  --font-display: 'Fraunces', serif;
  --font-body: 'Libre Franklin', sans-serif;
  --font-label: 'Special Elite', monospace; /* stamped/stencil labels — used sparingly */

  /* ---- Layout ---- */
  --container: 1180px;
  --radius: 2px;           /* intentionally minimal — sharp/structured, not rounded */
  --border-w: 1px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---- Reset & base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; color: var(--pine-deep); font-weight: 600; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
.topbar :focus-visible, .hero-panel :focus-visible, .page-hero :focus-visible,
.site-footer :focus-visible, .cta-banner :focus-visible { outline-color: var(--white); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ---- Eyebrow / stamped label ---- */
.eyebrow {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ochre);
  margin: 0 0 0.6rem;
  display: block;
}
.eyebrow-light { color: var(--canvas); }

/* ---- Buttons — rectangular, structured, no pills ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  border: var(--border-w) solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn-primary { background: var(--ochre); color: var(--white); }
.btn-primary:hover { background: #7C4A1B; }
.btn-secondary { background: var(--pine-deep); color: var(--white); }
.btn-secondary:hover { background: var(--pine); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-outline-dark { background: transparent; color: var(--pine-deep); border-color: var(--pine-deep); }
.btn-outline-dark:hover { background: var(--pine-deep); color: var(--white); }
.btn-lg { padding: 0.95rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---- Section rhythm ---- */
.section { padding: 4.5rem 1.5rem; }
.section-tight { padding: 3rem 1.5rem; }
.section-head { max-width: 680px; margin: 0 auto 2.75rem; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.section-lead { margin-top: 0.9rem; color: #4B5A50; font-size: 1.02rem; }

/* ---- Structural divider (flat — no gradient/texture) ---- */
.hr-stripe {
  height: 4px;
  background: var(--ochre);
  width: 100%;
}

/* ================================================
   HEADER — solid, compact, opaque, no glass/floating
   ================================================ */
.site-header {
    background: var(--white);
    border-bottom: var(--border-w) solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50; 
   }

.topbar { background: var(--pine-deep); color: #E9E2D2; font-size: 0.8rem; }
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar-phones { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.topbar-phones a { display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar-phones a:hover { color: var(--ochre-light); }
.topbar-phones strong { font-weight: 700; color: var(--white); }
.lang-switch { font-weight: 700; color: var(--ochre-light); }
.lang-switch:hover { color: var(--white); }

.nav-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-mark { width: 40px; height: auto; }
.brand-word { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--pine-deep); }
.brand-sub { font-size: 0.66rem; letter-spacing: 0.07em; text-transform: uppercase; color: #5C6B60; }

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a { font-weight: 600; font-size: 0.92rem; color: var(--ink); padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--ochre); color: var(--pine-deep); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); }

/* ================================================
   INTERIOR PAGE HEADER (non-homepage pages)
   ================================================ */
.page-hero {
  background: var(--pine-deep);
  color: var(--white);
  padding: 3.5rem 1.5rem 3rem;
  border-bottom: 4px solid var(--ochre);
}
.page-hero-inner { max-width: 780px; margin: 0 auto; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 3.6vw, 2.75rem); margin: 0.4rem 0 0.85rem; }
.page-hero-lead { color: #D9CFB8; font-size: 1.05rem; max-width: 60ch; }

/* ---- Breadcrumbs ---- */
.breadcrumbs { font-size: 0.82rem; color: #C7BCA1; margin-bottom: 1rem; }
.breadcrumbs a { color: #C7BCA1; }
.breadcrumbs a:hover { color: var(--white); }
.breadcrumbs .sep { margin: 0 0.4rem; opacity: 0.6; }
.breadcrumbs .current { color: var(--white); font-weight: 600; }

/* ================================================
   FOOTER
   ================================================ */
.site-footer { background: var(--ink); color: #C9C2B5; }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.25rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.85rem; }
.footer-mark { width: 38px; }
.footer-name { font-family: var(--font-display); font-size: 1.1rem; color: var(--white); margin: 0; }
.footer-name span { color: var(--ochre-light); font-size: 0.82rem; font-weight: 400; }
.footer-tag { font-size: 0.84rem; margin: 0.2rem 0 0; }
.footer-col h4 { color: var(--white); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.9rem; font-family: var(--font-body); }
.footer-col { display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.9rem; }
.footer-col a:hover { color: var(--ochre-light); }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a { width: 32px; height: 32px; border: 1px solid #3A362E; display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--ochre); border-color: var(--ochre); color: var(--ink); }
.footer-bottom { border-top: 1px solid #3A362E; text-align: center; padding: 1.1rem 1.5rem; font-size: 0.8rem; }

/* ================================================
   FORM COMPONENTS (shared across Contact / Free Estimate)
   ================================================ */
.form-card { background: var(--white); border: var(--border-w) solid var(--border); padding: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--pine-deep); }
.field .optional { color: #566559; font-weight: 400; }
.field input, .field select, .field textarea {
  border: var(--border-w) solid var(--field-border);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ochre);
}
.field textarea { resize: vertical; }
.form-note { margin-top: 0.9rem; font-size: 0.9rem; min-height: 1.2em; color: var(--pine); font-weight: 600; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 980px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .topbar-inner { flex-direction: column; gap: 0.4rem; align-items: flex-start; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 1rem 1.5rem 1.5rem; gap: 0.9rem; border-bottom: var(--border-w) solid var(--border); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; visibility: hidden; }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; visibility: visible;}
  .nav-toggle { display: flex; }
  .nav-actions .btn-primary { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { flex-direction: column; }
  .footer-social { justify-content: center; }
  .brand-sub { display: none; }
}

/* ---- Services nav dropdown ---- */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { display: inline-block; }

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--white);
  border: var(--border-w) solid var(--border);
  box-shadow: 0 6px 14px -6px rgba(0,0,0,0.12);
  padding: 0.4rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: none;
}
.nav-dropdown-menu a:hover { background: var(--paper); color: var(--pine-deep); }
.nav-dropdown-viewall {
  border-top: var(--border-w) solid var(--border);
  color: var(--ochre) !important;
  font-weight: 600;
}

/* Mobile: no hover, so make it a plain static list instead */
@media (max-width: 760px) {
  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--border);
    margin-left: 0.75rem;
    padding-left: 0.5rem;
  }
}

.footer-bottom a { text-decoration: underline; }
.footer-bottom a:hover { color: var(--ochre); }

.form-consent { font-size: 0.8rem; color: #5C6B60; margin-top: 0.8rem; }
.form-consent a { text-decoration: underline; }

  .skip-link { position: absolute; left: -999px; top: 0; background: var(--white); color: var(--pine-deep); padding: 0.75rem 1rem; z-index: 100; font-weight: 600; }
  .skip-link:focus { left: 0; }