@font-face {
  font-family: 'Safiro';
  src: url('assets/fonts/safiro-medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: only light;
  --font-heading: 'Safiro', Arial, sans-serif;
  --font-body: 'komet', Arial, sans-serif;
  --olive: #2f3c17;
  --olive-mid: #68792b;
  --olive-light: #daddb6;
  --orange: #df8a20;
  --cream: #f4f1ea;
  --white: #fff;
  --ink: #171717;
  --muted: #55564e;
  --radius: 2.25rem;
  --section-space: clamp(3rem, 6vw, 6.5rem);
  --gallery-gap: clamp(.75rem, 1.5vw, 1.5rem);
  --header-strip-height: 3.5rem;
  --header-row-height: 7.2rem;
  --header-compact-row-height: 5.4rem;
  --header-emblem-size: 12rem;
  --header-emblem-border: 2rem;
  --header-wordmark-width: clamp(12rem, 20vw, 20rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; padding-top: calc(var(--header-strip-height) + var(--header-row-height)); color: var(--ink); background: var(--cream); font-family: var(--font-body); font-weight: 200; line-height: 1.55; }
[id] { scroll-margin-top: calc(var(--header-strip-height) + var(--header-row-height) + 2rem); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 500; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: .2rem solid #117a9b; outline-offset: .25rem; }
.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 32px;
  box-sizing: border-box;
}
.section { padding-block: var(--section-space); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 1rem; left: 1rem; padding: .75rem 1rem; background: white; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.site-header { --logo-scale: .8; position: fixed; inset: 0 0 auto; z-index: 10; background: var(--cream); }
.header-accent { height: var(--header-strip-height); background: #627226; transition: height .25s ease; }
.header-inner { height: var(--header-row-height); display: flex; align-items: center; justify-content: space-between; gap: 1rem; transition: height .25s ease; }
.site-header.is-compact { --logo-scale: .6; }
.site-header.is-compact .header-accent { height: calc(var(--header-strip-height) * .5); }
.site-header.is-compact .header-inner { height: var(--header-compact-row-height); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.site-header .brand { flex-shrink: 0; gap: calc(1rem * var(--logo-scale)); transition: gap .25s ease; }
.brand-mark { flex-shrink: 0; width: calc(var(--header-emblem-size) * var(--logo-scale)); height: calc(var(--header-emblem-size) * var(--logo-scale)); border: calc(var(--header-emblem-border) * var(--logo-scale)) solid var(--cream); border-radius: 50%; background: var(--cream); overflow: hidden; transition: width .25s ease, height .25s ease, border-width .25s ease; }
.brand-mark img { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }
.brand-wordmark { width: clamp(12rem, 20vw, 20rem); height: auto; margin-left: 1rem; }
.site-header .brand-wordmark { width: calc(var(--header-wordmark-width) * var(--logo-scale)); margin-left: 0; transition: width .25s ease; }
.primary-nav { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: clamp(1.5rem, 2.2vw, 2.25rem); margin-left: clamp(0rem, 1vw, 1rem); font-family: var(--font-heading); font-weight: 500; color: var(--olive); }
.primary-nav a { flex-shrink: 0; text-decoration: none; }
.primary-nav > a:not(.button):hover { color: var(--orange); }
.button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; padding: .55rem 1.2rem; border: 1px solid transparent; border-radius: .65rem; background: var(--orange); color: white; text-decoration: none; font-family: var(--font-heading); font-weight: 500; }
.button--small { min-height: 3.25rem; }
.button:hover { filter: brightness(.93); }
.button--outline { min-height: 2.6rem; margin-left: auto; border-color: transparent; background: var(--orange); color: white; }
.icon-link { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; }
.nav-home__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.contact-reveal { display: flex; align-items: center; width: auto; min-width: 2.75rem; }
.contact-reveal svg { flex: 0 0 2.75rem; }
.contact-reveal__detail { max-width: 0; margin-left: 0; padding: .65rem 0; overflow: hidden; border: 0 solid var(--orange); border-radius: .7rem; background: var(--cream); color: var(--olive); font-size: .9rem; line-height: 1.4; white-space: nowrap; opacity: 0; visibility: hidden; transition: max-width .35s ease, padding .35s ease, margin-left .35s ease, border-width .35s ease, opacity .25s ease, visibility .35s; }
.contact-reveal.is-revealed .contact-reveal__detail { max-width: 21rem; margin-left: .5rem; padding-inline: .8rem; border-width: 2px; opacity: 1; visibility: visible; }
.icon-link svg, .social h2 svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-link .fill, .social .fill { fill: currentColor; stroke: none; }
.menu-toggle { display: none; width: 3rem; height: 3rem; padding: .65rem; border: 0; background: none; }
.menu-toggle span:not(.sr-only) { display: block; height: 2px; margin: .32rem 0; background: var(--olive); }

.hero { position: relative; height: calc(100vh - var(--header-strip-height) - var(--header-row-height)); height: calc(100svh - var(--header-strip-height) - var(--header-row-height)); min-height: 0; display: flex; background: var(--olive) url('assets/hero/treelife-hero-poster.jpg') center / cover no-repeat; color: white; overflow: hidden; isolation: isolate; }
.hero__video, .hero__shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__video { object-fit: cover; }
.hero__shade { pointer-events: none; background: radial-gradient(ellipse at bottom right, rgba(12, 22, 6, .86), rgba(12, 22, 6, .35) 48%, transparent 78%), linear-gradient(to top, rgba(12, 22, 6, .3), transparent 65%); }
.hero__inner { position: relative; display: flex; align-items: flex-end; justify-content: flex-end; padding-top: 2rem; padding-bottom: clamp(5.5rem, 9vh, 7rem); }
.hero h1 { max-width: 42rem; margin: 0; font-size: clamp(2.3rem, 4.8vw, 5.1rem); line-height: 1.12; text-align: right; letter-spacing: -.035em; font-weight: 500; text-shadow: 0 2px 20px rgba(0,0,0,.2); }
.hero h1 span { display: block; margin-top: .4em; font-size: .78em; }
.hero__controls { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .5rem; padding: .15rem .55rem; border: 1px solid rgba(255,255,255,.3); border-radius: 3rem; background: rgba(12,22,6,.35); }
.hero__controls[hidden] { display: none; }
.hero__controls button { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; background: transparent; color: white; cursor: pointer; }
.hero__playback { font-size: 1rem; }
.hero__controls button:focus-visible { outline-color: white; }

.intro { background: white; }
.intro__grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(22rem, 1fr); gap: clamp(3rem, 6vw, 6.5rem); align-items: stretch; }
.intro__content { display: flex; flex-direction: column; container-type: inline-size; }
.intro h2 { margin: 0 0 2.1rem; font-size: clamp(1rem, 6.8cqw, 2.75rem); line-height: 1.24; letter-spacing: -.03em; }
.intro__heading-line { display: block; white-space: nowrap; }
.intro h2 .intro__heading-accent, .consultancy h3 { color: var(--olive-mid); }
.intro__content > p { max-width: 44rem; margin: 0 0 1.8rem; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.2rem); }
.team-photo { margin: 0; min-height: 100%; overflow: hidden; border-radius: 1.8rem; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.consultancy { margin-top: auto; padding: clamp(1.6rem, 3vw, 3rem); border-radius: 2rem; background: var(--olive-light); color: #737a4c; }
.consultancy h3 { margin: 0 0 1rem; font-size: clamp(1.45rem, 2vw, 2.25rem); line-height: 1.15; }
.consultancy p { margin: 0; font-size: clamp(.95rem, 1.15vw, 1.12rem); }
.consultancy .button { margin-top: -.2rem; float: right; }

.trust { padding-bottom: 2.8rem; background: white; }
.trust__panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; padding: clamp(2rem, 4vw, 4rem); border-radius: var(--radius); background: var(--orange); color: white; text-align: center; }
.trust article { display: flex; flex-direction: column; align-items: center; }
.trust svg { width: 4.8rem; height: 4.8rem; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trust h3 { margin: 1.1rem 0 .5rem; font-size: clamp(1rem, 1.35vw, 1.3rem); }
.trust p { max-width: 20rem; margin: 0; font-size: clamp(.9rem, 1.15vw, 1.1rem); }

.testimonial { padding-top: 0; padding-bottom: 3.8rem; background: white; }
.testimonial__carousel { position: relative; border-radius: var(--radius); background: var(--cream); }
.testimonial__slides { display: grid; }
.testimonial__carousel.is-ready .testimonial__slide { grid-area: 1 / 1; visibility: hidden; }
.testimonial__carousel.is-ready .testimonial__slide.is-active { visibility: visible; }
.testimonial blockquote { position: relative; display: flex; flex-direction: column; justify-content: center; height: 100%; margin: 0; padding: clamp(3rem, 4vw, 4rem); color: #66675f; text-align: center; }
.testimonial blockquote::before, .testimonial blockquote::after { position: absolute; color: #d6d0c3; font: 700 6rem/1 Georgia, serif; }
.testimonial blockquote::before { content: '“'; top: 1.4rem; left: 3rem; }
.testimonial blockquote::after { content: '”'; right: 3rem; bottom: -.5rem; }
.testimonial p { max-width: 64rem; margin: 0 auto 1.3rem; font-size: clamp(1rem, 1.4vw, 1.35rem); line-height: 1.55; }
.testimonial cite { color: var(--olive); font-style: normal; font-weight: 500; }
.testimonial__controls { position: absolute; inset: 0; pointer-events: none; }
.testimonial__controls[hidden] { display: none; }
.testimonial__controls button { position: absolute; top: 50%; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: .6rem; border: 1px solid var(--olive-mid); border-radius: 50%; background: var(--cream); color: var(--olive); transform: translateY(-50%); cursor: pointer; pointer-events: auto; }
.testimonial__previous { left: -1.25rem; }
.testimonial__next { right: -1.25rem; }
.testimonial__controls svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.testimonial__controls button:hover { background: var(--olive); border-color: var(--olive); color: white; }

.social { padding-top: 3.6rem; background: #fff; }
.social h2 { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 0 0 3rem; color: var(--olive); font-size: clamp(1.6rem, 2.7vw, 2.75rem); }
.social h2 svg { width: 2rem; height: 2rem; }
.instagram-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gallery-gap); }
.instagram-post { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 1.5rem; background: #171b0b; }
.instagram-post img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.instagram-post:hover img { transform: scale(1.025); }
.instagram-post:focus-visible { outline-color: var(--orange); }
.social__cta { margin: 2.5rem 0 0; text-align: center; }
.instagram-post__stats { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 1rem; background: rgba(16,25,8,.65); color: white; font-family: var(--font-heading); font-weight: 500; opacity: 0; transition: opacity .2s ease; }
.instagram-post__stats > span { display: inline-flex; align-items: center; gap: .5rem; }
.instagram-post__stats svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.instagram-post:hover .instagram-post__stats, .instagram-post:focus-visible .instagram-post__stats { opacity: 1; }
body.has-instagram-modal { overflow: hidden; }
.instagram-dialog { width: min(75rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: 1.5rem; background: white; color: var(--ink); box-shadow: 0 1.5rem 5rem rgba(0,0,0,.3); overflow: hidden; }
.instagram-dialog::backdrop { background: rgba(12,22,6,.7); backdrop-filter: blur(4px); }
.instagram-dialog[open] { display: flex; flex-direction: column; }
.instagram-dialog__header { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--cream); }
.instagram-dialog__header h2 { margin: 0; color: var(--olive); font-size: clamp(1.2rem, 4vw, 1.6rem); }
.instagram-dialog__close { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: var(--cream); color: var(--olive); font: 1.8rem/1 Arial, sans-serif; cursor: pointer; }
.instagram-dialog__content { display: grid; grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); min-height: 0; }
.instagram-dialog__media { display: grid; place-items: center; min-width: 0; min-height: 0; background: var(--cream); }
.instagram-dialog__image { width: 100%; height: min(70dvh, 48rem); object-fit: contain; }
.instagram-dialog__body { min-height: 0; padding: 1.5rem; overflow-y: auto; overscroll-behavior: contain; }
.instagram-dialog__post { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--cream); }
.instagram-dialog__caption { margin: 0 0 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.instagram-dialog__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; color: var(--muted); font-size: .9rem; }
.instagram-dialog__link { color: var(--olive); font-weight: 600; }
.instagram-dialog__body h3 { margin: 0 0 1.25rem; color: var(--olive); }
.instagram-dialog__status { margin: 0; color: var(--muted); }
.instagram-dialog__status:empty { display: none; }
.instagram-dialog__list { list-style: none; margin: 0; padding: 0; }
.instagram-dialog__list li { padding: 1.25rem 0; border-bottom: 1px solid var(--cream); overflow-wrap: anywhere; }
.instagram-dialog__list li:first-child { padding-top: 0; }
.instagram-dialog__list strong { font-family: var(--font-heading); font-weight: 500; color: var(--olive); }
.instagram-dialog__list p { margin: .5rem 0; white-space: pre-wrap; }
.instagram-dialog__list time { color: var(--muted); font-size: .85rem; }
.instagram-dialog__more, .instagram-dialog__retry { margin-top: 1.25rem; cursor: pointer; }
.instagram-dialog button[hidden] { display: none; }
@media (hover: none) {
  .instagram-post__stats { inset: auto 0 0; padding: .7rem .5rem; gap: 1rem; opacity: 1; background: linear-gradient(transparent, rgba(16,25,8,.8)); }
}

.site-footer { padding-block: 3rem; background: var(--olive); color: white; }
.footer-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: var(--gallery-gap); align-items: stretch; }
.brand--footer { grid-column: span 3; padding-right: var(--gallery-gap); border-right: 1px solid rgba(255,255,255,.45); }
.brand--footer .brand-emblem { flex-shrink: 0; width: clamp(4rem, 6.5vw, 6rem); height: auto; object-fit: contain; filter: brightness(0) invert(1); }
.brand--footer .brand-wordmark { width: min(65%, 13rem); margin-left: 1rem; filter: brightness(0) invert(1); }
.site-footer address { grid-column: span 3; display: grid; gap: .8rem; align-content: center; padding: .25rem var(--gallery-gap) .25rem .5rem; border-right: 1px solid rgba(255,255,255,.45); font-style: normal; font-size: clamp(.85rem, 1.1vw, 1rem); line-height: 1.45; }
.site-footer address a, .footer-address { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: 1rem; align-items: center; text-decoration: none; }
.site-footer address span { overflow-wrap: anywhere; }
.site-footer address svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.credentials { grid-column: span 4; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.credentials__logos { display: grid; grid-template-columns: 1fr 1fr .75fr 2fr; gap: clamp(.65rem, 1.2vw, 1.25rem); align-items: center; }
.credentials__logos img { width: 100%; max-height: 5rem; object-fit: contain; }
.credentials__logos .credentials__vetcert { width: min(100%, 5rem); justify-self: center; aspect-ratio: 1; height: auto; object-fit: contain; border-radius: 50%; }
.credentials small { font-size: clamp(.8rem, 1.05vw, 1rem); line-height: 1.45; }

@media (max-width: 1200px) {
  :root { --header-strip-height: 1.5rem; --header-row-height: 4.8rem; --header-compact-row-height: 3.6rem; --header-emblem-size: 8rem; --header-emblem-border: 1.25rem; }
  .menu-toggle { display: block; }
  .primary-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; margin-left: 0; padding: 1.5rem; flex-direction: column; align-items: stretch; justify-content: flex-start; background: var(--cream); box-shadow: 0 1rem 2rem rgba(0,0,0,.12); }
  .primary-nav.is-open { display: flex; }
  .primary-nav .icon-link { display: none; }
  .primary-nav .nav-home { display: block; width: auto; height: auto; }
  .nav-home svg { display: none; }
  .nav-home__label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; }
  .primary-nav a { padding: .6rem; text-align: center; }
  .primary-nav.is-open { max-height: calc(100dvh - var(--header-strip-height) - var(--header-row-height)); overflow-y: auto; }
}

@media (max-width: 880px) {
  .hero__shade { background: linear-gradient(to top, rgba(12,22,6,.88), rgba(12,22,6,.2) 60%, transparent); }
  .hero h1 { max-width: 30rem; }
  .intro__grid { grid-template-columns: minmax(0, 1fr); }
  .team-photo { max-height: 42rem; }
  .trust__panel { gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .brand--footer, .site-footer address { grid-column: auto; }
  .site-footer address { border-right: 0; padding-right: 0; }
  .credentials { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.45); }
  .credentials__logos { max-width: 36rem; }
  .instagram-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .instagram-dialog__content { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .instagram-dialog__image { height: auto; max-height: 60dvh; }
  .instagram-dialog__body { overflow: visible; }
}

@media (max-width: 768px) {
  .container { padding-inline: 20px; }
}

@media (max-width: 620px) {
  .instagram-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :root { --header-row-height: 3.8rem; --header-compact-row-height: 3rem; --header-emblem-size: 5.75rem; --header-emblem-border: .8rem; --header-wordmark-width: clamp(6rem, 30vw, 8.5rem); }
  .site-header .brand { gap: calc(.55rem * var(--logo-scale)); }
  .consultancy .button { float: none; margin-top: 1.25rem; }
  .trust__panel { grid-template-columns: 1fr; gap: 3rem; }
  .testimonial blockquote { padding: 3.5rem 2.75rem; }
  .testimonial p br { display: none; }
  .testimonial blockquote::before, .testimonial blockquote::after { font-size: 4rem; }
  .testimonial blockquote::before { left: .75rem; top: .65rem; }
  .testimonial blockquote::after { right: .75rem; bottom: 0; }
  .social h2 { margin-bottom: 1.5rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .brand--footer { justify-content: center; padding: 0 0 1.5rem; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.4); }
  .brand--footer .brand-wordmark { width: 10rem; }
  .site-footer address { width: fit-content; max-width: 100%; margin-inline: auto; padding: .75rem 0; text-align: left; }
  .credentials { grid-column: auto; }
  .credentials__logos { grid-template-columns: 1fr 1fr .75fr 2fr; gap: .65rem; }
}

@media (max-height: 600px) {
  .hero__inner { padding-top: 1rem; padding-bottom: 5rem; }
  .hero h1 { font-size: clamp(1.25rem, 6svh, 2.25rem); }
  .hero__controls { bottom: .75rem; }
}

.scroll-reveal {
  transition: opacity .7s ease, translate .7s cubic-bezier(.22, 1, .36, 1);
}
.scroll-reveal--pending { opacity: 0; translate: 0 18px; }
.scroll-reveal:focus-within { opacity: 1; translate: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal { opacity: 1; translate: none; transition: none; }
  html { scroll-behavior: auto; }
  .site-header, .site-header * { transition: none !important; }
  .instagram-post img, .instagram-post__stats { transition: none; }
}
