/* =========================
   Design tokens
   ========================= */
:root{
  --bg: #fdf6e3;
  --paper: #ffffff;
  --ink: #4a3d33;
  --muted: #7b6a5d;
  --accent: #adc33e;
  --accent-ink: #1d2a00;

  --radius: 16px;
  --shadow: 0 6px 24px rgba(0,0,0,.08);
  --shadow-strong: 0 12px 32px rgba(0,0,0,.12);

  /* slightly wider desktop container */
  --container: 1200px;
}

/* =========================
   Base + Resets
   ========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto Condensed", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  /* fluid font size that never gets too small/large */
  font-size: clamp(15px, 1.1vw + 0.2rem, 18px);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* make media intrinsically responsive */
img, svg, video, canvas, audio, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* =========================
   Layout primitives
   ========================= */
.container {
  width: min(92vw, var(--container));
  margin-inline: auto;
  padding-inline: clamp(12px, 2vw, 24px);
}

.section {
  padding-block: clamp(40px, 6vw, 96px);
  background: var(--bg);
}

.section.alt {
  background: #faf7f1;
}

/* =========================
   Type scale
   ========================= */
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 3.8vw, 48px); }
h2 { font-size: clamp(22px, 2.6vw, 34px); }
h3 { font-size: clamp(19px, 2vw, 26px); }
p  { margin: 0 0 1em; }

/* =========================
   Header / Nav
   ========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.brand img {
  width: clamp(32px, 4vw, 44px);
  height: auto;
  object-fit: contain;
}

.nav-toggle {
  margin-left: auto;
  display: none;
  background: var(--paper);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.menu {
  margin-left: auto;
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.menu a {
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  display: inline-block;
}

.menu a:hover,
.menu a:focus {
  background: rgba(0,0,0,.04);
}

.menu a.active {
  background: rgba(173,195,62,.15);
}

/* =========================
   Dropdown menus (desktop)
   - fixes disappearing by removing gaps
   - adds hover bridge
   ========================= */
.has-sub {
  position: relative;
}

/* tiny "hover bridge" so pointer can travel from button to submenu without leaving hover */
.has-sub::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px;         /* hover buffer */
}

.sub-toggle {
  background: transparent;
  border: 0;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  border-radius: 8px;
}
.sub-toggle:hover { background: rgba(0,0,0,.04); }

.submenu {
  position: absolute;
  top: 100%;           /* sit flush under the toggle (no gap = no flicker) */
  left: 0;
  background: var(--paper);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  padding: 8px;
  display: none;
  min-width: 240px;
  z-index: 1001;       /* above header */
}

/* show submenu on hover or when aria-expanded=true */
.has-sub[aria-expanded="true"] .submenu,
.has-sub:hover .submenu { display: block; }

.submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
}
.submenu a:hover,
.submenu a:focus { background: rgba(0,0,0,.04); }

/* =========================
   Hero
   ========================= */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}
.hero h1 { margin: 0 0 12px; }
.hero p  { color: var(--muted); margin: 0 0 20px; }
.hero-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 11;
  object-fit: cover;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* =========================
   Two columns & cards
   ========================= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 4vw, 48px);
  align-items: start;
}
.two-col figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lead { color: var(--muted); max-width: 70ch; }
.check { padding-left: 1.2em; }
.check li { margin: .2em 0; list-style: "✓  "; }

.process summary {
  cursor: pointer;
  font-weight: 700;
  margin: 12px 0;
}
.process ol { padding-left: 1.2em; }

.cards {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: clamp(12px, 2vw, 18px);
  margin-top: 20px;
}
.card {
  background: var(--paper);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radius);
  padding: clamp(16px, 2.2vw, 24px);
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

.pillars { padding-left: 1.2em; }
.pillars li { margin:.3em 0; }

/* =========================
   Contact
   ========================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: clamp(12px, 2vw, 18px);
  margin-bottom: 20px;
}
.contact-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  background: var(--paper);
  padding: clamp(14px, 2vw, 18px);
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,.06);
}
.icon { font-size: clamp(20px, 3vw, 24px); }

.contact-form {
  background: var(--paper);
  padding: clamp(16px, 2.5vw, 24px);
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--shadow);
}
.form-row { display: grid; gap: 8px; margin-bottom: 14px; }
input, textarea {
  width: 100%;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
}
input:focus, textarea:focus { outline: 2px solid color-mix(in oklab, var(--accent) 45%, white); }

/* =========================
   Buttons / Links
   ========================= */
.btn {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
  line-height: 1;
}
.btn:hover { filter: saturate(1.05) brightness(0.98); }
.link { text-decoration: underline; }

/* =========================
   Footer
   ========================= */
.footer {
  background: var(--paper);
  border-top: 1px solid rgba(0,0,0,.06);
  padding: 20px 0;
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.cta-center { text-align: center; margin-top: 16px; }

/* =========================
   Breakpoints
   ========================= */

/* XL desktops: prevent over-wide lines */
@media (min-width: 1600px){
  :root { --container: 1320px; }
}

/* medium laptops/tablets */
@media (max-width: 1100px){
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .two-col   { grid-template-columns: 1fr 1fr; }
  .cards     { grid-template-columns: 1fr 1fr; }
}

/* tablets / small laptops */
@media (max-width: 860px){
  .nav-toggle { display: inline-flex; }
  .menu {
    position: fixed;
    inset: 64px 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: 16px;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-120%);
    transition: transform .25s ease;
    z-index: 1200;
  }
  .menu.open { transform: translateY(0); }

  /* on touch/mobile, submenus are "inline" and only open via aria-expanded (JS) */
  .submenu { position: static; display: none; box-shadow: none; border: 0; padding: 0; }
  .has-sub:hover .submenu { display: none; } /* disable hover open on touch range */
  .has-sub[aria-expanded="true"] .submenu { display: block; }

  .has-sub::after { display: none; } /* hover bridge not needed on mobile */
}

/* phones */
@media (max-width: 680px){
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .cards               { grid-template-columns: 1fr; }
  .contact-grid        { grid-template-columns: 1fr; }
  .brand span { font-size: 1rem; }
  .nav { min-height: 56px; }
  .nav-toggle { padding: 8px 12px; }
  .menu a { padding: 12px; }
}

/* narrow phones */
@media (max-width: 380px){
  .btn { padding: 9px 14px; }
  .brand img { width: 32px; }
}
