/* ---------- Design tokens ---------- */
:root {
  --black: #0a0d0c;
  --bg-alt: #0f1d15;
  --surface: #17331f;
  --green-dark: #123320;
  --green: #2f9c5c;
  --green-bright: #25be58;
  --lime: #a0c814;
  --silver: #b7beb9;
  --silver-dim: #7c857f;
  --ink: #f4f6f5;
  --ink-soft: var(--silver);
  --paper: var(--black);
  --paper-alt: var(--bg-alt);
  --line: rgba(255, 255, 255, 0.12);
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 28px rgba(0, 0, 0, 0.35);
  --maxw: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--ink-soft); }
ul { padding-left: 1.1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-bright); color: #06210f; }
.btn-primary:hover { background: #2fd867; }
.btn-outline { background: transparent; border-color: var(--silver-dim); color: var(--ink); }
.btn-outline:hover { background: var(--green-bright); border-color: var(--green-bright); color: #06210f; }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; color: var(--ink); }
.brand img { height: 44px; width: 44px; }
.brand-wordmark { height: 30px; width: auto; display: block; }
@media (max-width: 480px) { .brand-wordmark { height: 24px; } }

.main-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.main-nav a { text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--ink); padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-color: var(--green-bright); }
.header-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .main-nav { position: fixed; inset: 76px 0 0 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 24px; gap: 18px; overflow-y: auto; transform: translateX(100%); transition: transform 0.2s ease; }
  .main-nav.is-open { transform: translateX(0); }
  .header-cta .btn-outline { display: none; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px;
    background: none; align-items: center; justify-content: center; cursor: pointer;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 18px; height: 2px; background: var(--ink); position: relative; transition: 0.2s;
  }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after { position: absolute; top: 6px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; min-height: 92vh; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,11,0.66) 0%, rgba(10,10,11,0.9) 100%); }
.hero-inner { position: relative; padding-block: 100px; text-align: center; width: 100%; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.6rem, 7.5vw, 5.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.04; max-width: 19ch; margin: 0 auto 24px; }
.hero p.lede { max-width: 56ch; margin: 0 auto 40px; color: rgba(255,255,255,0.85); font-size: 1.2rem; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .btn { padding: 16px 30px; font-size: 1.02rem; }
@media (max-width: 700px) { .hero { min-height: 82vh; } .hero-inner { padding-block: 72px; } }

.page-hero { position: relative; color: #fff; overflow: hidden; background: var(--green-dark); display: flex; align-items: flex-start; min-height: 420px; }
.page-hero-bg { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; }
.page-hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,11,0.72) 0%, rgba(10,10,11,0.92) 100%); }
.page-hero-inner { position: relative; padding-block: 88px 72px; width: 100%; }
.page-hero .eyebrow { color: var(--lime); }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); max-width: 22ch; margin-bottom: 18px; }
.page-hero p.lede { color: rgba(255,255,255,0.85); max-width: 62ch; margin: 0; font-size: 1.05rem; }
.page-hero .hero-actions { justify-content: flex-start; margin-top: 30px; }
@media (max-width: 700px) { .page-hero { min-height: 340px; } .page-hero-inner { padding: 64px 0 48px; } }

/* ---------- Sections ---------- */
section.block { padding: 72px 0; }
section.block.tight { padding: 48px 0; }
.block-alt { background: var(--paper-alt); }

.find-class { position: relative; overflow: hidden; }
.find-class::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('/assets/brand/vinnie-pattern-tile.svg'), url('/assets/brand/vinnie-pattern-tile.svg');
  background-repeat: repeat, repeat;
  background-size: 180px 180px, 180px 180px;
  background-position: 0 0, 90px 90px;
  opacity: 0.08;
  pointer-events: none;
}
.find-class > .wrap { position: relative; }
.block-dark {
  background-image: linear-gradient(160deg, rgba(10,13,12,0.9), rgba(18,51,32,0.86)), url('/assets/images/snake-skin-vipers.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
}
.block-dark p { color: rgba(255,255,255,0.78); }

.parallax-section { position: relative; overflow: hidden; }
.parallax-bg {
  position: absolute;
  inset: -15% 0;
  background-image: linear-gradient(160deg, rgba(10,13,12,0.9), rgba(18,51,32,0.86)), url('/assets/images/snake-skin-vipers.jpg');
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: 0;
}
.parallax-section > .wrap { position: relative; z-index: 1; }
.block-dark h2, .block-dark h3 { color: #fff; }
.section-head { max-width: 62ch; margin: 0 0 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green); margin-bottom: 10px; }
.block-dark .kicker { color: var(--lime); }

/* Every section heading — inside .section-head or a plain split layout —
   shares one responsive scale and a capped measure, so headings never look
   mismatched page to page or stretch into an unreadably long line. */
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 24ch; }
.section-head.center h2 { margin-inline: auto; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (min-width: 861px) and (max-width: 1020px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card-flush { padding: 0; overflow: hidden; }

.value-card { text-align: left; padding: 22px; border-radius: var(--radius); background: none; border: 1px solid var(--line); }
.value-card .icon { display: block; margin-bottom: 16px; color: var(--green-bright); }
.value-card .icon svg { width: 48px; height: 48px; display: block; }

.step-badge { display: inline-flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; color: var(--green-bright); margin-bottom: 12px; border: none; background: none; padding: 0; }

.stat { text-align: center; }
.stat .num { font-size: 2.1rem; font-weight: 800; color: var(--green-bright); }
.stat .label { font-size: 0.85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.block-dark .stat .label { color: rgba(255,255,255,0.7); }

.progress { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green-bright); border-radius: 999px; }
.block-dark .progress { background: rgba(255,255,255,0.16); }

.pill {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 0.82rem; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; background: var(--surface);
}
.pill.active, .pill:hover { border-color: var(--green-bright); color: var(--ink); background: rgba(37,190,88,0.16); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--green-dark); color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-outline { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); }

/* Two-column split */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.split img, .split .media-frame { border-radius: var(--radius); box-shadow: var(--shadow); }
.media-frame {
  aspect-ratio: 4/3; background: var(--surface); border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
  font-size: 0.8rem; text-align: center; padding: 16px; overflow: hidden;
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; }
.media-frame.sponsor-logo { border-style: solid; transition: border-color 0.15s ease, opacity 0.15s ease; }
.media-frame.sponsor-logo:hover { border-color: var(--green-bright); opacity: 0.9; }
.sponsor-logo-svg { width: 100%; height: auto; max-width: 150px; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 20px; }
.timeline-row { display: flex; gap: 18px; }
.timeline-year { flex: none; width: 64px; font-weight: 800; color: var(--green); }
.timeline-row .line { flex: 1; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; font: inherit; color: var(--ink); background: var(--surface);
}
.field input::placeholder, .field textarea::placeholder { color: var(--silver-dim); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green-bright); outline-offset: 1px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; color: var(--ink-soft); }
.checkbox-row input { margin-top: 4px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green-bright); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0; }
legend { padding: 0 6px; font-weight: 700; font-size: 0.92rem; }
form .grid { margin-top: 4px; }

/* ---------- Table-ish roster / directory ---------- */
.year-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 700px) { .year-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.year-chip {
  display: flex; align-items: center; justify-content: center; padding: 12px 6px; border-radius: 8px;
  border: 1px solid var(--line); font-weight: 700; text-decoration: none; color: var(--ink); background: var(--surface); position: relative;
}
.year-chip:hover, .year-chip[aria-current="page"] { border-color: var(--green-bright); color: var(--ink); background: rgba(37,190,88,0.16); }
.year-chip .dot { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 999px; background: var(--lime); }

.roll-list { column-count: 3; column-gap: 20px; }
@media (max-width: 700px) { .roll-list { column-count: 1; } }
@media (min-width: 701px) and (max-width: 960px) { .roll-list { column-count: 2; } }
.roll-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 12px; border-radius: 10px; break-inside: avoid;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.09);
  text-decoration: none; color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.roll-row:hover { background: rgba(255,255,255,0.09); border-color: var(--green-bright); }
.roll-row:hover .meta { color: var(--green-bright); }
.meta { font-size: 0.82rem; color: var(--ink-soft); }

.name-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.name-tag { padding: 6px 12px; border-radius: 999px; background: var(--surface); font-size: 0.85rem; }

/* ---------- Sticky give bar ---------- */
.sticky-give {
  position: sticky; bottom: 0; z-index: 30; background: var(--green-dark); color: #fff;
  padding: 12px 0; border-top: 3px solid var(--green-bright);
}
.sticky-give .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sticky-give span { font-size: 0.9rem; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,0.85); padding: 56px 0 28px; }
.site-footer a { text-decoration: none; color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid > div { min-width: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; min-width: 0; }
.footer-grid li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; max-width: 100%; }
.footer-grid li a, .footer-grid li span { overflow-wrap: anywhere; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 40px; width: 40px; }
.footer-wordmark { height: 34px; width: auto; display: block; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.social-row { display: flex; gap: 12px; }
.tag-soon {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--green-bright);
  border-radius: 4px;
  font-size: 0.62rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-bright);
  vertical-align: middle;
}
.social-row a { width: 34px; height: 34px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.3); display: flex; align-items: center; justify-content: center; transition: border-color 0.15s ease, color 0.15s ease; }
.social-row a:hover { border-color: var(--green-bright); color: var(--green-bright); }
.social-row svg { width: 16px; height: 16px; }
.card .social-row { justify-content: center; margin-top: 12px; }
.card .social-row a { border-color: var(--line); color: var(--ink-soft); }
.card .social-row a:hover { border-color: var(--green-bright); color: var(--green-bright); }

#devninja-footer-widget { display: flex; flex-direction: column; align-items: center; font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.dnfw-row { display: flex; align-items: center; gap: 8px; }
.dnfw-logo-link { display: inline-flex; align-items: center; }
.dnfw-logo { height: 16px; width: auto; }

/* ---------- Sponsorship accordion + form ---------- */
.sponsor-layout { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; }
@media (max-width: 960px) { .sponsor-layout { grid-template-columns: 1fr; } }
.sponsor-form-card { position: sticky; top: 96px; }
@media (max-width: 960px) { .sponsor-form-card { position: static; } }

.accordion { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-item:last-child { border-bottom: none; }
.accordion-header {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; background: none; border: none; text-align: left; cursor: pointer; font: inherit;
  color: var(--ink);
}
.accordion-header:hover { background: rgba(255,255,255,0.04); }
.accordion-header .name { font-weight: 700; font-size: 1.02rem; }
.accordion-header .price { font-weight: 800; color: var(--green); flex: none; }
.accordion-header .plus { flex: none; width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; transition: transform 0.15s ease; }
.accordion-item[data-open="true"] .accordion-header { background: rgba(37,190,88,0.12); }
.accordion-item[data-open="true"] .accordion-header .plus { transform: rotate(45deg); border-color: var(--green-bright); color: var(--green); }
.accordion-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.2s ease; }
.accordion-item[data-open="true"] .accordion-panel { grid-template-rows: 1fr; }
.accordion-panel-inner { overflow: hidden; }
.accordion-panel-content { padding: 0 22px 22px; }
.accordion-panel-content ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.accordion-panel-content li { padding-left: 22px; position: relative; font-size: 0.92rem; color: var(--ink-soft); }
.accordion-panel-content li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

.check-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 7px; }
.check-list li { padding-left: 22px; position: relative; font-size: 0.85rem; color: var(--ink-soft); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* ---------- Editorial feature ---------- */
.editorial-feature { display: grid; grid-template-columns: 1fr 1fr; min-height: 480px; }
.editorial-feature-media { position: relative; overflow: hidden; background: var(--paper-alt); }
.editorial-feature-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(30%) contrast(1.05); display: block; }
.editorial-feature-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,46,26,0) 45%, rgba(16,46,26,0.4) 100%); }
.editorial-feature-media.is-empty { background: linear-gradient(160deg, #16351f 0%, #102e1a 100%); }
.editorial-feature-media.is-empty::after { display: none; }
.editorial-feature-media .placeholder-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.4); font-size: 0.85rem; letter-spacing: 0.04em; text-align: center; padding: 24px;
}
.editorial-feature-copy { background: var(--green-dark); color: #fff; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; }
.editorial-feature .kicker-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.editorial-feature .kicker-row .kicker { margin: 0; color: var(--lime); }
.editorial-feature h2 { font-style: italic; font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.15; margin: 0 0 22px; max-width: 18ch; color: #fff; }
.editorial-feature .body-copy { font-size: 1.05rem; line-height: 1.75; color: rgba(255,255,255,0.82); max-width: 48ch; margin: 0 0 26px; }
.editorial-feature .byline { font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 28px; }
.editorial-feature .cta-link {
  display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700;
  text-decoration: none; border-bottom: 2px solid var(--lime); padding-bottom: 4px; width: fit-content;
}
.editorial-feature .cta-link:hover { color: var(--lime); }
@media (max-width: 860px) {
  .editorial-feature { grid-template-columns: 1fr; min-height: 0; }
  .editorial-feature-media { min-height: 260px; }
  .editorial-feature-copy { padding: 44px 24px; }
}

/* ---------- Misc ---------- */
.note { font-size: 0.85rem; color: var(--ink-soft); background: var(--surface); border-left: 3px solid var(--green-bright); padding: 12px 16px; border-radius: 0 8px 8px 0; }
.center { text-align: center; }
.mt { margin-top: 32px; }
.divider { border: none; border-top: 1px solid var(--line); margin: 48px 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--green-dark); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }

.footer-credit { display: flex; justify-content: center; padding-top: 18px; }
.footer-bottom { justify-content: center; }

/* ---------- Scroll reveal ---------- */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

html.js-reveal .reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js-reveal .reveal.is-visible .reveal-stagger > * { opacity: 1; transform: none; }
html.js-reveal .reveal.is-visible .reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
html.js-reveal .reveal.is-visible .reveal-stagger > *:nth-child(2) { transition-delay: 70ms; }
html.js-reveal .reveal.is-visible .reveal-stagger > *:nth-child(3) { transition-delay: 140ms; }
html.js-reveal .reveal.is-visible .reveal-stagger > *:nth-child(4) { transition-delay: 210ms; }
html.js-reveal .reveal.is-visible .reveal-stagger > *:nth-child(5) { transition-delay: 280ms; }
html.js-reveal .reveal.is-visible .reveal-stagger > *:nth-child(6) { transition-delay: 350ms; }

@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal,
  html.js-reveal .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Homepage photo stack ---------- */
.photo-stack-section { overflow: visible; position: relative; z-index: 2; padding-bottom: 36px; }
.photo-stack-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 50%;
  bottom: 0;
  background-image: repeating-linear-gradient(45deg, var(--green) 0px, var(--green) 16px, var(--green-dark) 16px, var(--green-dark) 32px);
  z-index: 0;
}
/* Right-half mask: an opaque panel behind the text column, independent of
   the photo stack's own container. Photo cards use fixed px offsets so they
   don't scale down with the viewport the way the text column's grid width
   does — at in-between widths (below desktop, above the mobile breakpoint)
   a card can reach past the 50% line before the text column would. Rather
   than trying to keep the cards perfectly clear of a moving target, this
   mask guarantees anything that crosses into the right half simply
   disappears behind it, so the text side is always its own solid, readable
   surface no matter how the window is resized. */
.photo-stack-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  right: 0;
  bottom: 0;
  background: var(--black);
  z-index: 2;
}
.photo-stack-section .wrap { position: relative; z-index: 3; }
@media (max-width: 860px) {
  .photo-stack-section::before,
  .photo-stack-section::after { display: none; }
}

/* The stack is its own layer pinned exactly over the striped panel (full
   section height, flush to the true left edge) — not a grid child boxed in
   by .wrap's padding and centering margin. The grid column in .wrap below is
   an empty spacer that only reserves the text column's position. */
.photo-stack { position: absolute; top: 0; left: 0; right: 50%; bottom: 0; z-index: 1; }
.photo-card {
  position: absolute;
  width: 340px;
  aspect-ratio: 4 / 5;
  background: #fafaf7;
  padding: 16px 16px 54px;
  box-shadow: 0 2px 2px rgba(0,0,0,0.15), 0 14px 28px rgba(0,0,0,0.35);
  transform: rotate(var(--rot, 0deg));
  transition-delay: var(--delay, 0ms);
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* One uniform size, stacked with heavy overlap so the deck reads as covering
   the panel from top to bottom — not every photo needs to show in full. */
.photo-card--c1  { top: -14%;  left: -550px; --rot: -6deg;  --delay: 40ms;  z-index: 2; }
.photo-card--c2  { top: -8%;   left: 120px;  --rot: 5deg;   --delay: 90ms;  z-index: 3; }
.photo-card--c3  { top: -2%;   left: 0px;    --rot: 9deg;   --delay: 140ms; z-index: 4; }
.photo-card--c4  { top: 3%;    left: 430px;  --rot: -9deg;  --delay: 190ms; z-index: 3; }
.photo-card--c5  { top: 8%;    left: -380px; --rot: -3deg;  --delay: 500ms; z-index: 10; }
.photo-card--c6  { top: 13%;   left: 350px;  --rot: 7deg;   --delay: 260ms; z-index: 5; }
.photo-card--c7  { top: 17%;   left: -200px; --rot: -11deg; --delay: 399ms; z-index: 4; }
.photo-card--c8  { top: 21%;   left: 0px;    --rot: 10deg;  --delay: 380ms; z-index: 3; }
.photo-card--c9  { top: 24%;   left: 370px;  --rot: -7deg;  --delay: 410ms; z-index: 2; }
.photo-card--c10 { top: 27%;   left: -520px; --rot: 11deg;  --delay: 450ms; z-index: 2; }

/* Mobile: text reads first, then a tidy compact deck (not a scattered
   full-bleed collage) — three photos up front, two more peeking behind. */
@media (max-width: 860px) {
  .photo-stack-section { display: flex; flex-direction: column; }
  .photo-stack-section .wrap { order: 1; }
  .photo-stack-section .split > div:first-child { display: none; }
  .photo-stack {
    order: 2;
    position: relative;
    inset: auto;
    width: 300px;
    height: 300px;
    margin: 8px auto 0;
    z-index: 1;
  }
  .photo-card { width: 190px; }
  .photo-card--c6, .photo-card--c7, .photo-card--c8, .photo-card--c9, .photo-card--c10 { display: none; }
  .photo-card--c4 { top: 40px; left: 0px;   --rot: -12deg; z-index: 1; }
  .photo-card--c5 { top: 40px; left: 66px;  --rot: 12deg;  z-index: 2; }
  .photo-card--c1 { top: 14px; left: -12px; --rot: -6deg;  z-index: 3; }
  .photo-card--c3 { top: 14px; left: 76px;  --rot: 6deg;   z-index: 4; }
  .photo-card--c2 { top: 0px;  left: 32px;  --rot: 0deg;   z-index: 5; }
}

/* Scroll-in entrance: cards start stacked flat, then fan out to their resting
   position as the section reveals (see main.js's generic section observer). */
html.js-reveal .photo-card { opacity: 0; transform: translateY(50px) scale(0.9) rotate(0deg); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
html.js-reveal .reveal.is-visible .photo-card { opacity: 1; transform: rotate(var(--rot, 0deg)); }

@media (prefers-reduced-motion: reduce) {
  html.js-reveal .photo-card { transition: none !important; }
}
