/* ==========================================================================
   CHRISGASCOINE.COM — styles.css
   Everything you'd want to restyle lives in the :root token block below.
   Change a value there and it flows through the whole site, both themes.
   ========================================================================== */

/* ---------- 1 · DESIGN TOKENS — edit here first ---------- */
:root {
  /* Light theme (default) */
  --paper:    #FAF7F2;   /* page background */
  --ink:      #141412;   /* primary text */
  --muted:    #6E6A63;   /* secondary text */
  --hairline: #E3DFD7;   /* rules and borders */
  --brass:    #8A6D3B;   /* the one accent */

  /* Type */
  --serif: "Fraunces", Georgia, serif;            /* headings + logotype */
  --grot:  "Inter", "Helvetica Neue", Arial, sans-serif;  /* everything else */

  /* Scale */
  --display: clamp(3.4rem, 10vw, 7.5rem);  /* the name */
  --title:   clamp(1.6rem, 3vw, 2.2rem);   /* section titles */
  --body:    1.0625rem;                    /* 17px */
  --small:   0.8125rem;                    /* 13px nav/captions */

  /* SPACE — ONE SCALE. Every gap on the site is a step on this ladder and
     nothing else. The steps follow a Fibonacci-ish progression (1,2,3,5,8,13)
     off an 8px unit, which is what gives editorial pages their even rhythm:
     related things sit a step apart, unrelated things three steps apart. */
  --u:  8px;
  --s1: calc(var(--u) * 1);    /*   8 — inside a single element        */
  --s2: calc(var(--u) * 2);    /*  16 — label to its own value         */
  --s3: calc(var(--u) * 3);    /*  24 — between images in a grid       */
  --s4: calc(var(--u) * 5);    /*  40 — label to the block it heads    */
  --s5: calc(var(--u) * 8);    /*  64 — between blocks in a section    */
  --s6: calc(var(--u) * 13);   /* 104 — between groups                 */
  --section-gap: clamp(104px, 14vh, 168px);  /* between sections — s6 to s6+ */
  --maxw: 1140px;

  /* THE GRADE — now baked into the image files themselves, not faked in CSS.
     Every black-and-white photo has been matched to the same house look:
       · mono, black and white points clipped at 0.25%
       · every image pulled to the same mid-tone (mean 0.43)
       · a gentle filmic S-curve
       · matte blacks (5%) and highlights held just below white (97%)
     So this filter stays neutral. Use it only for a global tweak on top —
     e.g. contrast(1.04) to harden everything at once, or
     sepia(0.2) for a warm duotone across the whole set. */
  --grade: none;

  /* The hero carries its own, softer treatment — deliberately gentler than the
     plates below it, so the opening image reads as atmosphere rather than statement. */
  --grade-hero: saturate(0.8) contrast(1.02);   /* hero stays in colour */
}

/* Dark theme — flips automatically with the system, or via the toggle */
:root[data-theme="dark"] {
  --paper:    #0F0E0D;
  --ink:      #ECE8E1;
  --muted:    #8B867D;
  --hairline: #26241F;
  --brass:    #A98B54;   /* brass lifted for dark ground */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:    #0F0E0D;
    --ink:      #ECE8E1;
    --muted:    #8B867D;
    --hairline: #26241F;
    --brass:    #A98B54;
  }
}

/* ---------- 2 · BASE ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--grot);
  font-size: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 400ms ease, color 400ms ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* The only link style on the site: text with a brass underline on hover */
.link {
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, color 200ms ease;
}
.link:hover { border-bottom-color: var(--brass); color: var(--brass); }

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

/* Small uppercase label — section numbers, nav, captions */
.label {
  font-size: var(--small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s4);   /* was zero — labels sat on top of their content */
}

/* ---------- 3 · NAV ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  color: #fff;  /* over the hero */
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
  transition: background 300ms ease, color 300ms ease, box-shadow 300ms ease;
}
nav.solid {  /* once scrolled past the hero — added by the script */
  background: var(--paper); color: var(--ink); text-shadow: none;
  box-shadow: 0 1px 0 var(--hairline);
}
nav .logotype { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; letter-spacing: 0.14em; text-transform: uppercase; }
nav ul { display: flex; gap: 28px; list-style: none; align-items: center; }
nav a, nav button {
  font-size: var(--small); letter-spacing: 0.08em; text-transform: uppercase;
  background: none; border: none; color: inherit; cursor: pointer; font-family: var(--grot);
}
@media (max-width: 640px) {
  nav ul li.hide-sm { display: none; }
  nav { padding: 14px 18px; }
  nav .logotype { font-size: 0.82rem; letter-spacing: 0.1em; white-space: nowrap; }
  nav ul { gap: 18px; }
}

/* ---------- 4 · 01 OPENING — FULL-BLEED HERO ----------
   Swap the image below. background-position controls the crop: the second value
   moves the frame up and down (lower % = show more of the top of the photo). */
header.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; }
header.hero .bg {
  position: absolute; inset: 0;
  background-image: url("images/hero.jpg");
  background-size: cover; background-position: center 45%;
  filter: var(--grade-hero);
}
header.hero .scrim {  /* keeps the name legible without dirtying the photo */
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 38%, rgba(0,0,0,0.58) 100%);
}
header.hero .wrap { position: relative; padding-bottom: 9vh; color: #fff; width: 100%; }
h1 {
  font-family: var(--serif); font-weight: 300;
  font-size: var(--display); line-height: 1.02; letter-spacing: 0.01em;
}
.hero .strap { margin-top: var(--s2); font-size: 1.05rem; color: rgba(255,255,255,0.85); max-width: 34em; }

/* ---------- 5 · SECTIONS ---------- */
section { padding-top: var(--section-gap); }
section:last-of-type { padding-bottom: var(--section-gap); }
h2.section-title {
  font-family: var(--serif); font-weight: 400; font-size: var(--title);
  margin: 10px 0 40px;
}

/* 01 Photographs — editorial gallery
   Two rules make this read as composed rather than collected:
   1. ONE grade on every image (--grade) — mixed colour is what looked random.
   2. FIXED proportions — each photo is cropped to a set shape, so edges always
      line up. Tag any <img> .wide (2 cols, 16:9), .tall (1 col, 4:5) or
      .square (1 col, 1:1) and the layout holds whatever you swap in. */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.gallery img { width: 100%; height: 100%; object-fit: cover; filter: var(--grade); }
.gallery .wide   { grid-column: span 2; aspect-ratio: 16 / 9; }
.gallery .tall   { aspect-ratio: 4 / 5; }
.gallery .square { aspect-ratio: 1 / 1; }
.gallery .hold   { display: block; }   /* deliberate empty cell */
@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery .wide { grid-column: span 1; }
  .gallery .hold { display: none; }
}

/* Listen — an art-gallery grid. Every tile is the same square, two across,
   so the artwork is the whole point and the text stays out of the way. The
   featured tile carries a slim play bar; the rest link out. */
.releases {
  list-style: none;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--s5) var(--s3);
  align-items: start;
}
.releases img, .releases .art {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  filter: var(--grade-hero);          /* artwork keeps its own colour */
  transition: opacity 250ms ease;
}
.releases .art--left { object-position: left center; }  /* keeps the Semi-detached title in frame */
.releases a:hover img { opacity: 0.72; }
.releases iframe { width: 100%; height: 152px; border: 0; display: block; margin-top: var(--s2); }
.releases a { display: block; }
.releases .cap { margin-top: var(--s2); font-size: var(--small);
                 letter-spacing: 0.04em; color: var(--muted); }
@media (max-width: 640px) { .releases { grid-template-columns: 1fr; } }

/* Selected work (parked) — magazine index: hairline rows */
.worklist { border-top: 1px solid var(--hairline); }
.worklist .row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--hairline);
}
.worklist .what { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; }
.worklist .detail { color: var(--muted); font-size: 0.95rem; text-align: right; }
@media (max-width: 640px) {
  .worklist .row { grid-template-columns: 1fr; gap: 4px; }
  .worklist .detail { text-align: left; }
}

/* Full-bleed image divider */
.divider {
  margin-top: var(--section-gap);
  height: 72svh; overflow: hidden;
}
.divider img { width: 100%; height: 100%; object-fit: cover; filter: var(--grade); }

/* 03 Projects index */
.projects { list-style: none; }
.projects li { padding: 16px 0; border-bottom: 1px solid var(--hairline); font-family: var(--serif); font-size: 1.2rem; }
.projects li:first-child { border-top: 1px solid var(--hairline); }
.projects .dash { color: var(--muted); font-family: var(--grot); font-size: 0.95rem; }
.projects .go { color: var(--brass); font-family: var(--grot); font-size: 0.9rem; white-space: nowrap; margin-left: 10px; }

/* About — candid portrait above, prose beneath at a readable measure */
.about-grid { display: grid; gap: var(--s5); }
.about-grid img { width: 100%; max-width: 760px; filter: var(--grade); }
.about-prose { max-width: 34em; }
.about-prose p { margin-bottom: 0; }

@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- 6 · 05 FOOTER ---------- */
footer {
  border-top: 1px solid var(--hairline);
  margin-top: var(--section-gap);
  padding: var(--s6) 0 var(--s5);
}
footer .logotype { font-family: var(--serif); letter-spacing: 0.14em; text-transform: uppercase; font-size: 1rem; margin-bottom: var(--s5); }

/* Role-based contacts — a grid of doors, not a list of names */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: var(--s5) var(--s5); }
.contacts dt { font-size: var(--small); letter-spacing: 0.08em; text-transform: uppercase;
               color: var(--muted); margin-bottom: var(--s1); }
.contacts dd { font-family: var(--serif); font-size: 1.05rem; }
.contacts .proof { font-family: var(--grot); font-size: 0.8rem; line-height: 1.5;
                   color: var(--muted); margin-top: var(--s1); max-width: 26em; }

/* ---------- 7 · MOTION — the one rule ---------- */
.fade { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease, transform 600ms ease; }
.fade.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade { opacity: 1; transform: none; transition: none; } }


/* ---------- PARKED: the slit hero ----------
   To go back: remove class "split" from <header class="hero split"> and delete
   the <figure class="hero-figure"> block, wrap the name in <div class="wrap">,
   add <div class="bg"></div><div class="scrim"></div>, and un-comment this.

header.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; }
header.hero .bg {
  position: absolute; inset: 0;
  background-image: url("images/hero.jpg");
  background-size: cover; background-position: center 38%;
  filter: var(--grade-hero);
}
header.hero .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 38%, rgba(0,0,0,0.58) 100%);
}
header.hero .wrap { position: relative; padding-bottom: 9vh; color: #fff; width: 100%; }
.hero .strap { color: rgba(255,255,255,0.85); }
---------- END PARKED ---------- */
