/* ============================================================
   WebXLR8 content templates — base.css
   Slide 1080x1350. Post 1080x1080. Doc page 794x1123 (A4 at 96dpi).
   Themes via [data-theme="light|dark|mixed"] on .slide-row / .post-row.
   ============================================================ */
@import url("./colors_and_type.css");
@import url("./themes.css");

:root { --slide-w: 1080px; --slide-h: 1350px; }

html, body { margin: 0; padding: 0; font-family: var(--font-sans); }
body { background: #141414; color: #f2f2f2; min-height: 100vh; }

/* === Gallery chrome === */
.stage { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 48px 32px 96px; }
.stage-header { width: 100%; max-width: 1400px; display: flex; align-items: center; justify-content: space-between; }
.stage-header h1 { color: #fff; font-size: 22px; font-weight: 500; letter-spacing: -0.025em; margin: 0; }
.stage-header .meta { color: var(--wx8-muted-invert); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 6px; }
.stage-controls { display: flex; gap: 8px; align-items: center; }
.stage-controls button, .stage-controls select {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  padding: 8px 16px; border-radius: var(--wx8-r-pill);
  border: 1px solid var(--wx8-hairline-invert);
  background: rgba(255,255,255,0.05); color: #f2f2f2; cursor: pointer;
  transition: all 200ms var(--wx8-ease); letter-spacing: -0.01em;
}
.stage-controls button:hover { background: rgba(255,255,255,0.1); }
.stage-controls button.is-active { background: var(--wx8-orange); border-color: var(--wx8-orange); color: #fff; }
.back-link { color: var(--wx8-muted-invert); text-decoration: none; font-size: 13px; font-weight: 500; }
.back-link:hover { color: #fff; }

.slide-row { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; width: 100%; max-width: 1500px; }
.slide-wrap {
  width: 432px; height: 540px; position: relative;
  border-radius: var(--wx8-r-card); overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06); background: #000; flex: 0 0 auto;
}
.slide-wrap.size-md { width: 540px; height: 675px; }
.slide-wrap.size-lg { width: 648px; height: 810px; }
.slide { width: var(--slide-w); height: var(--slide-h); transform-origin: 0 0; transform: scale(0.4); position: relative; overflow: hidden; }
.slide-wrap.size-md .slide { transform: scale(0.5); }
.slide-wrap.size-lg .slide { transform: scale(0.6); }
.slide-label { position: absolute; bottom: 8px; right: 12px; z-index: 10; font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,0.85); letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; }

/* === Slide surface === */
.s {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: 88px; box-sizing: border-box;
  background: var(--bg-page); color: var(--ink-1);
}

/* === Type ===
   Scaled up from the site's clamp() ranges to suit a 1080x1350 canvas that is
   read at thumbnail size in a feed. Weights and tracking are the site's. */
.kicker {
  font-size: 20px; font-weight: 600; line-height: 1;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-text);
}
.display   { font-size: 96px; font-weight: 500; line-height: 0.98; letter-spacing: -0.04em;  color: var(--ink-1); text-wrap: balance; margin: 0; }
.h1        { font-size: 68px; font-weight: 500; line-height: 1.04; letter-spacing: -0.035em; color: var(--ink-1); text-wrap: balance; margin: 0; }
.h2        { font-size: 48px; font-weight: 500; line-height: 1.1;  letter-spacing: -0.03em;  color: var(--ink-1); margin: 0; }
.h3        { font-size: 34px; font-weight: 500; line-height: 1.2;  letter-spacing: -0.02em;  color: var(--ink-1); margin: 0; }
.lede      { font-size: 30px; font-weight: 400; line-height: 1.5;  letter-spacing: -0.01em;  color: var(--ink-2); text-wrap: pretty; margin: 0; }
.body-c    { font-size: 25px; font-weight: 400; line-height: 1.55; letter-spacing: -0.005em; color: var(--ink-2); margin: 0; }
.small-c   { font-size: 21px; font-weight: 400; line-height: 1.5;  color: var(--ink-3); margin: 0; }

/* Orange is the emphasis colour, exactly as on the site. */
.display em, .h1 em, .h2 em { font-style: normal; color: var(--accent); }
.s--orange .display em, .s--orange .h1 em, .s--orange .h2 em {
  color: #fff; text-decoration: underline; text-decoration-thickness: 6px; text-underline-offset: 10px;
  text-decoration-color: rgba(255,255,255,0.5);
}

/* The oversized wordmark, the site's loudest single device. */
.wordmark { font-size: 250px; font-weight: 500; line-height: 0.78; letter-spacing: -0.045em; white-space: nowrap; color: var(--ink-1); }

/* === Brand lockup ===
   Two marks ship in the markup and CSS picks one, so a slide can change ground
   without the logo needing to be swapped by hand. */
.brand { display: flex; align-items: center; }
.brand-logo { height: 42px; width: auto; display: block; }
.brand-logo-light { display: none; }
.s--dark .brand-logo-dark, .s--panel .brand-logo-dark, .s--orange .brand-logo-dark { display: none; }
.s--dark .brand-logo-light, .s--panel .brand-logo-light, .s--orange .brand-logo-light { display: block; }
[data-theme="dark"] .brand-logo-dark { display: none; }
[data-theme="dark"] .brand-logo-light { display: block; }
[data-theme="light"] .s--dark .brand-logo-dark, [data-theme="light"] .s--panel .brand-logo-dark { display: block; }
[data-theme="light"] .s--dark .brand-logo-light, [data-theme="light"] .s--panel .brand-logo-light { display: none; }

/* === Components === */
.card {
  background: var(--card-bg); border: 1px solid var(--line);
  border-radius: var(--wx8-r-card); padding: 40px;
}
.card--sm { border-radius: var(--wx8-r-card-sm); padding: 28px; }
.panel-c { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--wx8-r-panel); padding: 48px; }

.pill {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 20px 34px; border-radius: var(--wx8-r-pill);
  background: var(--accent); color: var(--on-accent);
  font-size: 24px; font-weight: 500; letter-spacing: -0.01em; align-self: flex-start;
}
.pill--outline { background: transparent; color: var(--ink-1); border: 1px solid var(--line); }
.pill .dot { width: 12px; height: 12px; border-radius: var(--radius-circle); background: currentColor; }

.tag {
  display: inline-flex; align-items: center; padding: 10px 20px;
  border-radius: var(--wx8-r-pill); border: 1px solid var(--line);
  font-size: 19px; font-weight: 500; letter-spacing: -0.005em; color: var(--ink-2);
}
.tag--orange { background: var(--wx8-orange); border-color: var(--wx8-orange); color: #fff; }

.rule { height: 1px; background: var(--line); width: 100%; }

/* === Orange comet streaks ===
   The site's signature backdrop (.wx8-streaks). Near-vertical gradient axis so
   the bands run horizontally, blurred, skewed, then radially masked into a
   comet that fades at both ends. */
.streaks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.streaks::before, .streaks::after { content: ""; position: absolute; }
.streaks::before {
  inset: 42% -16% 6% 40%;
  background: repeating-linear-gradient(178deg,
    transparent 0 12px, rgba(255,61,0,0.85) 12px 17px,
    rgba(255,176,58,0.70) 17px 21px, transparent 21px 44px);
  filter: blur(6px) saturate(1.3); opacity: 0.85; transform: skewY(-2deg);
  -webkit-mask-image: radial-gradient(66% 100% at 56% 50%, #000 4%, rgba(0,0,0,0.4) 48%, transparent 86%);
  mask-image: radial-gradient(66% 100% at 56% 50%, #000 4%, rgba(0,0,0,0.4) 48%, transparent 86%);
}
.streaks::after {
  inset: 38% -6% 2% 48%;
  background: radial-gradient(60% 50% at 50% 52%, rgba(255,100,20,0.42) 0%, rgba(255,61,0,0) 74%);
  filter: blur(36px);
}
.streaks--top::before { inset: 2% 40% 52% -16%; transform: skewY(-1.5deg);
  -webkit-mask-image: radial-gradient(60% 100% at 44% 50%, #000 6%, rgba(0,0,0,0.35) 46%, transparent 82%);
  mask-image: radial-gradient(60% 100% at 44% 50%, #000 6%, rgba(0,0,0,0.35) 46%, transparent 82%); }
.streaks--top::after { inset: 0 44% 58% -10%; }
/* On light grounds the same alphas disappear into the paper. */
.s:not(.s--dark):not(.s--panel):not(.s--orange) .streaks::before { opacity: 0.55; }

/* === Dots and footer === */
.dots { display: flex; gap: 8px; align-items: center; }
.dots .dot { width: 9px; height: 9px; border-radius: var(--radius-circle); background: var(--ink-3); opacity: 0.45; }
.dots .dot.is-active { width: 28px; background: var(--accent); opacity: 1; }

.s-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 28px; font-size: 20px; color: var(--ink-3); }
.corner { font-size: 20px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* === Helpers === */
.row { display: flex; } .col { display: flex; flex-direction: column; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; } .grow { flex: 1; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.gap-8 { gap: 32px; } .gap-10 { gap: 40px; } .gap-12 { gap: 48px; }
.mt-auto { margin-top: auto; }

@media print {
  body { background: #fff; }
  .stage-header, .stage-controls { display: none !important; }
  .stage { padding: 0; gap: 0; }
  .slide-wrap { transform: none !important; width: var(--slide-w) !important; height: var(--slide-h) !important; border: 0 !important; border-radius: 0; page-break-after: always; }
  .slide { transform: none !important; }
}
