/**
 * De Wetenschap page styles (page-de-wetenschap.php)
 *
 * All rules are scoped under .ws-page and all classes carry the ws- prefix
 * so nothing collides with theme classes (.hero, .step, .card) or the
 * .page-content-wrapper element rules from wordpress-pages.css.
 * Design tokens come from main.css (:root).
 *
 * @package 33procent
 */

.ws-page {
    background: var(--color-white);
    color: var(--color-dark-gray);
}

.ws-wrap {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ==========================================================================
   Typography inside the page (overrides theme element defaults)
   ========================================================================== */

.ws-page .ws-eyebrow {
    display: block;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.ws-page h2.ws-h2 {
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--color-dark);
    margin: 0 0 1.2rem;
    max-width: 760px;
}

.ws-page p.ws-lede {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-dark-gray);
    max-width: 760px;
    margin: 0 0 1.3rem;
}

.ws-page p.ws-text {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--color-dark-gray);
    max-width: 760px;
    margin: 0 0 1.1rem;
}

.ws-page .ws-text strong {
    color: var(--color-dark);
}

.ws-page p.ws-src {
    font-size: 0.8rem;
    color: var(--color-gray);
    line-height: 1.6;
    max-width: 760px;
    font-style: italic;
    margin: 1.4rem 0 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.ws-hero {
    background: var(--gradient-hero);
    color: var(--color-white);
    /* clears the fixed theme nav (~72px) */
    padding: calc(76px + 4.5rem) 0 var(--spacing-2xl);
    position: relative;
    overflow: hidden;
}

.ws-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 107, 53, 0.18), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(255, 213, 79, 0.12), transparent 45%);
}

.ws-hero__inner {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    text-align: center;
}

.ws-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--color-accent);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.ws-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 8px rgba(255, 213, 79, 0.9);
}

.ws-page .ws-hero h1 {
    font-size: clamp(2.1rem, 4.5vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: normal;
    color: var(--color-white);
    margin: 0 0 1.1rem;
}

.ws-page .ws-hero h1 em {
    font-style: normal;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ws-page .ws-hero__lead {
    font-size: 1.15rem;
    color: #cbd5e1;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.ws-hero__stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ws-stat {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    min-width: 150px;
    max-width: 200px;
}

.ws-stat b {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1.2;
}

.ws-stat span {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
    display: block;
    margin-top: 0.2rem;
}

/* ==========================================================================
   Section blocks
   ========================================================================== */

.ws-block {
    padding: var(--spacing-3xl) 0;
}

.ws-block--alt {
    background: var(--color-light-gray);
}

.ws-two-col {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.ws-two-col--top {
    align-items: start;
}

@media (max-width: 900px) {
    .ws-two-col {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Big number card
   ========================================================================== */

.ws-bignum {
    background: var(--color-dark);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.ws-bignum .ws-bignum__num {
    font-size: 5rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.ws-bignum .ws-bignum__num sup {
    font-size: 2.2rem;
}

.ws-page .ws-bignum p {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 1rem 0 0;
}

/* ==========================================================================
   Generic cards, callouts, notes
   ========================================================================== */

.ws-card {
    background: var(--color-white);
    border: 1px solid #eef1f5;
    border-radius: var(--border-radius);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

/* (0,3,0): must beat animations.css .scroll-reveal.revealed, which prints later */
.ws-page .ws-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Restores fast hover transitions after animations.css .scroll-reveal
   (transition: all .8s, printed later) takes over; opacity keeps the
   reveal fade timing. */
.ws-page .ws-card.revealed,
.ws-page .ws-pillar.revealed {
    transition: transform var(--transition-base), box-shadow var(--transition-fast), opacity 0.8s ease-out;
}

.ws-page .ws-card h3 {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--color-dark);
    margin: 0 0 0.5rem;
}

.ws-page .ws-card p {
    font-size: 0.85rem;
    color: var(--color-gray);
    line-height: 1.6;
    margin: 0;
}

.ws-grid3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

@media (max-width: 750px) {
    .ws-grid3 {
        grid-template-columns: 1fr;
    }
}

.ws-callout {
    background: var(--gradient-accent);
    border-radius: var(--border-radius);
    padding: 1.5rem 1.7rem;
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.ws-callout__tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}

.ws-page .ws-callout p {
    margin: 0;
    line-height: 1.65;
    font-size: 0.98rem;
    color: var(--color-white);
}

.ws-note {
    background: #fff7ed;
    border-left: 4px solid var(--color-secondary);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.3rem;
    font-size: 0.92rem;
    color: var(--color-dark-gray);
    line-height: 1.65;
    margin: 1.4rem 0 0;
    max-width: 760px;
}

.ws-note b {
    color: var(--color-dark);
}

/* ==========================================================================
   Principle index badge
   ========================================================================== */

.ws-idxrow {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.ws-idxrow > div:last-child {
    flex: 1;
    min-width: 0;
}

.ws-idx {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--gradient-accent);
    color: var(--color-white);
    font-weight: 800;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
    .ws-idxrow {
        gap: 1rem;
    }

    .ws-idx {
        width: 48px;
        height: 48px;
        font-size: 1.05rem;
        border-radius: 12px;
    }
}

/* ==========================================================================
   Chart cards (pure CSS infographics)
   ========================================================================== */

.ws-chart {
    background: var(--color-white);
    border: 1px solid #eef1f5;
    border-radius: var(--border-radius-lg);
    padding: 1.8rem;
    box-shadow: var(--shadow-lg);
}

.ws-chart__title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gray);
    margin-bottom: 1.2rem;
}

/* --- Bar chart --- */

.ws-bars {
    display: flex;
    align-items: flex-end;
    gap: 2.5rem;
    height: 210px;
    padding: 0 0.5rem;
}

.ws-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
}

.ws-bar {
    width: 100%;
    max-width: 74px;
    border-radius: 8px 8px 0 0;
    position: relative;
    flex-shrink: 0;
}

.ws-bar span {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--color-dark);
    white-space: nowrap;
}

.ws-bar--muted {
    height: 35%;
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
}

.ws-bar--accent {
    height: 71%;
    background: var(--gradient-accent);
}

/* Labels live outside the fixed-height bar area so wrapping labels can
   never compress the bars (and distort the 35% vs 71% ratio). */
.ws-bars-labels {
    display: flex;
    gap: 2.5rem;
    padding: 0 0.5rem;
}

.ws-bar__label {
    flex: 1;
    margin-top: 0.9rem;
    font-size: 0.82rem;
    color: var(--color-dark-gray);
    text-align: center;
    line-height: 1.4;
}

/* --- Stepper (the 5 study groups) --- */

.ws-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: 6px;
}

.ws-stepper::before {
    content: "";
    position: absolute;
    top: 30px;
    left: 24px;
    right: 24px;
    height: 2px;
    background: #e2e8f0;
}

.ws-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
    padding: 0 0.3rem;
}

.ws-step__dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--color-gray);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    border: 3px solid var(--color-white);
}

.ws-step--final .ws-step__dot {
    background: var(--gradient-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.ws-step small {
    display: block;
    font-size: 0.72rem;
    color: var(--color-gray);
    margin-top: 0.6rem;
    line-height: 1.4;
    max-width: 100px;
}

.ws-step--final small {
    color: var(--color-dark);
    font-weight: 600;
}

@media (max-width: 700px) {
    .ws-stepper {
        flex-wrap: wrap;
        row-gap: 1.5rem;
    }

    .ws-stepper::before {
        display: none;
    }

    .ws-step {
        flex: 0 0 33%;
    }
}

/* --- Effect-size scale (Cohen's d) --- */

.ws-scale {
    position: relative;
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    margin: 3rem 0.5rem 3.4rem;
}

.ws-scale__fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 42%;
    width: 38%;
    background: var(--gradient-accent);
    border-radius: 999px;
}

.ws-scale__tick {
    position: absolute;
    top: -8px;
    width: 2px;
    height: 26px;
    background: #cbd5e1;
}

.ws-scale__tick span {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--color-gray);
    white-space: nowrap;
}

.ws-scale__marker {
    position: absolute;
    top: -24px;
    transform: translateX(-50%);
    text-align: center;
}

.ws-scale__marker b {
    display: block;
    background: var(--color-dark);
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
}

.ws-scale__marker::after {
    content: "";
    display: block;
    width: 2px;
    height: 16px;
    background: var(--color-dark);
    margin: 0 auto;
}

.ws-page .ws-scale-caption {
    font-size: 0.82rem;
    color: var(--color-gray);
    margin: 0;
    line-height: 1.6;
}

/* --- Habit formation timeline --- */

.ws-timeline {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: #e2e8f0;
    margin: 3.6rem 0.5rem 3.2rem;
}

.ws-timeline__range {
    position: absolute;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.18), rgba(255, 213, 79, 0.35));
    border-radius: 999px;
}

.ws-tpoint {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-dark);
    border: 3px solid var(--color-white);
    box-shadow: 0 0 0 2px var(--color-dark);
}

.ws-tpoint--myth {
    background: #94a3b8;
    box-shadow: 0 0 0 2px #94a3b8;
}

.ws-tpoint--hero {
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.25);
}

.ws-tpoint--app {
    background: var(--color-secondary);
    box-shadow: 0 0 0 2px var(--color-secondary);
}

.ws-tlabel {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
}

.ws-tlabel--below {
    top: 22px;
}

.ws-tlabel b {
    display: block;
    font-size: 0.85rem;
    color: var(--color-dark);
    line-height: 1.3;
}

.ws-tlabel span {
    font-size: 0.72rem;
    color: var(--color-gray);
}

.ws-tlabel--myth b {
    color: #94a3b8;
}

.ws-tlabel--app b {
    color: var(--color-primary-dark);
}

@media (max-width: 600px) {
    .ws-timeline {
        margin-left: 0;
        margin-right: 0;
    }

    .ws-tlabel b {
        font-size: 0.72rem;
    }

    .ws-tlabel span {
        font-size: 0.62rem;
    }

    /* extra small so it clears the 66-dagen label on narrow phones */
    .ws-tlabel--myth b {
        font-size: 0.65rem;
    }

    .ws-tlabel--myth span {
        font-size: 0.58rem;
    }
}

/* ==========================================================================
   Pillars + convergence
   ========================================================================== */

.ws-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.ws-pillar {
    background: var(--color-white);
    border: 1px solid #eef1f5;
    border-radius: var(--border-radius);
    padding: 1.4rem 1.1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.ws-page .ws-pillar:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.ws-pillar__n {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-accent);
    color: var(--color-white);
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.7rem;
}

.ws-page .ws-pillar h3 {
    font-size: 0.92rem;
    color: var(--color-dark);
    margin: 0 0 0.3rem;
}

.ws-page .ws-pillar p {
    font-size: 0.78rem;
    color: var(--color-gray);
    line-height: 1.5;
    margin: 0;
}

.ws-converge-arrow {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    color: var(--color-gray);
    font-size: 1.4rem;
    margin: 0.2rem 0 0.8rem;
}

.ws-converge {
    background: var(--gradient-hero);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 1.7rem;
    text-align: center;
    color: var(--color-white);
    max-width: 460px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.ws-page .ws-converge p {
    margin: 0;
    color: #e2e8f0;
    font-size: 0.98rem;
    line-height: 1.7;
}

.ws-converge b {
    color: var(--color-accent);
}

@media (max-width: 700px) {
    .ws-pillars {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Claims (what we do / don't say)
   ========================================================================== */

.ws-claims {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.ws-claims__col {
    border-radius: var(--border-radius-lg);
    padding: 1.8rem;
}

.ws-claims__col--no {
    background: var(--color-navy);
    color: #e2e8f0;
}

.ws-claims__col--yes {
    background: var(--gradient-accent);
    color: var(--color-white);
}

.ws-page .ws-claims__col h3 {
    font-size: 1.05rem;
    margin: 0 0 1rem;
    color: inherit;
}

.ws-page .ws-claims__col ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.92rem;
    line-height: 1.7;
    list-style: disc;
}

.ws-page .ws-claims__col li {
    margin-bottom: 0.6rem;
}

.ws-page .ws-claims__col li:last-child {
    margin-bottom: 0;
}

.ws-claims__col--no ul {
    color: #cbd5e1;
}

.ws-claims__col--yes ul {
    color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 750px) {
    .ws-claims {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   References
   ========================================================================== */

.ws-page ol.ws-refs {
    max-width: 820px;
    font-size: 0.88rem;
    color: var(--color-gray);
    line-height: 1.8;
    padding-left: 1.3rem;
    margin: 0;
    list-style: decimal;
}

.ws-page .ws-refs li {
    margin-bottom: 0.6rem;
}

.ws-page .ws-refs a {
    color: var(--color-primary);
    text-decoration: none;
    word-break: break-word;
}

.ws-page .ws-refs a:hover {
    text-decoration: underline;
}

.ws-page p.ws-foottag {
    text-align: center;
    color: var(--color-gray);
    font-size: 0.85rem;
    padding: 2.4rem 0 0;
    margin: 0;
}

/* ==========================================================================
   Spacing helpers used by the template
   ========================================================================== */

.ws-mt-2 {
    margin-top: 2rem;
}

.ws-mt-3 {
    margin-top: 3rem;
}

.ws-mt-12 {
    margin-top: 1.2rem;
}

.ws-center {
    text-align: center;
}

.ws-center .ws-h2,
.ws-center .ws-lede {
    margin-left: auto;
    margin-right: auto;
}

/* Mobile hero: slightly less top padding, smaller stat chips */
@media (max-width: 600px) {
    .ws-hero {
        padding-top: calc(64px + 3rem);
    }

    .ws-stat {
        min-width: 130px;
        padding: 0.8rem 1rem;
    }

    .ws-block {
        padding: var(--spacing-2xl) 0;
    }

    .ws-bars {
        gap: 1.2rem;
        height: 190px;
    }

    .ws-bars-labels {
        gap: 1.2rem;
    }
}
