/* ============================================================
   Boxcar Landscaping — styles.css
   Botanical-editorial system · mobile-first
   ============================================================ */

/* ---------- Fonts (self-hosted, variable, subset) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/Fraunces-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------- Tokens ---------------------- */
:root {
  --green: #2c4d39;
  --green-700: #203a2a;
  --green-900: #16281e;
  --ink: #22281f;
  --ink-soft: #56604e;
  --cream: #f6f1e6;
  --cream-2: #efe8d8;
  --paper: #fcf9f1;
  --brass: #a9823f;
  --brass-lt: #c6a15c;
  --brass-ink: #765a24; /* AA-compliant brass for small text on cream */
  --sage: #8d9a7b;
  --line: rgba(31, 45, 35, 0.14);
  --line-soft: rgba(31, 45, 35, 0.08);

  --shell: 1200px;
  --r: 16px;
  --r-lg: 24px;
  --pill: 999px;

  --shadow-sm: 0 8px 24px -14px rgba(22, 34, 22, 0.4);
  --shadow: 0 26px 60px -30px rgba(22, 34, 22, 0.5);
  --shadow-lg: 0 40px 90px -40px rgba(22, 34, 22, 0.6);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --step: clamp(4.75rem, 9vw, 8.5rem);
}

/* ---------------------- Reset / base ---------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--green); color: var(--cream); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: 10px; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2.5px solid var(--brass); outline-offset: 3px; border-radius: 4px; }

/* ---------------------- Layout ---------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: clamp(20px, 5vw, 44px); }
.section { padding-block: var(--step); }
.section--tint { background: var(--cream-2); }

.br-lg { display: none; }
@media (min-width: 760px) { .br-lg { display: inline; } }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--brass-ink);
  margin-bottom: 1.1rem;
}
.eyebrow--light { color: var(--brass-lt); }

.section__head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__title { font-size: clamp(2.1rem, 4.6vw, 3.35rem); }
.section__lead {
  margin-top: 1.35rem; max-width: 40rem;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
}
.section__head--light .section__title,
.section__lead--light { color: var(--cream); }
.section__lead--light { color: rgba(246, 241, 230, 0.82); }

/* ---------------------- Buttons ---------------------- */
.btn {
  --bg: var(--green); --fg: var(--cream);
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--sans); font-weight: 600; font-size: 0.98rem;
  letter-spacing: 0.005em;
  padding: 0.85em 1.5em;
  background: var(--bg); color: var(--fg);
  border-radius: var(--pill);
  border: 1.5px solid transparent;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.25s, box-shadow 0.25s, color 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn__arw { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1); }
.btn:hover .btn__arw { transform: translateX(4px); }

.btn--green { --bg: var(--green); --fg: var(--cream); }
.btn--green:hover { background: var(--green-700); }
.btn--gold { --bg: var(--brass); --fg: #241a08; }
.btn--gold:hover { background: var(--brass-lt); }
.btn--ghost {
  --bg: transparent; --fg: var(--cream);
  border-color: rgba(246, 241, 230, 0.55);
  backdrop-filter: blur(2px);
}
.btn--ghost:hover { background: rgba(246, 241, 230, 0.12); }
.btn--pill { --bg: transparent; --fg: currentColor; border-color: currentColor; padding: 0.6em 1.2em; font-size: 0.9rem; }
/* explicit fill+text so the label never collides with a currentColor background */
.btn--pill:hover { background: var(--green); color: var(--cream); border-color: var(--green); }
.btn--lg { padding: 1em 1.75em; font-size: 1.02rem; }
.btn--xl { padding: 1.15em 2.1em; font-size: 1.1rem; }
.btn--block { display: flex; justify-content: center; width: 100%; }

/* ---------------------- Nav ---------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: var(--cream);
  transition: background 0.35s, color 0.35s, box-shadow 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(246, 241, 230, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--ink);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(22, 34, 22, 0.6);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; letter-spacing: -0.01em; }
.brand__mark { width: 34px; height: 34px; color: currentColor; }
.brand__mark svg { width: 100%; height: 100%; }
.brand__word { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; font-variation-settings: "opsz" 40, "SOFT" 0; }

.nav__links { display: none; gap: clamp(1.4rem, 2.6vw, 2.6rem); }
.nav__links a { font-weight: 500; font-size: 0.96rem; position: relative; padding: 0.4rem 0; opacity: 0.92; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: currentColor; transition: width 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { width: 100%; }

.nav__inner > .btn--pill { display: none; }

.nav__toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; align-items: center;
}
.nav__toggle span { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.nav__mobile {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 0.5rem clamp(20px, 5vw, 44px) 1.5rem;
  background: rgba(246, 241, 230, 0.97);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.nav__mobile a { padding: 0.85rem 0.25rem; font-weight: 500; border-bottom: 1px solid var(--line-soft); }
.nav__mobile a:last-child { border: 0; margin-top: 0.8rem; }
.nav__mobile[hidden] { display: none; }

@media (min-width: 880px) {
  .nav__links { display: flex; }
  .nav__inner > .btn--pill { display: inline-flex; }
  .nav__toggle { display: none; }
  .nav__mobile { display: none !important; }
}

/* ---------------------- Hero ---------------------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; color: var(--cream); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 22, 16, 0.72), rgba(14, 22, 16, 0.12) 58%, rgba(14, 22, 16, 0.02)),
    linear-gradient(0deg, rgba(14, 22, 16, 0.74), rgba(14, 22, 16, 0.08) 52%, rgba(14, 22, 16, 0.28));
}
.hero__inner { padding-block: clamp(6.5rem, 16vh, 11rem) clamp(3.5rem, 10vh, 6rem); max-width: 43rem; }
.hero__title {
  font-size: clamp(2.75rem, 7.4vw, 5.1rem); color: var(--cream);
  font-variation-settings: "opsz" 144, "SOFT" 24, "WONK" 0; letter-spacing: -0.02em;
  text-shadow: 0 2px 30px rgba(10, 16, 10, 0.35);
}
.hero__lead {
  margin-top: 1.5rem; max-width: 34rem;
  font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: rgba(246, 241, 230, 0.9);
}
.hero__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
@media (max-width: 600px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}
.hero__note { margin-top: 1.5rem; font-size: 0.9rem; letter-spacing: 0.02em; color: rgba(246, 241, 230, 0.72); }

.hero__scroll { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); width: 26px; height: 42px; border: 1.5px solid rgba(246, 241, 230, 0.5); border-radius: 20px; display: none; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; background: var(--cream); border-radius: 2px; transform: translateX(-50%); animation: scrolldot 1.8s ease-in-out infinite; }
@keyframes scrolldot { 0%, 100% { opacity: 0; transform: translate(-50%, 0); } 50% { opacity: 1; transform: translate(-50%, 8px); } }
@media (min-width: 880px) and (min-height: 640px) { .hero__scroll { display: block; } }

/* ---------------------- Visualize / before-after ---------------------- */
.visualize__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }

.ba { --pos: 50%; }
.ba__stage {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); background: var(--green-900);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
@media (min-width: 720px) { .ba__stage { aspect-ratio: 16 / 10; } }
.ba__img, .ba__after img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__after { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__tag {
  position: absolute; bottom: 1rem; z-index: 3;
  font-family: var(--sans); font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--cream);
  background: rgba(16, 26, 20, 0.55); padding: 0.4em 0.85em; border-radius: var(--pill);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ba__tag--before { left: 1rem; }
.ba__tag--after { right: 1rem; }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; z-index: 4;
  background: rgba(246, 241, 230, 0.9); transform: translateX(-1px); pointer-events: none;
}
.ba__grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--cream); box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
}
.ba__grip::before, .ba__grip::after {
  content: ""; position: absolute; width: 0; height: 0;
  border-block: 5px solid transparent;
}
.ba__grip::before { left: 12px; border-right: 7px solid var(--green); }
.ba__grip::after { right: 12px; border-left: 7px solid var(--green); }
.ba__range {
  position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent;
}
.ba__range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 100%; cursor: ew-resize; }
.ba__range::-moz-range-thumb { width: 48px; height: 200px; border: 0; background: transparent; cursor: ew-resize; }
.ba__cap { display: block; text-align: center; margin-top: 1.1rem; font-size: 0.85rem; color: var(--ink-soft); }
.ba__handle, .ba__grip { transition: none; }

.visualize__cta { margin-top: 4rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; }
.visualize__hint { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------------------- Services ---------------------- */
.svc-grid { list-style: none; padding: 0; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: 1fr; }
@media (min-width: 560px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }
.svc { padding-top: 1.6rem; border-top: 1.5px solid var(--line); }
.svc__icon { width: 40px; height: 40px; color: var(--green); margin-bottom: 1.1rem; }
.svc__icon svg { width: 100%; height: 100%; }
.svc__title { font-size: 1.3rem; font-variation-settings: "opsz" 40, "SOFT" 0; margin-bottom: 0.5rem; }
.svc__desc { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------------------- Work ---------------------- */
.work__grid { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); grid-template-columns: 1fr; }
@media (min-width: 720px) { .work__grid { grid-template-columns: repeat(2, 1fr); } .proj--tall { grid-row: span 2; } }
.proj { display: flex; flex-direction: column; }
.proj__media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--cream-2); flex: 1; min-height: 240px; }
.proj--tall .proj__media { min-height: 340px; }
.proj__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.proj:hover .proj__media img { transform: scale(1.045); }
.proj__body { padding: 1.35rem 0.25rem 0; }
.proj__meta { font-family: var(--sans); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: var(--brass-ink); margin-bottom: 0.5rem; }
.proj__title { font-size: clamp(1.5rem, 2.4vw, 1.95rem); margin-bottom: 0.55rem; }
.proj__desc { color: var(--ink-soft); font-size: 0.98rem; max-width: 34rem; }

/* ---------------------- Studio (dark) ---------------------- */
.studio { position: relative; background: var(--green-900); color: var(--cream); overflow: hidden; }
.studio__soil {
  position: absolute; inset: 0; z-index: 0;
  background-image: url("/assets/img/soil.jpg");
  background-size: cover; background-position: center;
  opacity: 0.16; mix-blend-mode: luminosity;
}
.studio::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(22, 40, 30, 0.6), rgba(18, 32, 24, 0.85)); }
.studio .shell { position: relative; z-index: 2; }
.studio .eyebrow { color: var(--brass-lt); }

.founders { display: grid; gap: clamp(1.75rem, 4vw, 3rem); grid-template-columns: 1fr; }
@media (min-width: 720px) { .founders { grid-template-columns: repeat(2, 1fr); } }
.founder { display: flex; flex-direction: column; }
.founder__media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 5; background: var(--green-700); }
.founder__media img { width: 100%; height: 100%; object-fit: cover; }
.founder__body { padding-top: 1.4rem; }
.founder__name { color: var(--cream); font-size: clamp(1.5rem, 2.4vw, 1.95rem); }
.founder__role { font-family: var(--sans); font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: var(--brass-lt); margin: 0.45rem 0 0.9rem; }
.founder__bio { color: rgba(246, 241, 230, 0.82); font-size: 1rem; max-width: 32rem; }

/* ---------------------- Voices ---------------------- */
.voices__grid { display: grid; gap: clamp(1.25rem, 2.6vw, 2rem); grid-template-columns: 1fr; }
@media (min-width: 680px) { .voices__grid { grid-template-columns: repeat(2, 1fr); } }
.quote {
  position: relative; background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: clamp(1.6rem, 3vw, 2.3rem);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 1.4rem;
}
.quote::before {
  content: "\201C"; font-family: var(--serif); font-weight: 600;
  font-size: 4.5rem; line-height: 0.8; color: var(--sage);
  position: absolute; top: 1rem; right: 1.4rem; opacity: 0.4;
}
.quote blockquote { font-family: var(--serif); font-weight: 400; font-size: clamp(1.12rem, 1.7vw, 1.32rem); line-height: 1.45; font-variation-settings: "opsz" 60, "SOFT" 20; color: var(--ink); }
.quote__by { display: flex; align-items: center; gap: 0.9rem; margin-top: auto; }
.quote__by strong { display: block; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }
.quote__by small { color: var(--ink-soft); font-size: 0.85rem; }
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green); color: var(--cream);
  font-family: var(--sans); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.04em;
}
.quote:nth-child(2) .avatar { background: var(--brass); color: #241a08; }
.quote:nth-child(3) .avatar { background: var(--sage); color: #1f2a17; }
.quote:nth-child(4) .avatar { background: var(--green-700); }

/* ---------------------- Closing CTA ---------------------- */
.closing { position: relative; color: var(--cream); overflow: hidden; text-align: center; }
.closing__bg { position: absolute; inset: 0; z-index: -2; }
.closing__bg img { width: 100%; height: 100%; object-fit: cover; }
.closing__scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16, 28, 20, 0.82), rgba(16, 28, 20, 0.68)); }
.closing__inner { padding-block: clamp(5rem, 12vw, 9rem); max-width: 40rem; margin-inline: auto; }
.closing__title { font-size: clamp(2.3rem, 5.2vw, 3.9rem); color: var(--cream); font-variation-settings: "opsz" 144, "SOFT" 24; }
.closing__lead { margin: 1.4rem auto 2.4rem; font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: rgba(246, 241, 230, 0.85); max-width: 32rem; }

/* ---------------------- Footer ---------------------- */
.foot { background: var(--green-900); color: rgba(246, 241, 230, 0.82); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.foot__inner { display: flex; flex-direction: column; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(246, 241, 230, 0.14); }
.foot__brand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.2rem 0.7rem; }
.brand__mark--sm { width: 30px; height: 30px; color: var(--cream); }
.foot__word { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--cream); }
.foot__tag { grid-column: 1 / -1; font-size: 0.92rem; margin-top: 0.35rem; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; }
.foot__nav a { font-size: 0.94rem; opacity: 0.82; transition: opacity 0.2s; }
.foot__nav a:hover { opacity: 1; }
.foot__base { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1.8rem; font-size: 0.82rem; color: rgba(246, 241, 230, 0.55); }
@media (min-width: 680px) {
  .foot__inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .foot__base { flex-direction: row; justify-content: space-between; }
}

/* ---------------------- Reveal ---------------------- */
/* hidden only when JS is active (html.js); no-JS renders everything visible */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .proj__media img, .btn__arw { transition: none !important; }
  .hero__scroll span { animation: none; }
}

/* ---------------------- Misc ---------------------- */
[id] { scroll-margin-top: 88px; }
.ba__range:focus-visible { outline: none; }
.ba.is-focus .ba__grip { outline: 2.5px solid var(--brass); outline-offset: 3px; }
