/* ==========================================================================
   WhiteRaven Game Zone — style.css
   Look: black void, blood red, bone white; coin-gold only inside the 3D scene.
   Signature shape: the cut corner (echoes the banner's diagonal shards).
   Two layouts share one markup:
     html.is-3d   → WebGL flight (canvas fixed behind everything, panels float over it)
     no .is-3d    → plain, fully readable page (no WebGL, reduced motion, or scripts blocked)
   ========================================================================== */

:root {
  --void: #060304;
  --oxblood: #4a0a0e;
  --oxblood-deep: #320709;
  --red: #e5252b;          /* glows, 3D, large elements */
  --red-btn: #c41e25;      /* button fill (bone text on it passes 4.5:1) */
  --red-text: #ff6d71;     /* small red text on dark */
  --bone: #efe6d6;
  --bone-deep: #e3d7c1;
  --ash: #b6ab9e;
  --ash-dim: #8c8175;
  --coin: #f0b23f;
  --ink: #1a1210;

  --font-display: 'Big Shoulders Display', 'Arial Narrow', Impact, 'Helvetica Neue', sans-serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --pad: clamp(1.25rem, 5vw, 4rem);
  --max: 78rem;
  --sec: clamp(4.5rem, 10vw, 8rem);
  --cut: clamp(1.75rem, 4.6vw, 4.75rem);   /* depth of the diagonal edge on opaque bands */
  --c: 14px;                                /* corner cut on buttons / panels */
  --ease: cubic-bezier(.22, .68, 0, 1);
  --anchor-h: 0px;                          /* set by app.js to the height of Google's anchor ad, when one is showing */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: var(--void); color: var(--bone);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
code { font: 500 .9em ui-monospace, Menlo, Consolas, monospace; }

.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; background: var(--bone); color: var(--ink); padding: .7rem 1rem; font-weight: 600; transition: top .2s; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--coin); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
main > section { position: relative; z-index: 1; }

/* ---------- type ---------- */
.h2 {
  font: 800 clamp(2.4rem, 5.2vw, 4.4rem)/.98 var(--font-display);
  letter-spacing: -.005em; max-width: 16ch; text-wrap: balance;
}
.h2--xl { font-size: clamp(3.4rem, 9vw, 8rem); line-height: .92; max-width: 11ch; }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--ash); max-width: 34rem; margin-top: 1.25rem; }
.about p, .faq p, .values p { color: var(--ash); }

/* ---------- buttons: cut corners ---------- */
.btn {
  --cc: var(--c);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.7rem; min-height: 3rem;
  font: 600 .95rem/1 var(--font-body); text-decoration: none; letter-spacing: .01em;
  color: var(--bone); background: transparent;
  clip-path: polygon(var(--cc) 0, 100% 0, 100% calc(100% - var(--cc)), calc(100% - var(--cc)) 100%, 0 100%, 0 var(--cc));
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.btn svg { width: 1.1rem; height: 1.1rem; flex: none; }
.btn--sm { padding: .75rem 1.25rem; min-height: 2.5rem; --cc: 10px; font-size: .9rem; }
.btn--red { background: var(--red-btn); }
.btn--red:hover { background: var(--bone); color: var(--ink); }
.btn--ghost { box-shadow: inset 0 0 0 1.5px rgba(239,230,214,.4); }
.btn--ghost:hover { background: rgba(239,230,214,.12); box-shadow: inset 0 0 0 1.5px var(--bone); }
.btn--bone { color: var(--ink); background: var(--bone); }
.btn--bone:hover { background: var(--ink); color: var(--bone); }
.btn:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px var(--coin); }

/* ---------- canvas + progress ---------- */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.is-3d #scene { opacity: 1; }
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 60; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 1rem 0; transition: background-color .3s, padding .3s, box-shadow .3s; }
.site-header.is-solid { background: rgba(6,3,4,.9); padding: .55rem 0; box-shadow: 0 1px 0 rgba(239,230,214,.08); }
.site-header__row { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand__name { font: 800 1.55rem/.9 var(--font-display); letter-spacing: .01em; }
.brand__name small { display: block; margin-top: .3rem; font: 600 .6rem/1 var(--font-body); letter-spacing: .24em; text-transform: uppercase; color: var(--red-text); }
.nav { display: none; gap: 1.5rem; }
.nav a { position: relative; text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ash); padding: .35rem 0; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--ease); }
.nav a:hover, .nav a.is-active { color: var(--bone); }
.nav a.is-active::after { transform: scaleX(1); }
.site-header__end { display: flex; align-items: center; gap: 1rem; }
.site-header__cta { display: none; }
.burger { width: 2.75rem; height: 2.75rem; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--bone); transition: transform .25s var(--ease), opacity .2s; }
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (min-width: 1100px) { .nav { gap: 2rem; } }
@media (min-width: 900px) {
  .nav { display: flex; } .site-header__cta { display: inline-flex; } .burger { display: none; }
}

.mobile-panel {
  position: fixed; inset: 0; z-index: 45; background: var(--void);
  display: flex; flex-direction: column; gap: .25rem; padding: 6.5rem var(--pad) 2.5rem;
  opacity: 0; visibility: hidden; transform: translateY(-.5rem); transition: opacity .3s, transform .3s var(--ease), visibility .3s;
}
.mobile-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-panel a:not(.btn) { font: 800 2.6rem/1 var(--font-display); text-decoration: none; padding: .8rem 0; border-bottom: 1px solid rgba(239,230,214,.12); }
.mobile-panel .btn { margin-top: 1.5rem; align-self: flex-start; }
@media (min-width: 900px) { .mobile-panel { display: none; } }

/* ---------- hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 7rem 0 5.5rem; }
.hero__wrap { position: relative; z-index: 2; }
.hero__copy { max-width: 41rem; }
.hero__title {
  font: 800 clamp(3.5rem, min(8.2vw, 11.5vh), 8rem)/.92 var(--font-display); letter-spacing: -.012em;
  text-shadow: 0 2px 30px rgba(6,3,4,.85); text-wrap: balance;
}
.hero__lead { margin-top: 1.6rem; font-size: 1.15rem; color: var(--ash); max-width: 30rem; text-shadow: 0 1px 18px rgba(6,3,4,.9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem; margin-top: 3rem; }
.hero__facts div { padding-left: .9rem; border-left: 2px solid var(--red); }
.hero__facts dt { font-weight: 600; font-size: .9rem; color: var(--bone); }
.hero__facts dd { font-size: .9rem; color: var(--ash-dim); }
.hero__fallback { display: none; position: absolute; right: -8%; top: 50%; width: min(70vw, 560px); transform: translateY(-50%); opacity: .12; filter: grayscale(1); pointer-events: none; }
html:not(.is-3d) .hero__fallback { display: block; }

/* slim ad under the hero info row: solid bone strip, cut corners, never over the headline or the 3D emblem */
.herobar {
  margin-top: 1.75rem; width: 100%; max-width: 41rem; background: var(--bone); color: var(--ink); padding: .35rem .9rem .65rem;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.herobar .adband__label { margin: 0 0 .3rem; font-size: .7rem; text-align: left; }
.herobar .adslot { min-height: 60px; }
.herobar .adslot__preview { min-height: 60px; flex-direction: row; gap: .6rem; padding: .4rem .75rem; font-size: .85rem; }
.herobar .adslot__preview strong { font-size: 1.15rem; }
.herobar[hidden] { display: none; }
@media (max-height: 820px) and (min-width: 900px) {
  .hero { padding: 5.5rem 0 3rem; }
  .hero__lead { margin-top: 1.1rem; }
  .hero__actions { margin-top: 1.5rem; }
  .hero__facts { margin-top: 1.75rem; }
  .herobar { margin-top: 1.25rem; }
}

/* the one orchestrated moment: hero copy rises in while the emblem spins up in 3D */
.rise { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) var(--d, 0s) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 899px) {
  .hero { align-items: flex-end; padding-bottom: 5.5rem; }
  .hero__title { font-size: clamp(2.6rem, 12vw, 4.4rem); }
  .hero { padding-bottom: 3.5rem; }
  .herobar .adslot, .herobar .adslot__preview { min-height: 50px; }
  .herobar { margin-top: 1.25rem; }
  .hero__actions { margin-top: 1.5rem; gap: .7rem; }
  .hero__actions .btn { flex: 1 1 auto; padding-inline: 1rem; }
  .hero__lead { font-size: 1rem; line-height: 1.5; margin-top: 1.1rem; }
  .hero__facts { display: none; }
  .is-3d .hero__copy { margin-top: 33svh; }
}

/* ---------- services: the flight ---------- */
.flight__intro { min-height: 75vh; min-height: 75svh; display: flex; align-items: flex-end; padding-bottom: 12vh; }
.flight__intro .h2 { text-shadow: 0 2px 30px rgba(6,3,4,.9); }
.flight__intro .lead { text-shadow: 0 1px 18px rgba(6,3,4,.9); }

/* static layout (default) */
.flight__track { padding: 0 var(--pad) var(--sec); }
.stage { max-width: var(--max); margin: 0 auto; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)); }
.rail { display: none; }
.panel {
  padding: 1.75rem; background: rgba(20,9,12,.86); border-left: 3px solid var(--red);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.panel__icon { display: inline-flex; width: 3.25rem; height: 3.25rem; align-items: center; justify-content: center; color: var(--red-text); margin-bottom: 1.1rem; box-shadow: inset 0 0 0 1.5px rgba(229,37,43,.5); }
.panel__icon svg { width: 1.8rem; height: 1.8rem; }
.panel__title { font: 800 clamp(1.9rem, 3vw, 2.4rem)/1 var(--font-display); }
.panel__lead { margin-top: .8rem; color: var(--bone-deep); }
.panel__hint { margin: .8rem 0 1.4rem; font-size: .95rem; color: var(--ash-dim); }

/* 3D layout */
.is-3d .flight__track { height: calc(100vh + 6 * 66vh); height: calc(100svh + 6 * 66svh); padding: 0; }   /* 66 = scroll per station; lower = shorter flight */
.is-3d .stage { position: sticky; top: 0; height: 100vh; height: 100svh; max-width: none; margin: 0; display: block; overflow: hidden; }
.is-3d .panel {
  position: absolute; z-index: 2; opacity: 0; pointer-events: none;
  background: rgba(8,3,5,.8); padding: 1.6rem 1.75rem 1.75rem;
  transform: translate3d(var(--dx, 0), var(--dy, 0), 0);
  will-change: opacity, transform;
}
.is-3d .panel.is-live { pointer-events: auto; }
.is-3d .panel:focus-within { opacity: 1 !important; }
.is-3d .panel__icon { display: none; }
.is-3d .panel__title { font-size: clamp(2.3rem, 4.4vw, 3.9rem); line-height: .96; }
.is-3d .panel__lead { font-size: 1.1rem; }

.is-3d .rail { display: flex; position: absolute; z-index: 3; }
.rail__btn { position: relative; width: 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center; color: var(--ash-dim); background: rgba(8,3,5,.6); box-shadow: inset 0 0 0 1.5px rgba(239,230,214,.16); transition: color .2s, background-color .2s, box-shadow .2s; }
.rail__btn:hover { color: var(--bone); }
.rail__btn.is-active { color: var(--bone); background: var(--red-btn); box-shadow: none; }
.rail__btn:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px var(--coin); }
.rail__ic svg { width: 1.45rem; height: 1.45rem; }
.rail__tip { position: absolute; left: 50%; bottom: calc(100% + .6rem); transform: translateX(-50%); white-space: nowrap; background: var(--bone); color: var(--ink); font-size: .8rem; font-weight: 600; padding: .35rem .6rem; opacity: 0; pointer-events: none; transition: opacity .15s; }
.rail__btn:hover .rail__tip, .rail__btn:focus-visible .rail__tip { opacity: 1; }

@media (min-width: 900px) {
  .is-3d .panel { top: 50%; width: min(31rem, 40vw); margin-top: -8.5rem; --dy: 0px; }
  .is-3d .panel--left  { left: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); }
  .is-3d .panel--right { right: max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); }
  .is-3d .rail { left: 50%; bottom: calc(1.6rem + var(--anchor-h)); transform: translateX(-50%); flex-direction: row; gap: .5rem; }
}
@media (max-width: 899px) {
  .is-3d .panel { left: var(--pad); right: var(--pad); bottom: calc(max(1.1rem, env(safe-area-inset-bottom)) + var(--anchor-h)); padding: 1.2rem 1.25rem 1.3rem; }
  .is-3d .panel__title { font-size: clamp(2rem, 9vw, 2.7rem); }
  .is-3d .panel__lead { font-size: 1rem; margin-top: .55rem; }
  .is-3d .panel__hint { display: none; }
  .is-3d .panel .btn { margin-top: 1rem; }
  .is-3d .rail { left: 50%; top: 4.9rem; transform: translateX(-50%); gap: .35rem; }
  .is-3d .rail .rail__btn { width: 2.4rem; height: 2.4rem; }
  .is-3d .rail__tip { display: none; }
}

/* ---------- ad breaks ---------- */
.adband {
  z-index: 1; background: var(--bone); color: var(--ink);
  padding: calc(var(--cut) + 2.25rem) var(--pad) 2.75rem;
  clip-path: polygon(0 var(--cut), 100% 0, 100% 100%, 0 100%);
}
.adband__frame { position: relative; max-width: 62rem; margin: 0 auto; padding: 1.5rem 1.25rem 1.25rem; }
.adband__frame::before, .adband__frame::after { content: ""; position: absolute; width: 3rem; height: 3rem; border: 0 solid var(--ink); pointer-events: none; }
.adband__frame::before { left: 0; top: 0; border-width: 2px 0 0 2px; }
.adband__frame::after { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.adband__label { text-align: center; font-size: .78rem; letter-spacing: .06em; color: #6b5e50; margin-bottom: .7rem; }
.adslot { position: relative; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.adband--slim .adslot { min-height: 110px; }
.adslot ins { display: block; width: 100%; }
.adslot:not(.is-live) ins { display: none !important; }   /* placeholder mode: the empty ad element must not push the preview box aside */
.adslot__preview {
  width: 100%; min-height: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: 1.25rem;
  border: 2px dashed rgba(26,18,16,.28); color: #5a4d40; font-size: .95rem;
}
.adslot__preview strong { font: 800 1.6rem/1 var(--font-display); color: var(--ink); }
.adslot.is-live .adslot__preview { display: none; }
.adband[hidden] { display: none; }

/* ---------- about ---------- */
.about { padding: var(--sec) 0; background: linear-gradient(270deg, rgba(6,3,4,.95) 0%, rgba(6,3,4,.88) 46%, rgba(6,3,4,0) 80%); }
.about__body { margin-left: auto; max-width: 35rem; }
.about__body p { margin-top: 1.25rem; }
.about__body .h2 { max-width: 14ch; }
.facts { margin-top: 2rem; display: grid; gap: .9rem; }
.facts li { display: flex; gap: .85rem; font-size: .98rem; color: var(--bone-deep); }
.facts svg { width: 1.3rem; height: 1.3rem; flex: none; margin-top: .2rem; color: var(--red-text); }
@media (max-width: 899px) { .about { background: rgba(6,3,4,.9); } .about__body { margin: 0; } }

/* ---------- values ---------- */
.values { padding: var(--sec) 0; background: rgba(6,3,4,.9); }
.values__grid { display: grid; gap: 2.5rem; margin-top: 3.25rem; }
.value { padding-left: 1.25rem; border-left: 3px solid var(--red); }
.value h3 { font: 800 1.9rem/1.02 var(--font-display); margin-bottom: .7rem; }
@media (min-width: 900px) { .values__grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

/* ---------- brand / gallery ---------- */
.brandband {
  background: linear-gradient(115deg, #5c0d12 0%, var(--oxblood) 45%, var(--oxblood-deep) 100%);
  padding: calc(var(--cut) + var(--sec) * .6) 0 var(--sec);
  clip-path: polygon(0 var(--cut), 100% 0, 100% 100%, 0 100%);
}
.brandband__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 3rem; }
.brandband__head .lead { margin-top: 0; max-width: 24rem; color: #d3c1b1; }
.brandband__grid { display: grid; gap: 1.5rem; margin-top: 3.25rem; }
.tilt { position: relative; transform-style: preserve-3d; transition: transform .35s var(--ease), box-shadow .35s; will-change: transform; background: #000; box-shadow: 0 30px 60px -25px rgba(0,0,0,.7); }
.tilt.is-tilting { transition: transform .08s linear; }
.tilt img { width: 100%; height: auto; }
.tilt--logo { padding: 1.25rem; display: flex; align-items: center; justify-content: center; }
.tilt--logo img { max-height: 21rem; width: auto; }
.tilt--banner figcaption { padding: 1.1rem 1.4rem 1.3rem; font-size: .92rem; color: #cdbeb0; background: #12070a; }
.social { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.5rem; }
@media (min-width: 900px) { .brandband__grid { grid-template-columns: 1fr 1.6fr; align-items: stretch; } .tilt--banner { display: flex; flex-direction: column; } .tilt--banner img { flex: 1; object-fit: cover; } }

/* ---------- faq ---------- */
.faq { padding: var(--sec) 0; background: linear-gradient(90deg, rgba(6,3,4,.95) 0%, rgba(6,3,4,.88) 46%, rgba(6,3,4,0) 80%); }
.faq__body { max-width: 40rem; }
.acc { margin-top: 2.75rem; }
.acc__item { border-bottom: 1px solid rgba(239,230,214,.14); }
.acc__q { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.4rem 0; font: 700 clamp(1.4rem, 2.6vw, 1.8rem)/1.1 var(--font-display); transition: color .2s; }
.acc__q:hover { color: var(--red-text); }
.acc__ic { position: relative; flex: none; width: 1.1rem; height: 1.1rem; transition: transform .3s var(--ease); }
.acc__ic::before, .acc__ic::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 2px; margin-top: -1px; background: var(--red); }
.acc__ic::after { transform: rotate(90deg); }
.acc__q[aria-expanded="true"] .acc__ic { transform: rotate(45deg); }
.acc__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.acc__a > div { overflow: hidden; }
.acc__q[aria-expanded="true"] + * , .acc__item[data-open="true"] .acc__a { grid-template-rows: 1fr; }
.acc__a p { padding: 0 0 1.5rem; max-width: 34rem; }
@media (max-width: 899px) { .faq { background: rgba(6,3,4,.9); } }

/* ---------- contact ---------- */
.contact { padding: var(--sec) 0; background: rgba(6,3,4,.8); }
.contact__grid { display: grid; gap: 3.5rem; }
.info { margin: 2.25rem 0; }
.info li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(239,230,214,.12); }
.info svg { width: 1.4rem; height: 1.4rem; flex: none; margin-top: .15rem; color: var(--red-text); }
.info strong { display: block; font-size: .95rem; }
.info span, .info a { font-size: .95rem; color: var(--ash); text-decoration: none; }
.info a:hover { color: var(--bone); }
.contact__cards { display: grid; gap: .9rem; align-content: start; }
.card {
  display: flex; align-items: center; gap: 1.1rem; padding: 1.15rem 1.25rem; text-decoration: none;
  background: rgba(20,9,12,.9); border-left: 3px solid rgba(229,37,43,.4);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: transform .2s var(--ease), border-color .2s, background-color .2s;
}
.card:hover { transform: translateX(6px); border-left-color: var(--red); background: rgba(40,12,16,.95); }
.card:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px var(--coin); }
.card__ic { width: 2.9rem; height: 2.9rem; flex: none; display: flex; align-items: center; justify-content: center; background: var(--oxblood); color: var(--bone); }
.card__ic svg { width: 1.35rem; height: 1.35rem; }
.card strong { display: block; font-weight: 600; }
.card small { display: block; font-size: .88rem; color: var(--ash); }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; } }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 1; background: #0b0507; border-top: 1px solid rgba(239,230,214,.1); padding: 4rem 0 2rem; }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(239,230,214,.1); }
.footer__about { max-width: 20rem; }
.footer__about p { margin-top: 1rem; font-size: .95rem; color: var(--ash); }
.footer__cols { display: flex; flex-wrap: wrap; gap: 4rem; }
.footer h4 { font: 700 1.1rem/1 var(--font-display); letter-spacing: .04em; color: var(--ash-dim); margin-bottom: .9rem; }
.footer__cols a, .footer__cols button { display: block; padding: .4rem 0; font-size: .95rem; color: var(--ash); text-decoration: none; text-align: left; transition: color .2s; }
.footer__cols a:hover, .footer__cols button:hover { color: var(--bone); }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.75rem; font-size: .88rem; color: var(--ash-dim); }
.footer__social { display: flex; gap: .75rem; }
.footer__social a { width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(239,230,214,.16); transition: color .2s, box-shadow .2s; }
.footer__social a:hover { color: var(--red-text); box-shadow: inset 0 0 0 1px var(--red); }
.footer__social svg { width: 1.05rem; height: 1.05rem; }

/* ---------- floating actions ---------- */
.float { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(max(1rem, env(safe-area-inset-bottom)) + var(--anchor-h)); z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.float .btn { box-shadow: 0 14px 30px -10px rgba(0,0,0,.7); }
.totop { width: 2.9rem; height: 2.9rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #170a0d; box-shadow: inset 0 0 0 1.5px rgba(239,230,214,.18); opacity: 0; transform: translateY(.5rem); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.totop.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.totop svg { width: 1.15rem; height: 1.15rem; }
@media (max-width: 899px) {
  .float .btn { min-height: 2.75rem; padding-inline: 1.15rem; transition: opacity .25s, visibility .25s; }
  .in-flight .float .btn { opacity: 0; visibility: hidden; }   /* panels carry their own text button */
}
.is-3d .float { transition: opacity .3s; }

/* ---------- dialogs ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; color: var(--ink); overflow: auto; }
.modal::backdrop { background: rgba(0,0,0,.82); }
.modal[open] { display: flex; align-items: flex-start; justify-content: center; padding: 4rem 1.25rem; }
.modal__box { position: relative; width: 100%; max-width: 42rem; background: var(--bone); border-top: 5px solid var(--red-btn); padding: 2.75rem clamp(1.4rem, 5vw, 3rem) 3rem; }
.modal__close { position: absolute; right: 1.1rem; top: 1.1rem; width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px rgba(26,18,16,.25); transition: background-color .2s; }
.modal__close:hover { background: rgba(26,18,16,.08); }
.modal__close svg { width: 1rem; height: 1rem; }
.modal h2 { font: 800 2.6rem/1 var(--font-display); padding-right: 3rem; }
.modal__date { margin: .6rem 0 1.75rem; font-size: .9rem; color: #6b5e50; }
.modal__body h3 { font: 800 1.45rem/1.1 var(--font-display); margin: 1.9rem 0 .5rem; }
.modal__body p { font-size: .95rem; color: #3a3129; margin-bottom: .9rem; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation-duration: .01ms; animation-delay: 0s; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* when the anchor ad is on, keep the hero's bottom strip clear of it from the very first paint */
@media (max-width: 899px) { .has-anchor .hero { padding-bottom: calc(3.5rem + 60px); } }
@media (min-width: 900px) { .has-anchor .hero { padding-bottom: calc(4rem + 40px); } }

/* ==========================================================================
   Projects — one project = one photo album
   ========================================================================== */
.projects { padding: var(--sec) 0; background: rgba(6,3,4,.92); }
.projects[hidden], [data-nav-projects][hidden] { display: none; }
.projects__head .lead { margin-top: 1.1rem; }
.projects__more { display: flex; justify-content: center; margin-top: 3.25rem; }

/* category filter chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.25rem; }
.chip {
  --cc: 9px; display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; min-height: 2.6rem;
  font: 600 .88rem/1 var(--font-body); color: var(--ash); box-shadow: inset 0 0 0 1.5px rgba(239,230,214,.18);
  clip-path: polygon(var(--cc) 0, 100% 0, 100% calc(100% - var(--cc)), calc(100% - var(--cc)) 100%, 0 100%, 0 var(--cc));
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.chip svg { width: 1.1rem; height: 1.1rem; flex: none; }
.chip small { font-weight: 500; opacity: .65; font-size: .8rem; }
.chip:hover { color: var(--bone); box-shadow: inset 0 0 0 1.5px var(--bone); }
.chip[aria-pressed="true"] { background: var(--red-btn); color: var(--bone); box-shadow: none; }
.chip:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px var(--coin); }
@media (max-width: 899px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + var(--pad) * 2); margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

/* the grid */
.pgrid { display: grid; gap: 3.25rem 2rem; margin-top: 3rem; grid-auto-flow: dense; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19.5rem), 1fr)); }
.pcard { position: relative; display: block; color: inherit; text-decoration: none; perspective: 900px; }
.pcard.will-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.pcard.will-reveal.is-in { opacity: 1; transform: none; }

/* the frame carries the "stack of prints" look: two layers behind the cover photo */
.pcard__frame { position: relative; display: block; transform-style: preserve-3d; transition: transform .4s var(--ease); will-change: transform; }
.pcard__frame.is-tilting { transition: transform .08s linear; }
.pcard__layer { position: absolute; inset: 0; background: #14090c; box-shadow: inset 0 0 0 1px rgba(239,230,214,.14); transition: transform .4s var(--ease), opacity .3s; }
.pcard__layer--1 { transform: translate3d(.5rem, -.5rem, -12px) rotate(1.1deg); }
.pcard__layer--2 { transform: translate3d(1rem, -1rem, -24px) rotate(2.2deg); opacity: .65; }
.pcard:hover .pcard__layer--1, .pcard:focus-visible .pcard__layer--1 { transform: translate3d(.85rem, -.85rem, -12px) rotate(2deg); }
.pcard:hover .pcard__layer--2, .pcard:focus-visible .pcard__layer--2 { transform: translate3d(1.7rem, -1.7rem, -24px) rotate(4deg); }
.pcard__media {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0d0709;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pcard:hover .pcard__media img { transform: scale(1.07); }
.pcard__view {
  position: absolute; left: 1rem; bottom: 1rem; padding: .55rem .95rem; background: var(--bone); color: var(--ink);
  font: 600 .85rem/1 var(--font-body); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .3s var(--ease);
}
.pcard:hover .pcard__view, .pcard:focus-visible .pcard__view { opacity: 1; transform: none; }
.pcard__sample { position: absolute; left: 1rem; top: 1rem; padding: .3rem .6rem; background: var(--coin); color: var(--ink); font: 700 .72rem/1 var(--font-body); }
.pcard:focus-visible { outline: 0; }
.pcard:focus-visible .pcard__frame { outline: 3px solid var(--coin); outline-offset: 6px; }

.pcard__body { display: block; padding: 1.35rem .25rem 0; }
.pcard__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; font-size: .82rem; color: var(--ash-dim); }
.pcard__cat { display: inline-flex; align-items: center; gap: .45rem; color: var(--red-text); font-weight: 600; }
.pcard__cat svg { width: 1.15rem; height: 1.15rem; }
.pcard__title { display: block; font: 800 clamp(1.7rem, 2.6vw, 2.1rem)/1 var(--font-display); text-wrap: balance; }
.pcard__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .6rem; font-size: .95rem; color: var(--ash); }
@media (min-width: 720px) {
  .pcard--feature { grid-column: span 2; }
  .pcard--feature .pcard__media { aspect-ratio: 16 / 9; }
  .pcard--feature .pcard__title { font-size: clamp(2.1rem, 3.4vw, 2.9rem); }
}
@media (max-width: 719px) {
  .pgrid { gap: 3rem 1.5rem; }
  .pcard__layer--1 { transform: translate3d(.4rem, -.4rem, -12px) rotate(1deg); }
  .pcard__layer--2 { transform: translate3d(.8rem, -.8rem, -24px) rotate(2deg); }
}

/* the album viewer */
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #050203; color: var(--bone); overflow: hidden; }
.lightbox::backdrop { background: #000; }
.lightbox[open] { display: block; }
.lb { position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 25rem; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage info" "thumbs info"; }
.lb__close { position: absolute; z-index: 5; right: 1.1rem; top: 1.1rem; width: 2.9rem; height: 2.9rem; display: flex; align-items: center; justify-content: center; background: rgba(6,3,4,.75); box-shadow: inset 0 0 0 1.5px rgba(239,230,214,.3); transition: background-color .2s; }
.lb__close:hover { background: var(--red-btn); box-shadow: none; }
.lb__close svg { width: 1.2rem; height: 1.2rem; }
.lb__close:focus-visible, .lb__nav:focus-visible, .lb__thumb:focus-visible { outline: 0; box-shadow: inset 0 0 0 3px var(--coin); }

.lb__stage { grid-area: stage; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 4.5rem 4.5rem 1rem; touch-action: pan-y; user-select: none; }
.lb__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9); }
.lb__img.anim { animation: lbIn .55s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: perspective(1200px) translateX(calc(var(--dir, 1) * 56px)) rotateY(calc(var(--dir, 1) * -14deg)) scale(.96); } to { opacity: 1; transform: none; } }
.lb__stage.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2.4rem; height: 2.4rem; margin: -1.2rem 0 0 -1.2rem; border: 3px solid rgba(239,230,214,.18); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lb__nav { position: absolute; top: 50%; z-index: 3; width: 3.2rem; height: 3.2rem; margin-top: -1.6rem; display: flex; align-items: center; justify-content: center; background: rgba(6,3,4,.75); box-shadow: inset 0 0 0 1.5px rgba(239,230,214,.25); transition: background-color .2s; }
.lb__nav:hover { background: var(--red-btn); box-shadow: none; }
.lb__nav[hidden] { display: none; }
.lb__nav svg { width: 1.4rem; height: 1.4rem; }
.lb__nav--prev { left: 1rem; } .lb__nav--next { right: 1rem; }
.lb__count { position: absolute; left: 1.5rem; top: 1.5rem; z-index: 3; font: 700 1.05rem/1 var(--font-display); letter-spacing: .08em; color: var(--ash); }

.lb__thumbs { grid-area: thumbs; display: flex; gap: .55rem; overflow-x: auto; padding: .6rem 1.5rem 1.4rem; scrollbar-width: thin; scrollbar-color: rgba(239,230,214,.25) transparent; }
.lb__thumbs[hidden] { display: none; }
.lb__thumb { flex: none; width: 5.5rem; height: 4.1rem; padding: 0; overflow: hidden; opacity: .45; transition: opacity .2s, outline-color .2s; outline: 2px solid transparent; outline-offset: 2px; }
.lb__thumb:hover { opacity: .85; }
.lb__thumb[aria-current="true"] { opacity: 1; outline-color: var(--red); }
.lb__thumb img { width: 100%; height: 100%; object-fit: cover; }

.lb__info { grid-area: info; overflow-y: auto; padding: 4.75rem 1.9rem 2.5rem; background: #0b0507; border-left: 1px solid rgba(239,230,214,.1); }
.lb__cat { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .88rem; color: var(--red-text); }
.lb__cat svg { width: 1.2rem; height: 1.2rem; }
.lb__info h3 { margin-top: .9rem; font: 800 clamp(2.1rem, 3vw, 2.9rem)/.98 var(--font-display); text-wrap: balance; }
.lb__meta { margin-top: .9rem; font-size: .88rem; color: var(--ash-dim); }
.lb__caption { margin-top: 1.25rem; padding-left: .9rem; border-left: 2px solid var(--coin); font-size: .92rem; color: var(--bone-deep); }
.lb__caption[hidden] { display: none; }
.lb__desc { margin-top: 1.5rem; }
.lb__desc p { color: var(--ash); margin-bottom: .9rem; font-size: 1rem; }
.lb__video { margin-top: 1.5rem; }
.lb__video[hidden] { display: none; }
.lb__video-title { margin-bottom: .55rem; font-size: .78rem; font-weight: 700; color: var(--ash-dim); letter-spacing: .12em; text-transform: uppercase; }
.lb__video-frame { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; box-shadow: inset 0 0 0 1px rgba(239,230,214,.12); }
.lb__video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.lb__video-link { display: inline-block; margin-top: .55rem; color: var(--red-text); font-size: .85rem; text-underline-offset: 3px; }
.lb__video-link:hover { color: var(--bone); }
.lb__actions { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; margin-top: 1.75rem; }
.lb__toast { min-height: 1.4rem; margin-top: .9rem; font-size: .88rem; color: var(--coin); word-break: break-all; }

@media (max-width: 899px) {
  .lb { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 46%) auto minmax(0, 1fr); grid-template-areas: "stage" "thumbs" "info"; }
  .lightbox { height: 100vh; height: 100dvh; }
  .lb__stage { padding: 3.6rem .75rem .25rem; }
  .lb__nav { width: 2.6rem; height: 2.6rem; margin-top: -1.3rem; background: rgba(6,3,4,.55); }
  .lb__nav--prev { left: .4rem; } .lb__nav--next { right: .4rem; }
  .lb__count { left: 1rem; top: 1.2rem; }
  .lb__close { right: .75rem; top: .75rem; }
  .lb__thumbs { padding: .5rem 1rem .8rem; }
  .lb__thumb { width: 4.4rem; height: 3.3rem; }
  .lb__info { border-left: 0; border-top: 1px solid rgba(239,230,214,.1); padding: 1.25rem 1.25rem 2rem; }
  .lb__info h3 { font-size: 2.1rem; margin-top: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard.will-reveal { opacity: 1; transform: none; }
  .lb__img.anim { animation: none; }
}
