/* ==========================================================================
   PARMEL — style.css
   Live-visual / video production studio portfolio site
   Base: black & green, infographic / HUD-inspired design system
   ========================================================================== */

/* ---------- Custom properties ---------- */
:root {
  --c-bg: #060907;
  --c-bg-alt: #0c110d;
  --c-bg-elev: #10160f;
  --c-line: #1e2a1f;
  --c-line-strong: #2c3e2c;
  --c-green: #25ad57;
  --c-green-soft: #81e4a5;
  --c-green-dim: #218345;
  --c-green-deep: #0d2616;
  --c-white: #f3f6f2;
  --c-gray: #9aa79c;
  --c-gray-dim: #5b665c;

  /* Latin glyphs render in Helvetica; unicode-range fallback covers Japanese with Noto Sans JP.
     --font-mono kept as an alias (same stack) so existing accent/label rules don't need touching. */
  --font-sans: "Helvetica Neue", Helvetica, Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-mono: var(--font-sans);

  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 76px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--c-bg);
  color: var(--c-white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100svh;
  overflow-x: hidden;
  position: relative;
  text-align: center;
}

/* ---------- Image/video save deterrents ----------
   Discourages casual right-click/drag saving of portfolio media. Not a
   real security measure — anyone using devtools or a screenshot can still
   get the file — this only stops the average visitor's quick save. */
img, video {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- Background: dithered voronoi/metaball field (canvas-driven) ---------- */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.32;
  transition: opacity 0.8s var(--ease);
}
html.is-loading .bg-canvas {
  opacity: 1;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.mono { font-family: var(--font-mono); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-green);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--c-green);
  box-shadow: 0 0 8px var(--c-green);
  flex-shrink: 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head__title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.section-head__desc {
  color: var(--c-gray);
  max-width: 46em;
  margin-inline: auto;
  font-size: 0.95rem;
}

.index-no {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-green-dim);
  letter-spacing: 0.1em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.6em;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--c-green);
  color: var(--c-green);
  background: var(--c-green-deep);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: var(--c-green); color: #04140b; }
.btn--ghost {
  border-color: var(--c-line-strong);
  color: var(--c-white);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  background: var(--c-green-deep);
}
.btn--lg {
  padding: 1.1em 2.4em;
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  letter-spacing: 0.16em;
}

/* corner-bracket frame, HUD / viewfinder motif */
.frame-corners {
  position: relative;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  background-image:
    linear-gradient(to right, var(--c-green) 2px, transparent 2px),
    linear-gradient(to right, var(--c-green) 2px, transparent 2px),
    linear-gradient(to left, var(--c-green) 2px, transparent 2px),
    linear-gradient(to left, var(--c-green) 2px, transparent 2px),
    linear-gradient(to bottom, var(--c-green) 2px, transparent 2px),
    linear-gradient(to bottom, var(--c-green) 2px, transparent 2px),
    linear-gradient(to top, var(--c-green) 2px, transparent 2px),
    linear-gradient(to top, var(--c-green) 2px, transparent 2px);
  background-position:
    top left, bottom left, top right, bottom right,
    top left, top right, bottom left, bottom right;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-green-soft);
  border: 1px solid var(--c-green-dim);
  padding: 0.3em 0.7em;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--c-green);
  color: #04140b;
  padding: 0.8em 1.2em;
  z-index: 999;
  font-family: var(--font-mono);
}
.skip-link:focus { left: var(--gutter); }

/* ---------- Preloader ---------- */
html.is-loading,
html.is-loading body {
  overflow: hidden;
}
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}
/* The preloader itself is transparent (bg-canvas stays visible underneath)
   — instead of an opaque panel, the header/main/footer are hidden directly
   while loading, so only the bg-canvas and the preloader's own logo/bar are
   ever on screen at once. main.js keeps html.is-loading applied until the
   preloader has fully faded out and been removed (not just when the fade
   starts), so content only appears once the loading animation is gone. */
html.is-loading .site-header,
html.is-loading main,
html.is-loading .site-footer {
  opacity: 0;
  visibility: hidden;
}
.site-header,
main,
.site-footer {
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.preloader__logo {
  height: clamp(28px, 6vw, 40px);
  width: auto;
  animation: preloader-pulse 1.6s ease-in-out infinite, preloader-glow 1.6s ease-in-out infinite;
}
.preloader__bar {
  position: relative;
  width: 160px;
  height: 2px;
  overflow: hidden;
  background: var(--c-line-strong);
}
.preloader__bar-fill {
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--c-green);
  animation: preloader-slide 1.2s ease-in-out infinite;
}
.preloader__label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-gray-dim);
}

@keyframes preloader-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes preloader-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(37, 173, 87, 0)); }
  50% { filter: drop-shadow(0 0 10px rgba(37, 173, 87, 0.65)); }
}
@keyframes preloader-slide {
  0% { left: -40%; }
  100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader__logo,
  .preloader__bar-fill { animation: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
}
/* blur lives on a pseudo-layer, not on .site-header itself — backdrop-filter on
   the header would make it a containing block for its fixed-position children
   (.site-nav), breaking the full-viewport mobile nav overlay */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 9, 7, 0.82);
  backdrop-filter: blur(10px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
  position: relative;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  z-index: 110;
}
.logo__img {
  display: block;
  height: clamp(20px, 4vw, 26px);
  width: auto;
}
.logo__sub {
  margin-top: 0.35em;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--c-gray-dim);
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  z-index: 110;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-line-strong);
}
.nav-toggle__bars {
  position: relative;
  width: 20px;
  height: 14px;
}
.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--c-green);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 50%; }
.nav-toggle__bars span:nth-child(3) { top: 100%; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.6vw, 2.6rem);
}
.site-nav__link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gray);
  padding-block: 0.4em;
  transition: color 0.2s var(--ease);
}
.site-nav__link::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--c-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.site-nav__link:hover,
.site-nav__link[aria-current="page"] { color: var(--c-white); }
.site-nav__link:hover::before,
.site-nav__link[aria-current="page"]::before { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { color: var(--c-green); }

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--c-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .site-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(to right, var(--c-line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--c-line) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.4;
  }
  body.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .site-nav__list {
    flex-direction: column;
    gap: 2rem;
    position: relative;
  }
  .site-nav__link { font-size: 1.4rem; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-toggle__bars span:nth-child(1) { top: 50%; transform: rotate(45deg); }
  body.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle__bars span:nth-child(3) { top: 50%; transform: rotate(-45deg); }
}

/* ---------- Main spacing ---------- */
main { padding-top: var(--header-h); position: relative; z-index: 1; }


/* ---------- Section base ---------- */
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.section--tight { padding-block: clamp(2.5rem, 6vw, 4rem); }
.section--lead { padding-top: clamp(1.5rem, 4vw, 2.25rem); }

/* ---------- Portfolio grid ----------
   JS-driven masonry (js/index-render.js): cards keep their media's natural
   aspect ratio instead of being cropped into a fixed box, so .work-grid is
   just a positioning context. .work-card starts in normal static flow —
   the JS switches each card to position:absolute + transform only once it
   has successfully computed real coordinates for it. If that JS never
   runs or fails partway (bad measurements, a thrown error, anything),
   cards are left as a plain stacked block list instead of pinned on top
   of each other at the same (0,0) spot, which is what a CSS-only
   position:absolute default would produce. */
.work-grid {
  position: relative;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  cursor: pointer;
}
.work-card__thumb {
  position: relative;
  overflow: hidden;
  min-height: 60px; /* placeholder floor before the media's real size is known */
  background:
    repeating-linear-gradient(135deg, var(--c-bg-elev) 0 2px, var(--c-bg-alt) 2px 22px);
  border: 1px solid var(--c-line);
  /* transform lives here, not on .work-card — .work-card is a scroll-reveal
     target (see main.js REVEAL_SELECTORS) and its .is-visible state forces
     `transform: none !important` once revealed, which would silently null
     out a hover transform applied to the card itself. */
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.work-card:hover .work-card__thumb,
.work-card:focus-visible .work-card__thumb {
  transform: translateY(-6px);
  border-color: var(--c-green);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(37, 173, 87, 0.4);
}
.work-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(37,173,87,0.12), transparent 60%);
}

/* Title/tag "stickers" — hidden until hover, then fade/scale in place,
   stacked top-left. This is a constrained flex stack, not free absolute
   placement: normal flow layout is what guarantees every sticker stays
   fully inside the thumb (no clipping) and never overlaps another
   sticker, however long the title text turns out to be — a fixed set of
   absolute % slots couldn't promise either once text length varied. */
.work-card__labels {
  position: absolute;
  /* Flush with the thumb's left edge (no left inset) — top/right/bottom
     keep their margin. */
  inset: 8% 6% 8% 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  /* Top-left, fixed — no per-card scatter. With no line-clamp below, an
     unusually long title just grows the stack downward, which stays
     predictable pinned to a single corner. */
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
  pointer-events: none;
  /* Set by JS (index-render.js `fitStickers`) once the thumb's real
     height is known — shrinks the whole stack down to fit rather than
     truncating any sticker's text. 1 (no-op) until then. */
  transform: scale(var(--fit-scale, 1));
  transform-origin: top left;
}
.work-card__sticker {
  display: inline-block;
  max-width: 92%;
  padding: 0.35em 0.65em;
  background: var(--c-green);
  color: #04140b;
  font-family: "Century Gothic", Meiryo, "Yu Gothic", "Hiragino Kaku Gothic ProN", var(--font-sans);
  font-weight: 700;
  font-size: 0.459rem; /* 85% of the previous 0.54rem — tags */
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  opacity: 0;
  /* No line-clamp/ellipsis — the sticker always shows its full text,
     wrapping as many lines as it needs instead of truncating. */
  white-space: normal;
  overflow-wrap: break-word;
  /* Simple fade + scale-up, no slide or rotation. */
  transform: scale(0.85);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  transition-delay: calc(var(--stagger, 0) * 60ms);
}
.work-card__sticker--title {
  background: var(--c-green-dim);
  color: var(--c-white);
  font-size: 0.66rem; /* 110% of the previous 0.6rem */
}
.work-card:hover .work-card__sticker,
.work-card:focus-visible .work-card__sticker {
  opacity: 1;
  transform: scale(1);
}
.work-card__video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* static image fallback for works whose media[0] is an image, not a video —
   always visible, no hover-to-play gating */
.work-card__thumb-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.view-more { display: flex; justify-content: center; margin-top: clamp(2.4rem, 5vw, 3.6rem); }

/* ---------- Work detail page ---------- */
.work-head {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 5vw, 3rem);
}
.work-head__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-gray);
  margin-bottom: 1.5rem;
  transition: color 0.2s var(--ease);
}
.work-head__back:hover { color: var(--c-green); }
.work-head__title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 20em;
  margin-inline: auto;
}
.work-head__meta {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  color: var(--c-gray);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.work-head__tags { margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; }

.work-media {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 700px;
  margin-inline: auto;
}
.work-media__item {
  border: 1px solid var(--c-line);
  overflow: hidden;
  background: var(--c-bg-alt);
}
.work-media__item video,
.work-media__item img {
  width: 100%;
  display: block;
}
.work-media__item--youtube { position: relative; aspect-ratio: 16 / 9; }
.work-media__item--youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  /* No controls + autoplay/loop already make this decorative, not
     interactive — blocking pointer events stops clicks from pausing it or
     opening YouTube, keeping it a background clip rather than a player. */
  pointer-events: none;
}
.work-media__caption {
  padding: 0.8rem 1rem;
  font-size: 0.82rem;
  color: var(--c-gray);
  border-top: 1px solid var(--c-line);
}
.work-media__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  color: var(--c-white);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.work-media__link:hover { color: var(--c-green); background: var(--c-green-deep); }
.work-media__link-label { font-size: 0.95rem; word-break: break-word; }
.work-media__link-arrow { flex-shrink: 0; color: var(--c-green); font-family: var(--font-mono); }

.work-desc {
  max-width: 44em;
  margin-inline: auto;
  color: var(--c-gray);
  /* Admin's description textarea lets editors type line breaks — without
     this, the browser collapses them like any other whitespace since the
     text is inserted via textContent (not innerHTML, so no <br> tags),
     and they'd silently disappear on the public page. */
  white-space: pre-line;
}

/* ---------- About page ---------- */
.page-head {
  padding-block: clamp(3rem, 7vw, 5rem) clamp(1.2rem, 3vw, 1.8rem);
}
.page-head__title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5rem);
  letter-spacing: 0.02em;
}
.page-head__title span { color: var(--c-green); }
.page-head__lead {
  margin-top: 1.2rem;
  max-width: 44em;
  margin-inline: auto;
  color: var(--c-gray);
}

/* ---------- Member honeycomb ----------
   3 rows of 3-2-2 (all 7 real members, no filler tiles), flat — no
   per-tile rotation/depth at rest. Each row is exactly 1 hex narrower
   than the one above: centering each row (justify-content:center) then
   naturally staggers it half a hex-width from the row above, which is
   what makes adjacent rows interlock into a true hex grid without any
   manual per-row offset. The only animation is CSS :hover below; there's
   no cursor-tracking JS. */
.member-honeycomb {
  max-width: 460px;
  margin-inline: auto;
  /* Tiles sit flat at rest (no rotateX/rotateY) — this is only for the
     hover pop's translateZ, so it reads as popping toward the viewer
     instead of just growing in place. */
  perspective: 1000px;
}
.member-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}
/* Desktop-only hex interlock overlap — scoped by media query rather than
   reset with a plain .member-row rule in the max-width:560px block below,
   since `.member-row + .member-row` (two classes) outranks a single-class
   `.member-row` there regardless of source order, and would otherwise
   keep pulling rows over each other on the mobile list layout too. */
@media (min-width: 561px) {
  .member-row + .member-row {
    margin-top: -38px;
  }
  /* Row 3 is the same width as row 2 (2 hexes), so centering both under
     the same 3-hex-wide row 1 lands them on the same columns — row 2
     reads as the "shifted" row relative to row 1 (its narrower width
     centers it half a hex-pitch right), but row 3 needs to land back on
     row 1's columns to keep the honeycomb brick pattern going, not
     repeat row 2's. Centering can't do that when the widths match, so
     row 3 gets an explicit shift back — half of one hex + gap (132+4) —
     instead, even though it's no longer centered under the cluster as a
     whole. */
  .member-row:last-child {
    transform: translateX(-68px);
  }
}
.member-hex {
  position: relative;
  width: 132px;
  height: 152px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.1rem;
  background: transparent;
  color: var(--c-white);
  font-family: "Century Gothic", Meiryo, var(--font-sans);
  font-weight: 600;
  font-size: 0.72rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  /* Flat at rest — no per-tile rotation/depth. Only the hover rule below
     adds any 3D (translateZ + scale, via .member-honeycomb's
     perspective), with a slower "back out" bounce just for that pop. */
  transition: transform 0.18s ease-out, filter 0.35s var(--ease);
}
/* Needs .member-honeycomb prefixed on to outrank nothing in particular
   here (the resting tilt above is a plain class rule, same specificity
   tier) — kept for consistency with how this rule had to be written
   before per-tile tilt moved to inline custom properties. Every tile
   lifts straight up by the same amount, rather than each nudging toward
   the cluster's center — one uniform direction reads more like a single
   button press than the whole honeycomb reacting. A slower "back out"
   easing overrides the base rule's quick one just for this state, so the
   pop itself still feels like a satisfying bounce. */
.member-honeycomb a.member-hex:hover,
.member-honeycomb a.member-hex:focus-visible {
  transform: translateY(-14px) translateZ(70px) scale(1.1) rotateX(0deg) rotateY(0deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s var(--ease);
  /* Three drop-shadows: a tight dark one to ground the lifted tile, a
     tight bright core so the glow reads as light coming off the tile
     edges rather than a blurred halo, and a wide soft outer bloom for
     reach — stacking a tight + wide pair pushes the glow further without
     just washing it out into fog. */
  filter:
    drop-shadow(0 10px 16px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 10px rgba(37, 173, 87, 1))
    drop-shadow(0 0 44px rgba(37, 173, 87, 0.95));
  z-index: 5;
}
.member-hex__outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.member-hex__outline polygon {
  fill: none;
  stroke: var(--c-line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.2s var(--ease);
}
a.member-hex:hover .member-hex__outline polygon,
a.member-hex:focus-visible .member-hex__outline polygon { stroke: var(--c-green); }
.member-hex__label {
  position: relative;
  z-index: 1;
  transition: color 0.2s var(--ease);
}
a.member-hex:hover .member-hex__label,
a.member-hex:focus-visible .member-hex__label { color: var(--c-green-soft); }

@media (max-width: 560px) {
  .member-honeycomb { display: flex; flex-direction: column; gap: 0.6rem; }
  .member-row {
    flex-direction: column;
    align-items: center;
    margin: 0;
    gap: 0.6rem;
  }
  .member-hex {
    width: 100%;
    max-width: 280px;
    height: auto;
    transform: none;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
  }
  .member-hex__outline { display: none; }
  a.member-hex:hover,
  a.member-hex:focus-visible { transform: none; }
}

.statement {
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  line-height: 1.6;
  max-width: 26em;
  margin-inline: auto;
  font-weight: 500;
}
.statement em {
  font-style: normal;
  color: var(--c-green);
}

.info-table__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--c-line);
}
.info-table__row dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-green-dim);
  text-align: center;
}
.info-table__row dd {
  margin: 0; /* browser default gives <dd> a 40px left indent, which throws off centering */
  color: var(--c-white);
  font-size: 0.95rem;
  max-width: 32em;
  text-align: center;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--c-line);
  border: 1px solid var(--c-line);
}
@media (min-width: 640px) { .capability-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .capability-grid { grid-template-columns: repeat(3, 1fr); } }
.capability {
  background: var(--c-bg);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.capability__no { font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-green-dim); }
.capability__title { font-size: 1.1rem; font-weight: 700; text-align: center; }
.capability__desc { font-size: 0.85rem; color: var(--c-gray); text-align: center; }

/* Mobile shows 2 columns x 3 rows — cells are narrower than the
   640-1019px 2-column layout the base .capability rules are tuned for,
   so padding/type sizes shrink a bit to keep them from feeling cramped. */
@media (max-width: 639px) {
  .capability {
    padding: 1rem 0.8rem;
    gap: 0.5rem;
  }
  .capability__no { font-size: 0.65rem; }
  .capability__title { font-size: 0.88rem; line-height: 1.25; }
  .capability__desc { font-size: 0.72rem; line-height: 1.45; }
}

/* ---------- Archive page ---------- */
.archive-year {
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}
.archive-year__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--c-green);
  margin-bottom: 1rem;
}
.archive-year__label::before,
.archive-year__label::after {
  content: "";
  width: clamp(1.5rem, 6vw, 4rem);
  height: 1px;
  background: var(--c-line-strong);
}
.archive-year__count {
  font-size: 0.7rem;
  color: var(--c-gray-dim);
}

/* Fixed 2-column grid (was a horizontal-scrolling 2-row strip of narrow
   168-210px cells) — cards are wide enough now that a long title wraps to
   at most a couple of lines instead of stacking tall in a cramped column,
   and there's room for a thumbnail. Grows downward with normal page
   scroll rather than needing its own horizontal scroller. */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 0.9rem;
}
@media (min-width: 640px) {
  .archive-grid { gap: 1.4rem 1.2rem; }
}

.archive-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid var(--c-line);
  cursor: pointer;
  padding: 0.9rem;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.archive-item:hover,
.archive-item:focus-visible {
  border-color: var(--c-green);
  background: var(--c-bg-alt);
  box-shadow: 0 0 22px rgba(37, 173, 87, 0.3);
}
/* A compact square preview on the left, text to its right — not a
   full-width banner over centered text. */
.archive-item__thumb {
  flex-shrink: 0;
  width: 30%;
  max-width: 88px;
  aspect-ratio: 1 / 1;
  background: var(--c-bg-elev);
}
.archive-item__thumb img,
.archive-item__thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* No media on the work — the site logo stands in, so it should read as a
   placeholder mark (contained, padded, on the plain page background)
   rather than get stretched/cropped like a real photo thumbnail. */
.archive-item__thumb--logo { background: var(--c-bg); }
.archive-item__thumb--logo img {
  object-fit: contain;
  padding: 0.6rem;
}
.archive-item__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
  text-align: left;
}
.archive-item__title { font-weight: 700; font-size: 0.76rem; line-height: 1.3; }
.archive-item__tags { display: flex; justify-content: flex-start; gap: 0.3rem; flex-wrap: wrap; }
.archive-item__tags .tag { font-size: 0.56rem; padding: 0.25em 0.55em; }

/* Mobile keeps the earlier stacked layout (thumbnail centered on top,
   text below) — the side-by-side arrangement above is too cramped once
   the card itself is only half a 375px screen wide. Type shrinks a step
   further too, since that same narrow column wraps long titles/tags
   more readily than the wider desktop card. */
@media (max-width: 639px) {
  .archive-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .archive-item__thumb {
    width: 52%;
    max-width: 100px;
    margin: 0 0 0.6rem;
  }
  .archive-item__body { align-items: center; text-align: center; }
  .archive-item__title { font-size: 0.66rem; }
  .archive-item__tags { justify-content: center; }
  .archive-item__tags .tag { font-size: 0.5rem; padding: 0.22em 0.5em; }
}

/* ---------- Privacy policy page ----------
   The rest of the site is deliberately center-aligned, but a long legal
   document reads far better left-aligned — this is the one section that
   opts out of the sitewide `body { text-align: center; }`. */
.policy {
  max-width: 680px;
  margin-inline: auto;
  text-align: left;
  color: var(--c-gray);
}
.policy__updated {
  text-align: center;
  color: var(--c-gray-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.policy__section { margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.policy__section:last-child { margin-bottom: 0; }
.policy__section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--c-line);
}
.policy__section p { margin-bottom: 0.8rem; }
.policy__section p:last-child { margin-bottom: 0; }
.policy__section ul { padding-left: 1.4rem; margin-bottom: 0.8rem; list-style: disc; }
.policy__section li { margin-bottom: 0.3rem; }
.policy__section a { color: var(--c-green-soft); text-decoration: underline; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 4rem);
  max-width: 640px;
  margin-inline: auto;
}

.form-field { margin-bottom: 1.6rem; }
.form-field label {
  display: flex;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-gray);
  margin-bottom: 0.6rem;
}
.form-field label .req { color: var(--c-green); }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line-strong);
  padding: 0.85em 1em;
  font-size: 0.95rem;
  text-align: center;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--c-green);
  background: var(--c-bg);
}
.form-field textarea { resize: vertical; min-height: 160px; }
.form-field select { appearance: none; cursor: pointer; }

.form-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  font-size: 0.85rem;
  color: var(--c-gray);
  margin-bottom: 1.8rem;
}
.form-check input {
  width: 18px; height: 18px;
  border: 1px solid var(--c-line-strong);
  background: var(--c-bg-alt);
  flex-shrink: 0;
  margin-top: 0.15em;
  accent-color: var(--c-green);
}
.form-check a { color: var(--c-green-soft); text-decoration: underline; }

.form-submit {
  width: 100%;
  justify-content: center;
}
@media (min-width: 500px) { .form-submit { width: auto; } }

.form-note {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--c-gray-dim);
}
.form-note--success { color: var(--c-green-soft); }
.form-note--error { color: #ff6b6b; }

/* ---------- CTA band ---------- */
.cta-band {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.6rem;
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--c-gray-dim);
}
@media (min-width: 760px) {
  .footer-bottom { flex-direction: row; justify-content: center; gap: 2rem; }
}

/* ---------- Reveal cascade (top-to-bottom stagger, JS-driven) ----------
   The hidden state is applied by CSS the moment these elements exist
   (gated behind html.js-reveal, added by an inline head script before
   body paint) so there is no flash of fully-visible content before
   main.js has a chance to run — that flash is what made the cascade look
   like it was "going back and forth" instead of a clean one-way reveal. */
html.js-reveal .logo,
html.js-reveal .site-nav__link,
html.js-reveal .hero__title,
html.js-reveal .page-head__title,
html.js-reveal .page-head__lead,
html.js-reveal .section-head,
html.js-reveal .statement,
html.js-reveal .work-card,
html.js-reveal .capability,
html.js-reveal .archive-item,
html.js-reveal .info-table__row,
html.js-reveal .work-head__title,
html.js-reveal .work-head__meta,
html.js-reveal .work-head__tags,
html.js-reveal .work-media__item,
html.js-reveal .work-desc,
html.js-reveal .form-field,
html.js-reveal .form-check,
html.js-reveal .form-submit,
html.js-reveal .cta-band .btn {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* ---------- Admin (additive — reuses existing tokens, no new design system) ---------- */
.admin-toolbar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.admin-list { max-width: 760px; margin-inline: auto; }
.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0.5rem;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
}
.admin-row--unread { border-left: 3px solid var(--c-green); padding-left: calc(0.5rem - 3px); }
.admin-row--hidden .admin-row__thumb,
.admin-row--hidden .admin-row__title,
.admin-row--hidden .admin-row__meta { opacity: 0.45; }
.admin-row__badge {
  display: inline-block;
  margin-left: 0.6em;
  padding: 0.15em 0.55em;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--c-gray-dim);
  border: 1px solid var(--c-line-strong);
  opacity: 1;
  vertical-align: middle;
}
.admin-row__main { display: flex; gap: 0.9rem; align-items: flex-start; min-width: 0; }
.admin-row__thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--c-line);
  background: repeating-linear-gradient(135deg, var(--c-bg-elev) 0 2px, var(--c-bg-alt) 2px 22px);
}
.admin-row__thumb img,
.admin-row__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-row__info { display: flex; flex-direction: column; gap: 0.35rem; max-width: 46em; }
.admin-row__title { font-weight: 700; }
.admin-row__meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-gray-dim); }
.admin-row__message { font-size: 0.85rem; color: var(--c-gray); }
.admin-row__actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.admin-row__actions .btn { padding: 0.5em 1em; font-size: 0.68rem; }
.admin-row__preview {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.3rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--c-line);
}
.admin-row__preview-url {
  flex: 1 1 260px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line-strong);
  padding: 0.6em 0.9em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-white);
}
.admin-row__preview-note { flex: 1 1 100%; font-size: 0.72rem; color: var(--c-gray-dim); }
.admin-form-wrap { max-width: 640px; margin-inline: auto; }

.media-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.media-row select { flex: 0 0 auto; width: auto; }
.media-row input[type="text"] { flex: 1 1 200px; }
.media-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--c-line);
}
.media-item:first-child { padding-top: 0; }
.media-item select { flex: 0 0 auto; width: auto; }
.media-item input[type="text"] { flex: 1 1 160px; }
.media-item input[type="file"] { flex: 1 1 160px; font-size: 0.72rem; }
.media-item .btn { flex-shrink: 0; padding: 0.5em 0.9em; font-size: 0.68rem; }

/* ---------- Misc ---------- */
::selection { background: var(--c-green); color: #04140b; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Preview gate (passcode lock for unlisted /preview/ pages) ---------- */
html.preview-locked .site-header,
html.preview-locked main,
html.preview-locked .site-footer,
html.preview-locked .bg-canvas { display: none !important; }
.preview-gate { display: none; }
html.preview-locked .preview-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--c-bg);
  padding: var(--gutter);
}
.preview-gate__box { width: 100%; max-width: 360px; text-align: center; }
.preview-gate__logo { width: 160px; height: auto; margin: 0 auto 1.6rem; }
.preview-gate__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gray);
  margin-bottom: 1.4rem;
}
.preview-gate__form { display: flex; flex-direction: column; gap: 0.9rem; }
.preview-gate__input {
  width: 100%;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-line-strong);
  padding: 0.85em 1em;
  font-size: 0.95rem;
  text-align: center;
  color: var(--c-white);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.preview-gate__input:focus {
  outline: none;
  border-color: var(--c-green);
  background: var(--c-bg);
}
.preview-gate__submit { justify-content: center; margin: 0 auto; }
.preview-gate__error { margin-top: 1rem; font-size: 0.78rem; color: #ff6b6b; }
.preview-gate__box.is-shake { animation: preview-gate-shake 0.35s var(--ease); }
@keyframes preview-gate-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
