/* ==========================================================
   pmt.report — frutiger-aero, hexagonal-honeycomb, ethereal-blue
   palette: #D8E8F8 sky / #A0C0E8 cloud / #1838A0 ocean
            #E8F0F8 frost / #E04848 rebel / #202030 ink
            #40A0A8 wave-teal
   fonts: Caveat (handwritten), Inter (body / metrics)
   ========================================================== */

:root {
    --sky: #D8E8F8;
    --cloud: #A0C0E8;
    --ocean: #1838A0;
    --frost: #E8F0F8;
    --rebel: #E04848;
    --ink: #202030;
    --wave: #40A0A8;

    --hex-w: 220px;
    --hex-h: calc(220px * 1.1547);

    --font-hand: 'Caveat', 'Lora', cursive;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--sky);
    line-height: 1.75;
    overflow-x: hidden;
    font-size: clamp(14px, 0.9vw, 16px);
    font-weight: 400;
}

/* =========================
   REPORT COVER
   ========================= */
.report-cover {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--sky) 0%, var(--cloud) 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px 160px;
}

.cover-aero-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.55) 35%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 65%,
        transparent 100%
    );
    background-size: 250% 250%;
    background-position: -100% -100%;
    pointer-events: none;
    animation: aero-sweep 6s ease-out 0.5s 1 forwards;
}

@keyframes aero-sweep {
    0%   { background-position: -100% -100%; opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { background-position: 100% 100%; opacity: 0; }
}

.cover-illustrations {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.illust {
    position: absolute;
    width: 64px;
    height: 64px;
    opacity: 0;
    animation: illust-fade-in 1200ms ease-out forwards;
}

.illust-1 { top: 12%; left: 10%; animation-delay: 800ms; }
.illust-2 { top: 18%; right: 12%; animation-delay: 950ms; width: 56px; height: 56px; }
.illust-3 { bottom: 28%; left: 14%; animation-delay: 1100ms; width: 70px; height: 70px; }
.illust-4 { top: 32%; right: 18%; animation-delay: 1250ms; width: 50px; height: 50px; }
.illust-5 { bottom: 32%; right: 8%; animation-delay: 1400ms; width: 76px; height: 76px; }

@keyframes illust-fade-in {
    0%   { opacity: 0; transform: translateY(8px) rotate(-4deg); }
    100% { opacity: 0.85; transform: translateY(0) rotate(0deg); }
}

.cover-content {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 900px;
}

.cover-meta {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--ocean);
    margin-bottom: 24px;
    opacity: 0;
    animation: fade-up 800ms ease-out 200ms forwards;
}

.cover-title {
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: clamp(56px, 9vw, 132px);
    line-height: 1;
    color: var(--ocean);
    letter-spacing: -0.01em;
}

.cover-title .title-line {
    display: inline-block;
    overflow: hidden;
}

.cover-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40%);
}

.cover-title .char.in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 320ms ease, transform 480ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cover-subtitle {
    font-family: var(--font-body);
    font-size: clamp(13px, 1vw, 16px);
    font-weight: 400;
    color: var(--ink);
    margin-top: 18px;
    opacity: 0;
    animation: fade-up 700ms ease-out 1500ms forwards;
}

.cover-tagline {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-up 700ms ease-out 1700ms forwards;
}

.tag-pill {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ocean);
    padding: 6px 14px;
    border: 1px solid var(--ocean);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(232,240,248,0.4) 100%);
    backdrop-filter: blur(2px);
}

.tag-pill.rebel {
    color: var(--rebel);
    border-color: var(--rebel);
}

.cover-handwritten {
    position: absolute;
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: 22px;
    color: var(--rebel);
    z-index: 4;
    opacity: 0;
    animation: fade-up 800ms ease-out 1900ms forwards;
}

.cover-handwritten {
    top: 22%;
    left: 18%;
    transform: rotate(-3deg);
}

.cover-handwritten-2 {
    top: auto;
    bottom: 26%;
    left: auto;
    right: 18%;
    transform: rotate(2deg);
    color: var(--ocean);
}

.cover-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 140px;
    pointer-events: none;
    overflow: hidden;
}

.wave-svg {
    position: absolute;
    left: -10%;
    width: 220%;
    height: 100%;
    will-change: transform;
}

.wave-a { top: 0;   animation: wave-flow 12s linear infinite; }
.wave-b { top: 12px; animation: wave-flow 18s linear infinite reverse; opacity: 0.7; }
.wave-c { top: 30px; animation: wave-flow 22s linear infinite; opacity: 0.55; }

@keyframes wave-flow {
    from { transform: translateX(0); }
    to   { transform: translateX(-25%); }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================
   SECTIONS
   ========================= */
.hex-section {
    position: relative;
    padding: 100px 24px 80px;
    background: var(--sky);
}

.section-anomalies   { background: linear-gradient(180deg, var(--sky) 0%, var(--frost) 100%); }
.section-methodology { background: var(--frost); }
.section-notes       { background: linear-gradient(180deg, var(--frost) 0%, var(--sky) 100%); }

.section-header {
    max-width: 1200px;
    margin: 0 auto 48px;
    position: relative;
}

.section-title {
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: clamp(36px, 4.5vw, 64px);
    color: var(--ocean);
    line-height: 1;
    letter-spacing: -0.005em;
}

.section-annotation {
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: 20px;
    color: var(--rebel);
    margin-top: 6px;
    display: inline-block;
}

.section-handwritten {
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: 22px;
    color: var(--rebel);
    text-align: center;
    margin-top: 56px;
    display: inline-block;
    width: 100%;
}

/* =========================
   HEX GRID
   ========================= */
.hex-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, var(--hex-w));
    gap: 4px 4px;
    justify-content: center;
    padding: 20px 0;
}

/* honeycomb offset rows */
.hex-grid > .hex:nth-child(odd) {
    transform: translateY(0);
}
.hex-grid > .hex:nth-child(even) {
    transform: translateY(calc(var(--hex-h) * 0.30));
}

@media (max-width: 720px) {
    .hex-grid > .hex:nth-child(even) { transform: translateY(0); }
}

.hex {
    width: var(--hex-w);
    height: var(--hex-h);
    position: relative;
    cursor: pointer;
    -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
            clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(180deg, var(--frost) 0%, #D2DEEE 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        inset 0 -2px 6px rgba(24, 56, 160, 0.08),
        0 6px 14px rgba(24, 56, 160, 0.10);
    transition: filter 250ms ease, transform 350ms ease;
    opacity: 0;
}

.hex.in {
    opacity: 1;
    transition: opacity 600ms ease, filter 250ms ease, transform 350ms ease;
}

.hex.hex-narrative,
.hex.hex-method,
.hex.hex-note {
    cursor: default;
}

.hex-rebel {
    background: linear-gradient(180deg, #FFE4E0 0%, #F8D2CD 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.9),
        inset 0 -2px 6px rgba(224, 72, 72, 0.18),
        0 6px 14px rgba(224, 72, 72, 0.18);
}

.hex-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hex-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    text-align: center;
    transition: opacity 300ms ease, transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hex-face-back {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
}

.hex-morph[data-state="chart"] .hex-face-front {
    opacity: 0;
    transform: scale(1.08);
    pointer-events: none;
}

.hex-morph[data-state="chart"] .hex-face-back {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* hex face content */
.hex-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ocean);
    margin-bottom: 12px;
}

.hex-value {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(24px, 2.5vw, 38px);
    color: var(--ink);
    line-height: 1;
    margin-bottom: 8px;
}

.hex-rebel .hex-value { color: var(--rebel); }

.hex-trend {
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: 15px;
    color: var(--rebel);
}

.hex-eyebrow {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--rebel);
    margin-bottom: 10px;
}

.hex-narrative-title {
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 22px;
    color: var(--ocean);
    margin-bottom: 8px;
    line-height: 1.05;
}

.hex-narrative-text {
    font-family: var(--font-body);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink);
    max-width: 90%;
}

.hex-chart {
    width: 80%;
    height: auto;
    max-height: 60px;
}

.hex-chart-radial { width: 60%; }

.hex-caption {
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: 14px;
    color: var(--rebel);
    margin-top: 8px;
}

.morph-hint {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ocean);
    opacity: 0.55;
    transition: opacity 250ms ease;
    pointer-events: none;
}

.hex-morph[data-state="chart"] .morph-hint {
    opacity: 0;
}

/* method hex */
.method-step {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--rebel);
    margin-bottom: 10px;
}

.method-title {
    font-family: var(--font-hand);
    font-weight: 700;
    font-size: 28px;
    color: var(--ocean);
    line-height: 1;
    margin-bottom: 10px;
}

.method-text {
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.55;
    color: var(--ink);
    max-width: 90%;
}

/* note hex */
.note-mark {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 28px;
    color: var(--rebel);
    line-height: 1;
    margin-bottom: 6px;
}

.note-text {
    font-family: var(--font-body);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink);
    max-width: 92%;
}

.note-by {
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: 16px;
    color: var(--ocean);
    margin-top: 8px;
}

/* hover */
@media (hover: hover) {
    .hex:hover {
        filter: brightness(1.04);
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.95),
            inset 0 -2px 8px rgba(24, 56, 160, 0.14),
            0 0 0 2px var(--ocean),
            0 10px 22px rgba(24, 56, 160, 0.20);
    }
    .hex-rebel:hover {
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,0.95),
            inset 0 -2px 8px rgba(224, 72, 72, 0.22),
            0 0 0 2px var(--rebel),
            0 10px 22px rgba(224, 72, 72, 0.25);
    }
}

/* pulse for morph-ready */
.hex-morph.in {
    animation: morph-pulse 2s ease-in-out infinite;
}

@keyframes morph-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.012); }
}

.hex-grid > .hex-morph:nth-child(even).in {
    animation: morph-pulse-shift 2s ease-in-out infinite;
}

@keyframes morph-pulse-shift {
    0%, 100% { transform: translateY(calc(var(--hex-h) * 0.30)) scale(1); }
    50%      { transform: translateY(calc(var(--hex-h) * 0.30)) scale(1.012); }
}

@media (max-width: 720px) {
    .hex-grid > .hex-morph:nth-child(even).in {
        animation-name: morph-pulse;
    }
}

/* =========================
   WAVE BAND DIVIDERS
   ========================= */
.wave-band {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    background: var(--frost);
}

.wave-band-1, .wave-band-3 { background: linear-gradient(180deg, var(--sky) 0%, var(--frost) 100%); }
.wave-band-2 { background: linear-gradient(180deg, var(--frost) 0%, var(--frost) 100%); }

.band-svg {
    position: absolute;
    width: 200%;
    height: 100%;
    left: -10%;
    will-change: transform;
}

.wave-band-1 .band-svg { animation: band-flow 16s linear infinite; }
.wave-band-2 .band-svg { animation: band-flow 20s linear infinite reverse; }
.wave-band-3 .band-svg { animation: band-flow 14s linear infinite; }

@keyframes band-flow {
    from { transform: translateX(0); }
    to   { transform: translateX(-25%); }
}

/* =========================
   SIGNATURE / FOOTER
   ========================= */
.report-signature {
    position: relative;
    background: linear-gradient(180deg, var(--sky) 0%, var(--cloud) 100%);
    padding: 0 24px 80px;
}

.sig-wave-border {
    width: 100%;
    height: 60px;
    overflow: hidden;
}

.sig-wave-border svg {
    width: 200%;
    height: 100%;
    animation: band-flow 18s linear infinite;
}

.sig-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 20px 0 40px;
    position: relative;
}

.sig-illustrations {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.sig-illust {
    width: 56px;
    height: 56px;
    opacity: 0.85;
}

.sig-handwritten {
    font-family: var(--font-hand);
    font-weight: 400;
    font-size: 24px;
    color: var(--ocean);
    margin: 8px 0;
    display: inline-block;
}

.sig-handwritten-2 {
    color: var(--rebel);
    margin-top: 12px;
}

.sig-svg {
    display: block;
    margin: 0 auto;
    width: clamp(220px, 40vw, 360px);
    height: 80px;
}

#sig-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 1800ms ease-out;
}

#sig-path.in {
    stroke-dashoffset: 0;
}

.sig-meta {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ocean);
    opacity: 0.7;
    margin-top: 16px;
}

/* =========================
   SVG ANNOTATION ROTATIONS
   ========================= */
[data-rotate]:not(.cover-handwritten) {
    transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (hover: hover) {
    .hex-section:hover .section-annotation[data-rotate] {
        transform: rotate(0deg);
    }
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 980px) {
    :root {
        --hex-w: 180px;
        --hex-h: calc(180px * 1.1547);
    }
    .cover-handwritten { left: 10%; top: 18%; font-size: 18px; }
    .cover-handwritten-2 { right: 10%; bottom: 22%; font-size: 18px; }
    .illust { width: 48px; height: 48px; }
    .hex-narrative-text, .note-text, .method-text { font-size: 11.5px; }
}

@media (max-width: 600px) {
    :root {
        --hex-w: 158px;
        --hex-h: calc(158px * 1.1547);
    }
    .hex-section { padding: 70px 14px 60px; }
    .cover-handwritten,
    .cover-handwritten-2 { display: none; }
    .hex-grid { gap: 6px; }
    .hex-value { font-size: 22px; }
    .hex-narrative-text, .note-text, .method-text { font-size: 11px; }
    .method-title, .hex-narrative-title { font-size: 18px; }
}
