/* ============================================================
   STUDIO GREEN — Design System
   ============================================================ */

:root {
  /* Canvas + ink */
  --canvas: #ffffff;
  --canvas-2: #f5f5f2;
  --ink: #0b100b;
  --ink-soft: #4a5642;
  --line: rgba(11, 16, 11, 0.14);

  /* Green family (palette) */
  --forest: #193117;
  --pine:   #234423;
  --emerald:#193117;
  --grass:  #59994d;
  --sage:   #59994d;
  --lime:   #c8f135;
  --mint:   #bcd9a8;

  /* Action accent (lime — use sparingly) */
  --accent: #c8f135;
  --accent-ink: #193117;

  /* Dark section */
  --dark: #193117;
  --dark-soft: #234423;
  --cta-bg: #0b100b;
  --on-dark: #f1f6e9;
  --on-dark-soft: #59994d;

  /* Type */
  --display: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Rhythm */
  --gutter: clamp(20px, 5vw, 80px);
  --maxw: 1480px;
  --radius: 0px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

::selection { background: var(--lime); color: var(--forest); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; line-height: 0.98; letter-spacing: -0.02em; }
p { margin: 0; }

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

/* ---------- Type scale ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage);
}

.display-xl { font-size: clamp(3.4rem, 13vw, 13rem); }
.display-l  { font-size: clamp(2.6rem, 8vw, 6.6rem); }
.display-m  { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.lead { font-size: clamp(1.15rem, 2.1vw, 1.6rem); line-height: 1.4; color: var(--ink-soft); max-width: 38ch; }

/* ---------- Redesign type scale (exactly three sizes) ---------- */
.t-display {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 9.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.t-manifesto {
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.35;
}

/* ---------- Text links (underline, lime on hover) ---------- */
.u-link {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .3s var(--ease);
}
.u-link:hover { text-decoration-color: var(--lime); }

/* ---------- Line reveal (masked, staggered) ---------- */
.reveal-line { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.reveal-line > span { display: block; will-change: transform; }
.js-reveal .reveal-line > span { transform: translateY(115%); transition: transform .9s var(--ease); }
.js-reveal .in-view .reveal-line > span { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-line > span { transform: none !important; transition: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 100px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  will-change: transform;
}
.btn .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: currentColor;
  transition: transform .4s var(--ease);
}
.btn:hover .dot { transform: scale(1.7); }
.btn--solid { background: var(--forest); color: var(--canvas); }
.btn--solid:hover { background: var(--ink); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: var(--lime); color: var(--forest); }
.btn--light:hover { background: var(--forest); color: #fff; }

/* ---------- Top nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  backdrop-filter: blur(14px);
  padding-block: 14px;
  box-shadow: 0 1px 0 var(--line);
}
.nav.on-dark { color: var(--on-dark); }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 700; font-size: 22px;
  letter-spacing: -0.02em;
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--forest);
  flex: none;
}
.brand-logo {
  display: block;
  width: 132px;
  aspect-ratio: 1000 / 250;
  background-color: currentColor;
  -webkit-mask: url("assets/studiogreen-logo.png") left center / contain no-repeat;
          mask: url("assets/studiogreen-logo.png") left center / contain no-repeat;
  transition: background-color .45s var(--ease);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  padding: 9px 16px;
  font-size: 15px; font-weight: 500;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.nav-links a:hover { text-decoration: underline; text-decoration-color: var(--lime); }
.nav.on-dark .nav-links a:hover { text-decoration: underline; text-decoration-color: var(--lime); }
.nav.on-dark .btn--solid { background: var(--lime); color: var(--forest); }
.nav.on-dark .btn--solid:hover { background: #fff; }
.nav.on-dark .btn--ghost { border-color: rgba(238,243,236,0.4); color: var(--on-dark); }
.nav.on-dark.scrolled { background: color-mix(in srgb, var(--dark) 80%, transparent); }
.nav-links a.active { color: var(--ink); font-weight: 600; }
.nav.on-dark .nav-links a.active { color: var(--sage); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.menu-btn { display: none; }

/* ---------- Fluid green orb (decorative — disabled for a flat look) ---------- */
.orb-field { display: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.92;
  mix-blend-mode: multiply;
  will-change: transform;
}
.orb.o1 { width: 46vw; height: 46vw; background: radial-gradient(circle at 40% 40%, var(--grass), transparent 70%); top: -6vw; left: 8vw; animation: drift1 22s var(--ease) infinite alternate; }
.orb.o2 { width: 40vw; height: 40vw; background: radial-gradient(circle at 50% 50%, var(--emerald), transparent 70%); top: 8vw; right: 4vw; animation: drift2 26s var(--ease) infinite alternate; }
.orb.o3 { width: 38vw; height: 38vw; background: radial-gradient(circle at 50% 50%, var(--lime), transparent 68%); bottom: -8vw; left: 24vw; animation: drift3 30s var(--ease) infinite alternate; }
.orb.o4 { width: 30vw; height: 30vw; background: radial-gradient(circle at 50% 50%, var(--pine), transparent 70%); top: 24vw; left: 38vw; animation: drift1 28s var(--ease) infinite alternate-reverse; }

@keyframes drift1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(8vw,6vw,0) scale(1.18); } }
@keyframes drift2 { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(-7vw,5vw,0) scale(0.9); } }
@keyframes drift3 { from { transform: translate3d(0,0,0) scale(0.95); } to { transform: translate3d(6vw,-7vw,0) scale(1.2); } }

/* dark-section variant of orb blends with screen */
.orb-field--dark .orb { mix-blend-mode: screen; filter: blur(60px); opacity: 0.6; }

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 168px); }
.dark-section { background: var(--dark); color: var(--on-dark); }
.dark-section h1, .dark-section h2, .dark-section h3 { color: var(--on-dark); }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: var(--on-dark); padding-block: clamp(60px,8vw,110px); position: relative; overflow: hidden; }
.footer a:hover { color: var(--sage); }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; gap: clamp(28px,4vw,56px); padding-bottom: 56px; }
.footer__nav, .footer__contact { display: flex; flex-direction: column; gap: 12px; }
.footer__label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark-soft); margin-bottom: 6px; }
.footer__email { font-family: var(--display); font-size: clamp(1.1rem,1.6vw,1.4rem); font-weight: 700; }
.footer__base { display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.14); font-size: 13px; color: var(--on-dark-soft); }
@media (max-width: 980px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer__inner { grid-template-columns: 1fr; } }

/* ---------- Sub-page hero and closing (redesign) ---------- */
.page-hero {
  background: var(--canvas);
  color: var(--ink);
  padding-top: 20vh;
  padding-bottom: clamp(48px, 8vh, 110px);
}
.page-hero h1 { max-width: 14ch; }
.page-hero__lead { margin-top: clamp(36px, 6vh, 72px); max-width: 44ch; }

.page-close {
  background: var(--canvas);
  color: var(--ink);
  padding-block: clamp(88px, 16vh, 220px);
}
.page-close__line { margin-bottom: clamp(28px, 5vh, 56px); }
.page-close__body { max-width: 56ch; margin-bottom: clamp(28px, 5vh, 56px); }
.page-close__link { display: block; color: var(--ink); }
.page-close__link .reveal-line > span {
  text-decoration: underline;
  text-decoration-color: rgba(11, 16, 11, 0.25);
  text-decoration-thickness: 0.045em;
  text-underline-offset: 0.1em;
  transition: text-decoration-color .3s var(--ease);
}
.page-close__link:hover .reveal-line > span { text-decoration-color: var(--lime); }

/* ---------- Quiet single-row footer ---------- */
.site-foot { background: var(--canvas); color: var(--ink); border-top: 1px solid var(--line); }
.site-foot__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding-block: 26px;
}
.site-foot__pages, .site-foot__legal { display: flex; gap: clamp(14px, 2vw, 28px); flex-wrap: wrap; }
.site-foot a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.site-foot a:hover { text-decoration: underline; text-decoration-color: var(--lime); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; border-block: 1px solid var(--line); }
.marquee__track { display: inline-flex; gap: 48px; padding-block: 16px; animation: marquee 60s linear infinite; }
.marquee__track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee__track span::after { content: "·"; color: var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- Hero word cycler ---------- */
.cycle-word {
  display: inline-block;
  color: var(--accent);
  transition: transform .42s var(--ease), opacity .42s var(--ease), filter .42s var(--ease);
}
.cycle-word.is-out { opacity: 0; transform: translateY(-0.32em) skewY(-4deg); filter: blur(6px); }
.cycle-word.is-in  { animation: wordIn .5s var(--ease); }
@keyframes wordIn {
  from { opacity: 0; transform: translateY(0.4em) skewY(4deg); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- Mobile drawer ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 99;
  background: var(--dark); color: var(--on-dark);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform .55s var(--ease);
}
.drawer.open { transform: none; }
.drawer a { font-family: var(--display); font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 700; padding-block: 6px; }
body.no-scroll { overflow: hidden; }

/* ---------- Utility ---------- */
.muted { color: var(--ink-soft); }
.on-dark-soft { color: var(--on-dark-soft); }
.tabular { font-variant-numeric: tabular-nums; }
.grid { display: grid; }
.flex { display: flex; }
.placeholder {
  background:
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink) 5%, transparent) 0 12px, transparent 12px 24px),
    var(--canvas-2);
  border: 1px solid var(--line);
  display: grid; place-content: center;
  color: var(--ink-soft);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px; letter-spacing: 0.05em;
  text-align: center;
  border-radius: var(--radius);
}

/* ---------- Footer legal links ---------- */
.footer__legal { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); flex-wrap: wrap; }
.footer__legal a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(238,243,236,0.28); }
.footer__legal a:hover { text-decoration-color: var(--sage); }

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: var(--gutter); right: var(--gutter); bottom: clamp(16px, 3vw, 28px);
  z-index: 200;
  max-width: 780px; margin-inline: auto;
  background: var(--dark); color: var(--on-dark);
  border: 1px solid rgba(238,243,236,0.16);
  border-radius: 18px;
  box-shadow: 0 30px 70px -28px rgba(2,12,7,0.72);
  padding: clamp(18px, 2.2vw, 26px) clamp(20px, 2.6vw, 30px);
  transform: translateY(160%); opacity: 0;
  transition: transform .55s var(--ease), opacity .45s var(--ease);
}
.cookie-banner.is-visible { transform: none; opacity: 1; }
.cookie-banner.is-leaving { transform: translateY(160%); opacity: 0; }
.cookie-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: clamp(16px, 2.6vw, 36px); flex-wrap: wrap; }
.cookie-banner__text { flex: 1 1 320px; min-width: 240px; margin: 0; font-size: 14px; line-height: 1.55; color: var(--on-dark-soft); }
.cookie-banner__text a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner__text a:hover { color: #fff; }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner .btn { padding: 12px 22px; font-size: 14px; }
.btn--ghost-dark { border-color: rgba(238,243,236,0.4); color: var(--on-dark); background: transparent; }
.btn--ghost-dark:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
@media (max-width: 560px) {
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { flex: 1; justify-content: center; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn {
    display: inline-flex; align-items:center; justify-content:center;
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid var(--line); background: transparent; cursor: pointer;
  }
  .nav-cta { gap: 10px; }
  .nav-cta .btn--solid { padding: 11px 16px; font-size: 14px; gap: 0; }
  .nav-cta .btn--solid .dot { display: none; }
}
