/* ===========================================
   turingtest.quest - Flat-Design Intelligence Testing Chamber
   Chrome-Metallic Palette | Kinetic Typography | Glitch-Art
   =========================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    color: #1A1A22;
    background-color: #F0F0F5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Cultural Symbols Background Layer --- */
.cultural-symbols {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.symbol {
    position: absolute;
    width: 60px;
    height: 60px;
    color: #B0B0C0;
    opacity: 0.10;
}

.symbol-1  { top: 8%;   left: 5%;  }
.symbol-2  { top: 15%;  left: 85%; }
.symbol-3  { top: 25%;  left: 12%; }
.symbol-4  { top: 32%;  left: 90%; }
.symbol-5  { top: 42%;  left: 3%;  }
.symbol-6  { top: 50%;  left: 92%; }
.symbol-7  { top: 58%;  left: 8%;  }
.symbol-8  { top: 68%;  left: 88%; }
.symbol-9  { top: 75%;  left: 6%;  }
.symbol-10 { top: 82%;  left: 93%; }
.symbol-11 { top: 90%;  left: 10%; }
.symbol-12 { top: 95%;  left: 87%; }

/* --- Section Base --- */
.section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.section-inner {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
    padding: 80px 24px;
    position: relative;
}

/* ===========================================
   SECTION 1: HERO
   =========================================== */
.section-hero {
    min-height: 100vh;
    background-color: #F0F0F5;
}

.section-hero .section-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Kinetic Weight-Breathing Typography */
.hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #1A1A22;
    letter-spacing: -0.02em;
    animation: weight-breathe 6s ease-in-out infinite;
    will-change: font-weight;
}

@keyframes weight-breathe {
    0%   { font-weight: 300; }
    50%  { font-weight: 800; }
    100% { font-weight: 300; }
}

/* Chrome-Blue Accent Line */
.chrome-accent-line {
    width: 80px;
    height: 2px;
    background-color: #6A7A9A;
    margin: 32px auto;
    position: relative;
}

.chrome-accent-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #6A7A9A, transparent);
    animation: accent-shimmer 3s ease-in-out infinite;
}

@keyframes accent-shimmer {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

.hero-subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.125rem;
    color: #6A7A9A;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ===========================================
   SECTION 2: TEST QUESTION
   =========================================== */
.section-test {
    background-color: #FAFAFA;
}

.test-block {
    position: relative;
    padding: 48px 0;
}

.test-label {
    display: inline-block;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #6A7A9A;
    margin-bottom: 16px;
}

.test-heading {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
    color: #1A1A22;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.test-body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #1A1A22;
    margin-bottom: 20px;
}

.test-body:last-child {
    margin-bottom: 0;
}

/* Underline-Draw Interaction */
.underline-draw {
    background-image: linear-gradient(#C0A890, #C0A890);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.4s ease;
    cursor: default;
    padding-bottom: 2px;
}

.underline-draw:hover {
    background-size: 100% 2px;
}

/* Margin Notation */
.margin-notation {
    position: absolute;
    right: -60px;
    color: #B0B0C0;
    opacity: 0.12;
    pointer-events: none;
}

.margin-notation svg {
    width: 50px;
    height: 80px;
}

.margin-notation-math {
    top: 120px;
}

.margin-notation-music {
    top: 100px;
}

/* Glitch-Art Bands */
.glitch-band {
    width: 100%;
    height: 4px;
    position: relative;
    overflow: hidden;
    margin: 24px 0;
}

.glitch-band::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #6A7A9A 0px,
        #6A7A9A 20px,
        transparent 20px,
        transparent 40px,
        #C0A890 40px,
        #C0A890 55px,
        transparent 55px,
        transparent 80px
    );
    animation: glitch-scroll 4s linear infinite;
}

@keyframes glitch-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(33.33%); }
}

.glitch-band-top {
    margin-bottom: 32px;
}

.glitch-band-bottom {
    margin-top: 32px;
}

/* ===========================================
   SECTION 3: RESPONSE
   =========================================== */
.section-response {
    background-color: #F0F0F5;
}

/* Glitch Disruption */
.glitch-disruption {
    width: 100%;
    height: 40px;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.glitch-disruption::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, transparent 0%, #6A7A9A 10%, transparent 10.5%, transparent 20%, #C0A890 20%, transparent 20.8%, transparent 45%, #B0B0C0 45%, transparent 45.4%, transparent 60%, #6A7A9A 60%, transparent 61%, transparent 80%, #C0A890 80%, transparent 81%);
    animation: glitch-disruption-anim 3s steps(8) infinite;
}

.glitch-disruption::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    width: 100%;
    height: 3px;
    background:
        linear-gradient(90deg, transparent 5%, #6A7A9A 15%, transparent 16%, transparent 35%, #C0A890 50%, transparent 51%, transparent 70%, #B0B0C0 75%, transparent 76%);
    animation: glitch-disruption-anim 2.5s steps(6) infinite reverse;
}

@keyframes glitch-disruption-anim {
    0%, 100% { clip-path: inset(0 0 0 0); opacity: 0.6; }
    10%      { clip-path: inset(5px 0 0 0); opacity: 0.8; }
    20%      { clip-path: inset(0 20px 0 0); opacity: 0.4; }
    30%      { clip-path: inset(10px 0 5px 0); opacity: 0.9; }
    40%      { clip-path: inset(0 0 0 30px); opacity: 0.5; }
    50%      { clip-path: inset(3px 10px 0 0); opacity: 0.7; }
    60%      { clip-path: inset(0 0 8px 0); opacity: 0.6; }
    70%      { clip-path: inset(0 5px 0 15px); opacity: 0.8; }
    80%      { clip-path: inset(6px 0 0 0); opacity: 0.4; }
    90%      { clip-path: inset(0 0 3px 10px); opacity: 0.7; }
}

/* Kinetic Pull-Quote */
.kinetic-quote {
    padding: 40px 0;
    border-left: 3px solid #6A7A9A;
    padding-left: 24px;
    margin-bottom: 40px;
}

.kinetic-quote p {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    color: #1A1A22;
    line-height: 1.5;
    animation: quote-weight-shift 8s ease-in-out infinite;
}

@keyframes quote-weight-shift {
    0%   { font-weight: 400; }
    50%  { font-weight: 700; }
    100% { font-weight: 400; }
}

.kinetic-quote cite {
    display: block;
    margin-top: 16px;
    font-family: 'IBM Plex Sans', sans-serif;
    font-style: normal;
    font-size: 0.875rem;
    color: #B0B0C0;
    letter-spacing: 0.02em;
}

.response-block {
    padding: 24px 0;
}

/* ===========================================
   SECTION 4: CLOSING
   =========================================== */
.section-closing {
    background-color: #FAFAFA;
    min-height: 60vh;
}

.section-closing .section-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.closing-symbols {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

.closing-symbol {
    width: 40px;
    height: 40px;
    color: #B0B0C0;
    opacity: 0.20;
    transition: opacity 0.3s ease;
}

.closing-symbol:hover {
    opacity: 0.45;
}

.chrome-surface {
    padding: 48px 32px;
    background-color: #F0F0F5;
    position: relative;
}

.closing-domain {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #1A1A22;
    letter-spacing: -0.01em;
}

.chrome-accent-line-closing {
    margin: 24px auto;
    width: 60px;
}

.closing-tagline {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1rem;
    color: #6A7A9A;
    letter-spacing: 0.02em;
}

/* ===========================================
   GLITCH OVERLAY EFFECT (applied via JS)
   =========================================== */
.section.glitch-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    animation: glitch-overlay 0.3s steps(4) 1;
}

@keyframes glitch-overlay {
    0%   { clip-path: inset(20% 0 60% 0); background: rgba(106, 122, 154, 0.08); }
    25%  { clip-path: inset(40% 0 20% 0); background: rgba(192, 168, 144, 0.06); }
    50%  { clip-path: inset(10% 0 70% 0); background: rgba(106, 122, 154, 0.10); }
    75%  { clip-path: inset(60% 0 10% 0); background: rgba(192, 168, 144, 0.05); }
    100% { clip-path: inset(0 0 100% 0); background: transparent; }
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
    .section-inner {
        padding: 60px 20px;
    }

    .margin-notation {
        display: none;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .kinetic-quote {
        padding-left: 16px;
    }

    .closing-symbols {
        gap: 12px;
    }

    .chrome-surface {
        padding: 36px 20px;
    }
}

@media (max-width: 480px) {
    .section-inner {
        padding: 48px 16px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .test-heading {
        font-size: 1.5rem;
    }
}
