@property --blob1-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 5%;
}

@property --blob1-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 85%;
}

@property --blob2-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 15%;
}

@property --blob2-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 65%;
}

@property --blob3-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 35%;
}

@property --blob3-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 50%;
}

@property --blob4-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 55%;
}

@property --blob4-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 30%;
}

@property --blob5-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 75%;
}

@property --blob5-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 60%;
}

@property --blob6-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 90%;
}

@property --blob6-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 20%;
}

@property --blob7-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 25%;
}

@property --blob7-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 15%;
}

@property --blob8-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 65%;
}

@property --blob8-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 80%;
}

@property --blob9-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 45%;
}

@property --blob9-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 70%;
}

@property --blob10-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 30%;
}

@property --blob10-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 40%;
}

@property --blob11-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 70%;
}

@property --blob11-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 25%;
}

@property --blob12-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 20%;
}

@property --blob12-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 55%;
}

@property --blob13-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 80%;
}

@property --blob13-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 75%;
}

@property --blob14-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 15%;
}

@property --blob14-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 30%;
}

@property --blob15-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 60%;
}

@property --blob15-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 85%;
}

@property --blob16-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 85%;
}

@property --blob16-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 45%;
}

@property --blob17-x {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 40%;
}

@property --blob17-y {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 15%;
}

:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #444444;
    --secondary-color: #bbbbbb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
    overflow-x: hidden;
    min-height: 100vh;
    width: 100vw;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.top-nav {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    z-index: 200;
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--secondary-color);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: lowercase;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-color);
}

#app {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding-bottom: 3rem;
    z-index: 10;
}

#word-container {
    position: absolute;
    /* Centered base position */
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    will-change: transform;
}

/* During physics animation, lock dimensions to pixels so resize can't affect layout */
#word-container.animating {
    width: var(--locked-width);
    height: var(--locked-height);
}

.letter {
    position: absolute;
    font-size: 15vw;
    /* MASSIVE typography */
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.06em;

    color: var(--text-color);

    text-transform: lowercase;
    user-select: none;
    transform-origin: center center;
    top: 0;
    left: 0;
    will-change: transform;
}

/* During physics animation, lock font-size to pixels so resize can't desync */
.letter-physics {
    font-size: var(--locked-font-size);
    letter-spacing: 0;
}

.stabilize-transition {
    /* When letters snap into their final target positions, smooth it out */
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* After animation: container keeps full viewport dimensions but is scaled
   down via CSS transform to fit in the top-left corner. The letter elements
   inside are UNCHANGED — same font size, same masks, same glass effect. */
#word-container.frozen-scaled {
    pointer-events: none;
    /* transform, transform-origin set inline by JS */
}

#content-section {
    position: absolute;
    top: 16vh;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    max-width: 900px;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease;
    padding-bottom: 4rem;
}

.tagline {
    font-size: min(3.5vw, 44px);
    font-weight: 900;
    color: #E03C28;
    margin-bottom: 1.5rem;
}

.tagline-mobile {
    display: none;
}


.highlight-underline {
    position: relative;
    display: inline-block;
    color: #E03C28;
}

.underline-stroke {
    position: absolute;
    bottom: -4px;
    left: -2%;
    width: 104%;
    height: 12px;
    overflow: visible;
    pointer-events: none;
}

.sponsor-label {
    font-size: min(1.3vw, 16px);
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.sponsor-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.sponsor {
    font-size: min(2.2vw, 27px);
    font-weight: 900;
    color: var(--text-color);
}

.sponsor-more {
    font-size: min(1.5vw, 18px);
    font-weight: 900;
    color: var(--secondary-color);
    font-style: italic;
    letter-spacing: 0.01em;
    margin-top: 0.5rem;
    text-align: center;
}

.prizes {
    font-size: min(1.8vw, 22px);
    font-weight: 900;
    color: var(--secondary-color);
    font-style: italic;
    letter-spacing: 0.01em;
    margin-top: 1rem;
}

.divider {
    border: none;
    border-top: 2px solid var(--accent-color);
    margin: 1.5rem 4rem;
}

.format-section {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.event-block {
    margin-bottom: 1.5rem;
}

.event-date {
    font-size: min(1.7vw, 21px);
    font-weight: 900;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}

.event-date .highlight-underline {
    color: #E87040;
}

.event-date .underline-stroke {
    bottom: -3px;
    height: 10px;
}

.event-desc {
    font-size: min(1.3vw, 16px);
    font-weight: 900;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
}

.event-highlights {
    list-style: none;
    padding: 0;
    font-size: min(1.3vw, 16px);
    font-weight: 900;
    color: var(--secondary-color);
    letter-spacing: 0.02em;
}

.event-highlights li {
    margin-bottom: 0.3rem;
}


.signup-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.85rem 2.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: min(1.5vw, 18px);
    letter-spacing: -0.02em;
    text-transform: lowercase;
    text-decoration: none;
    color: var(--bg-color);
    background: var(--text-color);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.signup-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.signup-page {
    position: relative;
    z-index: 10;
    max-width: 560px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.back-link {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--secondary-color);
    text-decoration: none;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text-color);
}

.signup-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.signup-note {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--secondary-color);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="month"] {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid var(--accent-color);
    outline: none;
    letter-spacing: -0.03em;
    transition: border-color 0.2s ease;
}

.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1rem;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid var(--accent-color);
    outline: none;
    letter-spacing: -0.03em;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.form-group select:focus {
    border-color: rgba(200, 50, 180, 0.6);
}

.form-group select option {
    background: #1a1a1a;
    color: var(--text-color);
}

.form-group input:focus {
    border-color: rgba(200, 50, 180, 0.6);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 2px solid var(--accent-color);
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.autocomplete-dropdown.open {
    display: block;
}

.autocomplete-option {
    padding: 0.6rem 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--secondary-color);
    cursor: pointer;
    letter-spacing: -0.03em;
}

.autocomplete-option:hover,
.autocomplete-option.active {
    background: rgba(200, 50, 180, 0.15);
    color: var(--text-color);
}

.file-upload-area {
    padding: 1.5rem;
    border: 2px dashed var(--accent-color);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.file-upload-area:hover {
    border-color: rgba(200, 50, 180, 0.6);
}

.file-upload-hint {
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--secondary-color);
    letter-spacing: -0.02em;
}

.file-upload-name {
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--text-color);
    margin-top: 0.5rem;
}

.cf-turnstile {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-submit {
    width: 100%;
    margin-top: 1rem;
}

.form-status {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    font-weight: 900;
    text-align: center;
    letter-spacing: -0.02em;
}

.form-status.success {
    color: #66ff88;
}

.form-status.error {
    color: #ff6666;
}

.form-status.info {
    color: #ffb830;
}

.optional-hint {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 900;
    font-style: italic;
}

.required {
    color: #ff6666;
}

@media (max-width: 768px) {
    #app {
        padding-bottom: 4rem;
    }

    #content-section {
        top: 14vh;
        padding-bottom: 3rem;
    }

    .tagline {
        font-size: 6.5vw;
        margin-bottom: 1rem;
    }

    .tagline-desktop {
        display: none;
    }

    .tagline-mobile {
        display: inline;
    }

    .sponsor-label {
        font-size: 3vw;
        margin-bottom: 0.5rem;
    }

    .sponsor-row {
        gap: 1rem;
    }

    .sponsor {
        font-size: 5vw;
    }

    .sponsor-more {
        font-size: 3.5vw;
        margin-top: 0.4rem;
    }

    .prizes {
        font-size: 4vw;
        margin-top: 0.8rem;
    }

    .divider {
        margin: 1rem 2rem;
    }

    .format-section {
        max-width: 90vw;
    }

    .event-block {
        margin-bottom: 1rem;
    }

    .event-date {
        font-size: 4.2vw;
        margin-bottom: 0.3rem;
    }

    .underline-stroke {
        height: 6px;
        bottom: -2px;
    }

    .event-date .underline-stroke {
        height: 5px;
        bottom: -2px;
    }

    .event-desc {
        font-size: 3.2vw;
    }

    .event-highlights {
        font-size: 3.2vw;
    }

    .event-highlights li {
        margin-bottom: 0.1rem;
    }

    .signup-btn {
        font-size: 4vw;
        padding: 0.7rem 1.8rem;
        margin-top: 1.5rem;
    }


    .signup-page {
        padding: 2rem 1.2rem 3rem;
    }

    .signup-title {
        font-size: 2rem;
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(circle var(--blob1-size) at var(--blob1-x) var(--blob1-y), rgba(100, 160, 230, 0.35) 0%, transparent 70%),
        radial-gradient(circle var(--blob2-size) at var(--blob2-x) var(--blob2-y), rgba(140, 80, 220, 0.38) 0%, transparent 70%),
        radial-gradient(circle var(--blob3-size) at var(--blob3-x) var(--blob3-y), rgba(60, 100, 240, 0.40) 0%, transparent 70%),
        radial-gradient(circle var(--blob4-size) at var(--blob4-x) var(--blob4-y), rgba(80, 130, 230, 0.35) 0%, transparent 70%),
        radial-gradient(circle var(--blob5-size) at var(--blob5-x) var(--blob5-y), rgba(50, 90, 180, 0.30) 0%, transparent 70%),
        radial-gradient(circle var(--blob6-size) at var(--blob6-x) var(--blob6-y), rgba(70, 140, 200, 0.32) 0%, transparent 70%),
        radial-gradient(circle var(--blob7-size) at var(--blob7-x) var(--blob7-y), rgba(120, 100, 220, 0.28) 0%, transparent 70%),
        radial-gradient(circle var(--blob8-size) at var(--blob8-x) var(--blob8-y), rgba(60, 120, 190, 0.30) 0%, transparent 70%),
        radial-gradient(circle var(--blob9-size) at var(--blob9-x) var(--blob9-y), rgba(90, 150, 230, 0.25) 0%, transparent 70%),
        radial-gradient(circle var(--blob10-size) at var(--blob10-x) var(--blob10-y), rgba(200, 100, 40, 0.35) 0%, transparent 70%),
        radial-gradient(circle var(--blob11-size) at var(--blob11-x) var(--blob11-y), rgba(160, 70, 120, 0.32) 0%, transparent 70%),
        radial-gradient(circle var(--blob12-size) at var(--blob12-x) var(--blob12-y), rgba(180, 85, 50, 0.30) 0%, transparent 70%),
        radial-gradient(circle var(--blob13-size) at var(--blob13-x) var(--blob13-y), rgba(140, 60, 100, 0.28) 0%, transparent 70%),
        radial-gradient(circle var(--blob14-size) at var(--blob14-x) var(--blob14-y), rgba(110, 80, 200, 0.25) 0%, transparent 70%),
        radial-gradient(circle var(--blob15-size) at var(--blob15-x) var(--blob15-y), rgba(70, 130, 210, 0.22) 0%, transparent 70%),
        radial-gradient(circle var(--blob16-size) at var(--blob16-x) var(--blob16-y), rgba(170, 75, 90, 0.24) 0%, transparent 70%),
        radial-gradient(circle var(--blob17-size) at var(--blob17-x) var(--blob17-y), rgba(90, 110, 220, 0.20) 0%, transparent 70%);
    filter: blur(8px);
    z-index: 1;
    pointer-events: none;
}

#grain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.15;
}

#glow-layer {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    filter: url(#grain);
    opacity: 0.3;
    pointer-events: none;
    z-index: 100;
}

/* ==========================================================================
   LIQUID GLASS EFFECT — toggle by adding/removing .liquid-glass on <body>
   Each letter is its own glass lens. The letter glyph shape masks a
   backdrop-filter region so it refracts the background through its outline.
   A canvas-generated mask is applied via JS (see script.js).
   ========================================================================== */

/* Shared glass properties for both physics and frozen letters.
   The canvas mask on the element clips backdrop-filter to the letter shape.
   The element itself = glass refraction (masked to glyph shape).
   ::before = solid orange text on top with a soft shadow for depth. */
/* TEMP: glass disabled — plain white text, no masks or backdrop-filter */
.liquid-glass .letter-glass {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    isolation: auto;
}

.liquid-glass .letter-glass::before {
    display: none;
}


/* Per-letter glass effect on date text (21st march / 28th march) */
.liquid-glass .date-glass-container {
    display: inline-flex;
    align-items: baseline;
}

/* TEMP: glass disabled on dates — plain white text */
.liquid-glass .date-letter {
    position: relative;
    display: inline-block;
    color: #E87040 !important;
    -webkit-text-fill-color: #E87040;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    isolation: auto;
}

.liquid-glass .date-letter::before {
    display: none;
}

.date-letter-space {
    display: inline-block;
}

/* ==========================================================================
   RGB CHANNEL-SPLIT GLITCH — cloned containers with color isolation
   ========================================================================== */
.glitch-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    will-change: transform, clip-path, opacity;
}

.glitch-layer.glitch-active {
    opacity: 1;
}

.glitch-red {
    filter: url(#channel-red);
}

.glitch-blue {
    filter: url(#channel-blue);
}

/* Per-letter glitch during physics animation — solid text only, no glass */
.letter.letter-glitch-red,
.letter.letter-glitch-blue {
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 50;
}

.letter.letter-glitch-red {
    filter: url(#channel-red);
}

.letter.letter-glitch-blue {
    filter: url(#channel-blue);
}

/* Strip glass effect from glitch clones — render as plain solid text */
.liquid-glass .letter-glitch-red.letter-glass,
.liquid-glass .letter-glitch-blue.letter-glass {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.liquid-glass .letter-glitch-red.letter-glass::before,
.liquid-glass .letter-glitch-blue.letter-glass::before {
    display: none;
}

/* Same for container-level glitch clones */
.glitch-layer .letter-glass {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.glitch-layer .letter-glass::before {
    display: none;
}

/* Generic text glitch — applied to signup button, prizes, etc. */
.glitch-text-clone {
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
}

.glitch-text-clone.glitch-active {
    opacity: 1;
}

.glitch-text-clone.glitch-clone-red {
    filter: url(#channel-red);
}

.glitch-text-clone.glitch-clone-blue {
    filter: url(#channel-blue);
}
