/* =====================================================================
   styles.css  —  NewPortfolio26
   Hero reconstructed to match the original hirevivi Webflow layout and
   load animation exactly (10-column x 10-row grid; only the photo
   animates: height 0 -> full over 500ms on load), laid OVER a Unicorn
   Studio animated background. A content panel scrolls up and overlaps.

   NOTE ON COLOR: the original sat on a white page with dark (#1e1e1e)
   text and #4222f1 purple. Over the dark animation those would be
   unreadable, so text is light and the purple is lightened to #b3a5ff.
   That color shift is the one intentional deviation from "exact".
   ===================================================================== */


/* ---------------------------------------------------------------------
   BASE + TOKENS
   --------------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "tablet-gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Inline text link: no underline, brand green, bold. Apply manually as
   class="inline-link" on any <a> inside body copy. */
.inline-link {
  color: #0ae448;
  font-weight: 700;
  text-decoration: none;
}
.inline-link:focus-visible {
  outline: 2px solid #0ae448;
  outline-offset: 2px;
}

:root {
  --brand: #b3a5ff;   /* lightened from the original #4222f1 for dark-bg contrast */
  --pill-fill: #d6f0da; /* warm cream: nav pill fill on hover/focus */
  --pill-ink:  #0e0f10; /* dark text inside a filled pill */
  --cta-accent: #0ae448; /* bright green: Open Portfolio outline/fill */
  --cta-ink:    #0e0f10; /* dark text inside the CTA when inverted */
  --tertiary:   #a899f6; /* purple: tertiary links / CTAs (.cs-links) */
  --subnav-ink:  #fffce1; /* subnav: muted default text */
  --subnav-hot:  #0ae448; /* subnav: hover + active text (same green as --cta-accent) */
  --subnav-line: #63d55a; /* subnav: active underline */
  --panel: #1e1e24;
  --paper: #fbfbfb;
  --nav-h: 62px;        /* approx top-nav height; the sticky subnav offsets by this */

  --display: "titling-gothic-fb", "Arial Narrow", Impact, sans-serif;
  --label:   "tablet-gothic-semi-condensed", "Arial Narrow", sans-serif;
  --body:    "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; /* Google font for body copy */
  --mono:    "M PLUS Code Latin", ui-monospace, "SFMono-Regular", Menlo, monospace; /* mono for work labels */
}


/* ---------------------------------------------------------------------
   STAGE  —  first viewport: hero OVER the animation
   --------------------------------------------------------------------- */
.stage-wrap { position: relative; }

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; background: #000; }
.hero-bg [data-us-project] { width: 100% !important; height: 100% !important; }

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.45));
  pointer-events: none;
}


/* ---------------------------------------------------------------------
   HERO GRID  —  the exact original main-structure grid
   --------------------------------------------------------------------- */
.wf-hero {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns:
    minmax(auto, 40px) 0.3fr 0.25fr 1fr 0.5fr 0.5fr 1fr 0.25fr 0.3fr minmax(auto, 40px);
  grid-template-rows:
    minmax(auto, 60px) 72px minmax(auto, 80px) minmax(60px, auto) minmax(auto, 80px) 20px auto auto auto 1fr;
  /* last row is 1fr: it soaks up leftover height on tall/wide screens so the
     title, bio, and email stay near the top instead of drifting to the bottom.
     The photo (rows 2-11) still spans into this row, so it stays full height. */
}

/* --- Nav: full-width row 1, three flex zones, links stacked top-right --- */
.wf-nav {
  grid-column: 1 / 11;
  grid-row: 1 / 2;
  display: flex;
  align-items: flex-start;
  padding: 20px 40px;
  position: relative;
}
.nav-left  { flex: 1 1 auto; }        /* empty zone soaks up the spare width */
.nav-right { flex: 0 0 auto; }        /* links keep their natural size */
.nav-logo {
  position: absolute;                 /* centered independently of the two sides */
  left: 50%;
  top: 20px;
  transform: translateX(-50%);
  font-family: var(--label);
  color: var(--brand);
  letter-spacing: 0.2em;
}
.nav-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}
/* Pill buttons: dark with a light outline by default, filled cream on
   hover/focus (like the GSAP reference). */
.nav-right a {
  display: inline-block;
  font-family: var(--label);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: #1e1e24;           /* subtle fill so the outline reads over bright frames */
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;                       /* full pill */
  padding: 8px 12px;
  line-height: 1;
  white-space: nowrap;                        /* keep the label on one line */
  flex: 0 0 auto;                             /* never shrink below content width */
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
/* Hover and focus share the filled state */
.nav-right a:hover,
.nav-right a:focus-visible {
  background: var(--pill-fill);
  border-color: var(--pill-fill);
  color: var(--pill-ink);
}
/* Keep a clear keyboard focus ring on top of the fill */
.nav-right a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* --- Open Portfolio CTA: own line below the bio, right-aligned --- */
.wf-cta {
  grid-column: 4 / 6;      /* same columns as the bio */
  grid-row: 9 / 10;        /* its own line, directly below the bio (row 8) */
  align-self: start;
  text-align: right;       /* push the link to the right edge of the column */
  padding-right: 40px;     /* match .wf-bio's right padding so the edges line up */
  margin-top: 16px;
}
.wf-cta a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: #fff;
  background: #101012;                       /* dark fill */
  border: 2px solid var(--cta-accent);       /* green outline */
  border-radius: 999px;                      /* pill */
  padding: 12px 16px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
/* Circled arrow; borrows the current text color so it inverts too */
.wf-cta .cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}
/* Invert on hover/focus: green fill, dark text */
.wf-cta a:hover,
.wf-cta a:focus-visible {
  background: var(--cta-accent);
  border-color: var(--cta-accent);
  color: var(--cta-ink);
}
.wf-cta a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* --- VIDALMA: cols 3-8, row 3, letters spread edge to edge --- */
.wf-brand {
  grid-column: 3 / 9;
  grid-row: 3 / 4;
  display: flex;
  justify-content: space-between;
  align-self: center;
  position: relative;
  z-index: 2;              /* letters print over the photo, like the original */
}
.wf-brand span {
  font-family: var(--display);
  font-size: clamp(40px, 9vw, 100px);
  line-height: 1;
  font-weight: 700;
  color: #0ae448;
  text-transform: uppercase;
}

/* --- PROFILE PHOTO: cols 6-8, rows 2-10, top-anchored (as the live
       original renders). LOAD ANIMATION: height 0 -> full, 500ms. --- */
.hero-photo {
  grid-column: 6 / 9;
  grid-row: 2 / 11;
  align-self: start;              /* top-anchored: grows downward, like the original */
  height: 100%;
  margin: 36px 16px 0;
  position: relative;
  z-index: 1;                     /* below the brand letters */
  animation: hero-grow 500ms ease forwards;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 35%;       /* CROP: raise/lower this 2nd value to frame the face */
  display: block;
}
@keyframes hero-grow { from { height: 0; } to { height: 100%; } }

/* --- PRODUCT DESIGNER: cols 3-5, row 7 --- */
.wf-title {
  grid-column: 3 / 6;
  grid-row: 7 / 8;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 50px);
  line-height: 0.96;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  margin: 12px 0 20px;
}

/* --- Bio: cols 4-5, row 8, small uppercase (exact original scale) --- */
.wf-bio {
  grid-column: 4 / 6;
  grid-row: 8 / 9;
  align-self: start;
  font-family: var(--body);
  font-size: 20px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #eaeaea;
  padding-right: 40px;
}

/* --- Vertical email: left gutter (col 1), rotated --- */
.wf-email {
  grid-column: 1 / 2;
  grid-row: 7 / 10;
  align-self: center;
  justify-self: center;
}
.wf-email span {
  display: inline-block;
  transform: rotate(-90deg);
  white-space: nowrap;
  font-family: var(--label);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e5fcf2;
}

/* Respect reduced-motion: show the photo fully, no grow. */
@media (prefers-reduced-motion: reduce) {
  .hero-photo { animation: none; }
}


/* ---------------------------------------------------------------------
   CONTENT SECTION NAV  —  fades in on scroll, then stays pinned at the top
   of the content section (position: sticky). Reuses the .nav-right pill
   styles from the hero nav.
   --------------------------------------------------------------------- */
.content-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;

  background: var(--panel);                 /* covers content scrolling underneath */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /* fade-in state (JS adds .is-visible) */
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.content-nav.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* center the logo dash vertically within this shorter bar */
.content-nav .nav-logo {
  top: 50%;
  transform: translate(-50%, -50%);
}
/* Wordmark in the section nav: same face + color as the VIDALMA hero letters */
.content-nav .nav-left {
  display: flex;
  align-items: center;
}
.content-brand {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  color: #0ae448;               /* same green as .wf-brand span (the VIDALMA letters) */
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.08em;
}

/* Wordmark link wrapper: inherit the h1's look, drop default link styling
   (no underline, no link color) so the h1 stays exactly as designed. */
.content-nav .nav-left a {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.content-nav .nav-left a:focus-visible {
  outline: 2px solid var(--cta-accent);
  outline-offset: 3px;
}

/* Open Portfolio in the content nav: inherits the .nav-right pill SIZE
   (padding/font) so it matches the other items, but takes the hero CTA's
   green outline, and inverts to a green fill on hover/focus. */
.nav-right a.content-cta {
  border-color: var(--cta-accent);
}
.nav-right a.content-cta:hover,
.nav-right a.content-cta:focus-visible {
  background: var(--cta-accent);
  border-color: var(--cta-accent);
  color: var(--cta-ink);
}

/* Active nav item ("you are here"): solid green like the CTA hover, plus a
   4px white dot overlapping the top-left corner. Apply .is-active OR
   aria-current="page" to the pill for the current page. */
.nav-right a.is-active,
.nav-right a[aria-current="page"] {
  position: relative;                       /* anchor for the dot */
  background: var(--cta-accent);
  border-color: var(--cta-accent);
  color: var(--cta-ink);
}
.nav-right a.is-active::before,
.nav-right a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 4px;                                 /* nudge these to reposition the dot */
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);         /* center the dot on that point so it straddles the edge */
}

@media (prefers-reduced-motion: reduce) {
  .content-nav { transition: none; opacity: 1; transform: none; }
}


/* ---------------------------------------------------------------------
   SUBNAV  —  portfolio secondary nav (tabs)
   default: muted cream · hover/focus: green · active: green + underline
   --------------------------------------------------------------------- */
.subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 40px 0;
}
.subnav a {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  color: var(--subnav-ink);                 /* muted default */
  padding: 12px 14px;
  border-bottom: 2px solid transparent;     /* reserve space so active doesn't shift layout */
  transition: color 0.2s ease, border-color 0.2s ease;
}
.subnav a:hover,
.subnav a:focus-visible {
  color: var(--subnav-hot);                 /* green on hover/focus */
}
.subnav a:focus-visible {
  outline: 2px solid var(--subnav-hot);
  outline-offset: 3px;
}
.subnav a.is-active,
.subnav a[aria-current="page"] {
  color: var(--subnav-hot);                 /* green text */
  border-bottom-color: var(--subnav-line);  /* green underline */
}

/* Subnav sticks below the top nav on wider screens (>=761px). */
@media (min-width: 761px) {
  .subnav {
    position: sticky;
    top: var(--nav-h);
    z-index: 4;                              /* below the top nav (z-index 5) */
    background: var(--panel);                /* cover content scrolling underneath */
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}


/* ---------------------------------------------------------------------
   CONTENT PANEL  —  scrolls up and overlaps the pinned hero
   --------------------------------------------------------------------- */
.content {
  position: relative;
  z-index: 2;
  background: var(--panel);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.25);
  min-height: 100vh;
  padding: 96px 40px;
  border-radius: 28px 28px 0 0;
}
.content-inner { max-width: 900px; margin: 0 auto; }

/* Reusable section eyebrow/label. Element-agnostic: renders identically
   whether it's on a <p>, <h2>, <h3>, etc. (pins weight, line-height, and
   margins so a heading tag's browser defaults can't leak through). */
.section-title {
  margin: 0 0 20px;
  font-family: var(--label);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}

.about { margin-bottom: 112px;margin-top: 48px; max-width: 640px; }
.about h2 {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1;
  margin-bottom: 20px;
}
.about p { font-size: 1.15rem; line-height: 1.7; color: #d9d9de; margin-bottom: 16px; }

.blurb {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  
  border-radius: 18px;
  overflow: hidden;
}
.blurb-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.blurb-body { padding: 40px 40px 40px 8px; }
.blurb-body h3 {
  font-family: var(--display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 14px;
}
.blurb-body p { font-size: 1.05rem; line-height: 1.65; color: #d9d9de; margin-bottom: 22px; }
.blurb-link {
  font-family: var(--label);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  text-decoration: none;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 2px;
}
.blurb-link:hover { color: var(--brand); }
.blurb-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }


/* ---------------------------------------------------------------------
   CASE STUDIES  —  portfolio menu: image + linked title + one-liner
   --------------------------------------------------------------------- */
.case-studies {
  padding: 48px 40px;
}

/* Reusable grid-paper background: faint cell lines + plus marks at the
   intersections. Add class="grid-bg" to any container.
   Tune --grid-size (cell spacing) and --grid-color (line opacity). */
.grid-bg {
  --grid-color: rgba(255, 255, 255, 0.05);
  --grid-size: 300px;                 /* bigger squares — one number to tune */
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg stroke='%23ffffff' stroke-opacity='0.35' stroke-width='1.4'%3E%3Cpath d='M100 96v8'/%3E%3Cpath d='M96 100h8'/%3E%3C/g%3E%3C/svg%3E");
  background-size: var(--grid-size) var(--grid-size);
  /* Lines cross at the tile corners; shift the plus layer back half a cell
     so each plus sits exactly on an intersection instead of a cell center. */
  background-position:
    0 0,
    0 0,
    calc(var(--grid-size) / -2) calc(var(--grid-size) / -2);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 48px;
}
.case-study { display: flex; flex-direction: column; }

/* Thumbnail: near-black block with the category tag pinned top-right */
.case-thumb {
  position: relative;
  aspect-ratio: 16 / 11;
  background: #0a0a0c;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.case-study-img {
  width: 100%;
  height: 100%;
  object-fit: contain;              /* center the graphic like the reference */
  padding: 9%;
  display: block;
}
.case-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cta-ink);
  background: var(--cta-accent);
  padding: 4px 8px;
  line-height: 1;
}

/* Caption row: title (left) + year (right), mono */
.case-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.case-title {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.case-title a { color: var(--paper); text-decoration: none; }
.case-title a:hover { color: var(--cta-accent); }
.case-title a:focus-visible { outline: 2px solid var(--cta-accent); outline-offset: 3px; }
.case-year {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #8a8a92;
  white-space: nowrap;
}
.case-desc {
  font-family: var(--body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: #b9b9c0;
  margin: 8px 0 0;
  max-width: 48ch;
}


/* ---------------------------------------------------------------------
   PAGE-IN TRANSITION (grid-flavored)
   Green sweep wipes up to reveal the page, then the work cards wipe open
   left-to-right in a stagger.
   --------------------------------------------------------------------- */
.page-sweep {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--cta-accent);
  transform-origin: top;
  animation: page-sweep-out 0.6s cubic-bezier(0.7, 0, 0.2, 1) forwards;
  pointer-events: none;
}
@keyframes page-sweep-out {
  from { transform: scaleY(1); }
  to   { transform: scaleY(0); }
}

.case-grid .case-study {
  clip-path: inset(0 100% 0 0);   /* hidden, opens from the left */
  animation: card-wipe 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.case-grid .case-study:nth-child(1) { animation-delay: 0.50s; }
.case-grid .case-study:nth-child(2) { animation-delay: 0.62s; }
.case-grid .case-study:nth-child(3) { animation-delay: 0.74s; }
.case-grid .case-study:nth-child(4) { animation-delay: 0.86s; }
@keyframes card-wipe {
  to { clip-path: inset(0 0 0 0); }
}

/* Respect reduced-motion: no sweep, cards shown immediately */
@media (prefers-reduced-motion: reduce) {
  .page-sweep { display: none; }
  .case-grid .case-study { clip-path: none; animation: none; }
}


/* ---------------------------------------------------------------------
   PAGE CONTENT  —  reusable case-study / interior page scaffolding
   --------------------------------------------------------------------- */
.case-study-page { padding: 56px 40px; }
.page-title {
  font-family: var(--display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 24px;
}


/* ---------------------------------------------------------------------
   SITE FOOTER  —  reusable across pages
   --------------------------------------------------------------------- */
.site-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 28px 40px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #8a8a92;
 
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--cta-accent); }
.site-footer a:focus-visible { outline: 2px solid var(--cta-accent); outline-offset: 3px; }


/* ---------------------------------------------------------------------
   CASE STUDY  —  reusable page components (hero, sections, splits,
   figures, statement, panels, next-case, lightbox)
   --------------------------------------------------------------------- */
.cs-main { max-width: 1080px; margin: 0 auto; padding: 48px 40px 96px; }

/* Hero */
.cs-hero {
  padding:24px;
  margin-bottom: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
   background: #00030e;
}
.cs-meta {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a8a92;
  margin: 6px 0 0;
}
/* Tertiary link / CTA pill — reusable (case-study links and small CTAs).
   Default: purple outline + purple text. Hover/focus: inverts to a purple
   fill with dark text. */
.cs-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.cs-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tertiary);
  text-decoration: none;
  background: transparent;
  border: 1.5px solid var(--tertiary);
  border-radius: 999px;
  padding: 9px 18px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.cs-links a:hover, .cs-links a:focus-visible {
  background: var(--tertiary);
  border-color: var(--tertiary);
  color: var(--cta-ink);
}
.cs-links a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Sections + headings */
.cs-section { margin-bottom: 88px; }
.cs-section > *:last-child { margin-bottom: 0; }
.cs-subhead {
  font-family: var(--display);
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--paper);
  margin: 0 0 14px;
}
.cs-main p {
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: #c9c9d0;
  margin: 0 0 16px;
}
.cs-main p:last-child { margin-bottom: 0; }

/* Layout splits (all stack on small screens) */
.cs-2col, .cs-8020, .cs-6040, .cs-3col { display: grid; gap: 32px; }
.cs-2col { grid-template-columns: 1fr 1fr; }
.cs-8020 { grid-template-columns: 4fr 1fr; }
.cs-6040 { grid-template-columns: 3fr 2fr; align-items: center; }
.cs-3col { grid-template-columns: repeat(3, 1fr); }
.cs-2col, .cs-8020, .cs-6040, .cs-3col,
.cs-figure, .cs-statement, .cs-panel, .cs-surface, .cs-prose { margin-bottom: 40px; }

/* Aside facts (Role / Timeline / Tools) */
.cs-fact { display: flex; flex-direction: column; gap: 3px; margin-bottom: 18px; }
.cs-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}
.cs-fact span:last-child { font-family: var(--body); font-size: 0.95rem; color: #e0e0e6; }

/* Figures + captions (click to enlarge) */
.cs-figure { margin: 0 0 40px; }
.cs-figure img {
  width: 100%; height: auto; display: block;
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: zoom-in;
}
.cs-figure figcaption {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a8a92;
  margin-top: 10px;
}

/* Big statement / hypothesis */
.cs-statement {
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--paper);
  padding: 36px 40px;
  border-left: 3px solid var(--cta-accent);
  background: rgba(255, 255, 255, 0.03);
}

/* Bordered panel (pain points) + dark surface (final designs) */
.cs-panel { border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px; padding: 40px; }
.cs-surface { background: #0a0a0c; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 40px; }
.cs-panel > .cs-subhead, .cs-surface > .cs-subhead { margin-bottom: 28px; }
.cs-panel > *:last-child, .cs-surface > *:last-child { margin-bottom: 0; }

/* Next case study */
.cs-next {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
  padding-top: 56px;
  text-align: center;
}
.cs-next a { display: inline-block; text-decoration: none; color: var(--paper); }
.cs-next img {
  width: 340px; max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: block;
  margin: 20px auto 14px;
}
.cs-next-title {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(22px, 3vw, 30px);
}
.cs-next a:hover .cs-next-title { color: var(--cta-accent); }

/* Lightbox */
.cs-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; place-items: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.9);
}
.cs-lightbox.is-open { display: grid; }
.cs-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; }
.cs-lightbox-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; color: #fff;
  font-family: var(--mono); font-size: 26px; line-height: 1;
  padding: 8px; cursor: pointer;
}
.cs-lightbox-close:hover { color: var(--cta-accent); }
.cs-lightbox-close:focus-visible { outline: 2px solid var(--cta-accent); outline-offset: 2px; }


/* ---------------------------------------------------------------------
   CONTACT MODAL
   --------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;                 /* shown via .is-open */
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}
.modal.is-open { display: grid; }
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 48px 44px;
  animation: modal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; cursor: pointer;
  color: #8a8a92; font-size: 20px; line-height: 1; padding: 8px;
  transition: color 0.2s ease;
}
.modal-close:hover { color: var(--cta-accent); }
.modal-close:focus-visible { outline: 2px solid var(--cta-accent); outline-offset: 2px; }

.modal-title {
  font-family: var(--display);
  font-size: clamp(30px, 6vw, 44px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  color: var(--paper);
  margin: 0 0 18px;
}
.modal-title .slash { color: var(--cta-accent); }

.modal-lead { font-family: var(--body); color: #c9c9d0; line-height: 1.6; margin: 0 0 26px; }

.modal-socials { display: flex; gap: 20px; margin-bottom: 28px; }
.modal-socials a {
  color: var(--tertiary);
  font-size: 22px;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.15s ease;
}
.modal-socials a:hover { color: var(--cta-accent); transform: translateY(-2px); }
.modal-socials a:focus-visible { outline: 2px solid var(--cta-accent); outline-offset: 3px; }

.modal-contactline {
  display: block;
  font-family: var(--display);
  font-size: clamp(18px, 3vw, 24px);
  color: var(--paper);
  text-decoration: none;
  margin-bottom: 10px;
}
.modal-contactline:hover { color: var(--cta-accent); }
.modal-contactline:focus-visible { outline: 2px solid var(--cta-accent); outline-offset: 3px; }

.modal-actions { display: flex; flex-direction: column; gap: 16px; margin-top: 30px; }
.modal-btn {
  display: block;
  text-align: center;
  font-family: var(--label);
 
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: var(--cta-accent);
  background: var(--cta-ink);
  border: 2px solid var(--cta-accent);
  border-radius: 32px;
  padding: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.modal-btn:hover, .modal-btn:focus-visible { background: var(--cta-accent); color: var(--cta-ink); }
.modal-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .modal-panel { animation: none; } }


/* ---------------------------------------------------------------------
   RESPONSIVE  —  the original re-placed the grid at 991/767/479.
   Here the hero collapses to a simple stack on small screens.
   --------------------------------------------------------------------- */
/* ---------------------------------------------------------------------
   WIP / UNDER CONSTRUCTION  —  centered two-column state (404-style)
   Reusable: <main class="wip"> with .wip-copy (text) + .wip-figure (art)
   --------------------------------------------------------------------- */
.wip {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 40px 88px;
  min-height: calc(100vh - var(--nav-h) - 220px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
}
.wip-copy { max-width: 480px; }
.wip-title {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 900;
  line-height: 1.03;
  color: var(--paper);
  margin: 6px 0 18px;
}
.wip-lead {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: #b7b7c0;
  margin: 0 0 32px;
}
.wip-btn {
  display: inline-block;
  font-family: var(--label);
  font-size: 16px;
  letter-spacing: 0.12em;
  
  color: var(--cta-ink);
  background: var(--brand);
  border: 2px solid var(--brand);
  border-radius: 32px;
  padding: 8px 12px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.wip-btn:hover { background: transparent; color: var(--brand); }
.wip-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.wip-figure { margin: 0; }
.wip-figure img { width: 100%; height: auto; display: block; }

/* ── Filters ── */
.filters {
  max-width: 1200px;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filter-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a92;
  margin-right: 4px;
}
.filter-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--paper);
  border-radius: 20px;
  padding: 6px 16px;
  font-family: var(--label);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.filter-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--cta-ink);
}
.filter-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── Gallery page wrapper ── */
.gallery-page { padding: 40px 40px 80px; }
.filters { padding: 0; }

/* ── Gallery grid: 3 -> 2 -> 1 columns ── */
.gallery {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

/* Gallery item: image above caption, whole card is a button */
.g-item {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.g-item:hover { transform: translateY(-3px); border-color: var(--brand); }
.g-item:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.g-item[hidden] { display: none; }   /* JS sets .hidden; this beats .g-item{display:flex} */
.g-thumb {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #26262e;
  color: #5a5a66;
  font-size: 30px;
}
.g-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-caption {
  padding: 16px 14px;
  font-family: var(--body);
  font-size: 15px;
  color: var(--tertiary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Item overlay (detail view) ── */
.ov {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}
.ov.is-open { display: grid; }
.ov-panel {
  width: min(920px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}
.ov-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: var(--brand);
  color: var(--cta-ink);
  border-radius: 16px 16px 0 0;
}
.ov-cat {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 22px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.ov-close {
  background: none;
  border: none;
  color: var(--cta-ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.ov-close:focus-visible { outline: 2px solid var(--cta-ink); outline-offset: 2px; }
.ov-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
}
.ov-figure { margin: 0; padding: 22px; }
.ov-imgwrap {
 
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #b9b9c2;
  font-size: 40px;
}
.ov-imgwrap img { max-width: 100%; max-height: 100%; display: block; }
.ov-note {
  margin: 12px 2px 0;
  font-family: var(--body);
  font-size: 12px;
  font-style: italic;
  color: #8a8a92;
}
.ov-content {
  padding: 26px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ov-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.05;
  color: var(--paper);
  margin: 0;
}
.ov-desc {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.6;
  color: #b7b7c0;
  margin: 0;
}
.ov-cta {
  margin-top: 4px;
  display: inline-block;
  text-align: center;
  font-family: var(--label);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--cta-ink);
  background: var(--cta-accent);
  border: 2px solid var(--cta-accent);
  border-radius: 10px;
  padding: 14px 20px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.ov-cta:hover { background: transparent; color: var(--cta-accent); }
.ov-cta:focus-visible { outline: 2px solid var(--cta-accent); outline-offset: 3px; }

@media (max-width: 760px) {
  /* Utility: add class="hide-mobile" to hide an element at <=760px */
  .hide-mobile { display: none; }

  .wf-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 24px;
  }
  .wf-nav { padding: 20px 24px; }
  .wf-nav .nav-left, .wf-nav .nav-logo { display: none; }
  .wf-cta, .wf-brand, .wf-title, .wf-bio, .hero-photo, .wf-email { margin-left: 24px; margin-right: 24px; }
  .wf-email { display: none; }
  .hero-photo { height: 34vh; margin: 8px 24px 0; }
  .wf-brand span { font-size: clamp(34px, 12vw, 72px); }

  .content { padding: 72px 24px; }

  .modal-panel { padding: 40px 24px; }

  .cs-main { padding: 40px 24px 72px; }
  .cs-2col, .cs-8020, .cs-6040, .cs-3col { grid-template-columns: 1fr; }
  .cs-statement { padding: 28px 24px; }
  .cs-panel, .cs-surface { padding: 28px 24px; }

  /* Gallery page + overlay on small screens */
  .gallery-page { padding: 32px 24px 64px; }
  .ov-body { grid-template-columns: 1fr; }
  .ov-figure { padding: 18px 18px 0; }
  .ov-content { padding: 20px 22px 26px; }

  /* WIP under-construction: stack, art below copy, centered */
  .wip {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 24px 64px;
    min-height: 0;
  }
  .wip-copy { max-width: none; }
  .wip-figure img { max-width: 360px; margin: 0 auto; }

  /* Content nav: stack the three zones (wordmark, dash, links) */
  .content-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .content-nav .nav-logo { position: static; transform: none; }  /* flow in the stack */
  .content-nav .nav-right { justify-content: flex-start; }        /* pills align left */

  .blurb { grid-template-columns: 1fr; }
  .blurb-img { height: 240px; }
  .blurb-body { padding: 8px 28px 36px; }
}
