/* =========================================================
   Conifera — site styles
   Brand tokens first. Change a colour here and it changes everywhere.
   ========================================================= */
:root {
  --evergreen: #0F2A22;
  --evergreen-raised: #16352B;
  --evergreen-line: #2E5A4A;
  --footer: #0B211B;
  --footer-line: #1F4034;
  --cream: #F4F1EA;
  --paper: #FBF9F4;
  --sage: #DCE6DF;
  --line: #DDD6C6;
  --moss: #2F6B4F;
  --gold: #C9A45C;
  --muted: #4A5550;        /* body text on cream */
  --muted-light: #BFD0C6;  /* body text on evergreen */
  --legal: #8FA89B;
  --error: #E8A08A;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;

  --pad: 120px;           /* side padding */
  --section: 120px;       /* vertical section padding */
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--evergreen);
  background: var(--footer);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[id] { scroll-margin-top: 96px; }

.wrap { width: 100%; max-width: calc(1200px + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: var(--evergreen); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Type ---------- */
.eyebrow {
  display: block;
  font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--moss);
}
.eyebrow--gold { color: var(--gold); }

h1 { font-family: var(--serif); font-weight: 600; font-size: 80px; line-height: 1.05; letter-spacing: -.01em; color: var(--cream); }
h2 { font-family: var(--serif); font-weight: 600; font-size: 56px; line-height: 1.1; max-width: 900px; }
.tagline { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 36px; line-height: 1.17; color: var(--gold); }
.tagline--sm { font-size: 22px; }
.lead { font-size: 20px; line-height: 1.5; color: var(--muted-light); max-width: 620px; }
.lead--dark { color: var(--muted); max-width: 760px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 17px; font-weight: 600; text-decoration: none;
  padding: 18px 32px; border-radius: 9999px; border: 0; cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.btn--gold { background: var(--gold); color: var(--evergreen); }
.btn--gold:hover { background: #D6B574; }
.btn--gold:active { transform: translateY(1px); }
.btn--sm { font-size: 15px; padding: 14px 24px; }
.btn--block { width: 100%; }
.link-light { color: var(--cream); font-size: 17px; font-weight: 500; text-underline-offset: 6px; }
.link-light:hover { color: var(--gold); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s, padding .3s;
}
.nav.is-solid { background: var(--evergreen); border-bottom-color: var(--evergreen-line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding-top: 32px; padding-bottom: 32px; transition: padding .3s; }
.nav.is-solid .nav__inner { padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 25px; height: 40px; }
.brand span { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--cream); line-height: 1; }
.nav__links { display: flex; align-items: center; gap: 40px; font-size: 15px; color: var(--muted-light); }
.nav__links a:not(.btn) { text-decoration: none; transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--cream); }
.nav__toggle {
  display: none; width: 44px; height: 44px; border-radius: 9999px;
  background: transparent; border: 1px solid var(--evergreen-line);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav__toggle line { stroke: var(--cream); stroke-width: 1.5; transition: transform .25s; transform-origin: 9px 6px; }
.nav__toggle[aria-expanded="true"] line:first-child { transform: translateY(5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] line:last-child { transform: translateY(-5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--evergreen);
  padding: 120px 24px 40px; display: flex; flex-direction: column; justify-content: space-between;
}
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a {
  font-family: var(--serif); font-size: 38px; font-weight: 600; color: var(--cream);
  text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--evergreen-line);
}

/* ---------- 1. Hero ---------- */
.hero { background: var(--evergreen); color: var(--cream); padding-top: 108px; }
.hero__body { display: flex; align-items: center; justify-content: space-between; gap: 48px; padding-top: 72px; padding-bottom: 96px; }
.hero__copy { max-width: 760px; display: flex; flex-direction: column; gap: 24px; }
.hero__ctas { display: flex; align-items: center; gap: 32px; padding-top: 16px; flex-wrap: wrap; }
.hero__mark { width: 300px; height: 480px; margin-right: 60px; flex-shrink: 0; }
.hero__teams { border-top: 1px solid var(--evergreen-line); }
.hero__teams .wrap { display: flex; gap: 24px; align-items: center; padding-top: 28px; padding-bottom: 28px; font-size: 15px; color: var(--muted-light); }

/* ---------- 2. Brands ---------- */
.brands { background: var(--cream); padding: 80px 0; }
.brands .wrap { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.logos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 48px 64px; width: 100%; max-width: 1100px; align-items: center; justify-items: center; }
.logos img { height: var(--h, 48px); width: var(--w, 150px); object-fit: contain; }

/* ---------- Sections ---------- */
.section { background: var(--cream); padding: var(--section) 0; border-top: 1px solid var(--line); }
.section .wrap > * + * { margin-top: 24px; }
.section--dark { background: var(--evergreen); color: var(--cream); border-top: 0; }
.section--paper { background: var(--paper); }

/* ---------- 3. How we work: diagram ---------- */
.section .wrap > .dgm { margin-top: 72px; }
.dgm--wide { position: relative; width: 100%; height: calc(730px * var(--k, 1)); }
.dgm__stage { position: absolute; left: 50%; top: 0; width: 1200px; height: 730px; transform-origin: top center; transform: translateX(-50%) scale(var(--k, 1)); }
.dgm__stage > svg { position: absolute; inset: 0; }
.dgm svg path { fill: none; stroke: var(--moss); stroke-width: 2; }
.dgm .node circle { fill: var(--gold); stroke: var(--evergreen); stroke-width: 1.5; }
.dgm .dots circle { fill: var(--gold); opacity: 0; transition: opacity .6s; }
.dgm.is-flowing .dots circle { opacity: .75; }
.dgm--wide .dgm__stage > * { position: absolute; }

.dgm__biz {
  width: 220px; height: 52px; border: 1.5px solid var(--evergreen); border-radius: 9999px; background: var(--paper);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600;
}
.dgm__core {
  width: 440px; height: 112px; background: var(--evergreen); border-radius: var(--radius);
  display: flex; align-items: center; gap: 20px; padding: 0 32px;
}
.dgm__core img { width: 40px; height: 64px; }
.dgm__core div { display: flex; flex-direction: column; gap: 4px; }
.dgm__core strong { font-family: var(--serif); font-size: 36px; line-height: 38px; font-weight: 600; color: var(--cream); }
.dgm__core span { font-size: 15px; color: var(--muted-light); }
.dgm__team {
  width: 320px; height: 80px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 24px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.dgm__team strong { font-size: 18px; font-weight: 600; }
.dgm__team span { font-size: 15px; color: var(--muted); }
.dgm__team--r { text-align: right; }
.dgm__layer {
  height: 44px; background: var(--sage); border-radius: 9999px;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600;
}

/* Narrow version */
.dgm--narrow { display: none; max-width: 520px; }
.dgm--narrow .dgm__biz { width: 180px; height: 48px; font-size: 16px; margin: 0 auto; }
.dgm__link { display: block; width: 2px; height: 48px; background: var(--evergreen); margin: 0 auto; transform-origin: top; }
.dgm--narrow .dgm__core { width: 100%; height: 96px; gap: 16px; padding: 0 20px; }
.dgm--narrow .dgm__core img { width: 32px; height: 52px; }
.dgm--narrow .dgm__core strong { font-size: 30px; line-height: 32px; }
.dgm--narrow .dgm__core span { font-size: 14px; }
.dgm__tree { position: relative; display: flex; }
.dgm__spine { flex: 0 0 64px; overflow: visible; }
.dgm__teams { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding-top: 32px; }
.dgm--narrow .dgm__team { width: 100%; height: 72px; padding: 12px 18px; border-radius: 14px; gap: 0; }
.dgm--narrow .dgm__team strong { font-size: 16px; }
.dgm--narrow .dgm__team span { font-size: 14px; }
.dgm--narrow .dgm__layer { width: 250px; height: 40px; font-size: 14px; margin-top: 12px; }

/* Diagram animation: hidden until .is-built is added by main.js */
.js .dgm .fade { opacity: 0; transform: translateY(6px); transition: opacity .5s ease var(--d, 0ms), transform .5s ease var(--d, 0ms); }
.js .dgm .dgm__stage > .fade { transform: translateY(6px); }
.js .dgm .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--t, 350ms) ease-out var(--d, 0ms); }
.js .dgm .draw-y { transform: scaleY(0); transition: transform 400ms ease-out var(--d, 0ms); }
.js .dgm .pop { opacity: 0; transition: opacity .3s ease var(--d, 0ms); }
.js .dgm svg .fade { transform: none; }
.dgm.is-built .fade { opacity: 1; transform: none; }
.dgm.is-built .draw { stroke-dashoffset: 0; }
.dgm.is-built .draw-y { transform: none; }
.dgm.is-built .pop { opacity: 1; }

/* Principles */
.section .wrap > .principles { margin-top: 72px; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; border-top: 1px solid var(--line); padding-top: 48px; }
.principles div { display: flex; flex-direction: column; gap: 12px; }
.principles h3 { font-family: var(--serif); font-size: 32px; line-height: 1.19; font-weight: 600; }
.principles p { font-size: 17px; line-height: 1.6; color: var(--muted); }

/* ---------- 4. Results ---------- */
.section .wrap > .results { margin-top: 56px; }
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.result { background: var(--evergreen-raised); border: 1px solid var(--evergreen-line); border-radius: var(--radius); padding: 40px; display: flex; flex-direction: column; gap: 12px; }
.result__tag { font-size: 14px; font-weight: 600; color: var(--gold); }
.result__num { font-family: var(--serif); font-size: 72px; line-height: 1.05; font-weight: 600; color: var(--cream); }
.result p { font-size: 17px; line-height: 1.6; color: var(--muted-light); }

/* ---------- 5. Teams ---------- */
.section .wrap > .teams { margin-top: 64px; }
.teams { border-bottom: 1px solid var(--line); }
.team { display: grid; grid-template-columns: 380px minmax(0, 1fr) 200px; gap: 48px; align-items: center; padding: 36px 0; border-top: 1px solid var(--line); }
.team__head { display: flex; flex-direction: column; gap: 6px; }
.team__head h3 { font-family: var(--serif); font-size: 36px; line-height: 1.11; font-weight: 600; }
.team p { font-size: 20px; line-height: 1.5; color: var(--muted); }
.team__link { justify-self: end; font-size: 15px; font-weight: 600; color: var(--moss); text-underline-offset: 5px; }
.team__link:hover { color: var(--evergreen); }
.team__soon { justify-self: end; font-size: 15px; color: var(--muted); }

/* ---------- 6. How we start ---------- */
.section .wrap > .steps { margin-top: 56px; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.steps li { display: flex; flex-direction: column; gap: 12px; border-top: 2px solid var(--evergreen); padding-top: 24px; }
.steps__n { font-family: var(--serif); font-size: 48px; line-height: 1.08; font-weight: 600; color: var(--moss); }
.steps h3 { font-size: 22px; line-height: 1.36; font-weight: 600; }
.steps p { font-size: 17px; line-height: 1.6; color: var(--muted); }

/* ---------- 7. Contact ---------- */
.contact__grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 560px); grid-template-areas: "intro form" "details form"; justify-content: space-between; column-gap: 80px; row-gap: 56px; align-items: start; }
.section .wrap.contact__grid > * + * { margin-top: 0; }
.contact__intro { grid-area: intro; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.contact__intro h2 { font-size: 64px; line-height: 1.06; }
.contact__intro .btn { margin-top: 8px; }
.contact__details { grid-area: details; margin: 0; border-top: 1px solid var(--evergreen-line); padding-top: 32px; display: flex; flex-direction: column; gap: 20px; }
.contact__details div { display: flex; flex-direction: column; gap: 4px; }
.contact__details dt { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.contact__details dd { margin: 0; font-size: 18px; color: var(--cream); }
.contact__details dd a { text-decoration: none; }
.contact__details dd a:hover { color: var(--gold); }

.form { grid-area: form; background: var(--evergreen-raised); border: 1px solid var(--evergreen-line); border-radius: var(--radius); padding: 48px; display: flex; flex-direction: column; gap: 20px; }
.form h3 { font-family: var(--serif); font-size: 36px; line-height: 1.11; font-weight: 600; color: var(--cream); margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--cream); }
.field .opt { font-weight: 400; color: var(--muted-light); }
.field input, .field textarea {
  width: 100%; background: var(--evergreen); border: 1px solid var(--evergreen-line); border-radius: 8px;
  color: var(--cream); font-family: var(--sans); font-size: 16px; transition: border-color .2s;
}
.field input { height: 52px; padding: 0 16px; }
.field textarea { min-height: 120px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #7F978B; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field.has-error input { border-color: var(--error); }
.field__error { font-size: 13px; color: var(--error); min-height: 0; }
.field__error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .btn { margin-top: 8px; height: 56px; padding: 0 32px; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.form__note { font-size: 14px; line-height: 1.5; color: var(--muted-light); text-align: center; }
.form__note.is-error { color: var(--error); }
.form__done { display: flex; flex-direction: column; gap: 16px; padding: 24px 0; }
.form__done img { width: 30px; height: 48px; }
.form__done p { font-size: 18px; line-height: 1.55; color: var(--muted-light); }

/* ---------- 8. Footer ---------- */
.footer { background: var(--footer); padding: 72px 0 48px; color: var(--muted-light); }
.footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; }
.footer__brand { display: flex; flex-direction: column; gap: 12px; }
.footer__cols { display: flex; gap: 96px; font-size: 15px; line-height: 28px; }
.footer__cols div { display: flex; flex-direction: column; }
.footer__cols .eyebrow { margin-bottom: 8px; }
.footer__cols a { text-decoration: none; }
.footer__cols a:hover { color: var(--cream); }
.footer__legal { margin-top: 48px; border-top: 1px solid var(--footer-line); padding-top: 24px; font-size: 14px; color: var(--legal); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1280px) {
  :root { --pad: 64px; }
  h1 { font-size: 68px; }
  .hero__mark { width: 240px; height: 384px; margin-right: 0; }
  .team { grid-template-columns: 300px minmax(0, 1fr) 170px; gap: 32px; }
  .contact__grid { column-gap: 48px; }
}

@media (max-width: 1024px) {
  :root { --pad: 40px; --section: 96px; }
  .nav__links { display: none; }
  .hero__teams { display: none; }
  .nav__toggle { display: inline-flex; }
  h1 { font-size: 60px; }
  h2 { font-size: 46px; }
  .hero__mark { width: 180px; height: 288px; }
  .logos { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
  .dgm--wide { display: none; }
  .dgm--narrow { display: block; }
  .principles, .results, .steps { grid-template-columns: 1fr; gap: 28px; }
  .result { padding: 32px; }
  .team { grid-template-columns: 1fr; gap: 12px; }
  .team__head { flex-direction: column-reverse; }
  .team__link, .team__soon { justify-self: start; }
  .contact__grid { grid-template-columns: 1fr; grid-template-areas: "intro" "form" "details"; }
  .contact__grid { row-gap: 40px; }
}

@media (max-width: 768px) {
  :root { --pad: 24px; --section: 64px; }
  [id] { scroll-margin-top: 84px; }
  .nav__inner { padding-top: 20px; padding-bottom: 20px; }
  .nav.is-solid .nav__inner { padding-top: 14px; padding-bottom: 14px; }
  .brand { gap: 10px; }
  .brand img { width: 20px; height: 32px; }
  .brand span { font-size: 26px; }
  .eyebrow { font-size: 12px; }

  .hero { padding-top: 84px; }
  .hero__body { flex-direction: column-reverse; align-items: flex-start; gap: 20px; padding-top: 40px; padding-bottom: 48px; }
  .hero__mark { width: 60px; height: 96px; }
  .hero__copy { gap: 20px; }
  h1 { font-size: 48px; line-height: 52px; }
  h1 br { display: none; }
  .tagline { font-size: 28px; }
  .lead { font-size: 17px; line-height: 27px; }
  .hero__ctas { flex-direction: column; align-items: stretch; gap: 20px; padding-top: 8px; }
  .hero__ctas .btn { padding: 17px 24px; }
  .hero__ctas .link-light { text-align: center; font-size: 16px; }
  .hero__teams { display: none; }

  .brands { padding: 56px 0; }
  .brands .wrap { gap: 32px; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .logos img { height: calc(var(--h, 48px) * .8); width: calc(var(--w, 150px) * .85); }

  h2, .contact__intro h2 { font-size: 38px; line-height: 42px; }
  .contact__intro h2 { font-size: 42px; line-height: 46px; }
  .section .wrap > * + * { margin-top: 20px; }
  .section .wrap > .dgm { margin-top: 40px; }
  .section .wrap > .principles, .section .wrap > .teams { margin-top: 32px; }
  .section .wrap > .results, .section .wrap > .steps { margin-top: 28px; }
  .principles { padding-top: 32px; }
  .principles h3 { font-size: 28px; }
  .principles p, .steps p, .result p { font-size: 16px; line-height: 25px; }
  .result { padding: 28px; gap: 8px; }
  .result__num { font-size: 56px; }
  .team { padding: 24px 0; }
  .team__head h3 { font-size: 30px; }
  .team p { font-size: 17px; line-height: 27px; }
  .steps li { padding-top: 20px; gap: 8px; }
  .steps__n { font-size: 40px; }
  .steps h3 { font-size: 20px; }
  .contact__intro { gap: 20px; align-items: stretch; }
  .contact__intro .btn { padding: 17px 24px; }
  .form { padding: 24px; gap: 18px; }
  .contact__grid { row-gap: 32px; }
  .form h3 { font-size: 30px; }

  .footer { padding: 48px 0 40px; }
  .footer__top { flex-direction: column; gap: 28px; }
  .footer__cols { flex-direction: column; gap: 28px; }
  .footer__legal { margin-top: 28px; padding-top: 20px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .dgm .fade, .js .dgm .draw, .js .dgm .draw-y, .js .dgm .pop { transition: none !important; }
  .dgm .dots { display: none; }
}
