/* ============================================================
   Diablo Padel — the vision page.

   Every other page holds to one screen. This one is the exception, and it is
   the only page that scrolls: it is the gallery, so the images need room.
   Tokens, type scale and grain all come from styles.css, which loads first.
   This file only adds what a long editorial page needs.
   ============================================================ */

/* The sibling pages pin the body to the viewport. This one must scroll. */
html, body { height: auto; }

body { overflow-x: hidden; }

/* ---------- Shell ---------- */

.vision {
  --gutter: clamp(20px, 6vw, 120px);
  --stack: clamp(72px, 12vh, 156px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Fixed brand and back, over everything ---------- */

.vision-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(16px, 2.4vw, 30px) var(--gutter, 24px);
  background: linear-gradient(to bottom, rgba(21, 19, 20, 0.86), transparent);
  pointer-events: none;
}

.vision-bar > * { pointer-events: auto; }

.vision-bar img { width: clamp(132px, 13vw, 176px); height: auto; }

/* ---------- Hero ---------- */

.vh {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-content: end;
  /* The top pad clears the fixed bar, so a tall headline can never slide under
     the logo on a short screen. */
  padding: clamp(96px, 16vh, 180px) 0 clamp(48px, 9vh, 110px);
}

.vh-media {
  position: absolute;
  inset: 0 calc(var(--gutter) * -1);
  z-index: -1;
  overflow: hidden;
}

.vh-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  /* The plate is dark on its own, so lift it before the scrim goes on top. */
  filter: brightness(1.24) contrast(1.02) saturate(1.05);
  /* A slow settle, so the page does not land dead still. */
  animation: settle 2600ms var(--ease) both;
}

@keyframes settle {
  from { transform: scale(1.06); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* The image carries the type, so the bottom third has to go quiet. */
.vh-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--shadow) 2%, rgba(21, 19, 20, 0.42) 30%, rgba(21, 19, 20, 0) 60%),
    linear-gradient(to right, rgba(21, 19, 20, 0.56), transparent 54%);
}

/* Text sits left and low. A centred hero over a dark photo is the cliche.
   The block is wide; only the headline itself is measured tight, so the lede
   does not inherit a 20ch column and turn into a ladder. */
.vh-copy { max-width: min(54ch, 100%); }

.eyebrow-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--parchment);
}

.eyebrow-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-lit);
}

.vh h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(44px, 6.6vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  color: var(--parchment);
}

.vh h1 em {
  display: block;
  font-style: italic;
  color: var(--iron);
}

.vh-lede {
  margin: 26px 0 0;
  max-width: 44ch;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Section frame ---------- */

.vsec { padding: var(--stack) 0; }

.vsec-head {
  margin: 0 0 8px;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--iron);
}

.vsec h2,
.vclose h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--parchment);
}

/* The section eyebrow is a <p> too, and it must keep the shared label size.
   Excluding it here rather than out-specifying it keeps one rule per role. */
.vsec p:not(.vsec-head),
.vclose p:not(.vsec-head):not(.vclose-note) {
  font-size: clamp(14.5px, 1.35vw, 17px);
  line-height: 1.68;
  color: var(--muted);
  max-width: 60ch;
}

/* ---------- The brief: asymmetric, never a three-card row ---------- */

.brief {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(32px, 6vw, 110px);
  align-items: start;
}

.brief-note { margin: 22px 0 0; }

/* Numbers read as a spec sheet: hairlines, no boxes. */
.spec { border-top: 1px solid var(--line); }

.spec div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.spec dt {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--dim);
}

.spec dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1;
  color: var(--parchment);
}

/* ---------- The gallery: zig-zag, alternating, never a grid of cards ---------- */

.plate {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 44px);
  margin: 0 0 clamp(56px, 9vh, 120px);
}

@media (min-width: 861px) {
  .plate { grid-template-columns: 1.9fr 1fr; align-items: end; }
  /* Every second plate flips, so the eye travels rather than marches. */
  .plate:nth-child(even) { grid-template-columns: 1fr 1.9fr; }
  .plate:nth-child(even) .plate-media { order: 2; }
  .plate:nth-child(even) .plate-cap { order: 1; }
}

.plate-media {
  position: relative;
  overflow: hidden;
  background: #1c191a;
}

.plate-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  transition: transform 900ms var(--ease);
}

.plate-media:hover img { transform: scale(1.03); }

.plate--tall .plate-media img { aspect-ratio: 4 / 5; }

.plate-cap h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.12;
  color: var(--parchment);
}

.plate-cap p { margin: 0; font-size: var(--fs-small); max-width: 38ch; }

/* ---------- The three activities: play, gather, recover ---------- */

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.6vw, 36px);
  margin-top: clamp(28px, 5vh, 56px);
}

.trio-card { margin: 0; }

.trio-media {
  position: relative;
  overflow: hidden;
  background: #1c191a;
}

.trio-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  transition: transform 900ms var(--ease);
}

.trio-media:hover img { transform: scale(1.03); }

.trio-card figcaption { padding-top: 18px; }

.trio-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.12;
  color: var(--parchment);
}

.trio-card p { margin: 0; font-size: var(--fs-small); max-width: 32ch; }

.plate-tag {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 10px;
  border: 1px solid var(--line-lit);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- The creed: the gallery's argument, set as type ---------- */

.creed { margin: clamp(8px, 2vh, 28px) 0 0; }

@media (min-width: 861px) {
  /* Sits under the plate, offset right, so the column edge is not a wall.
     No character cap: the size is set so the longest clause holds one line
     inside the remaining width, and nothing folds mid-phrase. */
  .creed { margin-left: 28%; }
  .vsec .creed p { font-size: clamp(22px, 2.3vw, 34px); }
}

.vsec .creed p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 5.8vw, 30px);
  line-height: 1.2;
  color: var(--parchment);
}

/* Each clause lands on its own line, so the list reads as a spec, not a run-on.
   On a phone a long clause folds once, and balance keeps the fold from
   stranding one word. */
.vsec .creed span { display: block; text-wrap: balance; }

.vsec .creed span:last-child { color: var(--iron); }

/* ---------- Before / after ---------- */

/* One number drives it: --cut is where the line sits, as a share of the
   width. The shell shows to the left of the line, the club sits underneath. */
.ba {
  --cut: 100%;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1c191a;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;   /* a vertical swipe still scrolls the page */
}

.ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.ba-before { clip-path: inset(0 calc(100% - var(--cut)) 0 0); }

.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--cut);
  width: 2px;
  margin-left: -1px;
  background: var(--parchment);
  box-shadow: 0 0 0 1px rgba(21, 19, 20, 0.35);
  pointer-events: none;
}

.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid var(--parchment);
  border-radius: 50%;
  background: rgba(21, 19, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--parchment);
  transition: transform 300ms var(--ease), background 300ms var(--ease);
}

.ba-knob svg { width: 20px; height: 20px; }

.ba:hover .ba-knob,
.ba.is-dragging .ba-knob {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(21, 19, 20, 0.78);
}

.ba-tag {
  position: absolute;
  bottom: 14px;
  padding: 6px 10px;
  border: 1px solid var(--line-lit);
  background: rgba(21, 19, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--parchment);
  pointer-events: none;
}

.ba-tag--before { left: 14px; }
.ba-tag--after  { right: 14px; }

/* Keyboard access. The input is invisible but focusable, and the box wears
   the ring, so a visitor can see where the arrow keys land. */
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.ba:has(.ba-range:focus-visible) {
  outline: 2px solid var(--parchment);
  outline-offset: 3px;
}

.ba-cap { margin-top: clamp(16px, 2.4vw, 26px); }

.ba-cap p { margin: 0; max-width: 46ch; }

/* ---------- The night: type carries it, no image needed ---------- */

.night {
  border-top: 1px solid var(--line);
  padding-top: clamp(36px, 6vh, 76px);
}

.night-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(30px, 5vh, 60px);
}

@media (min-width: 861px) {
  /* Deliberately uneven. The last column is the short one. */
  .night-grid { grid-template-columns: 1.2fr 1.2fr 0.9fr; }
}

.night-grid h3 {
  margin: 0 0 10px;
  font-size: var(--fs-label);
  font-weight: 900;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--parchment);
}

.night-grid p { margin: 0; font-size: var(--fs-small); }

/* ---------- Close ---------- */

.vclose {
  padding: var(--stack) 0 clamp(80px, 14vh, 150px);
  border-top: 1px solid var(--line);
  text-align: left;
}

.vclose h2 { max-width: 16ch; }

.vclose .cta { margin-top: 34px; }

.vclose-note {
  margin: 18px 0 0;
  font-size: var(--fs-small);
  color: var(--dim);
}

/* ---------- Reveal on scroll ---------- */

.rise {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.rise.is-in { opacity: 1; transform: none; }

/* A stagger, so a row does not arrive as one slab. */
.rise[data-delay="1"] { transition-delay: 90ms; }
.rise[data-delay="2"] { transition-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  .vh-media img { animation: none; }
  .plate-media img { transition: none; }
  .trio-media img { transition: none; }
}

/* ---------- Mobile: collapse hard, never scroll sideways ---------- */

@media (max-width: 860px) {
  .brief { grid-template-columns: 1fr; }
  .trio { grid-template-columns: 1fr; gap: clamp(26px, 6vw, 40px); }
  .vh-copy { max-width: none; }
}
