/* Earth Logic — photo-led site on black */

:root {
  --bg: #000;
  --bg-2: #0d0f0f;
  --panel: #151817;
  --text: #ecefe8;
  --muted: #a3aba3;
  --hair: rgba(236,239,232,.16);
  --sage: #b3cc95;           /* logo green */
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 2.6vw, 40px);
  --fade: 1600ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-weight: 600; letter-spacing: -.025em; margin: 0; }

/* ---------- Header: transparent over the hero, solid once you scroll ---------- */
.site-head {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 68px; padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  transition: background .4s;
}
.site-head.scrolled { background: rgba(0,0,0,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 42px; }
.brand span { font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.site-head nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); font-size: 15px; }
.site-head nav a { text-decoration: none; opacity: .9; }
.site-head nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.site-head .call { padding: 8px 16px; border-radius: 999px; background: var(--text); color: #000; font-weight: 600; opacity: 1; }
.site-head .call:hover { text-decoration: none !important; background: var(--sage); }

/* ---------- Crossfading photos ---------- */
.slides { position: absolute; inset: 0; overflow: hidden; background: var(--bg-2); }
.slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity var(--fade) ease-in-out;
}
.slides img.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .slides img { transition: none; } }

/* ---------- Hero: full screen, text over the photo ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.35) 38%, rgba(0,0,0,0) 62%),
    linear-gradient(to right, rgba(0,0,0,.35), rgba(0,0,0,0) 55%);
}
.hero-copy {
  position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: clamp(28px, 6vh, 64px);
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px;
}
.hero .name { font-size: clamp(16px, 1.4vw, 20px); font-weight: 500; margin: 0 0 .6em; color: var(--sage); }
.hero-logo { width: clamp(110px, 10vw, 170px); height: auto; margin-bottom: clamp(16px, 2.4vh, 28px); filter: drop-shadow(0 2px 14px rgba(0,0,0,.4)); }
.hero h1 { font-size: clamp(38px, 6.2vw, 108px); line-height: 1; }
.hero h1 span { display: block; white-space: nowrap; }
.hero .sub { margin: 1em 0 0; font-size: clamp(16px, 1.3vw, 19px); color: #dfe3db; }
.hero .actions { display: flex; gap: 12px; margin-top: 1.4em; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 22px; border-radius: 999px; text-decoration: none;
  font: inherit; font-size: 15.5px; font-weight: 600; border: 0; cursor: pointer;
  background: var(--text); color: #000;
}
.btn:hover { background: var(--sage); }
.btn.ghost { background: rgba(0,0,0,.25); color: var(--text); box-shadow: inset 0 0 0 1px rgba(236,239,232,.6); backdrop-filter: blur(4px); }
.btn.ghost:hover { background: rgba(236,239,232,.15); }
.hero .credit { text-align: right; font-size: 14px; color: #d4d9d0; max-width: 28ch; }
.hero .credit strong { display: block; font-weight: 500; color: var(--text); }

/* ---------- Sections ---------- */
section { padding: clamp(72px, 9vw, 130px) var(--gutter) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.sec-head h2 { font-size: clamp(32px, 4vw, 60px); line-height: 1; }
.sec-head p { margin: 0; color: var(--muted); max-width: 46ch; text-align: right; }

/* ---------- Work: one screen of project tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px;
  border: 0; padding: 0; background: var(--panel); cursor: pointer; color: var(--text); text-align: left; font: inherit;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease, opacity .6s; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0) 55%); }
.tile .t { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px; }
.tile .t strong { display: block; font-size: clamp(18px, 1.5vw, 23px); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.tile .t span { font-size: 14px; color: #cfd5cb; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) { .tile img { transition: none; } }

/* ---------- Full-bleed photo sections with text over them ---------- */
.feature { position: relative; padding: 0; margin-top: clamp(72px, 9vw, 130px); min-height: 92vh; display: flex; align-items: center; }
.feature .slides { position: absolute; inset: 0; }
.feature::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.feature.left::after { background: linear-gradient(to right, rgba(0,0,0,.88) 0%, rgba(0,0,0,.7) 40%, rgba(0,0,0,.05) 75%); }
.feature.right::after { background: linear-gradient(to left, rgba(0,0,0,.88) 0%, rgba(0,0,0,.7) 40%, rgba(0,0,0,.05) 75%); }
.feature .copy { position: relative; z-index: 2; width: min(560px, 100%); margin: clamp(56px, 8vw, 110px) var(--gutter); }
.feature.right .copy { margin-left: auto; }
.feature h2 { font-size: clamp(32px, 4vw, 58px); line-height: 1.02; margin-bottom: .55em; }
.feature p { margin: 0 0 1em; color: #dde2d9; }
.feature .lead { font-size: 1.18em; line-height: 1.45; color: var(--text); }
.ticks { list-style: none; margin: .4em 0 0; padding: 0; columns: 2; column-gap: 24px; }
.ticks li { break-inside: avoid; display: flex; gap: .65em; align-items: baseline; padding: .28em 0; font-size: 15.5px; }
.ticks li::before { content: ""; flex: none; width: .5em; height: .5em; border-radius: 50% 50% 50% 0; background: var(--sage); transform: translateY(-.05em) rotate(-45deg); }

/* ---------- Services: cards divided by hairlines; colour rises on hover ---------- */
.services {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--hair); border: 1px solid var(--hair); border-radius: 8px; overflow: hidden;
}
.service {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--bg-2); padding: clamp(24px, 2.6vw, 38px);
  display: grid; grid-template-rows: auto 1fr auto; gap: 28px; min-height: 250px;
}
.service::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: #33432a;                       /* deep sage */
  transform: translateY(101%); transition: transform 520ms cubic-bezier(.2,.7,.2,1);
}
.service:hover::before { transform: translateY(0); }
.service-icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid rgba(236,239,232,.28); border-radius: 50%; color: var(--sage);
  transition: border-color .3s, background-color .3s, color .3s;
}
.service-icon svg { width: 21px; height: 21px; }
.service:hover .service-icon { border-color: rgba(236,239,232,.4); background: rgba(236,239,232,.06); color: var(--text); }
.service h3 { font-size: clamp(20px, 1.6vw, 25px); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; align-self: end; }
.service p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 34ch; transition: color .3s; }
.service:hover p { color: #d9e0d2; }
@media (prefers-reduced-motion: reduce) { .service::before { transition: none; } }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.team .photo { border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--panel); }
.team .photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.person + .person { margin-top: 28px; }
.person h3 { font-size: 24px; margin-bottom: .3em; }
.person p { margin: 0; color: #d3d8cf; }

/* ---------- How we work: a real sequence, so numbered ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-top: 18px; border-top: 1px solid var(--hair); }
.steps li::after {                       /* sage line that draws across on hover */
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--sage);
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
.steps li::before {
  content: "0" counter(s); display: block;
  font-size: clamp(48px, 5vw, 76px); font-weight: 500; letter-spacing: -.04em; line-height: 1;
  color: var(--sage); margin-bottom: .35em; font-variant-numeric: tabular-nums;
  transition: color .4s;
}
.steps strong { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin-bottom: .35em; }
.steps span {
  display: block; font-size: 15px; color: var(--muted);
  transition: color .45s ease, transform .55s cubic-bezier(.2,.7,.2,1);
}
.steps li:hover::after { width: 100%; }
.steps li:hover::before { color: var(--text); }
.steps li:hover span { color: var(--text); transform: translateY(-6px); }
@media (prefers-reduced-motion: reduce) { .steps li::after, .steps span { transition: none; } .steps li:hover span { transform: none; } }

/* ---------- Contact over a photo ---------- */
.contact-sec .copy { width: min(1100px, 100%); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); }
.contact-grid .big { display: block; font-size: clamp(34px, 4.6vw, 70px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; text-decoration: none; }
.contact-grid .mail { color: var(--sage); overflow-wrap: anywhere; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 4px; font-size: 14px; color: #c9cfc5; }
.form .full { grid-column: 1 / -1; }
.form input, .form textarea {
  font: inherit; color: var(--text); background: rgba(0,0,0,.35);
  border: 1px solid rgba(236,239,232,.35); border-radius: 6px; padding: 10px 12px;
}
.form textarea { resize: vertical; min-height: 96px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--sage); }
.form .hp { position: absolute; left: -9999px; }
.form-status { margin: 0; min-height: 1.4em; font-size: 15px; }
.form-status.ok { color: var(--sage); }
.form-status.err { color: #f0a493; }

/* ---------- Footer with site map ---------- */
.site-foot { margin-top: clamp(72px, 9vw, 120px); padding: clamp(48px, 6vw, 80px) var(--gutter) 24px; border-top: 1px solid var(--hair); font-size: 15px; }
.foot-map { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr 1fr; gap: 32px; }
.foot-brand img { width: 120px; margin-bottom: 16px; }
.foot-brand p { margin: 0; color: var(--muted); max-width: 26ch; }
.site-foot h2 { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--sage); margin: 0 0 14px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 8px; }
.site-foot a, .linklike { color: #cdd3c9; text-decoration: none; }
.linklike { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.site-foot a:hover, .linklike:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--muted); }
.foot-base a { color: var(--text); }
@media (max-width: 1000px) { .foot-map { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- Project gallery (full screen) ---------- */
.gallery {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh;
  background: #000; color: var(--text);
}
.gallery::backdrop { background: #000; }
.gallery[open] { display: grid; grid-template-rows: auto 1fr auto; }
.g-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--gutter); }
.g-top h3 { font-size: 18px; font-weight: 600; }
.g-top p { margin: 0; font-size: 14px; color: var(--muted); }
.g-stage { position: relative; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 0 72px; }
.g-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.g-btn { border: 0; cursor: pointer; color: var(--text); background: rgba(255,255,255,.08); width: 48px; height: 48px; border-radius: 50%; font-size: 22px; line-height: 1; }
.g-btn:hover { background: rgba(255,255,255,.18); }
.g-prev, .g-next { position: absolute; top: 50%; transform: translateY(-50%); }
.g-prev { left: 14px; } .g-next { right: 14px; }
.g-thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 12px var(--gutter) 16px; scrollbar-width: thin; }
.g-thumbs button { flex: none; width: 92px; height: 64px; border: 0; padding: 0; border-radius: 4px; overflow: hidden; cursor: pointer; opacity: .45; background: var(--panel); outline-offset: 2px; }
.g-thumbs button[aria-current="true"] { opacity: 1; outline: 2px solid var(--sage); }
.g-thumbs button:hover { opacity: .85; }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .team, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-head nav .opt { display: none; }
  .hero-copy { grid-template-columns: 1fr; }
  .hero .credit { text-align: left; }
  .hero h1 span { white-space: normal; display: inline; }
  .hero-logo { width: 96px; }
  .sec-head { display: block; }
  .sec-head p { text-align: left; margin-top: .6em; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 6px; }
  .tile .t { left: 10px; right: 10px; bottom: 9px; }
  .tile .t strong { font-size: 15px; }
  .tile .t span { font-size: 12.5px; }
  .feature { min-height: 0; }
  .feature.left::after, .feature.right::after { background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.72) 55%, rgba(0,0,0,.25) 100%); }
  .feature .copy { margin: 46vh var(--gutter) 40px; }
  .ticks { columns: 1; }
  .services { grid-template-columns: 1fr; }
  .service { min-height: 0; gap: 18px; }
  .steps { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .g-stage { padding: 0 8px; }
  .g-prev, .g-next { top: auto; bottom: 8px; transform: none; background: rgba(0,0,0,.5); }
  .g-thumbs button { width: 70px; height: 50px; }
}

/* a soft shadow keeps text legible over bright photos */
.hero .name, .hero h1, .hero .sub, .site-head:not(.scrolled) nav a:not(.call), .site-head:not(.scrolled) .brand span { text-shadow: 0 1px 14px rgba(0,0,0,.45); }
.hero .name { color: #cfe0b8; }

/* phones: compact header, compact service rows */
.brand span, .site-head nav a { white-space: nowrap; }
.call .short { display: none; }
@media (max-width: 700px) {
  .site-head { height: 60px; }
  .call .long { display: none; }
  .call .short { display: inline; }
  .hero .credit { display: none; }
  .service { grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; row-gap: 4px; padding: 18px; }
  .service-icon { grid-row: 1 / span 2; width: 40px; height: 40px; }
  .service h3 { align-self: start; font-size: 18px; }
  .service p { grid-column: 2; font-size: 14.5px; }
}

section[id] { scroll-margin-top: 64px; }
@media (max-width: 430px) { .brand span { display: none; } }
