/*
 * Triple e Digital — Packaging Design Service Page
 * packaging.css — this page's hero and accents, loads AFTER branding.css
 *
 * DEPLOY:
 * 1. Upload to /templates/wavo/css/packaging.css
 * 2. Load from the first Custom HTML addon on the page (the STYLES row in
 *    that page's sections file), in this order:
 *      <link href="https://fonts.googleapis.com/css2?family=Caveat:wght@500&display=swap" rel="stylesheet">
 *      <link rel="stylesheet" href="/templates/wavo/css/branding.css">
 *      <link rel="stylesheet" href="/templates/wavo/css/packaging.css">
 *      <link rel="modulepreload" href="/media/three/three.module.min.js">
 * 3. Menu item → Page Display → Page Class: te-branding-page
 *
 * This file adds the "The Whole Package" 3D hero and a few packaging-page accents.
 * Fonts: the headline is Bayon like the rest of the site. Caveat is the one extra
 * font, used for the handwritten pencil notes on the dieline and the scroll hint.
 * Everything else (hook, chapters, signal, process, portfolio, CTA, FAQ) uses branding.css as-is.
 */

/* ══ PACKAGING HERO ═════════════════════════════════════════════════════════ */
.pk-hero {
  --pk-paper:#f9f9f9;
  --pk-hdr:0px;              /* JS overwrites this with the real #sp-header height */
  position:relative; z-index:2;
  height:720vh;              /* scroll length of the whole sequence */
  background:#000;
}
.pk-hero *, .pk-hero *::before, .pk-hero *::after { box-sizing:border-box; margin:0; padding:0; }

.pk-stage {
  position:sticky; top:var(--pk-hdr);
  height:calc(100vh - var(--pk-hdr));
  height:calc(100svh - var(--pk-hdr));
  overflow:hidden;
  background:var(--pk-paper);
}
.pk-canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }

/* inside-the-box reveal */
.pk-inside {
  position:absolute; inset:0; opacity:0; pointer-events:none;
  background:radial-gradient(ellipse 70% 65% at 50% 52%, #1c1c1c 0%, #121212 45%, #050505 100%);
}
.pk-inside svg { position:absolute; inset:0; width:100%; height:100%; }

/* the H1 — real text, revealed at the end */
.pk-title {
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:0 5vw; text-align:center; pointer-events:none;
  font-family:'Bayon',sans-serif; font-weight:400;
  font-size:clamp(3.4rem,12.5vw,12rem); line-height:.92; letter-spacing:0; text-transform:uppercase;
}
.pk-l { display:block; overflow:hidden; padding:.04em .02em; }
.pk-l > span { display:block; transform:translateY(105%); opacity:0; will-change:transform; }
.pk-l1 > span { color:var(--w); }
.pk-l2 > span { color:var(--y); }

/* scroll hint (pencil-note style): at the top, the first thing people read.
   The "static ritual" file note sits at the bottom of the dieline instead. */
.pk-hint {
  position:absolute; left:50%; top:3.5vh; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:.2em;
  font-family:'Caveat',cursive; font-weight:500; font-size:clamp(1.3rem,2.2vw,1.8rem); line-height:1;
  color:#4a4b4b; pointer-events:none; transition:opacity .2s;
}
.pk-hint svg { width:22px; height:30px; animation:pkBob 1.6s ease-in-out infinite; }
@keyframes pkBob { 50% { transform:translateY(6px); } }

/* Static fallback: reduced motion, or a browser without WebGL.
   JS adds .pk-static; the finished headline shows on black at rest. */
.pk-hero.pk-static { height:auto; }
.pk-hero.pk-static .pk-stage { position:relative; top:0; height:calc(100vh - var(--pk-hdr)); }
.pk-hero.pk-static .pk-canvas, .pk-hero.pk-static .pk-hint { display:none; }
.pk-hero.pk-static .pk-inside { opacity:1; }
.pk-hero.pk-static .pk-l > span { transform:none; opacity:1; }

@media (prefers-reduced-motion:reduce){
  .pk-hero { height:auto; }
  .pk-stage { position:relative; top:0; }
  .pk-hint svg { animation:none; }
}

/* ══ PACKAGING-PAGE ACCENTS ═════════════════════════════════════════════════ */
/* Hook eyebrow line becomes a dashed fold line (branding = solid line, print = CMYK bar).
   Same 60px × 1px size as every other eyebrow line; six 6px dashes. */
.pk-hook .hook-eyebrow::before { width:60px; background:repeating-linear-gradient(90deg,var(--y) 0 6px,transparent 6px 10px); }
/* Signal word in charcoal on this page (branding = yellow, print = blue) */
.pk-signal .signal-word { color:var(--ch); }
/* UNBOXED is one letter longer than SIGNAL, so it gets a slightly smaller size on phones */
@media (max-width:480px){ .pk-signal .signal-word { font-size:clamp(44px,13vw,120px); } }
