/* ClimaWorks — site styles */
:root {
  --night: #0E1A17;      /* page background, deep canopy green-black */
  --panel: #152520;      /* raised surfaces */
  --line: #26392F;       /* rules and borders */
  --leaf: #4FCB8D;       /* brand green */
  --sun: #E8A23A;        /* warm accent, used sparingly */
  --mist: #E4EDE8;       /* main text */
  --muted: #9AAFA5;      /* secondary text */

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--mist);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--mist); }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { margin: 0; font-weight: 400; }
h2, h1 { font-family: var(--serif); letter-spacing: -0.01em; line-height: 1.05; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; line-height: 1.35; }
p { margin: 0 0 1em; }
ul, ol, dl, dd { margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--sun); color: var(--night); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 26, 23, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--serif); font-size: 1.6rem; color: var(--mist); text-decoration: none; line-height: 1; }
.logo span { color: var(--leaf); }
.site-header nav ul { display: flex; gap: 28px; list-style: none; align-items: center; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--mist); }
.site-header nav .nav-cta { color: var(--night); background: var(--leaf); padding: 8px 16px; border-radius: 999px; font-weight: 600; }
.site-header nav .nav-cta:hover { background: var(--mist); color: var(--night); }

/* Hero */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 70% 40%;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(14,26,23,0.92) 0%, rgba(14,26,23,0.65) 45%, rgba(14,26,23,0) 75%),
              linear-gradient(0deg, var(--night) 0%, rgba(14,26,23,0) 35%);
}
.hero-content { position: relative; z-index: 2; padding-top: 120px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); max-width: 11ch; }
.hero-lede { max-width: 52ch; color: var(--mist); opacity: 0.9; font-size: 1.12rem; margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn { display: inline-block; padding: 13px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 0.98rem; }
.btn-primary { background: var(--leaf); color: var(--night); }
.btn-primary:hover { background: var(--mist); color: var(--night); }
.btn-ghost { border: 1px solid rgba(228,237,232,0.4); color: var(--mist); }
.btn-ghost:hover { border-color: var(--mist); }

/* Signature: the comfort scale, borrowed from a UTCI legend */
.scale { position: relative; z-index: 2; padding-bottom: 8px; }
.scale-bar {
  height: 6px;
  background: linear-gradient(90deg, #2B5FD9 0%, #3BA7E0 18%, #4FCB8D 38%, #4FCB8D 52%, #E8D23A 68%, #E8A23A 80%, #D8452E 100%);
  transform-origin: left center;
  animation: sweep 1.6s cubic-bezier(.2,.7,.2,1) 0.2s both;
}
.scale-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); padding-top: 8px; }
@keyframes sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .scale-bar { animation: none; } }

/* Sections */
.section { padding: clamp(64px, 10vw, 120px) 0; border-top: 1px solid var(--line); }
.hero + .section { border-top: 0; }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); max-width: 60ch; }
.section-head h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.08rem; }

/* Intro */
.intro-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.statement { font-family: var(--serif); font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.18; margin: 0; }
.pillars { display: grid; gap: 26px; }
.pillars > div { border-left: 2px solid var(--leaf); padding-left: 18px; }
.pillars dt { font-weight: 600; }
.pillars dd { color: var(--muted); }

/* Services */
.service {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px clamp(32px, 6vw, 80px);
  padding: 40px 0; border-top: 1px solid var(--line);
}
.service:first-of-type { border-top: 0; padding-top: 0; }
.service-title h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 2.6vw, 2.1rem); line-height: 1.1; }
.service-title p { color: var(--muted); margin-top: 10px; max-width: 34ch; }
.service ul, .study ul { list-style: none; display: grid; gap: 10px; }
.service li, .study li { position: relative; padding-left: 20px; }
.service li::before, .study li::before {
  content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--leaf);
}
.service-figure { grid-column: 1 / -1; margin: 16px 0 0; }
.service-figure img { border-radius: 6px; width: 100%; }
.service-figure.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.service-figure.pair figcaption { grid-column: 1 / -1; }
figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* Studies */
.studies { background: var(--panel); }
.study-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.study h3 { padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.study li { font-size: 0.95rem; color: var(--mist); }

/* Cases */
.case { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.case + .case { margin-top: clamp(56px, 8vw, 96px); }
.case-text h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.1; margin-bottom: 16px; }
.case-text > p { color: var(--muted); }
.case-text dl { margin-top: 24px; display: grid; gap: 2px; }
.case-text dt:not(:first-child) { margin-top: 14px; }
.case-text dt { font-weight: 600; }
.case-text dd { color: var(--muted); font-size: 0.97rem; }
.case-gallery { display: grid; gap: 10px; }
.case-gallery img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; background: #000; }
.case-gallery.quad { grid-template-columns: 1fr 1fr; }
.case-gallery.quad img { aspect-ratio: 1 / 1; }
.case-gallery.trio { grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; background: #fff; padding: 12px; border-radius: 8px; }
.case-gallery.trio img { object-fit: contain; background: #fff; border-radius: 0; }
.case-gallery.trio img:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
.case-gallery.trio img:nth-child(2) { grid-column: 1; grid-row: 2; max-height: 300px; }

/* Approach */
.approach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); }
.whys h3, .approach-side h3 { margin-bottom: 8px; }
.whys > p, .approach-side p { color: var(--muted); }
.whys ol { list-style: none; counter-reset: why; margin-top: 24px; position: relative; }
.whys ol::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(var(--sun), var(--leaf)); }
.whys li { counter-increment: why; position: relative; padding: 10px 0 10px 48px; font-family: var(--serif); font-size: 1.45rem; line-height: 1.25; }
.whys li::before {
  content: counter(why); position: absolute; left: 0; top: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--night); border: 2px solid var(--leaf); color: var(--leaf);
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600; display: grid; place-items: center;
}
.whys li:last-child { color: var(--leaf); }
.approach-side { display: grid; gap: 32px; align-content: start; }

.leed { margin-top: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; background: var(--panel); border-radius: 10px; overflow: hidden; }
.leed img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.leed-text { padding: 32px 32px 32px 0; }
.leed-text h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; margin-bottom: 12px; }
.leed-text p { color: var(--muted); margin: 0; }

/* Partners */
.partner-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 48px; }
.partner-list > div { padding: 22px 0; border-top: 1px solid var(--line); }
.partner-list dt { font-weight: 600; margin-bottom: 4px; }
.partner-list dd { color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.portrait { margin: 0; position: sticky; top: 96px; }
.portrait img { border-radius: 8px; width: 100%; filter: contrast(1.02); }
.about-text h2 { font-size: clamp(2.4rem, 4.5vw, 3.4rem); }
.about-text .role { color: var(--leaf); margin: 10px 0 28px; }
.about-text p { max-width: 64ch; }
.credentials { list-style: none; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.credentials li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.88rem; color: var(--mist); }

/* Contact */
.contact { background: var(--panel); }
.contact-inner h2 { font-size: clamp(2.4rem, 5vw, 4rem); max-width: 14ch; }
.contact-inner > p { color: var(--muted); max-width: 52ch; margin-top: 16px; }
.contact-email { display: inline-block; font-family: var(--serif); font-size: clamp(1.9rem, 5vw, 3.4rem); margin: 28px 0; color: var(--leaf); text-decoration: none; border-bottom: 2px solid var(--leaf); line-height: 1.1; word-break: break-word; }
.contact-email:hover { color: var(--mist); border-color: var(--mist); }
.contact-list { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 32px; color: var(--muted); }
.contact-list a { color: var(--mist); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
.site-footer .logo { font-size: 1.3rem; }

/* Responsive */
@media (max-width: 960px) {
  .study-grid { grid-template-columns: 1fr 1fr; }
  .case, .approach-grid, .intro-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-header nav ul { gap: 16px; }
  .site-header nav li:not(:last-child) { display: none; }
  .hero { min-height: 92vh; }
  .hero-img { object-position: 78% 30%; }
  .hero::before { background: linear-gradient(0deg, var(--night) 10%, rgba(14,26,23,0.75) 55%, rgba(14,26,23,0.35) 100%); }
  .service { grid-template-columns: 1fr; }
  .service-figure.pair { grid-template-columns: 1fr; }
  .study-grid { grid-template-columns: 1fr; }
  .leed { grid-template-columns: 1fr; }
  .leed-text { padding: 0 24px 28px; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: static; max-width: 340px; }
  .case-gallery.trio { grid-template-columns: 1fr 1fr; }
}
