/* ============================================================
   turingtest.club — Memphis bold-shapes + dopamine-neon
   Asymmetric, whimsical, deliberately uneven.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    /* Palette (exact hex from DESIGN.md) */
    --bg-primary: #F5F0FF;     /* lavender cream */
    --bg-alt: #FFF5E6;         /* warm cream */
    --surf-pink: #FF3366;      /* memphis pink */
    --surf-cyan: #00E5FF;      /* electric cyan */
    --surf-yellow: #FFD700;    /* signal yellow */
    --surf-slate: #7B68EE;     /* medium slate */
    --text-primary: #1A1A2E;   /* deep indigo */
    --text-secondary: #3A3A4E; /* muted indigo */
    --on-light: #FFFFFF;       /* pure white on colored bg */

    /* Type */
    --font-display: "Syne", "Albert Sans", system-ui, sans-serif;
    --font-body: "Albert Sans", "Inter", system-ui, sans-serif;

    /* Geometry */
    --radius-sm: 6px;
    --radius-md: 16px;
    --radius-lg: 28px;
    --shadow-card: 8px 8px 0 0 var(--text-primary);
    --shadow-card-soft: 6px 6px 0 0 rgba(26,26,46,0.18);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    background: var(--bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

/* ---------- Typography ---------- */
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1.0;
    font-weight: 800;
    letter-spacing: -0.02em;
}
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; }
h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }

p { font-size: 16px; line-height: 1.7; color: inherit; }

::selection { background: var(--surf-yellow); color: var(--text-primary); }

/* ---------- Shape Navigation ---------- */
.shape-nav {
    position: fixed;
    top: 28px;
    right: 32px;
    z-index: 50;
    display: flex;
    gap: 14px;
    background: rgba(245, 240, 255, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 16px;
    border: 2px solid var(--text-primary);
    border-radius: 999px;
    box-shadow: 4px 4px 0 0 var(--text-primary);
}

.nav-shape {
    width: 22px;
    height: 22px;
    display: inline-block;
    border: 2px solid var(--text-primary);
    transition: all 0.28s cubic-bezier(.5,1.6,.4,1);
    background: transparent;
    position: relative;
}
.nav-circle  { border-radius: 50%; }
.nav-square  { border-radius: 3px; }
.nav-triangle {
    width: 0; height: 0; border: none;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 22px solid transparent;
    background: transparent;
    box-shadow: none;
    position: relative;
}
.nav-triangle::before {
    content: "";
    position: absolute;
    left: -12px; top: 0;
    width: 0; height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 22px solid var(--text-primary);
    z-index: 0;
}
.nav-triangle::after {
    content: "";
    position: absolute;
    left: -9px; top: 3px;
    width: 0; height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 16px solid var(--bg-primary);
    z-index: 1;
}
.nav-diamond { transform: rotate(45deg); }

.nav-shape.active.nav-circle  { background: var(--surf-pink); }
.nav-shape.active.nav-square  { background: var(--surf-cyan); }
.nav-shape.active.nav-triangle::after { border-bottom-color: var(--surf-yellow); }
.nav-shape.active.nav-diamond { background: var(--surf-slate); }

.nav-shape:hover { transform: scale(1.18) rotate(8deg); }
.nav-diamond:hover { transform: rotate(45deg) scale(1.18); }

/* ---------- Sections (general) ---------- */
.section {
    position: relative;
    padding: 80px 6vw 80px;
    overflow: hidden;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--surf-slate);
    padding: 6px 12px;
    background: rgba(123,104,238,0.12);
    border-radius: 999px;
    margin-bottom: 18px;
}

.section-heading {
    margin-bottom: 56px;
    max-width: 720px;
}

.section-sub {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 17px;
    max-width: 600px;
}

/* ---------- Reveal animations ---------- */
.reveal-bounce {
    opacity: 0;
    transform: scale(0.3);
}
.reveal-bounce.is-visible {
    animation: bounceIn 800ms cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes bounceIn {
    0%   { opacity: 0; transform: scale(0.3); }
    50%  { opacity: 1; transform: scale(1.05); }
    70%  { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* ---------- Floating shape keyframes ---------- */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-15px) rotate(3deg); }
}
@keyframes floatReverse {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(12px) rotate(-4deg); }
}
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* =============== ENTRANCE =============== */
.section-entrance {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 120px;
    padding-bottom: 60px;
}

.entrance-inner {
    margin-left: 15%;
    max-width: 70%;
    position: relative;
    z-index: 2;
}

.kicker {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--surf-pink);
    margin-bottom: 22px;
}

.club-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(64px, 11vw, 168px);
    line-height: 0.92;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 28px;
    text-shadow: 6px 6px 0 var(--surf-yellow);
}
.club-title .dot {
    color: var(--surf-pink);
    display: inline-block;
    transform: translateY(-0.05em);
}

.club-tag {
    font-size: clamp(17px, 1.7vw, 22px);
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 640px;
    margin-bottom: 32px;
}

.entrance-cta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}
.entrance-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    background: var(--text-primary);
    color: var(--on-light);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    border-radius: 999px;
    box-shadow: 4px 4px 0 0 var(--surf-cyan);
}
.entrance-card strong { color: var(--surf-yellow); font-weight: 800; }

.entrance-mood {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 15px;
    color: var(--text-secondary);
    padding: 12px 18px;
    border: 2px dashed var(--surf-slate);
    border-radius: 999px;
}

/* Floating shapes — entrance */
.floating-shape { position: absolute; pointer-events: none; }

.shape-triangle-big {
    top: 14%;
    left: 4%;
    width: 0;
    height: 0;
    border-left: 110px solid transparent;
    border-right: 110px solid transparent;
    border-bottom: 200px solid var(--surf-pink);
    animation: float 6s ease-in-out infinite;
    transform-origin: 50% 60%;
}
.shape-circle-small {
    bottom: 12%;
    right: 8%;
    width: 80px;
    height: 80px;
    background: var(--surf-cyan);
    border-radius: 50%;
    animation: float 5s ease-in-out infinite 1s;
    box-shadow: inset -10px -10px 0 rgba(26,26,46,0.12);
}
.shape-squiggle-top {
    top: 9%;
    right: 18%;
    width: 220px;
    animation: floatReverse 7s ease-in-out infinite;
}
.shape-yellow-blob {
    bottom: 22%;
    left: 8%;
    width: 60px;
    height: 60px;
    background: var(--surf-yellow);
    border-radius: 38% 62% 60% 40% / 50% 40% 60% 50%;
    animation: float 8s ease-in-out infinite 0.5s;
}

/* =============== MEMBERSHIP DESK =============== */
.section-desk {
    background: var(--bg-alt);
    padding-top: 120px;
    padding-bottom: 140px;
    position: relative;
}

/* Terrazzo background — radial-gradient dots */
.terrazzo-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.85;
    background-image:
        radial-gradient(circle at 12% 18%, var(--surf-pink) 0 8px, transparent 9px),
        radial-gradient(circle at 32% 7%, var(--surf-cyan) 0 6px, transparent 7px),
        radial-gradient(circle at 78% 14%, var(--surf-yellow) 0 9px, transparent 10px),
        radial-gradient(circle at 22% 42%, var(--surf-yellow) 0 7px, transparent 8px),
        radial-gradient(circle at 58% 36%, var(--surf-pink) 0 5px, transparent 6px),
        radial-gradient(circle at 88% 48%, var(--surf-cyan) 0 11px, transparent 12px),
        radial-gradient(circle at 8%  72%, var(--surf-cyan) 0 7px, transparent 8px),
        radial-gradient(circle at 44% 64%, var(--surf-yellow) 0 9px, transparent 10px),
        radial-gradient(circle at 70% 78%, var(--surf-pink) 0 6px, transparent 7px),
        radial-gradient(circle at 92% 88%, var(--surf-yellow) 0 8px, transparent 9px),
        radial-gradient(circle at 28% 92%, var(--surf-pink) 0 9px, transparent 10px),
        radial-gradient(circle at 54% 14%, var(--surf-slate) 0 5px, transparent 6px);
    filter: opacity(0.18);
}

.section-desk > * { position: relative; z-index: 1; }

.desk-grid {
    display: block;
    max-width: 1200px;
}

.desk-block {
    position: relative;
    background: var(--bg, var(--surf-pink));
    color: var(--fg, var(--on-light));
    padding: 40px 38px;
    border: 3px solid var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    margin-bottom: 32px;
    overflow: hidden;
}
.desk-block h3 {
    color: inherit;
    margin-bottom: 14px;
}
.desk-block p {
    color: inherit;
    opacity: 0.92;
    font-size: 16px;
    line-height: 1.65;
}
.desk-block.desk-block--big   { margin-left: 15%; max-width: 60%; margin-top: 25px; }
.desk-block.desk-block--small { margin-left: 5%;  max-width: 35%; margin-top: -40px; }
.desk-block.desk-block--mid   { margin-left: 25%; max-width: 50%; margin-top: 30px; }

.block-list {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.block-list li {
    font-size: 13px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 12px;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid currentColor;
    border-radius: 999px;
}
.desk-block--small .block-list li,
.desk-block--mid   .block-list li { background: rgba(26,26,46,0.08); }

/* Block accent shapes */
.block-shape {
    position: absolute;
    pointer-events: none;
}
.block-shape--circle {
    top: -28px; right: -28px;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: var(--surf-yellow);
    border: 3px solid var(--text-primary);
    animation: float 6s ease-in-out infinite;
}
.block-shape--triangle {
    bottom: -26px; left: -10px;
    width: 0; height: 0;
    border-left: 36px solid transparent;
    border-right: 36px solid transparent;
    border-bottom: 64px solid var(--surf-pink);
    transform: rotate(20deg);
    animation: floatReverse 7s ease-in-out infinite;
    filter: drop-shadow(2px 2px 0 var(--text-primary));
}
.block-shape--squiggle {
    top: 18px; right: 24px;
    width: 110px;
    animation: floatReverse 5s ease-in-out infinite;
}

/* =============== TEST CHAMBER =============== */
.section-chamber {
    background: var(--bg-primary);
    padding-top: 140px;
    padding-bottom: 140px;
    position: relative;
}

.chamber-heading { margin-left: 8%; }

.shape-yellow-circle {
    top: 10%;
    right: 6%;
    width: 140px;
    height: 140px;
    background: var(--surf-yellow);
    border-radius: 50%;
    border: 3px solid var(--text-primary);
    animation: float 7s ease-in-out infinite;
    z-index: 0;
}
.shape-cyan-tri {
    bottom: 20%;
    left: 4%;
    width: 0; height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 90px solid var(--surf-cyan);
    transform: rotate(-12deg);
    animation: floatReverse 6s ease-in-out infinite;
    z-index: 0;
}

/* QA zigzag */
.qa-zigzag {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    display: block;
}

.flip-card {
    width: clamp(280px, 46%, 520px);
    height: 320px;
    perspective: 1400px;
    margin-bottom: 56px;
    position: relative;
    z-index: 1;
}
.flip-card.flip-left  { margin-left: 4%;  }
.flip-card.flip-right { margin-left: 50%; margin-top: -120px; }

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(.4, .2, .2, 1);
}
.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: var(--bg, var(--bg-primary));
    color: var(--fg, var(--text-primary));
    border: 3px solid var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}
.flip-back { transform: rotateY(180deg); }

.card-marker {
    width: 40px;
    height: 40px;
    display: inline-block;
}
.card-marker svg { width: 100%; height: 100%; }

.q-tag, .a-tag {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--surf-slate);
    margin-top: 8px;
}
.flip-back .a-tag { color: rgba(255,255,255,0.85); }
.flip-back[style*="00E5FF"] .a-tag,
.flip-back[style*="FFD700"] .a-tag { color: rgba(26,26,46,0.7); }

.q-text {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(20px, 1.6vw, 24px);
    line-height: 1.3;
    color: var(--surf-pink);
    margin: 4px 0 8px;
}

.a-text {
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: inherit;
    margin: 4px 0 8px;
}

.flip-hint {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--surf-slate);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    align-self: flex-end;
}

.flip-source {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 13px;
    opacity: 0.85;
    align-self: flex-end;
    color: inherit;
}

.flip-card:hover .flip-card-inner { transform: scale(1.02); }
.flip-card.is-flipped:hover .flip-card-inner { transform: rotateY(180deg) scale(1.02); }

/* =============== CLUB LOUNGE =============== */
.section-lounge {
    background:
        radial-gradient(1200px 600px at 80% 0%, rgba(0,229,255,0.12), transparent 60%),
        radial-gradient(1000px 600px at 10% 90%, rgba(255,51,102,0.10), transparent 60%),
        var(--bg-primary);
    padding-top: 140px;
    padding-bottom: 80px;
    text-align: center;
    position: relative;
}

.lounge-heading {
    margin: 0 auto 28px;
    text-align: center;
    max-width: 600px;
}

.lounge-block {
    max-width: 720px;
    margin: 0 auto;
    padding: 56px 48px;
    background: var(--on-light);
    border: 3px solid var(--text-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    position: relative;
    z-index: 2;
}
.lounge-block h2 {
    color: var(--text-primary);
    margin-bottom: 22px;
    font-size: clamp(34px, 4vw, 54px);
}
.lounge-block p {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 18px;
}
.lounge-block p:last-of-type { margin-bottom: 0; }
.lounge-sign {
    margin-top: 18px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--surf-pink) !important;
    font-size: 18px !important;
}
.lounge-wink {
    font-family: var(--font-body);
    font-weight: 400;
    font-style: italic;
    color: var(--surf-slate);
    font-size: 14px;
}

/* Confetti scatter */
.confetti-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.confetti {
    position: absolute;
    pointer-events: none;
    will-change: transform;
}
.confetti.c-circle   { border-radius: 50%; }
.confetti.c-square   { border-radius: 2px; }
.confetti.c-triangle { width: 0 !important; height: 0 !important; background: transparent !important; }

@keyframes confettiSpin {
    from { transform: translate(0,0) rotate(0deg); }
    to   { transform: translate(0,0) rotate(360deg); }
}
@keyframes confettiDrift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-18px) rotate(180deg); }
}

/* =============== FOOTER =============== */
.club-footer {
    margin: 100px auto 0;
    max-width: 1100px;
    padding: 32px 0 0;
    border-top: 2px dashed var(--surf-slate);
    position: relative;
    z-index: 2;
    text-align: center;
}
.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 32px;
    align-items: center;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--text-secondary);
}
.footer-mark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.footer-mark .dot { color: var(--surf-pink); }
.footer-meta {
    font-style: italic;
    color: var(--surf-slate);
}
.footer-bottom { font-size: 12px; opacity: 0.85; }

.footer-shapes {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}
.fs { width: 12px; height: 12px; display: inline-block; }
.fs-c { background: var(--surf-pink);   border-radius: 50%; }
.fs-t {
    background: transparent;
    width: 0; height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid var(--surf-cyan);
}
.fs-s { background: var(--surf-yellow); }
.fs-d { background: var(--surf-slate); transform: rotate(45deg); }

/* =============== Squiggle dividers =============== */
.divider {
    margin-top: 80px;
    margin-bottom: -40px;
    width: 100%;
    height: 40px;
    pointer-events: none;
}
.squiggle-divider svg {
    width: 100%;
    height: 100%;
}
.squiggle-divider path {
    stroke-dasharray: 12 12;
    animation: dashFlow 8s linear infinite;
}
@keyframes dashFlow {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -240; }
}

/* =============== Responsive =============== */
@media (max-width: 900px) {
    .shape-nav {
        top: 14px; right: 14px;
        gap: 10px; padding: 8px 12px;
    }

    .entrance-inner {
        margin-left: 0;
        max-width: 100%;
    }

    .desk-block.desk-block--big,
    .desk-block.desk-block--small,
    .desk-block.desk-block--mid {
        margin-left: 0;
        max-width: 100%;
        margin-top: 24px;
    }
    .desk-block.desk-block--small { margin-top: 24px; }

    .flip-card { width: 100%; margin-left: 0; }
    .flip-card.flip-right { margin-left: 0; margin-top: 0; }

    .chamber-heading { margin-left: 0; }

    .shape-triangle-big { width: 0; border-left-width: 60px; border-right-width: 60px; border-bottom-width: 110px; }
    .shape-squiggle-top { width: 140px; right: 4%; }

    .lounge-block { padding: 40px 26px; }
}

@media (max-width: 540px) {
    .section { padding-left: 5vw; padding-right: 5vw; }
    .club-title { font-size: 64px; text-shadow: 4px 4px 0 var(--surf-yellow); }
    .flip-card { height: 360px; }
    .flip-face { padding: 22px 22px; }
    .q-text { font-size: 19px; }
    .a-text { font-size: 16px; }
}
