/**
 * Homepage cut. Scoped to body.pl-index.
 */

@property --sun-x { syntax: '<percentage>'; inherits: true; initial-value: 72%; }
@property --sun-y { syntax: '<percentage>'; inherits: true; initial-value: 92%; }
@property --sun-size { syntax: '<length>'; inherits: true; initial-value: 90px; }
@property --sun-opacity { syntax: '<number>'; inherits: true; initial-value: 0.55; }
@property --moon-x { syntax: '<percentage>'; inherits: true; initial-value: 24%; }
@property --moon-y { syntax: '<percentage>'; inherits: true; initial-value: 18%; }
@property --moon-opacity { syntax: '<number>'; inherits: true; initial-value: 0.55; }
@property --stars-opacity { syntax: '<number>'; inherits: true; initial-value: 0.55; }
@property --heat-opacity { syntax: '<number>'; inherits: true; initial-value: 0.12; }
@property --sky-a { syntax: '<color>'; inherits: true; initial-value: #070714; }
@property --sky-b { syntax: '<color>'; inherits: true; initial-value: #24143c; }
@property --sky-c { syntax: '<color>'; inherits: true; initial-value: #5c3d6e; }
@property --sky-d { syntax: '<color>'; inherits: true; initial-value: #c97b63; }
@property --glow { syntax: '<color>'; inherits: true; initial-value: rgba(180, 80, 120, 0.4); }
@property --sun-core { syntax: '<color>'; inherits: true; initial-value: #ffb38a; }
@property --sun-bloom { syntax: '<color>'; inherits: true; initial-value: rgba(200, 70, 90, 0.45); }

body.pl-index {
    --pl4-ink: #0e0e0e;
    --pl4-muted: #6a645c;
    --pl4-rule: #e4e4e4;
}

/* ── Sky theater ── */
body.pl-index .pl4-sky {
    --sky-a: #070714;
    --sky-b: #24143c;
    --sky-c: #5c3d6e;
    --sky-d: #c97b63;
    --glow: rgba(180, 80, 120, 0.4);
    --sun-x: 72%;
    --sun-y: 92%;
    --sun-size: 90px;
    --sun-core: #ffb38a;
    --sun-bloom: rgba(200, 70, 90, 0.45);
    --sun-opacity: 0.55;
    --moon-x: 24%;
    --moon-y: 18%;
    --moon-opacity: 0.55;
    --stars-opacity: 0.55;
    --heat-opacity: 0.12;
    --ink: #f6eefe;
    --muted: rgba(246, 238, 254, 0.7);
    --rule: rgba(246, 238, 254, 0.2);
    --gaze-x: 0px;
    --gaze-y: 0px;
    position: relative;
    isolation: isolate;
    height: 100vh;
    min-height: 680px;
    overflow: hidden;
    color: var(--ink);
    background:
        radial-gradient(ellipse 90% 55% at 50% 118%, var(--glow), transparent 58%),
        linear-gradient(180deg, var(--sky-a) 0%, var(--sky-b) 38%, var(--sky-c) 72%, var(--sky-d) 100%);
}

body.pl-index .pl4-sky[data-pl4-sky='sunrise'] {
    --sky-a: #2a3a72;
    --sky-b: #e07a5f;
    --sky-c: #f2cc8f;
    --sky-d: #ffe8c8;
    --glow: rgba(255, 186, 120, 0.55);
    --sun-x: 18%;
    --sun-y: 70%;
    --sun-size: 128px;
    --sun-core: #fff4d2;
    --sun-bloom: rgba(255, 170, 90, 0.7);
    --sun-opacity: 1;
    --moon-x: 82%;
    --moon-y: 8%;
    --moon-opacity: 0;
    --stars-opacity: 0;
    --heat-opacity: 0.28;
    --ink: #1c140e;
    --muted: rgba(28, 20, 14, 0.68);
    --rule: rgba(28, 20, 14, 0.18);
}

body.pl-index .pl4-sky[data-pl4-sky='sunset'] {
    --sky-a: #140e28;
    --sky-b: #9b2226;
    --sky-c: #e76f51;
    --sky-d: #f4c095;
    --glow: rgba(255, 90, 40, 0.5);
    --sun-x: 78%;
    --sun-y: 68%;
    --sun-size: 148px;
    --sun-core: #ffd7a1;
    --sun-bloom: rgba(255, 80, 30, 0.7);
    --sun-opacity: 1;
    --moon-opacity: 0;
    --stars-opacity: 0.08;
    --heat-opacity: 0.4;
    --ink: #fff6ee;
    --muted: rgba(255, 246, 238, 0.72);
    --rule: rgba(255, 246, 238, 0.22);
}

body.pl-index .pl4-sky[data-pl4-sky='dusk'] {
    --sky-a: #070714;
    --sky-b: #24143c;
    --sky-c: #5c3d6e;
    --sky-d: #c97b63;
    --glow: rgba(180, 80, 120, 0.4);
    --sun-x: 72%;
    --sun-y: 92%;
    --sun-size: 90px;
    --sun-core: #ffb38a;
    --sun-bloom: rgba(200, 70, 90, 0.45);
    --sun-opacity: 0.55;
    --moon-x: 24%;
    --moon-y: 18%;
    --moon-opacity: 0.55;
    --stars-opacity: 0.55;
    --heat-opacity: 0.12;
    --ink: #f6eefe;
    --muted: rgba(246, 238, 254, 0.7);
    --rule: rgba(246, 238, 254, 0.2);
}

body.pl-index .pl4-sky[data-pl4-sky='twilight'] {
    --sky-a: #02040a;
    --sky-b: #0b1224;
    --sky-c: #15243d;
    --sky-d: #1c3358;
    --glow: rgba(70, 120, 180, 0.28);
    --sun-x: 88%;
    --sun-y: 108%;
    --sun-size: 70px;
    --sun-opacity: 0;
    --moon-x: 70%;
    --moon-y: 22%;
    --moon-opacity: 0.92;
    --stars-opacity: 1;
    --heat-opacity: 0;
    --ink: #eef3fb;
    --muted: rgba(238, 243, 251, 0.68);
    --rule: rgba(238, 243, 251, 0.18);
}

body.pl-index .pl4-sky,
body.pl-index .pl4-sky .pl-time-benefits__grid,
body.pl-index .pl4-sky .pl-time-benefits__copy {
    min-height: 0;
}

body.pl-index .pl4-sky__world {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

body.pl-index .pl4-sky__veil {
    position: absolute;
    inset: -10%;
    background:
        radial-gradient(circle at var(--sun-x) var(--sun-y), var(--sun-bloom), transparent 42%),
        radial-gradient(ellipse 70% 40% at 50% 100%, var(--glow), transparent 70%);
    transform: translate(var(--gaze-x), var(--gaze-y));
}

body.pl-index .pl4-sky__sun {
    position: absolute;
    left: var(--sun-x);
    top: var(--sun-y);
    width: var(--sun-size);
    height: var(--sun-size);
    margin: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 36%, #fff, var(--sun-core) 42%, transparent 72%);
    box-shadow:
        0 0 40px 16px var(--sun-core),
        0 0 120px 48px var(--sun-bloom),
        0 0 220px 90px rgba(255, 140, 60, 0.28);
    opacity: var(--sun-opacity);
    transform: translate(calc(-50% + var(--gaze-x)), calc(-50% + var(--gaze-y)));
    will-change: left, top, opacity;
}

body.pl-index .pl4-sky__moon {
    position: absolute;
    left: var(--moon-x);
    top: var(--moon-y);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 30%, #f7f3ea, #cfd6e4 62%, #9aa7bd);
    box-shadow:
        0 0 24px 8px rgba(220, 230, 255, 0.35),
        inset -10px -6px 0 rgba(20, 30, 50, 0.18);
    opacity: var(--moon-opacity);
    transform: translate(calc(-50% + calc(var(--gaze-x) * -0.4)), calc(-50% + calc(var(--gaze-y) * -0.4)));
    will-change: left, top, opacity;
}

body.pl-index .pl4-sky__stars {
    position: absolute;
    inset: 0;
    opacity: var(--stars-opacity);
    background-image:
        radial-gradient(1px 1px at 8% 18%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 22% 12%, #fff, transparent),
        radial-gradient(1px 1px at 31% 28%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 44% 9%, #fff, transparent),
        radial-gradient(2px 2px at 57% 21%, #fff, transparent),
        radial-gradient(1px 1px at 71% 14%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 83% 31%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 91% 11%, #fff, transparent),
        radial-gradient(1px 1px at 14% 41%, #fff, transparent),
        radial-gradient(1px 1px at 39% 36%, rgba(255, 255, 255, 0.55), transparent),
        radial-gradient(1px 1px at 64% 44%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 78% 38%, #fff, transparent),
        radial-gradient(1px 1px at 96% 48%, #fff, transparent),
        radial-gradient(1px 1px at 5% 62%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 27% 58%, #fff, transparent);
    animation: pl4-twinkle 5.5s ease-in-out infinite;
}

body.pl-index .pl4-sky__heat {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18%;
    height: 28%;
    background: linear-gradient(180deg, transparent, rgba(255, 180, 90, 0.18), transparent);
    opacity: var(--heat-opacity);
    filter: blur(18px);
    transform: scaleX(1.15);
    animation: pl4-heat 7s ease-in-out infinite;
}

body.pl-index .pl4-sky__grain {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

body.pl-index .pl4-sky__center {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 var(--pl-time-inset);
    box-sizing: border-box;
}

body.pl-index .pl4-sky .pl-time-benefits__copy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: min(100%, 36rem);
    max-width: 36rem;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    gap: 22px;
}

body.pl-index .pl4-sky .pl-time-benefits__head,
body.pl-index .pl4-sky .pl-time-benefits__accordion {
    width: 100%;
    max-width: none;
    align-self: stretch;
    text-align: left;
}

body.pl-index .pl4-sky .pl-time-benefits__head .pl-time-title {
    font-size: clamp(36px, 5.5vw, 56px);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 1.02;
}

body.pl-index .pl4-sky .pl-time-eyebrow,
body.pl-index .pl4-sky .pl-time-title,
body.pl-index .pl4-sky .pl-time-benefits__trigger,
body.pl-index .pl4-sky .pl-time-benefits__icon {
    color: var(--ink);
}

body.pl-index .pl4-sky .pl-time-benefits__item {
    border-bottom-color: var(--rule);
}

body.pl-index .pl4-sky .pl-time-benefits__trigger-label {
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

body.pl-index .pl4-sky .pl-time-benefits__text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--muted);
}

body.pl-index .pl4-sky .pl-time-benefits__title .pl-time-typewriter-cursor {
    background: currentColor;
}

body.pl-index .pl4-sky .pl-time-benefits__visual {
    display: none;
}

body.pl-index .pl4-sky__hours {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: max(28px, env(safe-area-inset-bottom));
    display: flex;
    gap: 4px;
    padding: 5px;
    transform: translateX(-50%);
    background: rgba(8, 6, 12, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.pl-index .pl4-sky__hours button {
    appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.62);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 10px 16px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

body.pl-index .pl4-sky__hours button[aria-selected='true'] {
    color: #0e0e0e;
    background: #fff;
}

body.pl-index .pl4-sky__hours button:hover {
    color: #fff;
}

body.pl-index .pl4-sky__hours button[aria-selected='true']:hover {
    color: #0e0e0e;
}

@keyframes pl4-twinkle {
    0%,
    100% { opacity: var(--stars-opacity); }
    50% { opacity: calc(var(--stars-opacity) * 0.55); }
}

@keyframes pl4-heat {
    0%,
    100% { transform: scaleX(1.1) translateY(0); }
    50% { transform: scaleX(1.22) translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
    body.pl-index .pl4-sky,
    body.pl-index .pl4-sky__sun,
    body.pl-index .pl4-sky__moon,
    body.pl-index .pl4-sky__veil,
    body.pl-index .pl4-sky__stars {
        transition: none;
        animation: none;
    }

    body.pl-index .pl4-sky__heat {
        animation: none;
    }

}

/* ── Lamp: light finds the line ── */
body.pl-index .pl4-lamp,
body.pl-landing-about .pl4-lamp {
    --sx: 42%;
    --sy: 48%;
    position: relative;
    height: 100vh;
    min-height: 680px;
    overflow: hidden;
    background: #070707;
    color: #fff;
}

body.pl-index .pl4-lamp__spot,
body.pl-landing-about .pl4-lamp__spot {
    position: absolute;
    z-index: 1;
    left: var(--sx);
    top: var(--sy);
    width: 72vmax;
    height: 72vmax;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(255, 228, 186, 0.22) 0%,
        rgba(255, 196, 120, 0.08) 32%,
        transparent 62%
    );
    pointer-events: none;
    mix-blend-mode: screen;
    transition: width 0.4s ease, height 0.4s ease;
}

body.pl-index .pl4-lamp__ghost,
body.pl-index .pl4-lamp__word,
body.pl-landing-about .pl4-lamp__ghost,
body.pl-landing-about .pl4-lamp__word {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 4vw 48px;
    font-size: clamp(72px, 22vw, 280px);
    font-weight: 600;
    letter-spacing: -0.07em;
    line-height: 0.82;
    text-align: center;
    pointer-events: none;
    user-select: none;
}

body.pl-index .pl4-lamp__ghost,
body.pl-landing-about .pl4-lamp__ghost {
    color: #fff;
    opacity: 0.045;
}

body.pl-index .pl4-lamp__word,
body.pl-landing-about .pl4-lamp__word {
    z-index: 3;
    color: #fff8ee;
    -webkit-mask-image: radial-gradient(
        circle 38vmax at var(--sx) var(--sy),
        #000 0%,
        rgba(0, 0, 0, 0.55) 38%,
        transparent 70%
    );
    mask-image: radial-gradient(
        circle 38vmax at var(--sx) var(--sy),
        #000 0%,
        rgba(0, 0, 0, 0.55) 38%,
        transparent 70%
    );
}

body.pl-index .pl4-lamp__note,
body.pl-landing-about .pl4-lamp__note {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: max(36px, env(safe-area-inset-bottom));
    margin: 0;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.38);
}

body.pl-index .pl-crew-hero--products,
body.pl-index .pl-crew-product {
    border-radius: 0;
}

body.pl-index.pl-landing.pl-crew .pl-crew-hero.pl-crew-hero--products {
    padding-top: clamp(72px, 12vh, 128px);
    padding-bottom: 0;
}

body.pl-index .pl-time-founder {
    padding-top: clamp(48px, 6vh, 64px);
    padding-bottom: clamp(48px, 6vh, 64px);
}

@media (max-width: 860px) {
    body.pl-index .pl4-sky {
        min-height: 100svh;
    }

    body.pl-index .pl4-sky .pl-time-benefits__head .pl-time-title {
        font-size: clamp(36px, 5.5vw, 56px);
    }

    body.pl-index .pl4-lamp,
    body.pl-landing-about .pl4-lamp {
        min-height: 100svh;
    }

    body.pl-index .pl4-lamp__ghost,
    body.pl-index .pl4-lamp__word,
    body.pl-landing-about .pl4-lamp__ghost,
    body.pl-landing-about .pl4-lamp__word {
        font-size: clamp(64px, 28vw, 140px);
    }

}
