html {
    box-sizing: border-box;
    overflow-x: hidden;

    /* Color Variables */
    --black-color: oklch(0 0 0);
    --white-color: oklch(1 0 0);
    --red-color: rgba(255, 0, 0, 1);

    /* Font Variables */
    --font-primary: 'Darker Grotesque', sans-serif;
}

#smooth-wrapper {
    overflow: hidden;
    position: fixed;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#smooth-content {
    overflow: visible;
    width: 100%;
}

/* Security Camera - fixed position outside smooth wrapper */
.security-camera {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    z-index: 1000;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    background-color: var(--red-color);
    color: var(--black-color);
    font-family: var(--font-primary);
    overflow-x: hidden;
    /* Prevent side scroll always */
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    filter: url(#noise-filter);
    opacity: 1;
    mix-blend-mode: overlay;
}

a {
    text-decoration: none;
    color: var(--black-color);
}

p {
    color: #FFF;
    font-family: var(--font-primary);
    font-size: 4rem;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.emphasis__white {
    color: var(--white-color);
    font-weight: bold;
}

.emphasis__black {
    color: var(--black-color);
    font-weight: bold;
}

.emphasis__red {
    color: var(--red-color);
    font-weight: bold;
}

.hero__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4rem;
    padding: 10rem 0;
    margin: 2rem 4rem;
    min-height: 80vh;
}

.hero__title {
    font-size: 6rem;
    color: var(--black-color);
    margin-bottom: 0;
    font-family: var(--font-primary);
    ;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.hero__text {
    font-size: 1.8rem;
    padding: 0 15rem;
    line-height: 1.6;
    max-width: 900px;
}

.hero__button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Big Red 3D Button */
.red-button {
    position: relative;
    width: 140px;
    height: 140px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: transform 0.1s ease;
}

.red-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    background: linear-gradient(145deg, #555 0%, #222 50%, #111 100%);
    border-radius: 50%;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.red-button__surface {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #ff4444 0%, #cc0000 40%, #990000 100%);
    border-radius: 50%;
    box-shadow:
        0 6px 0 #660000,
        0 10px 20px rgba(0, 0, 0, 0.5),
        inset 0 -8px 20px rgba(0, 0, 0, 0.4),
        inset 0 8px 20px rgba(255, 100, 100, 0.3);
    z-index: 1;
    transition: all 0.1s ease;
}

.red-button__highlight {
    position: absolute;
    top: 15%;
    left: 20%;
    width: 40%;
    height: 25%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50%;
    filter: blur(2px);
}

.red-button:hover .red-button__surface {
    background: linear-gradient(145deg, #ff5555 0%, #dd1111 40%, #aa0000 100%);
    box-shadow:
        0 6px 0 #770000,
        0 12px 25px rgba(0, 0, 0, 0.5),
        inset 0 -8px 20px rgba(0, 0, 0, 0.4),
        inset 0 8px 20px rgba(255, 120, 120, 0.4);
}

.red-button:active .red-button__surface {
    transform: translate(-50%, -48%);
    box-shadow:
        0 2px 0 #660000,
        0 4px 10px rgba(0, 0, 0, 0.5),
        inset 0 -4px 15px rgba(0, 0, 0, 0.4),
        inset 0 4px 15px rgba(255, 100, 100, 0.3);
}

.red-button__label {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-primary);
    ;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.red-button:hover .red-button__label {
    opacity: 1;
}

.info__container {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 20rem;
    margin: 0;
    padding: 50rem 4rem;
    height: fit-content;
    position: relative;
}

/* Background text as pseudo-element */
.info__container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../assets/BG-text.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    z-index: 0;
    pointer-events: none;
}

/* Ensure cards are above the background */
.info__card {
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(5px);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-width: 50vw;
    position: relative;
    z-index: 1;
}

.card--first {
    align-self: flex-start;
}

.card--second {
    align-self: flex-end;
}

.card--third {
    align-self: flex-start;
}

.experience__container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin: 8rem 0;
    margin-bottom: 0;
    padding: 4rem;
    position: relative;
    background: linear-gradient(to bottom, var(--red-color), var(--black-color));
}

canvas {
    border: 4px solid var(--black-color);
    border-radius: 0.5rem;
    background-color: var(--black-color);
    height: auto;
    z-index: 10;
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(0, 0, 0, 0.4),
        inset 0 0 100px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Error Overlay */
.error-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    color: var(--red-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-align: center;
    padding: 1rem;
}

.error-title {
    font-family: monospace;
    margin-bottom: 20px;
    font-size: 3rem;
    text-align: center;
}

.error-text {
    font-family: monospace;
    margin-bottom: 10px;
    color: var(--white-color);
    text-align: center;
}

.error-msg {
    font-family: monospace;
    font-size: 12px;
    color: #666;
    margin-top: 20px;
    text-align: center;
}

.error-retry-btn {
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    font-family: monospace;
    font-size: 1rem;
    background: transparent;
    border: 2px solid var(--red-color);
    color: var(--red-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.error-retry-btn:hover {
    background: var(--red-color);
    color: var(--black-color);
}

.security-camera {
    z-index: 1000;
}

/* ====== ACT HEADER OVERLAY ====== */
.act-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.act-header-overlay.is-visible {
    opacity: 1;
}

.act-header {
    font-family: var(--font-primary);
    font-size: 5rem;
    font-weight: 900;
    color: var(--white-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

/* ====== END ACT HEADER OVERLAY ====== */

/* ====== TYPEWRITER OVERLAY ====== */
.typewriter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 2rem;
    box-sizing: border-box;
}

.typewriter-overlay.is-visible {
    opacity: 1;
}

.typewriter-text {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.6;
    text-align: center;
    max-width: 900px;
    position: relative;
}

/* Blinking cursor after text */
.typewriter-text::after {
    content: '█';
    animation: blink-cursor 0.8s infinite;
    opacity: 1;
}

.typewriter-text.no-cursor::after {
    display: none;
}

@keyframes blink-cursor {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* ====== END TYPEWRITER OVERLAY ====== */

/* UI Overlay Layer */
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Allow interactions with canvas if needed */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
    /* Above canvas */
}

.ui-text {
    font-family: var(--font-primary);
    text-align: center;
    color: var(--white-color);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    opacity: 0;
    /* Hidden by default, controlled by JS */
    transition: opacity 0.3s ease;
}

.ui-text.visible {
    opacity: 1;
}

/* Quiz Specifics */
.quiz-question {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 8px;
}

/* Tutorial Specifics */
.tutorial-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    font-family: var(--font-primary);
    font-size: 2rem;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    border-radius: 1rem;
}

/* Comment Specifics */
.comment-text {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.3;
    background: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 8px;
}

/* Comment Reveal Specifics */
.record-item {
    margin-bottom: 2rem;
    text-align: left;
    background: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 0.5rem;
    width: 100%;
    font-family: var(--font-primary);
    ;
}

.record-original {
    color: #aaa;
    font-style: italic;
    font-size: 1.1rem;
    font-family: var(--font-primary);
    ;
    margin-bottom: 0.5rem;
}

.record-yousaid {
    font-weight: bold;
    font-size: 1.4rem;
    margin: 0.75rem 0;
    font-family: var(--font-primary);
    ;
}

.record-official {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    font-family: var(--font-primary);
    ;
    line-height: 1.4;
}

.record-yousaid.yes {
    color: #00ff00;
}

.record-yousaid.no {
    color: #ff0000;
}

/* ====== RESULTS WRAPPER (Card + Debrief) ====== */
.results__wrapper {
    display: none;
    /* Hidden until experience is finished */
    background-color: var(--black-color);
    min-height: 100vh;
    position: relative;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.results__wrapper.visible {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    /* Critical for sticky to work in flexbox */
    opacity: 1;
}

/* ====== CITIZEN ASSESSMENT CARD ====== */
.citizen-card {
    position: relative;
    /* ScrollTrigger pin will handle positioning */
    width: 50%;
    height: fit-content;
    padding: 1.5rem;
    z-index: 100;
    /* Hidden initially until experience ends */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    flex-shrink: 0;
}

.citizen-card.visible {
    opacity: 1;
    visibility: visible;
}

.citizen-card__inner {
    background-color: #f4f1e8;
    border: 3px solid #2a2a2a;
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    color: #1a1a1a;
    position: relative;
    box-shadow:
        4px 4px 0 #2a2a2a,
        inset 0 0 30px rgba(0, 0, 0, 0.05);
    /* Subtle paper texture */
    background-image:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.02) 2px,
            rgba(0, 0, 0, 0.02) 3px);
}

/* Header */
.citizen-card__header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.citizen-card__seal {
    width: 50px;
    height: 50px;
    border: 3px solid #8b0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: #8b0000;
    flex-shrink: 0;
    position: relative;
}

.citizen-card__seal::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid #8b0000;
    border-radius: 50%;
}

.citizen-card__title-block {
    flex: 1;
}

.citizen-card__nation {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    margin: 0;
    color: #555;
    border-bottom: 1px dotted #999;
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
}

.citizen-card__title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.citizen-card__subtitle {
    font-size: 0.6rem;
    margin: 0.25rem 0 0 0;
    color: #666;
    line-height: 1.3;
}

/* Dividers */
.citizen-card__divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #2a2a2a, transparent);
    margin: 1rem 0;
}

.citizen-card__divider--thin {
    height: 1px;
    background: #ccc;
    margin: 0.75rem 0;
}

/* Fields */
.citizen-card__row {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.citizen-card__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.citizen-card__field--full {
    width: 100%;
}

.citizen-card__label {
    font-size: 0.6rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.citizen-card__value {
    font-size: 0.9rem;
    font-weight: bold;
    color: #1a1a1a;
}

.citizen-card__value--highlight {
    font-size: 1rem;
    color: #8b0000;
    padding: 0.25rem 0;
    border-bottom: 1px solid #ddd;
}

/* Final Assessment */
.citizen-card__assessment {
    text-align: center;
    padding: 1rem 0;
}

.citizen-card__verdict {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #8b0000;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

/* Stamp */
.citizen-card__stamp {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: rotate(-15deg) translateY(-50%) scale(0);
    border: 4px solid #8b0000;
    color: #8b0000;
    padding: 0.5rem 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    opacity: 0;
    text-transform: uppercase;
    pointer-events: none;
}

.citizen-card__stamp.visible {
    transform: rotate(-15deg) translateY(-50%) scale(1);
    opacity: 0.9;
    animation: stamp-slam 0.4s ease-out;
}

@keyframes stamp-slam {
    0% {
        transform: rotate(-15deg) translateY(-50%) scale(2);
        opacity: 0;
    }

    50% {
        transform: rotate(-15deg) translateY(-50%) scale(0.9);
        opacity: 1;
    }

    100% {
        transform: rotate(-15deg) translateY(-50%) scale(1);
        opacity: 0.9;
    }
}

.citizen-card__stamp::before,
.citizen-card__stamp::after {
    content: '';
    position: absolute;
    background: #8b0000;
}

/* Card reveal animation */
.citizen-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.citizen-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.citizen-card__footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dotted #999;
}

.citizen-card__footer p {
    font-size: 0.65rem;
    color: #666;
    margin: 0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ====== END CITIZEN CARD ====== */

/* ====== DEBRIEF SECTION ====== */
.debrief__container {
    background-color: var(--black-color);
    color: var(--white-color);
    padding: 4rem;
    padding-bottom: 6rem;
    text-align: left;
    min-height: 100vh;
}

/* Hero text with large words */
.debrief__hero {
    margin-bottom: 4rem;
}

.debrief__line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0;
    line-height: 1;
}

.debrief__small {
    font-size: 1rem;
    color: var(--white-color);
    font-weight: 400;
}

.debrief__subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--white-color);
}

.debrief__large {
    font-family: var(--font-primary);
    ;
    font-size: 2rem;
    font-weight: 900;
    color: var(--red-color);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Explanation section */
.debrief__explanation {
    max-width: 700px;
    margin: 3rem 0;
}

.debrief__explanation p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--white-color);
    margin: 1.5rem 0;
}

.debrief__explanation ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.debrief__explanation ul li {
    margin: 0.3rem 0;
    color: var(--white-color);
    list-style: none;
    margin-top: 2rem;
}

.debrief__explanation ul li a {
    color: var(--white-color);
    font-weight: bolder;
    text-decoration: underline;
}

.debrief__explanation ul li a:hover {
    color: var(--red-color);
}

/* Final statement */
.debrief__final {
    margin-top: 4rem;
    text-align: center;
}

.debrief__heard {
    font-size: 1.1rem;
    color: var(--white-color);
    margin-bottom: 2rem;
    font-style: italic;
}

.debrief__title {
    font-family: var(--font-primary);
    ;
    font-size: 5rem;
    font-weight: 900;
    color: var(--white-color);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
}

.debrief__title .emphasis__red {
    color: var(--red-color);
    display: inline;
    font-size: inherit;
}

/* ====== END DEBRIEF SECTION ====== */

/* ====== FOOTER ====== */
footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 0;
    padding: 2rem 4rem;
    padding-bottom: 4rem;
    background-color: var(--black-color);
    color: var(--white-color);
}

footer a {
    color: var(--white-color);
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--red-color);
}

.socials__container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.socials__container h2 {
    font-size: 1.5rem;
    color: var(--white-color);
}

.socials__container ul {
    display: flex;
    gap: 1rem;
    list-style: none;
}

footer p {
    font-size: 1rem;
    color: var(--white-color);
}

/* ====== END FOOTER ====== */