/* =====================================================================
   CIEL Integrated Report 2026 — landing page
   Pixel-faithful reproduction of Figma node 1:2 (1920 × 5941)

   Strategy: an exact 1920×5941 "stage" with absolutely-positioned
   elements (matching Figma coordinates 1:1). A JS-driven scale wrapper
   shrinks the whole stage to fit any viewport width while keeping the
   internal layout pixel-perfect.
   ===================================================================== */

/* ---- Font -----------------------------------------------------------
   The design uses "Pluto Sans" (a licensed HVD font). It is NOT bundled.
   If you own it, drop the web files in /fonts and uncomment the @font-face
   blocks below. Until then we fall back to Poppins (a close rounded-
   geometric match, loaded in index.html) then system sans.            */

/*
@font-face { font-family:'Pluto Sans'; font-weight:300; font-style:normal;
  src:url('./fonts/PlutoSans-Light.woff2') format('woff2'); font-display:swap; }
@font-face { font-family:'Pluto Sans'; font-weight:400; font-style:normal;
  src:url('./fonts/PlutoSans-Regular.woff2') format('woff2'); font-display:swap; }
@font-face { font-family:'Pluto Sans'; font-weight:500; font-style:normal;
  src:url('./fonts/PlutoSans-Medium.woff2') format('woff2'); font-display:swap; }
@font-face { font-family:'Pluto Sans'; font-weight:700; font-style:normal;
  src:url('./fonts/PlutoSans-Bold.woff2') format('woff2'); font-display:swap; }
*/

:root {
  --ciel-navy:    #003258;
  --ciel-cyan:    #2da4d2;
  --ciel-cyan-75: rgba(45, 164, 210, 0.75);
  --ciel-pale:    #b6daeb;
  --ciel-white:   #fafbfb;
  --ciel-font: 'Pluto Sans', 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

/* ---- Reset (scoped to our subtree) ---------------------------------- */
.ciel-viewport, .ciel-viewport * { box-sizing: border-box; }
.ciel-viewport p { margin: 0; }

/* ---- Responsive scale wrapper --------------------------------------- */
.ciel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;          /* clip the scaled stage cleanly            */
  background: #ffffff;
  /* height is set inline by JS = 5941 * scale                          */
}

/* ---- The fixed 1920×5941 design stage ------------------------------- */
.ciel-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 5941px;
  background: #ffffff;
  transform-origin: top left;
  transform: scale(var(--ciel-scale, 1));
  font-family: var(--ciel-font);
  color: var(--ciel-navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Font-weight helpers (Pluto Sans variants) ---------------------- */
.pl { font-weight: 300; }   /* Light   */
.pr { font-weight: 400; }   /* Regular */
.pm { font-weight: 500; }   /* Medium  */
.pb { font-weight: 700; }   /* Bold    */

/* ---- Primitives ----------------------------------------------------- */
.abs   { position: absolute; }
.cover { position: absolute; inset: 0; width: 100%; height: 100%;
         object-fit: cover; pointer-events: none; }
.clip  { position: absolute; overflow: hidden; }
.block-img { position: absolute; inset: 0; width: 100%; height: 100%;
             display: block; }

/* ---- Reusable outlined (ghost) button ------------------------------- */
.ciel-btn {
  position: absolute;
  border-radius: 5px;
  border: 2px solid var(--ciel-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  color: var(--ciel-cyan);
  text-transform: uppercase;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.ciel-btn--white { border-color: #ffffff; color: var(--ciel-white);
                   text-transform: none; }

/* ---- Reusable name plate (pale-blue tab) ---------------------------- */
.ciel-plate {
  position: absolute;
  background: var(--ciel-pale);
  border-top-left-radius: 20px;
}
.ciel-plate__label {
  position: absolute;
  font-weight: 400;
  color: var(--ciel-navy);
  text-transform: uppercase;
  text-align: center;
}

/* ---- Discover-the-report thumbnail (rounded square) ----------------- */
.ciel-thumb {
  position: absolute;
  width: 118px;
  height: 118px;
  border-radius: 20px;
  overflow: hidden;
}

/* ---- A divider line (thin navy rule) -------------------------------- */
.ciel-rule { position: absolute; height: 0; border-top: 1px solid var(--ciel-navy); }

/* ---- Scroll reveals (blur + fade text / zoom photos — scroll-driven) */
:root {
  --ciel-reveal-dur: 1s;
  --ciel-reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.ciel-reveal {
  opacity: 0;
  filter: blur(12px);
  transition:
    opacity var(--ciel-reveal-dur) var(--ciel-reveal-ease) var(--ciel-reveal-delay, 0s),
    filter calc(var(--ciel-reveal-dur) * 1.1) var(--ciel-reveal-ease) var(--ciel-reveal-delay, 0s);
}

.ciel-reveal.is-inview {
  opacity: 1;
  filter: blur(0);
}

/* Large photos: skip heavy blur; zoom image inside clip instead */
.ciel-reveal--media {
  opacity: 0;
  filter: none;
  transition: opacity var(--ciel-reveal-dur) var(--ciel-reveal-ease) var(--ciel-reveal-delay, 0s);
}

.ciel-reveal--media.is-inview {
  opacity: 1;
}

.ciel-reveal--media > img {
  transform: scale(1.07);
  transform-origin: center center;
  transition: transform 1.15s var(--ciel-reveal-ease) var(--ciel-reveal-delay, 0s);
}

.ciel-reveal--media.is-inview > img {
  transform: scale(1);
}

/* Standalone images (charts, portraits, SVG hero art) */
img.ciel-reveal--zoom {
  opacity: 0;
  transform: scale(1.06);
  transform-origin: center center;
  transition:
    opacity var(--ciel-reveal-dur) var(--ciel-reveal-ease) var(--ciel-reveal-delay, 0s),
    transform 1.15s var(--ciel-reveal-ease) var(--ciel-reveal-delay, 0s);
}

img.ciel-reveal--zoom.is-inview {
  opacity: 1;
  transform: scale(1);
}

/* Thumbnail tiles: soft fade + zoom inner crop */
.ciel-reveal--thumb {
  opacity: 0;
  filter: blur(6px);
  transition:
    opacity 0.9s var(--ciel-reveal-ease) var(--ciel-reveal-delay, 0s),
    filter 1s var(--ciel-reveal-ease) var(--ciel-reveal-delay, 0s);
}

.ciel-reveal--thumb.is-inview {
  opacity: 1;
  filter: blur(0);
}

.ciel-reveal--thumb > img {
  transform: scale(1.12);
  transform-origin: center center;
  transition: transform 1s var(--ciel-reveal-ease) var(--ciel-reveal-delay, 0s);
}

.ciel-reveal--thumb.is-inview > img {
  transform: scale(1);
}

/* Buttons / plates: same soft reveal as text */
.ciel-btn.ciel-reveal,
.ciel-plate.ciel-reveal {
  filter: blur(10px);
}

@media (prefers-reduced-motion: reduce) {
  .ciel-reveal,
  .ciel-reveal--media,
  .ciel-reveal--thumb,
  img.ciel-reveal--zoom,
  .ciel-reveal--media > img,
  .ciel-reveal--thumb > img {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }
}
