/* ================================================================
   TERRAIN DESIGN SYSTEM v1.0  —  Map and Field Website Prototype
   ================================================================ */

:root {
  --parchment:     #F5F1EB;
  --terrain-black: #1D1B18;
  --field-green:   #2A4A3C;
  --sienna:        #9E4933;
  --stone:         #DAD5CB;
  --sage:          #7A988F;
  --stone-mid:     #C4BEB4;   /* divider on Stone backgrounds */
  --font-map:      'Lora', serif;
  --font-field:    'Plus Jakarta Sans', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  background-color: var(--parchment);
  color: var(--terrain-black);
  font-family: var(--font-field);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-field); cursor: pointer; }

/* --- Keyboard focus indicators --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.form-input:focus-visible,
.form-textarea:focus-visible {
  /* Transparent outline keeps a visible focus indicator in
     Windows High Contrast mode, where box-shadows are stripped.
     The visible focus style is the sienna ring on :focus below. */
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* --- Type Scale --- */
h1 {
  font-family: var(--font-map);
  font-weight: 400;
  font-size: clamp(42px, 5.5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
h2 {
  font-family: var(--font-map);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h3 {
  font-family: var(--font-map);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.3;
  letter-spacing: 0;
}
p {
  font-family: var(--font-field);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.78;
}

/* --- Eyebrow Label --- */
.eyebrow {
  display: block;
  font-family: var(--font-field);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sienna);
  margin-bottom: 22px;
}

/* --- Text selection — Sienna highlight --- */
::selection {
  background-color: var(--sienna);
  color: var(--parchment);
}

/* --- Dividers --- */
.divider        { border: none; border-top: 1px solid var(--stone); }
.divider-mid    { border: none; border-top: 1px solid var(--stone-mid); }
.divider--spaced     { margin-bottom: 60px; }
.divider-mid--spaced { margin-bottom: 40px; }

/* --- Container --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
}

/* Centered column: 8/12 centered */
.col-center {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Anchor offset for sticky header */
section { scroll-margin-top: 68px; }


/* ================================================================
   HEADER
   ================================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: var(--field-green);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-map);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-list a {
  font-family: var(--font-field);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.025em;
  color: var(--parchment);
  transition: color 0.2s;
}
.nav-list a:hover { color: var(--sage); }
.nav-cta {
  padding: 7px 18px;
  border: 1px solid rgba(245,241,235,0.55);
  font-size: 12px !important;
  letter-spacing: 0.04em !important;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s !important;
}
.nav-cta:hover {
  background-color: var(--parchment) !important;
  color: var(--field-green) !important;
  border-color: var(--parchment) !important;
}

/* Mobile hamburger */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  padding: 2px;
}
.menu-btn span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--parchment);
  transition: opacity 0.2s;
}


/* ================================================================
   SECTION 1 — HERO  (#home)
   ================================================================ */
#home {
  position: relative;
  overflow: hidden;
  background-color: var(--parchment);
  padding: 120px 0 100px;
}
/* Hero terrain texture — charcoal contours with organic drawn edges,
   anchored to the section's right edge at full height so linework bleeds
   off the top, right, and bottom while the left edge stays hand-drawn.
   Hidden below 980px alongside .hero-spacer. */
#home::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 34%;
  background-image: url("topo-hero.webp");
  background-size: auto 100%;
  background-position: right top;
  background-repeat: no-repeat;
  /* Left feather anchored to the column edge (not the image), so clipped
     stroke-ends dissolve at every viewport width */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 30%);
          mask-image: linear-gradient(to right, transparent, #000 30%);
  opacity: 0.08;
  pointer-events: none;
}
#home .container {
  position: relative;
  z-index: 1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 40px;
  align-items: stretch;
}
.hero-text .eyebrow { margin-bottom: 30px; }
.hero-text h1 { margin-bottom: 38px; max-width: 820px; }
.hero-intro { max-width: 580px; margin-bottom: 22px; }
.hero-credential {
  color: var(--sage);
  font-size: 15px;
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 44px;
}
.btn-primary {
  display: inline-block;
  font-family: var(--font-field);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--parchment);
  background-color: var(--sienna);
  padding: 15px 30px;
  border: none;
  transition: background-color 0.2s;
}
.btn-primary:hover { background-color: var(--terrain-black); }


/* ================================================================
   SECTION 2 — PROBLEM  (#problem)
   ================================================================ */
#problem {
  background-color: var(--stone);
  padding: 100px 0;
}
#problem .col-center .eyebrow { margin-bottom: 24px; }
#problem h2 { margin-bottom: 44px; }
.problem-body p + p { margin-top: 24px; }
.gap-line {
  font-family: var(--font-map);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--terrain-black);
  margin-top: 44px;
}


/* ================================================================
   SECTION 3 — PHILOSOPHY  (#approach)
   ================================================================ */
#approach {
  background-color: var(--field-green);
  padding: 100px 0 0;
}
#approach .container { padding-bottom: 64px; }
.approach-text {
  margin-left: 16.67%;
  max-width: 680px;
}
.approach-text .eyebrow { color: var(--sage); }
.approach-text h2,
.approach-text p { color: var(--parchment); }
.approach-text h2 { margin-bottom: 44px; }
.approach-text p + p { margin-top: 26px; }

/* Landscape artwork — Philosophy section.
   Hand-drawn charcoal contours, parchment on Field Green, pre-composited
   at 30% line opacity with a smoothstep fade-in over the top 40% so the
   linework emerges gently from the section above (topo-band.webp). */
.landscape-art {
  display: block;
  width: 100%;
  height: 400px;
  background-color: var(--field-green);
  background-image: url("topo-band.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}


/* ================================================================
   SECTION 4 — THE WORK  (#work)
   ================================================================ */
#work {
  background-color: var(--parchment);
  padding: 100px 0;
}

/* Section header */
.work-intro { margin-left: 16.67%; max-width: 680px; }
.work-intro h2 { margin-bottom: 60px; }

/* Practice cards 2×2 */
.practices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 60px;
  margin-bottom: 80px;
  border-top: 1px solid var(--terrain-black);
  border-left: 1px solid var(--terrain-black);
}
.practice-card {
  padding: 40px 40px 44px;
  border-right: 1px solid var(--terrain-black);
  border-bottom: 1px solid var(--terrain-black);
}
.practice-card h3 {
  font-size: clamp(17px, 1.6vw, 21px);
  margin-bottom: 18px;
}
.practice-card p { font-size: 16px; line-height: 1.76; }
.practice-card p + p { margin-top: 14px; }
.practice-for {
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  color: var(--sage) !important;
  font-style: italic;
}

/* Engagement formats */
.engagements-intro {
  margin-left: 16.67%;
  max-width: 680px;
}
.engagements-intro h3 { margin-bottom: 40px; }
.engagement-list {
  margin-left: 16.67%;
  max-width: 680px;
}
.engagement-item {
  padding: 30px 0;
  border-bottom: 1px solid rgba(218,213,203,0.9);
}
.engagement-item:last-child { border-bottom: none; }
.engagement-item .eyebrow { margin-bottom: 10px; }
.engagement-item p { font-size: 16px; line-height: 1.76; max-width: 620px; }

/* ================================================================
   SECTION 5 — EXPERIENCE  (#experience)
   ================================================================ */
#experience {
  background-color: var(--stone);
  padding: 100px 0;
}
.exp-header { margin-left: 16.67%; max-width: 680px; margin-bottom: 60px; }
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  margin-bottom: 60px;
}
.credential h3 {
  font-size: clamp(17px, 1.7vw, 21px);
  margin-bottom: 16px;
}
.credential p { font-size: 15px; line-height: 1.76; }
.scope-line { margin-left: 16.67%; max-width: 680px; }
.scope-line p {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--sage);
  line-height: 1.7;
}


/* ================================================================
   SECTION 6 — CLIENT SIGNAL  (#fit)
   ================================================================ */
#fit {
  background-color: var(--field-green);
  padding: 100px 0;
}
.fit-content { margin-left: 16.67%; max-width: 680px; }
.fit-content .eyebrow { color: var(--sage); }
.fit-content h2,
.fit-content p { color: var(--parchment); }
.fit-content h2 { margin-bottom: 44px; }
.fit-content p + p { margin-top: 24px; }



/* ================================================================
   SECTION 7 — CONTACT  (#contact)
   ================================================================ */
#contact {
  background-color: var(--stone);
  padding: 100px 0 120px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 1fr 6fr;
  align-items: start;
}

/* Left: copy */
.contact-copy h2 {
  font-size: clamp(26px, 3.2vw, 44px);
  margin-bottom: 36px;
}
.contact-copy p + p { margin-top: 18px; }
.contact-copy .contact-sage {
  margin-top: 34px;
  font-size: 15px;
  color: var(--sage);
}

/* Right: form */
.form-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-label {
  font-family: var(--font-field);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
}
.form-input,
.form-textarea {
  font-family: var(--font-field);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  border: 1px solid var(--stone-mid);
  background-color: var(--parchment);
  color: var(--terrain-black);
  padding: 11px 15px;
  outline: none;
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--sage); opacity: 1; }
.form-input:focus,
.form-textarea:focus {
  border-color: var(--sienna);
  box-shadow: 0 0 0 3px rgba(158, 73, 51, 0.13);
}
.form-textarea { resize: vertical; min-height: 148px; }
.form-submit {
  align-self: flex-start;
  margin-top: 4px;
  font-family: var(--font-field);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--parchment);
  background-color: var(--sienna);
  padding: 15px 40px;
  border: none;
  transition: background-color 0.2s;
}
.form-submit:hover { background-color: var(--terrain-black); }

/* Success state */
.form-success {
  display: none;
  padding: 36px 40px;
  background-color: var(--parchment);
  border-left: 2px solid var(--field-green);
}
.form-success p { font-size: 16px; color: var(--terrain-black); }


/* ================================================================
   FOOTER
   ================================================================ */
footer {
  position: relative;
  overflow: hidden;
  background-color: var(--field-green);
  padding: 48px 0;
}
/* Footer terrain motif — a single hand-drawn peak rising from the bottom
   edge, centered. A quiet colophon behind the wordmark. */
footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: url("topo-footer.webp");
  background-size: auto 75%;
  background-position: center bottom;
  background-repeat: no-repeat;
  opacity: 0.09;
  pointer-events: none;
}
.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  gap: 40px;
}
.footer-wordmark {
  font-family: var(--font-field);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
  margin-bottom: 6px;
}
.footer-meta {
  font-family: var(--font-field);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--sage);
  line-height: 1.85;
}
.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.footer-links a {
  font-family: var(--font-field);
  font-size: 13px;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 0.65; }
.footer-link-p { color: var(--parchment); }
.footer-link-s { color: var(--sage); }


/* ================================================================
   ABOUT SECTION
   ================================================================ */
#about {
  background-color: var(--parchment);
  padding: 100px 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 80px;
  align-items: start;
}
.about-photo img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  object-position: center 12%;
  display: block;
}
.about-bio .eyebrow { margin-bottom: 18px; }
.about-bio h2 {
  font-size: clamp(28px, 3vw, 40px);
  margin-bottom: 8px;
}
.about-role {
  font-family: var(--font-field);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 32px;
  display: block;
}
.about-bio p + p { margin-top: 22px; }
.about-bio p { font-size: 16px; }

/* Testimonials */
.testimonials-wrap {
  margin-top: 56px;
  padding-top: 52px;
  border-top: 1px solid var(--stone-mid);
}
.testimonials-wrap .eyebrow { margin-bottom: 32px; }
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.testimonial {
  padding: 36px 36px 32px;
  background-color: var(--parchment);
  border-left: 2px solid var(--stone-mid);
}
.testimonial p {
  font-family: var(--font-map);
  font-size: 17px;
  font-style: italic;
  line-height: 1.72;
  color: var(--terrain-black);
  margin-bottom: 20px;
}
.testimonial cite {
  font-family: var(--font-field);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  font-style: normal;
}

/* Mid-page CTA */
.work-cta-wrap {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--stone);
  margin-left: 16.67%;
  max-width: 680px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.work-cta-wrap p { font-size: 16px; color: var(--terrain-black); }
.work-cta-link {
  color: var(--sienna);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  flex-shrink: 0;
}

/* Bridge from Who We Serve into Contact */
.fit-bridge {
  margin-top: 36px !important;
  font-size: 16px !important;
  color: rgba(245, 241, 235, 0.60) !important;
  font-style: italic;
}

/* First-use brand term — underline in Sienna accent on first appearance
   of "map" and "field" as standalone concepts in the Philosophy section */
.brand-term {
  text-decoration: underline;
  text-decoration-color: var(--sienna);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}


/* ================================================================
   RESPONSIVE — 1024px
   ================================================================ */
@media (max-width: 1024px) {
  .container,
  .header-inner,
  .footer-inner {
    padding-left: 48px;
    padding-right: 48px;
  }
  /* Remove left offsets on smaller screens */
  .work-intro,
  .engagements-intro,
  .engagement-list,
  .exp-header,
  .scope-line,
  .approach-text,
  .fit-content { margin-left: 0; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-spacer { display: none; }
  #home::after { display: none; }
  .credentials-grid { gap: 40px; }
}

/* ================================================================
   RESPONSIVE — 768px
   ================================================================ */
@media (max-width: 768px) {
  .container,
  .header-inner,
  .footer-inner {
    padding-left: 28px;
    padding-right: 28px;
  }
  #home      { padding: 72px 0 64px; }
  #problem   { padding: 72px 0; }
  #approach  { padding: 72px 0 0; }
  #work      { padding: 72px 0; }
  #experience{ padding: 72px 0; }
  #fit       { padding: 72px 0; }
  #contact   { padding: 72px 0 80px; }

  section { scroll-margin-top: 0; }

  h1 { font-size: 42px; letter-spacing: -0.02em; }
  h2 { font-size: 30px; }
  h3 { font-size: 20px; }
  p  { font-size: 16px; }
  .hero-intro,
  .engagement-item p { font-size: 16px; }

  /* Nav collapses to dropdown */
  .nav-list {
    display: none;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background-color: var(--field-green);
    flex-direction: column;
    gap: 0;
    padding: 12px 28px 24px;
    border-top: 1px solid rgba(122,152,143,0.25);
  }
  .nav-list.is-open { display: flex; }
  .nav-list li { border-bottom: 1px solid rgba(122,152,143,0.15); }
  .nav-list li:last-child { border-bottom: none; }
  .nav-list a { display: block; padding: 13px 0; font-size: 15px; }
  .nav-cta { border: none; padding: 13px 0 !important; }
  .menu-btn { display: flex; }

  /* Stacked grids */
  .practices-grid { grid-template-columns: 1fr; }
  .credentials-grid { grid-template-columns: 1fr; gap: 44px; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .contact-grid > *:nth-child(2) { display: none; } /* hide spacer col */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo img { height: 260px; object-position: center 10%; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .work-cta-wrap { margin-left: 0; flex-direction: column; gap: 10px; }
  #about { padding: 72px 0; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-links { align-items: flex-start; }

  .landscape-art {
    height: 260px;
    background-size: cover;
    background-position: 55% top;
  }

  header { position: relative; }
}
