/* ============================================================
   Integrity Tree Service — styles
   Palette grounded in the job: bark brown, overcast winter sky,
   and the crew's hi-vis shirts (used only where we want a hand
   to reach: the estimate button and focus rings).
   ============================================================ */

:root {
  --bark: #221c17;
  --bark-deep: #17120f;
  --soil: #5c4d3f;
  --ash: #8b8177;
  --line: #ddd8d0;
  --paper: #ffffff;
  --overcast: #e9edee;
  --overcast-deep: #d5dcde;
  --hivis: #d4f01a;
  --hivis-deep: #bfd90f;
  --hivis-ink: #1a1f00;
  --ok: #1f6f3a;
  --warn: #b23a2a;

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.9375rem;   /* 15px */
  --step-0: 1.125rem;     /* 18px */
  --step-1: 1.375rem;     /* 22px */
  --step-2: 1.75rem;      /* 28px */
  --step-3: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);
  --step-4: clamp(2.5rem, 1.6rem + 4vw, 4rem);

  --radius: 6px;
  --container: 1160px;
  --gutter: clamp(20px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--bark);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--bark);
  outline-offset: 2px;
  box-shadow: 0 0 0 7px var(--hivis);
  border-radius: 3px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--hivis); color: var(--hivis-ink);
  font-weight: 700; text-decoration: none; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .25em;
  padding: .8rem 1.35rem;
  font: 600 1.05rem/1.2 var(--font-body);
  text-decoration: none; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn--lg { padding: 1rem 1.6rem; font-size: 1.15rem; }
.btn--sm { padding: .5rem 1rem; font-size: .95rem; }
.btn--hivis { background: var(--hivis); border-color: var(--hivis); color: var(--hivis-ink); }
.btn--hivis:hover { background: var(--hivis-deep); border-color: var(--hivis-deep); }
.btn--ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.75); color: #fff; backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(255,255,255,.2); border-color: #fff; }
.btn--dark { background: var(--paper); border-color: var(--paper); color: var(--bark); }
.btn--dark:hover { background: var(--overcast); border-color: var(--overcast); }
.btn--outline { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ---------- Logo lockup ---------- */
.logo {
  display: inline-flex; align-items: center; gap: .65rem;
  color: inherit; text-decoration: none;
}
.logo__mark { width: 44px; height: auto; flex: none; }
.logo__word {
  font: 600 1.3rem/1 var(--font-display);
  letter-spacing: .08em; text-transform: uppercase;
}
.logo__word small {
  display: block; margin-top: .25em;
  font-size: .5em; font-weight: 400; letter-spacing: .3em;
}
/* The mark file is bark-colored; flip it to white on dark surfaces. */
.header:not(.header--solid) .logo__mark,
.logo--light .logo__mark { filter: invert(1) brightness(1.3); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-block: .85rem;
  color: #fff;
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.header--solid {
  background: rgba(255,255,255,.96);
  color: var(--bark);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.9rem); }
.nav a { text-decoration: none; font-weight: 600; font-size: 1.02rem; }
.nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: .25em; }
.nav__phone { font-variant-numeric: tabular-nums; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: transparent; border: 0; color: inherit; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle__bar { width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); color: var(--bark);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .75rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav a.btn { margin-top: .75rem; border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: #fff;
  background-color: var(--bark);
  /* Poster frame first; if it is not there yet, the fall climber photo shows under the video. */
  background-image: url("../assets/img/hero-poster.jpg"), url("../assets/img/climber-fall-leavenworth.jpg");
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.hero__video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(20,14,10,.82) 0%, rgba(20,14,10,.45) 45%, rgba(20,14,10,.05) 100%),
    linear-gradient(to right, rgba(20,14,10,.45), rgba(20,14,10,0) 70%);
}
.hero__inner {
  padding-block: clamp(6rem, 14vh, 9rem) clamp(3rem, 9vh, 6rem);
  max-width: 44rem;
  animation: rise .8s ease-out both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .hero__inner { animation: none; } }

.hero__title {
  font: 700 var(--step-4)/1.02 var(--font-body);
  letter-spacing: -.015em; text-wrap: balance;
  margin-bottom: 1.1rem;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
}
.hero__lede {
  font-size: var(--step-1); line-height: 1.45;
  max-width: 34rem; margin-bottom: 1.6rem;
  color: rgba(255,255,255,.92);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.2rem; }
.hero__note { font-size: var(--step--1); color: rgba(255,255,255,.8); margin: 0; }

.hero__pause {
  position: absolute; right: var(--gutter); bottom: 1.1rem; z-index: 1;
  padding: .4rem .8rem; font: 600 .8rem/1 var(--font-body);
  color: #fff; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; cursor: pointer;
}
.hero__pause:hover { background: rgba(0,0,0,.55); }

/* ---------- Trust bar ---------- */
.trust { background: var(--bark); color: #fff; }
.trust__row {
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.trust__row p {
  margin: 0; padding: 1.1rem 1.5rem;
  font-size: var(--step-0); line-height: 1.3;
  border-left: 1px solid rgba(255,255,255,.18);
}
.trust__row p:first-child { border-left: 0; padding-left: 0; }
.trust__row strong { display: block; font-size: var(--step-2); font-weight: 700; color: var(--hivis); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .trust__row { grid-template-columns: 1fr; }
  .trust__row p { border-left: 0; padding: .9rem 0; border-top: 1px solid rgba(255,255,255,.18); }
  .trust__row p:first-child { border-top: 0; }
  .trust__row strong { display: inline; font-size: var(--step-1); margin-right: .35rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); scroll-margin-top: 4.5rem; }
.section__title {
  font: 400 var(--step-3)/1.15 var(--font-display);
  letter-spacing: .01em; margin-bottom: 1rem;
}
.section p { max-width: 62ch; }

/* Services */
.services__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
.services__intro p { font-size: var(--step-1); line-height: 1.45; color: var(--soil); }
.services__list { list-style: none; border-top: 1px solid var(--line); }
.services__list li { padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.services__list h3 { font-size: var(--step-1); font-weight: 600; margin-bottom: .3rem; }
.services__list p { margin: 0; color: var(--soil); }
.services__photo { grid-column: 1; margin: 0; }
.services__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
figcaption { font-size: var(--step--1); color: var(--ash); margin-top: .5rem; }
@media (min-width: 881px) {
  .services__grid { grid-template-areas: "intro list" "photo list"; }
  .services__intro { grid-area: intro; }
  .services__list { grid-area: list; }
  .services__photo { grid-area: photo; }
}
@media (max-width: 880px) {
  .services__grid { grid-template-columns: 1fr; }
  .services__photo { max-width: 420px; }
}

/* Our work — every tile shares one row height, wide tiles are exactly two portraits plus a gap,
   and rows are centered, so the grid stays even no matter how many photos are in the folder. */
.work { background: var(--overcast); }
.work__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 1.75rem; }
.work__head p { margin: 0; color: var(--soil); }
.gallery {
  --tile-h: clamp(200px, 24vw, 340px);
  --tile-gap: 1rem;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: var(--tile-gap);
}
.gallery figure { margin: 0; flex: 0 0 auto; width: calc(var(--tile-h) * 0.8); }
.gallery figure.is-wide { width: calc(var(--tile-h) * 1.6 + var(--tile-gap)); }
.gallery img {
  width: 100%; height: var(--tile-h); object-fit: cover;
  border-radius: var(--radius); background: var(--overcast-deep);
}
.gallery figcaption { min-height: 1.4em; }
@media (max-width: 480px) {
  .gallery { --tile-h: 170px; --tile-gap: .75rem; }
}

/* Watch */
.watch { background: var(--bark); color: #fff; }
.watch .section__title { color: #fff; }
.watch__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.watch__copy p { color: rgba(255,255,255,.85); font-size: var(--step-1); line-height: 1.45; }
.watch__player video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: #000; }
@media (max-width: 880px) { .watch__grid { grid-template-columns: 1fr; } }

/* About */
.about__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about__photo { margin: 0; }
.about__photo img { width: 100%; border-radius: var(--radius); }
.about__copy h3 { font-size: var(--step-1); font-weight: 600; margin: 1.75rem 0 .75rem; }
.steps { list-style: none; counter-reset: step; }
.steps li { position: relative; padding-left: 3rem; margin-bottom: .85rem; counter-increment: step; max-width: 56ch; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: .05em;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--bark); color: var(--hivis);
  font: 700 1rem/2rem var(--font-body); text-align: center;
}
@media (max-width: 880px) { .about__grid { grid-template-columns: 1fr; } }

/* Reviews */
.reviews { background: var(--overcast); }
.reviews__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.reviews__quotes { display: grid; gap: 1.25rem; }
.reviews__quotes blockquote {
  margin: 0; padding: 1.5rem 1.75rem;
  background: var(--paper); border-radius: var(--radius);
  border-left: 4px solid var(--hivis);
}
.reviews__quotes p { font-size: var(--step-1); line-height: 1.4; margin-bottom: .75rem; }
.reviews__quotes footer { font-size: var(--step--1); color: var(--ash); }
.reviews__summary p { color: var(--soil); }
.reviews__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.reviews__links a { font-weight: 600; text-underline-offset: .25em; }
@media (max-width: 880px) { .reviews__grid { grid-template-columns: 1fr; } }

/* Service area */
.area__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.area__copy p { color: var(--soil); }
.area__list { list-style: none; columns: 2; column-gap: 2rem; border-top: 1px solid var(--line); }
.area__list li { padding: .7rem 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-weight: 600; }
@media (max-width: 880px) { .area__grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .area__list { columns: 1; } }

/* Estimate */
.estimate { background: var(--bark); color: #fff; }
.estimate .section__title { color: #fff; }
.estimate__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.estimate__copy p { color: rgba(255,255,255,.88); }
.estimate__contact { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.estimate__tip { font-size: var(--step--1); color: rgba(255,255,255,.7); }
@media (max-width: 880px) { .estimate__grid { grid-template-columns: 1fr; } }

.form {
  background: var(--paper); color: var(--bark);
  padding: clamp(1.25rem, 3vw, 2rem); border-radius: 8px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field { display: block; margin-bottom: 1.1rem; }
.field__label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field__opt { font-weight: 400; color: var(--ash); }
.field__hint { display: block; font-size: var(--step--1); color: var(--ash); margin-top: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .85rem;
  font: inherit; color: var(--bark); background: #fff;
  border: 1px solid #b9b2a8; border-radius: 4px;
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--bark); outline-offset: 0; box-shadow: 0 0 0 5px var(--hivis);
}
.field.is-invalid input { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(178,58,42,.15); }
.field__error { display: block; font-size: var(--step--1); color: var(--warn); margin-top: .35rem; }
.form__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__submit { width: 100%; }
.form__submit[disabled] { opacity: .7; cursor: progress; }
.form__status { margin: .9rem 0 0; font-weight: 600; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-error { color: var(--warn); }
.form__done { padding: .5rem 0; }
.form__done h3 { font-size: var(--step-2); font-weight: 700; margin-bottom: .75rem; }
.form__done p { color: var(--soil); }
.form__fallback { margin-top: 1rem; padding: 1rem; background: var(--overcast); border-radius: var(--radius); font-size: var(--step--1); white-space: pre-wrap; }

/* ---------- Footer ---------- */
.footer { background: var(--bark-deep); color: rgba(255,255,255,.85); border-top: 5px solid var(--hivis); padding: 3rem 0 1.5rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer__tagline { margin: 1rem 0 0; color: rgba(255,255,255,.7); }
.footer__contact { font-style: normal; line-height: 1.7; }
.footer__contact a { font-weight: 700; font-size: var(--step-1); text-decoration: none; }
.footer__contact a[data-email] { font-weight: 400; font-size: inherit; }
.footer__contact a:hover { text-decoration: underline; }
.footer__links { display: flex; flex-direction: column; gap: .5rem; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }
.footer__legal { margin: 2.5rem auto 0; font-size: var(--step--1); color: rgba(255,255,255,.5); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: 3.6rem; }
  .callbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr 1.6fr;
    background: var(--bark); border-top: 1px solid rgba(255,255,255,.15);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .callbar a {
    padding: .95rem .5rem; text-align: center;
    color: #fff; font-weight: 700; text-decoration: none;
    border-right: 1px solid rgba(255,255,255,.15);
  }
  .callbar__estimate { background: var(--hivis); color: var(--hivis-ink) !important; border-right: 0 !important; }
  .hero__pause { bottom: 1rem; }
}
