:root {
  /* greens picked from a reference moodboard so they all belong to one family */
  --bg: #0b170d;        /* warm deep forest: page, hero, footer */
  --surface: #1d3a1c;   /* forest: image placeholders */
  --ink: #f3f0ec;       /* warm off-white text */
  --muted: #a9b59a;     /* warm sage-grey secondary text */
  --sage: #8e9e80;      /* softer sage for the About intro */
  --lime: #3ccf5c;      /* accent: the one bright green (name kept as --lime so nothing else needs renaming) */
  --line: rgba(243, 240, 236, .22);
  --pad: clamp(20px, 4.5vw, 48px);
  --sans: "Inter", system-ui, sans-serif;
  --serif: "Bricolage Grotesque", Inter, sans-serif;   /* highlight font (name kept as --serif) */
  /* TYPE: six styles in total, used everywhere (sizes from the original Webflow site)
     display = big headlines · title = project titles, About headings and intro · body = paragraphs
     label = small uppercase info · action = uppercase links (nav, footer, project links) · highlight = lime phrases */
  --t-display: clamp(40px, 6.25vw, 80px);
  --t-title: clamp(24px, 2.5vw, 32px);
  --t-body: clamp(17px, 1.6vw, 20px);
  --t-label: 14px;
  --f-display: 300 var(--t-display)/1 var(--sans);
  --f-title: 300 var(--t-title)/1.25 var(--sans);
  --f-body: 300 var(--t-body)/1.45 var(--sans);
  --f-label: 500 var(--t-label)/1.4 var(--sans);
  --f-action: 500 15px/1.5 var(--sans);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
html, body { overflow-x: clip; }
body { background: var(--bg); color: var(--ink); font: var(--f-body); }
/* the six styles */
.hero h1, .quote { font: var(--f-display); letter-spacing: -.06em; }
.p-title, .row h2, .intro-text, .intro-photo strong { font: var(--f-title); letter-spacing: -.02em; }
.hero p, .p-desc, .row > div, footer { font: var(--f-body); }
.label, .status, .cv-item small, .slide.ph, .photo { font: var(--f-label); letter-spacing: .06em; text-transform: uppercase; }
.nav, .nav .brand, footer a.l, .more, .links a, .skip, dialog button { font: var(--f-action); letter-spacing: .04em; text-transform: uppercase; }
.accent { font-family: var(--serif); font-weight: 400; letter-spacing: -.03em; color: var(--lime); }
b, strong { font-weight: 600; }
a { color: inherit; }
a:focus-visible, button:focus-visible, .slides:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------- nav ---------- */
/* see-through at the top of the page; a frosted dark bar once you scroll (like the original Webflow nav) */
.nav { position: sticky; top: 0; z-index: 10; height: 60px; margin-bottom: -60px; display: flex; align-items: center; gap: 28px;
       padding: 0 var(--pad);
       background: transparent; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s, transform .35s ease; }
.nav.away { transform: translateY(-100%); }   /* slid up out of view while scrolling down */
.nav.scrolled { background: rgba(11, 23, 13, .72); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom-color: var(--line); }
.nav .brand { margin-right: auto; white-space: nowrap; }
.nav a { text-decoration: none; padding: 6px 0; }
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--lime); }
.nav .brand:hover { text-decoration: none; color: var(--lime); }

/* ---------- views ---------- */
.view { display: none; }
.view.active { display: block; }

/* ---------- hero ---------- */
/* like the original Webflow hero: full screen, ASCII flowers bottom-left, soft light fade at the bottom */
.hero { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
        min-height: 100svh; padding: calc(60px + clamp(32px, 5vw, 64px)) var(--pad) 64px;
        position: relative; isolation: isolate; background: #010f09; }
/* the ASCII flowers sit on their own layer so their opacity can change with scrolling (--art, 0–1, set by the motion script) */
.hero::before, .hero::after, footer::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero::before { opacity: var(--art, 1);
                background: linear-gradient(rgba(1, 15, 9, .35), rgba(1, 15, 9, .35)), url("assets/hero-image.png") -15% 100% / auto 80% no-repeat; }
.hero::after { background: linear-gradient(rgba(0, 0, 0, 0), rgba(255, 255, 255, .1)); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .hero::before { background-attachment: scroll, fixed; } }
.hero p { max-width: 640px; margin: 24px auto 0; }
.status { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; align-items: center; margin-top: 26px; }
.status a { white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); }
.status a { text-underline-offset: 4px; }

/* ---------- project sections ---------- */
/* each project sits on its own colour, based on the original Webflow site, with off-white text (--ink).
   colours are darkened where needed so the text stays readable (at least 5:1 contrast). */
.project { --fg: var(--ink); padding: clamp(48px, 6vw, 80px) var(--pad); background: var(--pc); color: var(--fg); }
.project.dark { --fg: var(--ink); }
.project .label { color: inherit; }
.project a:focus-visible, .project button:focus-visible, .project .slides:focus-visible { outline-color: var(--fg); }
/* layout: title (left) and description (right) first, images below, so you know what you're looking at.
   On phones: title, images, then description. */
.project .inner { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
                  column-gap: clamp(20px, 4vw, 64px); grid-template-areas: "head desc" "media media" "grid grid"; }
.p-head { grid-area: head; } .p-desc { grid-area: desc; } .project .grid { grid-area: grid; }
.p-media { grid-area: media; margin-top: clamp(28px, 3vw, 40px); }
.project .inner > * { min-width: 0; }

/* hero image / carousel: one image at a time on the project's colour, nothing cropped */
/* the box takes the shape of the project's images (--fr = width ÷ height, set per project with "shape"),
   so there are no empty bands above and below; it never gets taller than about the screen */
.frame { --fr: 1.7778; position: relative; aspect-ratio: var(--fr); width: min(100%, calc(84svh * var(--fr)));
         background: var(--pc); border-radius: 4px; overflow: hidden; }
.slides { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; }
/* pinned to the frame so tall and square images shrink to fit instead of being cut off */
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.slide.ph { color: rgba(255, 255, 255, .7); }
.project.dark .slide.ph { color: rgba(255, 255, 255, .7); }
.arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0;
         background: rgba(11, 23, 13, .72); color: var(--ink); font: 400 20px/1 var(--sans); cursor: pointer; opacity: 0; transition: opacity .2s; }
.arrow.prev { left: 14px; } .arrow.next { right: 14px; }
.frame:hover .arrow, .arrow:focus-visible { opacity: 1; }
@media (hover: none) { .arrow { opacity: 1; } }
.seg { display: flex; gap: 6px; margin-top: 8px; }
.seg button { all: unset; position: relative; flex: 0 1 56px; height: 14px; cursor: pointer; }
.seg button::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: currentColor; opacity: .3; }
.seg button[aria-current="true"]::after { opacity: 1; }
.seg button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------- hover: everything clickable reacts ---------- */
/* text links on dark green turn bright green; links on project colours get a thicker underline (green would be hard to read there) */
.nav a, .links a, footer a.l, .status a, .more, dialog button { transition: color .2s, text-decoration-thickness .2s, text-underline-offset .2s; }
@media (hover: hover) {
  .nav a:hover, .links a:hover, footer a.l:hover, .status a:hover, dialog button:hover { color: var(--lime); }
  .more:hover { text-decoration-thickness: 3px; text-underline-offset: 8px; }
  /* pictures grow very slightly inside their frame */
  .slide img, .tile img { transition: transform .35s ease; }
  .slide img:hover, .tile:hover img { transform: scale(1.025); }
  .arrow:hover { background: var(--lime); color: var(--bg); }
  .seg button:hover::after { opacity: .7; }
}

/* title row: name + subtitle on the left, description on the right */
.p-tags { margin-top: 14px; }
.p-tags span + span::before { content: "·"; margin: 0 8px; }
.p-desc p { max-width: 60ch; }
.p-desc p + p { margin-top: 1em; }
.more { display: inline-block; margin-top: 22px; color: inherit; text-underline-offset: 5px; }
.label { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.project .grid { margin-top: 32px; }

/* masonry gallery for poster-like sets: natural aspect ratios */
.grid { columns: 4; column-gap: 10px; }
.grid.few { columns: 3; }
.grid .slide { display: block; height: auto; break-inside: avoid; margin-bottom: 10px; }
.grid .slide img { position: static; width: 100%; height: auto; aspect-ratio: var(--ratio, auto); object-fit: cover; }
.grid .slide.ph { aspect-ratio: 3 / 4; display: grid; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .6); }

/* ---------- about ---------- */
.about { padding: 0 var(--pad); max-width: 1240px; margin: 0 auto; }
.row { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 5vw, 64px); padding: 64px 0 0; }
.intro { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr); gap: clamp(20px, 3vw, 48px);
         padding: calc(60px + clamp(56px, 8vw, 112px)) 0 8px; align-items: stretch; }
.intro-text { color: var(--sage); }
.intro-text b { color: var(--ink); }
.intro-text p + p { margin-top: 1.1em; }
.intro-text .eyebrow { font: 400 calc(var(--t-display) * .65)/1 var(--serif); letter-spacing: -.03em; color: var(--lime); margin-bottom: .5em; }
.intro-photo { margin: 0; align-self: start; max-width: 480px; }
.photo { position: relative; aspect-ratio: 4 / 5; background: var(--surface); display: grid; place-content: center; color: var(--muted); overflow: hidden; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: grayscale(1) contrast(1.05); }
.intro-photo figcaption { margin-top: 14px; }
.intro-photo strong { display: block; }
.intro-photo span { display: block; margin-top: 6px; }
.cv-item { margin-bottom: 18px; }
.cv-item small { display: block; margin-top: 2px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.links a { text-underline-offset: 4px; }

/* archive: one row of images that drifts sideways forever (moved by the script below).
   Hover or touch stops it; drag, swipe, trackpad or Shift + mouse wheel scrolls it by hand. */
.arch-intro p { max-width: 44ch; }
.marquee { --th: clamp(150px, 20vw, 260px); width: 100vw; margin: 40px calc(50% - 50vw) 88px; padding: 4px 0;
           overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; cursor: grab; }
.marquee::-webkit-scrollbar { display: none; }
.marquee.dragging, .marquee.dragging .tile { cursor: grabbing; user-select: none; }
.marquee-track { display: flex; gap: 12px; width: max-content; padding: 0 var(--pad); }
.tile { all: unset; box-sizing: border-box; flex: none; height: var(--th); aspect-ratio: var(--ar); background: var(--surface);
        border-radius: 4px; overflow: hidden; cursor: zoom-in; }
.tile:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
/* reduced motion: no drifting and no second copy; the row only moves when you scroll it */
@media (prefers-reduced-motion: reduce) {
  .marquee .tile[aria-hidden="true"] { display: none; }
}

dialog { border: 0; background: transparent; margin: auto; max-width: min(94vw, 1400px); max-height: 92vh; color: var(--ink); }
dialog::backdrop { background: rgba(11, 23, 13, .92); }
dialog .frame { aspect-ratio: auto; width: auto; display: grid; place-content: center; background: none; border-radius: 4px; overflow: hidden; }
dialog img { max-height: 84vh; max-width: 100%; width: auto; margin: auto; }
dialog button { all: unset; display: block; margin: 0 0 12px auto; cursor: pointer; padding: 4px 8px; }
dialog button:focus-visible { outline: 3px solid var(--lime); }

/* ---------- footer ---------- */
/* like the original: soft light fade at the top, then the quote over the ASCII flowers (mirrors the hero) */
footer { background: #010f09; position: relative; isolation: isolate; }
footer .wrap { max-width: 1240px; margin: 0 auto; }
.foot-info { padding: clamp(56px, 6vw, 80px) var(--pad) 0;
             /* soft light at the top, and solid dark that fades away so the flowers show through lower down */
             background: linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, 0)), linear-gradient(#010f09 30%, rgba(1, 15, 9, 0)); }
footer .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(24px, 4vw, 64px); }
footer h2 { margin-bottom: 14px; }
footer p { max-width: 44ch; }
footer p + p { margin-top: 12px; }
footer a.l { display: block; width: fit-content; margin-top: 10px; text-underline-offset: 4px; }
footer a.l:first-of-type { margin-top: 0; }
.foot-quote { padding: clamp(80px, 10vw, 140px) var(--pad) clamp(40px, 5vw, 64px); text-align: center; }
/* the flowers sit behind the whole footer, so the fading top section reveals them */
footer::before { opacity: var(--art, 1);
                      background: linear-gradient(rgba(1, 15, 9, .35), rgba(1, 15, 9, .35)), url("assets/hero-image.png") 0 100% / auto 50% no-repeat; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { footer::before { background-attachment: scroll, fixed; } }
.quote .accent { display: block; font-style: normal; }
.legal { display: grid; gap: 10px; justify-items: center; margin-top: clamp(32px, 4vw, 48px); }

/* ---------- motion (GSAP, see the script at the end) ----------
   Only active with the "motion" class, which is skipped for people who ask their device for less motion
   and removed again if GSAP fails to load, so nothing ever stays hidden. */
.motion #projects .project, .motion #projects .frame { background: transparent; }   /* one shared colour that blends */
.motion .hero h1, .motion .hero > p, .motion .hero .status { visibility: hidden; }   /* revealed by the intro */
.motion .hero h1 > div { padding-bottom: .14em; margin-bottom: -.14em; }   /* room for "g" while the lines slide in */

/* skip link: hidden until the first Tab press, then shows in the top-left corner */
.skip { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 16px; background: var(--lime); color: var(--bg);
        border-radius: 4px; transform: translateY(-200%); }
.skip:focus { transform: none; }
main:focus { outline: none; }

/* ---------- case study page (see-the-good.html) ---------- */
/* reuses the project layout: each section is a .inner grid (heading left, text right, pictures below) */
.case { padding-top: calc(60px + clamp(48px, 6vw, 80px)); }
.case .inner + .inner { margin-top: clamp(64px, 8vw, 112px); }
.case .p-media img { width: 100%; height: auto; border-radius: 6px; }
.case .gallery { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.case .gallery .wide { grid-column: 1 / -1; }
.case figcaption { margin-top: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .nav { gap: 18px; }
  .row, footer .cols, .intro { grid-template-columns: minmax(0, 1fr); }
  .project .inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "media" "desc" "grid"; }
  .p-media { margin-top: 24px; } .p-desc { margin-top: 24px; }
  .arrow { display: none; }   /* phones swipe; the arrows only covered the image */
  .grid, .grid.few { columns: 2; }
  .case .gallery { grid-template-columns: minmax(0, 1fr); }
  .case .inner { grid-template-areas: "head" "desc" "media"; }   /* on the case page the story reads first, then the pictures */
}
