/* =========================================================================
   Page flourishes — Home (front page)
   Loaded after styles.css. Only page-specific composition lives here.
   Signature: big masthead headline, dateline strip, front-page grid,
   index aside, beginners split, clubhouse split.
   ========================================================================= */

/* ---- Front-page masthead block ---- */
.frontpage {
  padding-block: clamp(2.4rem, 5vw, 4rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 3px double var(--rule-strong);
}
.frontpage__headline {
  margin-top: .8rem;
  max-width: 18ch;
}
.frontpage__dateline {
  margin-top: 1.4rem;
  padding-block: .9rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.frontpage__lead {
  display: grid;
  gap: 1.4rem;
  margin-top: 1.6rem;
  max-width: 52rem;
}
.frontpage__cta { margin-top: .2rem; }
.frontpage__answer { margin-top: 2rem; }

/* ---- Front-page grid: lead feature + index aside ---- */
.frontpage__grid { align-items: start; }

.lead-feature__intro {
  font-family: var(--serif);
  font-size: var(--fs-lead);
  color: var(--body);
  line-height: 1.45;
  margin-top: 1rem;
}
.lead-feature h2 { font-size: var(--fs-h2); margin-top: .5rem; }

.syslist {
  margin-top: 1.6rem;
  display: grid;
  gap: 1.4rem;
}
.syslist__group {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}
.syslist__group h3 {
  font-size: var(--fs-h4);
  margin-bottom: .7rem;
}

/* Index aside sticks alongside the lead column on wide screens */
.frontpage__index { align-self: start; }
.frontpage__index .muted {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
}
@media (min-width: 52rem) {
  .frontpage__index { position: sticky; top: 8rem; }
}

/* ---- Beginners split: heading column + features ---- */
.frontpage__beginners { align-items: start; gap: clamp(1.6rem, 5vw, 3.5rem); }

/* ---- Clubhouse split ---- */
.frontpage__home { align-items: center; }
.frontpage__home .stat-row { background: var(--card); }

/* ---- Gallery ---- */
.frontpage__gallery-head {
  font-size: var(--fs-h2);
  margin-top: .6rem;
  margin-bottom: .6rem;
}
.frontpage__gallery-intro { margin-bottom: clamp(1.4rem, 3vw, 2rem); color: var(--muted); }
.frontpage__gallery figcaption { margin-top: .6rem; }

/* ---- Large systems marquee (front page) ---- */
.frontpage__marquee { border-bottom: 3px double var(--rule-strong); }
.frontpage__marquee .kicker { margin-bottom: 1rem; }
.marquee--lg .sys-chip {
  font-size: clamp(.92rem, .85rem + .4vw, 1.15rem);
  padding: .65rem 1.2rem;
}
.marquee--lg .marquee__group { gap: 1rem; }

/* ---- Community block (green) ---- */
.frontpage__community { align-items: start; gap: clamp(1.6rem, 5vw, 3.5rem); }
.frontpage__community .community-list li::before { color: #bfe0c9; }
.frontpage__community .community-list strong { color: #fff; }
.community-stat { margin-top: 1.3rem; font-family: var(--serif); font-size: var(--fs-lead); line-height: 1.4; }
.community-stat strong { color: #fff; }
.community-collage { margin-top: clamp(2rem, 5vw, 3.2rem); max-width: 44rem; margin-inline: auto; }

/* =========================================================================
   v2.2 — premium home composition (layered hero, scrollytelling, polish)
   Pairs with enhance.css + enhance.js.
   ========================================================================= */

/* ---- Layered, parallaxed hero ------------------------------------------ */
.frontpage { position: relative; overflow: hidden; }
.frontpage__bg {
  position: absolute; inset: -10% -5% auto -5%; height: 70%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 55% at 78% 18%, rgba(179,50,42,.07), transparent 60%),
    radial-gradient(38% 50% at 12% 0%, rgba(47,122,69,.06), transparent 60%);
}
.hero { position: relative; z-index: 1; display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(1.6rem, 4vw, 3.6rem); align-items: center; }
.hero__copy { position: relative; z-index: 2; }
.hero .frontpage__headline { font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.5rem); line-height: .95; letter-spacing: -.018em; max-width: 15ch; margin-top: 1rem; }
.hero .frontpage__dateline { margin-top: 1.5rem; }
.hero__lead { margin-top: 1.5rem; max-width: 40rem; }
.hero .frontpage__cta { margin-top: 1.7rem; }

.hero__stack { position: relative; min-height: clamp(23rem, 42vw, 35rem); }
.hero__stack .hero__photo {
  position: absolute; overflow: hidden; background: var(--paper-2);
  border: 6px solid #fff; box-shadow: var(--sh-4);
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg));
}
.hero__stack .hero__photo > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s var(--ease-out); }
.hero__stack .hero__photo:hover > img { transform: scale(1.05); }
.hero__photo--a { --rot: -2.4deg; width: 60%; right: 1%; top: 0;     aspect-ratio: 3/4; z-index: 1; }
.hero__photo--b { --rot:  2.3deg; width: 49%; left: 0;   top: 35%;   aspect-ratio: 4/5; z-index: 3; }
.hero__photo--c { --rot: -3.2deg; width: 35%; right: 3%; bottom: -3%; aspect-ratio: 1;   z-index: 4; }
.hero__seal {
  position: absolute; z-index: 5; left: -3%; top: 12%;
  width: clamp(72px, 8.5vw, 104px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper);
  border: 1px solid var(--rule); box-shadow: var(--sh-3);
}
.hero__seal img { width: 80%; height: 80%; }
@media (prefers-reduced-motion: no-preference) { .hero__seal img { animation: li-spin 38s linear infinite; } }
@keyframes li-spin { to { transform: rotate(360deg); } }

@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero__stack { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
  .hero__stack .hero__photo { position: relative; inset: auto; width: auto !important; aspect-ratio: 4/5; transform: none !important; border-width: 4px; box-shadow: var(--sh-2); }
  .hero__photo--c { grid-column: 1 / -1; aspect-ratio: 16/9; }
  .hero__seal { display: none; }
}

/* ---- Scrollytelling: pinned visual + scrolling beats -------------------- */
.scrolly__grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(1.6rem, 5vw, 4.5rem); align-items: start; }
.scrolly__media { position: sticky; top: 7rem; }
.scrolly__figs { position: relative; aspect-ratio: 4/5; border: 6px solid #fff; box-shadow: var(--sh-4); overflow: hidden; background: var(--paper-2); }
.scrolly__fig { position: absolute; inset: 0; opacity: 0; transform: scale(1.05); transition: opacity .8s var(--ease-out), transform 1.1s var(--ease-out); }
.scrolly__fig.is-active { opacity: 1; transform: none; }
.scrolly__fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scrolly__cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 2.4rem 1.2rem 1rem; color: #fff; background: linear-gradient(to top, rgba(12,9,8,.8), transparent); font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.scrolly__steps { display: grid; gap: clamp(2.6rem, 10vh, 6rem); padding-block: clamp(1rem, 8vh, 6rem); }
.scrolly__step { transition: opacity .4s ease; }
.scrolly__step .no { font-family: var(--mono); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.scrolly__step h3 { font-size: var(--fs-h3); margin: .5rem 0 .6rem; }
.scrolly__step p { color: var(--muted); max-width: 34rem; }
@media (min-width: 52rem) { .scrolly__step { opacity: .42; } .scrolly__step.is-current { opacity: 1; } }
@media (max-width: 52rem) {
  .scrolly__grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .scrolly__media { position: relative; top: 0; }
  .scrolly__steps { gap: 1.4rem; padding-block: 1.4rem; }
  .scrolly__step .no { color: var(--accent); }
}

/* ---- Cinematic gallery -------------------------------------------------- */
.cine { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(7rem, 12vw, 11rem); gap: clamp(.5rem, 1.4vw, 1rem); }
.cine figure { position: relative; overflow: hidden; margin: 0; box-shadow: var(--sh-2); }
.cine figure > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cine figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; margin: 0;
  padding: 1.6rem .9rem .7rem; color: #fff; font-family: var(--mono); font-size: .72rem;
  letter-spacing: .05em; opacity: 0; transform: translateY(8px);
  background: linear-gradient(to top, rgba(12,9,8,.82), transparent);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.cine figure:hover figcaption, .cine figure:focus-within figcaption { opacity: 1; transform: none; }
.cine .cine--xl { grid-column: span 7; grid-row: span 2; }
.cine .cine--tall { grid-column: span 5; grid-row: span 2; }
.cine .cine--half { grid-column: span 6; grid-row: span 1; }
.cine .cine--wide { grid-column: span 5; grid-row: span 1; }
.cine .cine--sq   { grid-column: span 4; grid-row: span 1; }
@media (max-width: 52rem) {
  .cine { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; }
  .cine .cine--xl, .cine .cine--tall, .cine .cine--wide, .cine .cine--sq, .cine .cine--half { grid-column: span 1; grid-row: span 1; }
  .cine .cine--xl { grid-column: span 2; }
}

/* ---- misc home polish --------------------------------------------------- */
.frontpage__homephoto { aspect-ratio: 16/10; }
.frontpage__answer { box-shadow: var(--sh-2); }
.lead-feature h2 { letter-spacing: -.01em; }
.syslist__group .tag { transition: transform .18s var(--ease-spring), background-color .18s ease, color .18s ease, border-color .18s ease; }
.syslist__group .tag:hover { transform: translateY(-2px); background: var(--accent); color: #fff; border-color: var(--accent); }
.agenda__item { transition: background-color .25s ease; }
.agenda__item:hover { background: color-mix(in srgb, var(--card) 70%, transparent); }
