/* ==========================================================================
   GIBC V2 — poster layer. Below the hero the site keeps talking like the
   poster: puffy bubble titles with an Egyptian-blue offset, rattle-can grain,
   halftone dots, die-cut stickers, polaroids with tape, name tags and marker
   notes in the hand of the “V2” script. Loaded after gibc.css + pages.css.
   ========================================================================== */
@font-face { font-family: 'Bagel Fat One'; font-display: swap; src: url(../fonts/bagel-fat-one.woff2) format('woff2'); }
@font-face { font-family: 'Reenie Beanie'; font-display: swap; src: url(../fonts/reenie-beanie.woff2) format('woff2'); }

:root {
  --font-bubble: 'Bagel Fat One', 'Cabinet Grotesk', system-ui, sans-serif;
  --font-hand: 'Reenie Beanie', 'Bradley Hand', 'Segoe Print', cursive;
  --paper: #D6D6DD;          /* the logo letters' light grey */
  --egypt: #1E2260;          /* the logo's navy (V2, sparkles) */
  --sticker: #0C0C10;
  --edge: #D6D6DD;
  --drop: 7px 9px 0 #1A1D52;
}

/* ---------- Bubble titles: white puff, blue offset, spray grain ---------- */
.display, .h1, .h2, .p-name, .next-title, .tier h3, .tl-month, .stat-num, .podium-bar strong, .ms-date, .orbit-card h3, .growth .from, .growth .to {
  font-family: var(--font-bubble); font-weight: 400; letter-spacing: -0.005em;
  text-shadow: .05em .06em 0 var(--egypt);
}
.h1 { font-size: clamp(46px, 7.2vw, 116px); line-height: .98; }
.h2 { font-size: clamp(38px, 5vw, 80px); line-height: .98; }
.display { line-height: .92; }
.display, .h1, .h2, .p-name, .next-title {
  -webkit-mask: url(../img/tex/grain.png) 0 0 / 192px; mask: url(../img/tex/grain.png) 0 0 / 192px;
}
/* the second half of a title is no longer greyed out — it gets a marker swash */
.display em, .h1 em, .h2 em, .p-name em, .orbit-card h3 em, .tcard h3 em {
  color: inherit; font-style: normal; padding-bottom: .1em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 18' preserveAspectRatio='none'%3E%3Cpath d='M4 12C42 5 76 15 114 9s80-6 122-2' fill='none' stroke='%23A9ABBD' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") 0 100% / 100% .22em no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero-title em { color: var(--signal); background: none; }

/* ---------- Marker notes instead of mono “(01) LABEL” kickers ---------- */
.label:has(.label-index), .page-hero .ph-grid > div > .label, .page-hero > .wrap > .label, .section-head .label {
  font: 400 clamp(27px, 2.3vw, 36px)/1 var(--font-hand); letter-spacing: 0; text-transform: none;
  color: var(--signal); rotate: -2.5deg; transform-origin: 0 50%; gap: 10px;
}
.label-index { display: none; }
.label .star { width: 16px; height: 16px; }
.hand { font-family: var(--font-hand); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--signal); }

/* ---------- Die-cut stickers (every .hud panel) ---------- */
.hud { background: var(--sticker); border: 3px solid var(--edge); border-radius: 26px; box-shadow: var(--drop); }
.hud::after, .hud-corners::before, .glow { display: none !important; }
.grid > .hud, .hs-track > .hud, .stats > .stat, .tags > *, .sticker-wall > * {
  rotate: var(--r, 0deg); transition: rotate .6s var(--spring), translate .6s var(--spring), box-shadow .4s var(--ease);
}
.grid > .hud:nth-child(3n+1), .hs-track > .hud:nth-child(odd) { --r: -1.4deg; }
.grid > .hud:nth-child(3n+2), .hs-track > .hud:nth-child(even) { --r: 1.2deg; }
.grid > .hud:nth-child(3n) { --r: -.5deg; }
.grid > .hud:hover, .hs-track > .hud:hover { rotate: 0deg; translate: 0 -6px; box-shadow: 10px 14px 0 rgba(0, 0, 0, .5); }

/* fills: blue and paper stickers for rhythm */
.grid > .hud:nth-child(4n+2), .sticker-blue, .orbit-card:nth-child(2), .ms.is-now, .ms.is-next, .tl-item.is-now, .tl-item.is-next {
  background: var(--egypt); --fg: #F4F5FF; --fg-2: rgba(244, 245, 255, .8); --fg-3: rgba(244, 245, 255, .6); --line: rgba(244, 245, 255, .28);
  --surface: rgba(255, 255, 255, .08); --accent: #FFFFFF; --accent-ink: #0E34A0; color: var(--fg);
}
.grid > .hud:nth-child(4n+3), .paper, .orbit-card:nth-child(3), .form-shell.hud, .doc.hud, .tier-grand, .champion.hud {
  background: var(--paper); --fg: #0B0C22; --fg-2: rgba(11, 12, 34, .72); --fg-3: rgba(11, 12, 34, .52); --line: rgba(11, 12, 34, .16);
  --surface: rgba(11, 12, 34, .05); --accent: #0E34A0; --accent-ink: #FFFFFF; --signal: #0E34A0; color: var(--fg);
}
.paper .btn, .form-shell .btn, .champion .btn, .tier-grand .btn { --b: var(--egypt); --t: #fff; }
.paper .h1, .paper .h2, .paper .h4, .paper h3, .doc dd, .form-shell, .champion .h4 { color: var(--fg); }

/* ---------- Buttons: printed pills with a hard drop ---------- */
.btn { --b: var(--paper); --t: #0B0C22; border: 2.5px solid var(--edge); box-shadow: 5px 6px 0 var(--egypt); }
.btn::before { background: var(--egypt); }
.btn:hover { color: #fff; box-shadow: 7px 9px 0 rgba(0, 0, 0, .6); }
.btn:active { box-shadow: 0 0 0 transparent; }
.btn-ghost { --b: transparent; --t: var(--fg); border-color: color-mix(in srgb, var(--fg) 55%, transparent); box-shadow: 5px 6px 0 rgba(0, 0, 0, .45); }
.btn-ghost:hover { border-color: var(--edge); }
.nav-cta { box-shadow: 3px 4px 0 var(--egypt); }

/* ---------- Chips become little stickers ---------- */
.chip { height: auto; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--edge); background: var(--paper); color: #0B0C22;
  box-shadow: 3px 4px 0 rgba(0, 0, 0, .5); font: 700 13px/1.1 var(--font-body); letter-spacing: 0; text-transform: none; rotate: -1.2deg; }
.chips > .chip:nth-child(even), .chip-solid { background: var(--egypt); color: #fff; rotate: 1.4deg; }
.chips > .chip:nth-child(3n) { rotate: -.4deg; }

/* ---------- Rows, specs, steps, criteria: ruled with a marker ---------- */
.rows, .spec, .steps, .criteria { border-top: 2px dashed var(--line); }
.row, .spec > dt, .spec > dd, .step, .crit, .sponsor { border-bottom: 2px dashed var(--line); }
.row::before { display: none; }
a.row:hover > * { translate: 10px 0; }
a.row:hover .row-title { color: var(--signal); }
.row .mono { font: 400 32px/1 var(--font-hand); color: var(--signal); opacity: 1; }
.spec > dt { font: 400 26px/1.1 var(--font-hand); letter-spacing: 0; text-transform: none; color: var(--signal); padding-top: 16px; }
.step::before { font: 400 44px/1 var(--font-hand); color: var(--signal); padding-top: 0; }
.crit h3::before { content: '✶ '; color: var(--signal); }

/* ---------- Numbers on stickers ---------- */
.stats { display: flex; flex-wrap: wrap; gap: clamp(14px, 2vw, 24px); border-top: 0; }
.stats > .stat, .stats > .stat + .stat { padding: 20px 26px 18px; border: 3px solid var(--edge); border-radius: 22px; background: var(--sticker); box-shadow: var(--drop); }
.stats > .stat:nth-child(odd) { --r: -2deg; } .stats > .stat:nth-child(even) { --r: 1.6deg; background: var(--egypt); }
.stat-label { font: 400 26px/1 var(--font-hand); letter-spacing: 0; text-transform: none; color: var(--signal); margin-top: 8px; }
.stats > .stat:nth-child(even) .stat-label { color: #C9C9D1; }

/* ---------- Quotes are notes taped to the page ---------- */
.quote { position: relative; max-width: 30ch; padding: 34px 36px 30px; border: 0; border-radius: 4px; background: var(--paper); color: #0B0C22;
  font: 400 clamp(34px, 3.2vw, 50px)/1.02 var(--font-hand); letter-spacing: 0; box-shadow: var(--drop); rotate: -1.5deg; }
.quote cite { color: rgba(11, 12, 34, .55); }
.quote::before, .polaroid::before { content: ''; position: absolute; top: -15px; left: 50%; width: 120px; height: 32px; translate: -50% 0; rotate: -4deg;
  background: rgba(230, 230, 236, .55); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }

/* ---------- Polaroids ---------- */
.polaroid { position: relative; margin: 0; padding: 12px 12px 58px; border-radius: 5px; background: #F4F3F8; box-shadow: 9px 11px 0 rgba(0, 0, 0, .5); rotate: var(--r, -2deg); transition: rotate .6s var(--spring); }
.polaroid:hover { rotate: 0deg; }
.polaroid .media { border-radius: 2px; --clip-r: 2px; background: #ddd; }
.polaroid figcaption { position: absolute; left: 12px; right: 12px; bottom: 14px; text-align: center; font: 400 31px/1 var(--font-hand); color: #0B0C22; }
.hover-img { padding: 10px 10px 34px; background: #F4F3F8; border-radius: 5px; box-shadow: 9px 11px 0 rgba(0, 0, 0, .5); }
.hover-img img { border-radius: 2px; }

/* ---------- Name tags (judges) ---------- */
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(20px, 2.6vw, 34px); }
.tag { overflow: hidden; border-radius: 18px; background: #FFFFFF; color: #0B0C22; border: 3px solid var(--edge); box-shadow: var(--drop); }
.tags > :nth-child(3n+1) { --r: -2.4deg; } .tags > :nth-child(3n+2) { --r: 1.8deg; } .tags > :nth-child(3n) { --r: -.8deg; }
.tags > :hover { rotate: 0deg; translate: 0 -6px; }
.tag-top { padding: 14px 10px 10px; background: var(--egypt); color: #fff; text-align: center; }
.tag-top b { display: block; font: 400 34px/1 var(--font-bubble); letter-spacing: .03em; }
.tag-top span { font: 700 12px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; }
.tag-name { padding: 26px 14px 6px; text-align: center; font: 400 clamp(40px, 3.4vw, 54px)/.95 var(--font-hand); color: #10155A; }
.tag-org { padding: 0 14px 20px; text-align: center; font: 600 14px/1.3 var(--font-body); color: rgba(11, 12, 34, .62); }

/* ---------- Sticker wall (sponsor logos) ---------- */
.sticker-wall { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(14px, 2vw, 26px); }
.sticker-logo { display: grid; place-items: center; height: clamp(80px, 8.5vw, 108px); padding: 0 clamp(24px, 2.6vw, 38px); border-radius: 24px;
  background: var(--sticker); border: 3px solid var(--edge); box-shadow: 6px 8px 0 rgba(0, 0, 0, .55); }
.sticker-logo img { width: auto; height: clamp(24px, 2.4vw, 34px); max-width: 190px; object-fit: contain; }
.sticker-wall > :nth-child(5n+1) { --r: -4deg; } .sticker-wall > :nth-child(5n+2) { --r: 3deg; background: var(--egypt); } .sticker-wall > :nth-child(5n+3) { --r: -1.5deg; }
.sticker-wall > :nth-child(5n+4) { --r: 5deg; background: var(--paper); } .sticker-wall > :nth-child(5n+4) img { filter: invert(1) brightness(.12); } .sticker-wall > :nth-child(5n) { --r: -3deg; }
.js .sticker-wall > .in:hover, .sticker-wall > :hover { rotate: 0deg; translate: 0 -6px; }

/* the “slap” reveal: stickers land with a little overshoot */
.js .reveal-slap { opacity: 0; scale: 1.35; rotate: calc(var(--r, 0deg) + 10deg); transition: opacity .25s ease, scale .75s var(--spring), rotate .75s var(--spring), translate .6s var(--spring); transition-delay: var(--d, 0s); }
.js .reveal-slap.in { opacity: 1; scale: 1; rotate: var(--r, 0deg); }
.js .tags > .reveal-slap.in:hover, .js .sticker-wall > .reveal-slap.in:hover { rotate: 0deg; }

/* ---------- Print texture: halftone bands + the poster's binary ---------- */
.section::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 220px; z-index: -1; pointer-events: none; opacity: .55;
  background: radial-gradient(circle, rgba(218, 218, 224, .2) 1.3px, transparent 1.9px) 0 0 / 10px 10px;
  -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent); }
.binary { position: absolute; z-index: -1; font: 500 12px/1.7 var(--font-mono); white-space: pre; color: rgba(218, 218, 224, .16); pointer-events: none; user-select: none; }

/* ---------- Scribbles that draw themselves ---------- */
.scribble { position: relative; display: inline-block; }
.scribble svg { position: absolute; inset: -18% -10%; width: 120%; height: 136%; overflow: visible; pointer-events: none; }
.scribble path { fill: none; stroke: var(--signal); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; transition: stroke-dashoffset 1.6s var(--ease) .4s; }
.scribble.in path, .in .scribble path { stroke-dashoffset: 0; }

/* ---------- Pieces that were glassy, now printed ---------- */
.nav { background: rgba(6, 6, 9, .9); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 2px rgba(242, 241, 247, .7), 5px 6px 0 rgba(0, 0, 0, .5); }
.ms-state, .tl-state { font: 400 24px/1 var(--font-hand); letter-spacing: 0; text-transform: none; }
.tier { border-width: 3px; }
.tier-grand h3 { color: #0B0C22; text-shadow: .05em .06em 0 #FFC94D; }
.sponsor .logo-mark { opacity: 1; }
.page-hero-foot, .hs-head { border-top: 0; }
.footer-grid { border-top: 2px dashed var(--line); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal-slap { scale: 1 !important; rotate: var(--r, 0deg) !important; transition: opacity .4s linear !important; }
  .scribble path { stroke-dashoffset: 0; transition: none; }
}

.growth .from { color: var(--fg-3); text-shadow: .05em .06em 0 rgba(14, 52, 160, .5); }
.gallery .polaroid figcaption { font-size: 27px; }
.ph-side .polaroid .media { aspect-ratio: 4 / 5; }
.ph-side .polaroid .media.wide { aspect-ratio: 4 / 3; }
