/* 
DEFYDIRECTIVE.CSS — landing page layer
Loads AFTER /assets/css/defy.css (tokens & shared components).
Hero scene, terminal, snagged paper w/ 3D flutter, manifesto.
*/


.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 130px 24px 100px;
    background: url("/assets/img/dark-wall2.webp") center / cover no-repeat;
    overflow: hidden; 
}


.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to right,  #000 0%, transparent 14%),
        linear-gradient(to left,   #000 0%, transparent 14%),
        linear-gradient(to bottom, #000 0%, transparent 18%),
        linear-gradient(to top,    #000 0%, transparent 22%);
    z-index: 2;
}


.terminal {
    position: relative;
    width: 100%;
    max-width: 720px;
    z-index: 3;       
    perspective: 900px;      
    background: #050505;
    border: 1px solid #1a1a1a;
    box-shadow: 0 0 80px rgba(192,57,43,0.05), 0 30px 60px rgba(0,0,0,0.85);
}

.terminal-bar {
    padding: 12px 16px 12px 58px;   
    position: relative;
    border-bottom: 1px solid #1a1a1a;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #555;
    text-transform: uppercase;
}

.terminal-bar::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    margin-top: -4.5px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--red-dim);
    box-shadow: 13px 0 0 #2a2a2a, 26px 0 0 #2a2a2a;
}

.terminal-body {
    padding: 26px 26px 34px;
    font-family: var(--mono);
    font-size: clamp(11px, 1.6vw, 13px);
    line-height: 2.1;
    color: var(--white-dim);
    min-height: 340px;
    white-space: pre-wrap;   
}

.terminal-body b { font-style: normal; font-weight: 700; }
.terminal-body .ok { color: #5a7a5a; font-weight: 400; }
.terminal-body .warn { color: var(--red); font-weight: 400; }
.terminal-body .bright { color: var(--white); }

.js-active .terminal-body > span { visibility: hidden; }
.js-active .terminal-body > span.typed { visibility: visible; }


.t-cursor {
    font-style: normal;
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--red);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }


.paper {
    position: absolute;
    top: -110px;
    right: -50px;
    width: min(400px, 82vw);
    height: auto;
    z-index: 4;
    transform-origin: 82% 12%; /* pivots around the snag point */
    transform: rotate(-3.2deg);
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6));
}


/* OUTER: the travel path — smooth arc, one gentle curve, no rotation */
.js-active .paper {
    animation: drift 3.2s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}
@keyframes drift {
    0%   { transform: translate(-70vw, -30vh); opacity: 0; }
    10%  { opacity: 1; }
    100% { transform: translate(0, 0); }
}

/* INNER: the tumble — continuous rotation, no sign flips, settles late */
.js-active .paper-sheet {
    animation: tumble 3.2s cubic-bezier(0.35, 0, 0.2, 1) both;
    display: block;
    width: 100%;
}
@keyframes tumble {
    0%   { transform: rotate(-200deg) rotateX(50deg) rotateY(-35deg); }
    60%  { transform: rotate(-40deg)  rotateX(15deg) rotateY(-10deg); }
    85%  { transform: rotate(7.5deg) rotateX(-3deg) rotateY(2deg); }   /* overshoot */
    93%  { transform: rotate(2.5deg) rotateX(1deg)  rotateY(0); }      /* recoil */
    100% { transform: rotate(4deg) rotateX(0)     rotateY(0); }
}

.scroll-cue {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.3em;
    color: rgba(240, 236, 228, 0.35);
    text-transform: uppercase;
    text-decoration: none;
    z-index: 3;
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.8; }
}

.scene-manifesto {
    padding: 120px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #000;
}

.manifesto-inner { max-width: 640px; width: 100%; }

.indictment {
    font-family: var(--mono);
    font-size: clamp(12px, 1.5vw, 14px);
    line-height: 2.1;
    color: rgba(240, 236, 228, 0.5);
    border-left: 2px solid var(--red-dim);
    padding-left: 22px;
    margin-bottom: 44px;
}

.pivot {
    font-family: var(--body);
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 600;
    color: var(--white);
    line-height: 1.5;
    margin-bottom: 28px;
}

.thesis {
    font-family: var(--body);
    font-size: clamp(16px, 2.2vw, 20px);
    font-weight: 300;
    line-height: 1.7;
    color: rgba(240, 236, 228, 0.75);
    margin-bottom: 64px;
}

.closing-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.3em;
    color: var(--red-dim);
    text-transform: uppercase;
    margin-bottom: 18px;
}

.closing-line {
    font-family: var(--display);
    font-size: clamp(48px, 8vw, 88px);
    line-height: 0.95;
    letter-spacing: 0.02em;
    color: var(--white);
}

.closing-line .accent { color: var(--red); }


.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.no-js .reveal { opacity: 1; transform: none; }


@media (prefers-reduced-motion: reduce) {
    .js-active .paper { animation: none; }
    .scroll-cue { animation: none; opacity: 0.5; }
    .t-cursor { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .js-active .terminal-body > span { visibility: visible; }
}


@media (max-width: 700px) {
    .hero { padding: 110px 16px 90px; }

    .paper {
        position: fixed;
        top: -110px;
        right: -34px;
    }

    .creed { font-size: clamp(20px, 5.4vw, 26px); }

    .terminal-body {
        padding: 20px 16px 28px;
        min-height: 300px;
    }
}