:root {
  --sand: #F3EEE2;
  --sand-light: #FBF8F1;
  --sand-dark: #D8D0BC;
  --forest: #17352B;
  --forest-soft: #3F5A4E;
  --forest-hover: #234B3C;
  --fern: #2E7D5B;
  --fern-text: #256B4C;
  --ochre: #D9822B;
  --ochre-hover: #E8923D;
  --sage: #9CCB8B;
  --sage-pale: #CFE3C6;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); scrollbar-color: var(--forest-soft) var(--sand); }

body {
  margin: 0;
  background: var(--sand);
  color: var(--forest);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  caret-color: var(--fern);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--sage); color: var(--forest); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb { background: var(--forest-soft); border-radius: 8px; border: 3px solid var(--sand); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "opsz" 144;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h3 { font-variation-settings: "opsz" 48; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--fern-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--forest); }
:focus-visible { outline: 3px solid var(--fern); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--sand); color: var(--forest); padding: 0.6rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 1rem 1.7rem; border-radius: 999px;
  font: 600 1rem/1.3 var(--sans); text-decoration: none;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn span { transition: transform 0.35s var(--ease); }
.btn:hover span { transform: translateX(5px); }
.btn:active { transform: translateY(1px); }
.btn-cta { background: var(--ochre); color: var(--forest); }
.btn-cta:hover { background: var(--ochre-hover); color: var(--forest); }
.btn-dark { background: var(--forest); color: var(--sand); }
.btn-dark:hover { background: var(--forest-hover); color: var(--sand); }

/* ---------- header: light ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(251, 248, 241, 0.94);
  border-bottom: 1px solid var(--sand-dark);
}
.bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: block; line-height: 0; border-radius: 4px; }
.brand img { height: 2rem; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.nav a { color: var(--forest); text-decoration: none; font-weight: 500; font-size: 0.9375rem; position: relative; }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: var(--forest); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav .nav-cta {
  background: var(--forest); color: var(--sand);
  padding: 0.55rem 1.15rem; border-radius: 999px; font-weight: 600;
  transition: background-color 0.25s var(--ease);
}
.nav .nav-cta:hover { background: var(--forest-hover); }

/* ---------- hero: Forest ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--forest); color: var(--sage-pale);
  min-height: min(48rem, calc(100svh - var(--header-h)));
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero :focus-visible { outline-color: var(--sage); }
.hero-inner { padding-block: clamp(4rem, 11vw, 8rem) clamp(2.5rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(2.75rem, 8vw, 5.75rem); line-height: 1.02; letter-spacing: -0.03em; color: var(--sand); }
.hero h1 .row { display: block; overflow: hidden; padding-bottom: 0.14em; }
.hero h1 .in { display: inline-block; }
.hero h1 .dim { color: var(--sage); font-style: italic; font-weight: 400; }

.swap { display: inline-grid; vertical-align: top; color: var(--ochre); }
.swap .w { grid-area: 1 / 1; white-space: nowrap; opacity: 0; transform: translateY(40%); transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); }
.swap .w.is-on { opacity: 1; transform: none; }
.swap .w.is-off { opacity: 0; transform: translateY(-40%); }
@media (max-width: 40rem) { .swap .w { white-space: normal; } }

.lede { margin-top: 2rem; max-width: 36rem; font-size: clamp(1.0625rem, 1.7vw, 1.3125rem); color: var(--sage-pale); }
.actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; }
.textlink { color: var(--sand); font-weight: 500; }
.textlink:hover { color: var(--sage); }

.jump { list-style: none; padding: 0; margin-block: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid rgba(156, 203, 139, 0.28); border-bottom: 0; }
.jump li + li { border-left: 1px solid rgba(156, 203, 139, 0.28); }
.jump a { display: block; padding: 1.25rem 1.5rem 1.5rem; color: var(--sand); text-decoration: none; font-weight: 500; transition: background-color 0.3s var(--ease), color 0.3s; }
.jump a:hover { background: var(--forest-hover); color: var(--sage); }

/* diagonal planes and the flow-line field behind the copy */
.bands { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.b {
  position: absolute; display: block; width: 46vw; height: 190%; top: -45%;
  transform: translate3d(var(--bx, 0), 0, 0) rotate(38deg);
  transform-origin: center;
}
.b1 { right: 6%;  background: var(--forest-hover); opacity: 0.85; }
.b2 { right: -9%; background: var(--fern); opacity: 0.55; width: 30vw; }
.b3 { right: -22%; background: var(--sage); opacity: 0.22; width: 22vw; }
.flow {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(100deg, transparent 8%, #000 70%);
  mask-image: linear-gradient(100deg, transparent 8%, #000 70%);
}

/* ---------- services: Sand light ---------- */
.services { background: var(--sand-light); padding-block: clamp(4.5rem, 10vw, 8rem); }
.services h2, .about h2, .feedback h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.offer { list-style: none; margin: clamp(2.5rem, 5vw, 4.5rem) 0 0; padding: 0; border-top: 1px solid var(--forest); }
.offer li {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) 3.5rem; align-items: start;
  gap: 1rem clamp(1.5rem, 5vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--sand-dark);
}
.offer h3 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
.offer .problem { font-family: var(--serif); font-style: italic; font-variation-settings: "opsz" 36; font-size: 1.3rem; line-height: 1.3; color: var(--fern-text); margin-bottom: 0.6rem; }
.offer .body p:not(.problem) { max-width: 36rem; color: var(--forest-soft); }
.go {
  justify-self: end; align-self: center;
  width: 3.25rem; height: 3.25rem; display: grid; place-items: center;
  border-radius: 999px; border: 1.5px solid var(--forest); color: var(--forest); text-decoration: none; font-size: 1.25rem;
  transition: background-color 0.3s var(--ease), color 0.3s, transform 0.4s var(--ease);
}
.offer li:hover .go, .go:focus-visible { background: var(--forest); color: var(--sand); transform: translateX(4px); }

/* ---------- method: Forest ---------- */
.method { background: var(--forest); color: var(--sage-pale); padding-block: clamp(4.5rem, 10vw, 8rem); }
.method :focus-visible { outline-color: var(--sage); }
.method-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 7vw, 6rem); align-items: start; }
.method h2 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); color: var(--sand); max-width: 14ch; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding-block: 1.75rem; border-top: 1px solid rgba(156, 203, 139, 0.45); }
.steps li:first-child { padding-top: 1.9rem; }
.steps .n { font-family: var(--serif); font-size: 2.75rem; line-height: 1; font-weight: 400; color: var(--ochre); font-variant-numeric: lining-nums; }
.steps h3 { font-size: 1.625rem; font-weight: 500; color: var(--sand); }
.steps p { margin-top: 0.5rem; max-width: 30rem; }

/* ---------- placeholders: delete the .ph class when real content arrives ---------- */
.ph { border: 1.5px dashed currentColor; border-radius: 16px; }

/* ---------- about: Sand ---------- */
.about { padding-block: clamp(4.5rem, 10vw, 8rem); }
.about-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(2rem, 7vw, 6rem); align-items: start; }
.portrait { aspect-ratio: 4 / 5; display: grid; place-items: center; text-align: center; color: var(--forest-soft); font-size: 0.9375rem; }
.about-body { display: grid; gap: 1.25rem; max-width: 38rem; color: var(--forest-soft); }
.about-body h2 { color: var(--forest); margin-bottom: 0.5rem; }
.about-body .big { font-family: var(--serif); font-variation-settings: "opsz" 72; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.3; color: var(--forest); }
.bio { padding: 1.5rem; margin-top: 0.75rem; }
.bio-name { font-weight: 600; color: var(--forest); margin-bottom: 0.4rem; }

/* ---------- feedback: Sand light ---------- */
.feedback { background: var(--sand-light); padding-block: clamp(4.5rem, 10vw, 8rem); }
.quotes { list-style: none; margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2rem); }
.quotes blockquote { margin: 0; height: 100%; padding: 1.75rem; color: var(--forest-soft); display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.quotes blockquote p { font-family: var(--serif); font-variation-settings: "opsz" 36; font-size: 1.3rem; line-height: 1.35; }
.quotes footer { font-size: 0.9375rem; }

/* ---------- contact: Ochre, with the shaded X ---------- */
.contact { position: relative; isolation: isolate; overflow: hidden; background: var(--ochre); color: var(--forest); padding-block: clamp(4.5rem, 10vw, 8rem); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(2.5rem, 7vw, 6rem); align-items: end; }
.contact h2 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); max-width: 16ch; }
.contact .lead { margin-top: 1.5rem; font-size: 1.1875rem; max-width: 30rem; }
.contact-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.copy {
  display: inline-flex; align-items: center; gap: 0.75rem; cursor: pointer;
  font: 500 1rem/1.3 var(--sans); color: var(--forest); background: transparent;
  border: 1.5px solid var(--forest); border-radius: 999px; padding: 0.9rem 1.25rem;
  transition: background-color 0.25s var(--ease);
}
.copy:hover { background: rgba(23, 53, 43, 0.1); }
.copy[hidden] { display: none; }
.copy-state { font-size: 0.8125rem; font-weight: 600; background: var(--forest); color: var(--sand); border-radius: 999px; padding: 0.2rem 0.6rem; }
.contact-side { border-top: 1.5px solid var(--forest); padding-top: 1.5rem; display: grid; gap: 0.75rem; }
.contact-side h3 { font-size: 1.25rem; }
.contact-side h3:not(:first-child) { margin-top: 1rem; }
.contact-side ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; }
.contact :focus-visible { outline-color: var(--forest); }

/* copied from v3: the reversed mark, darkened and translucent, bleeding off the bottom right */
.contact .x { position: absolute; z-index: -1; right: -6vw; bottom: -14%; width: min(52vw, 44rem); height: auto; opacity: 0.22; filter: brightness(0.15); pointer-events: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--forest); color: var(--sage-pale); padding-block: 2.5rem; font-size: 0.9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.site-footer img { height: 1.9rem; width: auto; margin-right: auto; }
.site-footer a { color: var(--sage); }
.site-footer a:hover { color: var(--sand); }
.site-footer :focus-visible { outline-color: var(--sage); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 .in { transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
  .js .hero h1 .row:nth-child(2) .in { animation-delay: 0.12s; }
  .js .lede, .js .actions, .js .jump { opacity: 0; transform: translateY(16px); animation: fade-up 0.9s var(--ease) forwards; }
  .js .lede { animation-delay: 0.4s; }
  .js .actions { animation-delay: 0.55s; }
  .js .jump { animation-delay: 0.7s; }

  .js .b { animation: slide-in 1.6s var(--ease) both, sway 14s ease-in-out 1.6s infinite alternate; }
  .js .b2 { animation-delay: 0.15s, 1.75s; }
  .js .b3 { animation-delay: 0.3s, 1.9s; }

  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .js [data-reveal].in { opacity: 1; transform: none; }
  .js .offer li:nth-child(2), .js .steps li:nth-child(2) { transition-delay: 0.1s; }
  .js .offer li:nth-child(3), .js .steps li:nth-child(3) { transition-delay: 0.2s; }
  .js .quotes li:nth-child(2) { transition-delay: 0.1s; }
  .js .quotes li:nth-child(3) { transition-delay: 0.2s; }

}

@keyframes rise { to { transform: none; } }
@keyframes fade-up { to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translate3d(40vw, 0, 0) rotate(38deg); } }
@keyframes sway { to { transform: translate3d(-3vw, 0, 0) rotate(38deg); } }

/* ---------- responsive ---------- */
@media (max-width: 56rem) {
  .offer li { grid-template-columns: 1fr 3.25rem; }
  .offer li .body { grid-column: 1 / -1; grid-row: 2; }
  .offer li h3 { grid-column: 1; }
  .offer li .go { grid-column: 2; grid-row: 1; }
  .method-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .portrait { max-width: 18rem; }
  .nav a:not(.nav-cta) { display: none; }
  .b1 { right: -10%; width: 60vw; } .b2 { right: -30%; width: 40vw; } .b3 { display: none; }
  .flow { -webkit-mask-image: linear-gradient(180deg, transparent 10%, #000 90%); mask-image: linear-gradient(180deg, transparent 10%, #000 90%); }
}
@media (max-width: 36rem) {
  .jump { grid-template-columns: 1fr; }
  .jump li + li { border-left: 0; border-top: 1px solid rgba(156, 203, 139, 0.28); }
  .jump a { padding: 1rem 1.25rem; }
  .steps li { grid-template-columns: 3rem 1fr; }
}
