/* Valen's Tree Care, tree removal landing page (dev preview).
   Design plan lives in README.md. Every colour, family and size used on the
   page is a token here; a hex value anywhere below this block is a bug. */

:root {
  /* colour, each with the only things it may touch */
  --ground: #ffffff;  /* the page. White everywhere, by request. */
  --ink:    #16230f;  /* text and the tree's own linework */
  --ink-2:  #4c5a45;  /* secondary text, bark lines, ring detail */
  --draft:  #a3ae9d;  /* secondary drawing: the house, fence, hydro, hatching */
  --rule:   #e3e9df;  /* hairlines and borders only */
  --forest: #3e5934;  /* buttons, links, focus ring, the sapling. Valen's brand green */
  --forest-deep: #2b4024; /* button hover only */
  --leaf:   #78a06a;  /* the rope, grass and list bullets only */
  --kerf:   #e2552b;  /* saw cuts in the drawing only. Never text, never a button */

  /* type */
  /* One family, Jost (a Futura-style geometric), used thin. Weights are
     tokens too, so the page never drifts back to heavy type. */
  --display: "Jost", "Futura", "Century Gothic", "Segoe UI", sans-serif;
  --text: "Jost", "Futura", "Century Gothic", "Segoe UI", sans-serif;
  --w-hair: 250;   /* hero and closing headline */
  --w-thin: 300;   /* every other heading, pull quotes */
  --w-body: 350;   /* running text: thin, still comfortably readable */
  --w-mid: 450;    /* labels, nav, captions that need to hold up small */
  --w-strong: 500; /* buttons and the odd emphasis; the heaviest weight on the page */

  /* layout */
  --head: 64px;
  --gutter: max(20px, 5vw);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: var(--w-body) 1.0625rem/1.65 var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: var(--w-thin); letter-spacing: -0.01em; line-height: 1.08; }
p { margin: 0 0 1em; }
a { color: var(--forest); }
[id] { scroll-margin-top: calc(var(--head) + 16px); }

:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--forest); color: var(--ground); padding: 10px 16px; border-radius: 6px;
  font-weight: var(--w-strong); text-decoration: none;
}
.skip:focus { top: 12px; }

.devbar {
  margin: 0; padding: 7px var(--gutter);
  font-size: 0.8rem; line-height: 1.4; color: var(--ink-2); text-align: center;
  border-bottom: 1px solid var(--rule);
}

/* ── header ─────────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 30;
  height: var(--head);
  display: flex; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  background: rgb(255 255 255 / 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--forest); text-decoration: none; margin-right: auto; }
.brand__mark { width: 40px; height: 32px; }
.brand__name { font-family: var(--display); font-weight: var(--w-strong); font-size: 1.12rem; letter-spacing: 0.01em; color: var(--ink); }
.brand__name span { font-weight: var(--w-thin); color: var(--ink-2); }
.top__nav { display: flex; gap: 26px; }
.top__nav a { color: var(--ink); text-decoration: none; font-weight: var(--w-mid); font-size: 0.95rem; padding: 8px 0; }
.top__nav a:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 5px; }

/* ── buttons and links ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--forest); color: var(--ground);
  font: var(--w-strong) 1rem/1 var(--text); letter-spacing: 0.02em; text-decoration: none;
  border: 2px solid var(--forest); border-radius: 10px;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.btn:hover { background: var(--forest-deep); border-color: var(--forest-deep); }
.btn--small { min-height: 42px; padding: 0 16px; font-size: 0.93rem; }
.btn--line { background: transparent; color: var(--forest); }
.btn--line:hover { background: var(--forest); color: var(--ground); border-color: var(--forest); }
.btn--big { min-height: 62px; padding: 0 34px; font-size: 1.12rem; }
.textlink { display: inline-block; padding: 11px 0; color: var(--forest); font-weight: var(--w-strong); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
.textlink:hover { text-decoration-thickness: 3px; }

/* ── the takedown ───────────────────────────────────────────────────────── */
.takedown {
  overflow-x: clip; /* a label near the edge must never widen the page */
  display: grid;
  grid-template-columns: minmax(0, 5.4fr) minmax(0, 6.6fr);
  column-gap: 4vw;
  padding: 0 var(--gutter);
}
.takedown__hero {
  grid-column: 1; grid-row: 1;
  min-height: calc(100svh - var(--head) - 34px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 0 64px;
}
.hero__title {
  font-weight: var(--w-hair);
  font-size: clamp(3rem, 5.6vw, 6.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 30px;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero__title .line > span { display: inline-block; }
.hero__lede { font-size: 1.16rem; color: var(--ink-2); max-width: 36ch; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-bottom: 18px; }
.hero__fine { font-size: 0.92rem; color: var(--ink-2); margin: 0; }

.takedown__stage { grid-column: 2; grid-row: 1 / 3; }
.stage {
  position: sticky; top: var(--head);
  height: calc(100svh - var(--head));
  margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.stage__frame {
  position: relative;
  width: min(100%, calc((100svh - var(--head) - 70px) * 1.111));
  aspect-ratio: 1000 / 900;
}
.stage__cap { font-size: 0.8rem; color: var(--ink-2); margin-top: 6px; text-align: center; }

.steps { grid-column: 1; grid-row: 2; list-style: none; margin: 0; padding: 0; }
.step { min-height: 100svh; }
.step--long { min-height: 185svh; }
.step__in { position: sticky; top: calc(var(--head) + 18svh); padding: 32px 0 64px; max-width: 30rem; }
.step__n {
  width: 44px; height: 44px; margin: 0 0 22px;
  display: grid; place-items: center;
  border: 1.5px solid var(--forest); border-radius: 50%;
  font: var(--w-thin) 1.1rem/1 var(--display); color: var(--forest);
}
.step h2 { font-size: clamp(2rem, 3.3vw, 3rem); margin-bottom: 18px; }
.step p { color: var(--ink-2); font-size: 1.12rem; }
.step__quote { margin: 0 0 18px; }
.step__quote p { font: italic var(--w-thin) clamp(1.6rem, 2.6vw, 2.2rem)/1.2 var(--display); color: var(--ink); margin-bottom: 8px; }
.step__quote footer { font-size: 0.95rem; color: var(--ink-2); }

/* the drawing */
.scene { display: block; width: 100%; height: 100%; overflow: visible; }
.scene path, .scene line, .scene rect, .scene circle {
  fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round;
}
.scene .trunk { fill: var(--ground); stroke-width: 2; }
.scene .bark { stroke: var(--ink-2); stroke-width: 0.9; }
.scene .yard path, .scene .yard rect { stroke: var(--draft); stroke-width: 2; }
.scene .yard .thin, .scene .thin { stroke-width: 1.2; }
.scene .yard .wire { stroke-width: 1.7; }
.scene .ground path { stroke: var(--ink); stroke-width: 2; }
.scene .ground .hatch { stroke: var(--draft); stroke-width: 1; }
.scene .grass { stroke: var(--leaf); stroke-width: 1.5; opacity: 0; }
.scene .kerf { stroke: var(--kerf); stroke-width: 3; opacity: 0; }
.scene .rope { stroke: var(--leaf); stroke-width: 2.6; opacity: 0; }
.scene .rig-point { fill: var(--ground); stroke: var(--leaf); stroke-width: 2.6; opacity: 0; }
.scene .rig-foot { fill: var(--leaf); stroke: none; opacity: 0; }
.scene .round { opacity: 0; }
.scene .round .end { fill: var(--ground); stroke: var(--ink); stroke-width: 2; }
.scene .round circle:not(.end), .scene .round path { stroke: var(--ink-2); stroke-width: 1; }
.scene .sapling path { stroke: var(--forest); }
.scene .sapling .thin { stroke: var(--ink-2); }
.scene .sapling { opacity: 0; }

/* labels laid over the drawing; main.js shows the ones for the current step */
.notes { position: absolute; inset: 0; pointer-events: none; }
.note { position: absolute; display: flex; align-items: center; opacity: 0; transform-origin: 0 50%; }
.note i { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--ground); border: 2.5px solid var(--forest); flex: none; position: absolute; left: 0; top: 0; }
.note b {
  position: absolute; top: -14px; left: 14px;
  font: var(--w-mid) 0.84rem/1.25 var(--text); color: var(--ink); letter-spacing: 0.01em;
  background: var(--ground); border: 1px solid var(--rule); border-radius: 6px;
  padding: 5px 9px; white-space: nowrap;
}
.note--l b { left: auto; right: 14px; }

/* JS is running and motion is allowed: the drawing starts undrawn */
@media (prefers-reduced-motion: no-preference) {
  html.js .scene .tree [pathLength], html.js .scene .yard [pathLength], html.js .scene .ground [pathLength] {
    stroke-dasharray: 1; stroke-dashoffset: 1;
  }
  html.js .scene .yard .thin, html.js .scene .ground .hatch { opacity: 0; }
  html.js .hero__title .line > span { transform: translateY(110%); }
}

/* ── why ────────────────────────────────────────────────────────────────── */
.why {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 6vw;
  align-items: center;
  padding: 140px var(--gutter) 120px;
  border-top: 1px solid var(--rule);
}
.why h2, .work h2, .storm h2, .reviews h2, .cert h2 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); margin-bottom: 22px; }
.why__intro { color: var(--ink-2); font-size: 1.12rem; }
.reasons { list-style: none; margin: 26px 0 30px; padding: 0; border-top: 1px solid var(--rule); }
.reasons li {
  position: relative; padding: 16px 0 16px 34px;
  border-bottom: 1px solid var(--rule); font-size: 1.12rem; color: var(--ink-2);
}
.reasons li strong { color: var(--ink); font-weight: var(--w-strong); }
/* a tiny end-grain mark for each reason */
.reasons li::before {
  content: ""; position: absolute; left: 2px; top: 22px;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--leaf);
  background: radial-gradient(circle, var(--leaf) 0 1.6px, transparent 2.2px 3.6px, var(--leaf) 3.8px 4.6px, transparent 5px);
}
.why__photo { margin: 0; }
.why__photo img { border-radius: 8px; width: 100%; }
figcaption { font-size: 0.92rem; color: var(--ink-2); margin-top: 10px; }
figcaption b { color: var(--ink); font-weight: var(--w-strong); }

/* ── work ───────────────────────────────────────────────────────────────── */
.work { padding: 120px var(--gutter); border-top: 1px solid var(--rule); }
.work h2 { max-width: 16ch; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.ba__item { margin: 0; }
.ba__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.field__h { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 100px 0 26px; }
.field { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.field figure { margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.field img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.field__a { grid-column: 1 / 6; grid-row: 1 / 3; contain: size; }
.field__b { grid-column: 6 / 13; grid-row: 1; }
.field__b img { aspect-ratio: 3 / 2; }
.field__c { grid-column: 6 / 9; grid-row: 2; }
.field__d { grid-column: 9 / 13; grid-row: 2; }
.field__c img, .field__d img { aspect-ratio: 1 / 1; }

/* ── storm ──────────────────────────────────────────────────────────────── */
.storm {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 6vw; align-items: center;
  padding: 120px var(--gutter); border-top: 1px solid var(--rule);
}
.storm__photo { margin: 0; }
.storm__photo img { border-radius: 8px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.storm__text p { font-size: 1.16rem; color: var(--ink-2); max-width: 38ch; }
.storm blockquote { margin: 34px 0 34px; padding-left: 22px; border-left: 3px solid var(--leaf); }
.storm blockquote p { font: italic var(--w-thin) clamp(1.35rem, 2vw, 1.7rem)/1.35 var(--display); color: var(--ink); margin-bottom: 8px; }
.storm blockquote footer { font-size: 0.95rem; color: var(--ink-2); }

/* ── reviews ────────────────────────────────────────────────────────────── */
.reviews {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 5vw;
  padding: 120px var(--gutter); border-top: 1px solid var(--rule);
}
.reviews h2 { grid-column: 1 / -1; }
.review { margin: 0; padding: 30px 0 0; border-top: 1px solid var(--rule); }
.review p { font-size: 1.12rem; color: var(--ink-2); }
.review footer { font-weight: var(--w-strong); font-size: 0.98rem; }
.review--lead { grid-column: 1 / -1; padding: 36px 0 70px; }
.review--wide { grid-column: 1 / -1; }
.review--wide p { font-size: 1.25rem; max-width: 60ch; }
.review--lead p { font: italic var(--w-thin) clamp(1.8rem, 3.6vw, 3.1rem)/1.18 var(--display); color: var(--ink); letter-spacing: -0.01em; max-width: 26ch; }

/* ── credential ─────────────────────────────────────────────────────────── */
.cert {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: center;
  padding: 110px var(--gutter); border-top: 1px solid var(--rule);
}
.cert__photo { width: 220px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; }
.cert p { font-size: 1.12rem; color: var(--ink-2); max-width: 48ch; }

/* ── call to action ─────────────────────────────────────────────────────── */
.cta { text-align: center; padding: 150px var(--gutter) 140px; border-top: 1px solid var(--rule); }
.cta h2 { font-weight: var(--w-hair); font-size: clamp(2.8rem, 7vw, 6rem); letter-spacing: -0.02em; margin-bottom: 22px; }
.cta p { font-size: 1.16rem; color: var(--ink-2); max-width: 40ch; margin: 0 auto 34px; }
.cta .cta__hours { font-size: 0.95rem; margin: 26px auto 0; max-width: none; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 28px var(--gutter) 40px; border-top: 1px solid var(--rule);
  font-size: 0.85rem; color: var(--ink-2);
}
.foot p { margin: 0; }

/* ── tablet and phone ───────────────────────────────────────────────────── */
@media (max-width: 959px) {
  :root { --head: 58px; }
  .top__nav { display: none; }
  .takedown { display: block; padding: 0; }
  .takedown__hero { min-height: 0; padding: 44px var(--gutter) 28px; }
  .takedown__stage {
    position: sticky; top: var(--head); z-index: 5;
    background: var(--ground);
    border-bottom: 1px solid var(--rule);
  }
  .stage { position: static; height: auto; padding: 6px var(--gutter) 4px; }
  .stage__frame { width: min(100%, calc(48svh * 1.111)); }
  .stage__cap { display: none; }
  .steps { padding: 0 var(--gutter); }
  .step { min-height: 78svh; }
  .step--long { min-height: 130svh; }
  /* the text sticks just under the pinned drawing while its step plays */
  .step__in { top: calc(var(--head) + min((100vw - 2 * max(20px, 5vw)) * 0.9, 48svh) + 12px); padding: 22px 0 40px; }
  .step__n { width: 38px; height: 38px; margin-bottom: 14px; }
  .note b { font-size: 0.72rem; padding: 3px 6px; top: -11px; left: 10px; white-space: normal; width: max-content; max-width: 10em; }
  .note--l b { left: auto; right: 10px; }

  .why, .storm { grid-template-columns: 1fr; gap: 40px; padding: 90px var(--gutter); }
  .why__photo { max-width: 420px; }
  .work, .reviews { padding: 90px var(--gutter); }
  .field__h { margin-top: 70px; }
  .reviews { grid-template-columns: 1fr; }
  .review--lead { padding-bottom: 40px; }
  .review { padding-bottom: 20px; }
  .cert { grid-template-columns: 1fr; gap: 28px; padding: 90px var(--gutter); }
  .cta { padding: 110px var(--gutter); }
}
@media (max-width: 640px) {
  .top .btn--small { padding: 0 12px; font-size: 0.86rem; min-height: 40px; }
  .brand__name span { display: none; }
  .ba { grid-template-columns: 1fr; }
  .field { grid-template-columns: 1fr 1fr; gap: 14px; }
  .field__a { grid-column: 1 / -1; grid-row: auto; contain: none; }
  .field__a img { aspect-ratio: 4 / 5; }
  .field__b { grid-column: 1 / -1; grid-row: auto; }
  .field__c, .field__d { grid-column: auto; grid-row: auto; }
}

/* thin type stays thin only where it is big; small print gets a little more weight */
.devbar, .stage__cap, figcaption, .hero__fine, .foot, .cta .cta__hours, .step__quote footer, .storm blockquote footer { font-weight: var(--w-mid); }
