:root {
    /* Colors - NEW BRAND PALETTE */
    --dark-bg: #161B40;
    /* Dark blue background */
    --main-light-blue: #6AC8DA;
    /* Main light blue */
    --gold-accent: #E4B96C;
    /* Gold accent */
    --royal-blue: #274091;
    /* Accent royal blue */
    --light-royal-blue: #375EB2;
    /* Accent light royal blue */
    --white: #FFFFFF;
    /* White */

    /* Legacy variable names for compatibility */
    --primary-blue: #6AC8DA;
    /* Maps to main light blue */
    --dark-navy: #161B40;
    /* Maps to dark bg */
    --light-blue: #E8F4FD;
    /* Old light blue (deprecated) */
    --warm-accent: #E4B96C;
    /* Maps to gold accent */

    /* Typography */
    --font-heading: 'Amarante', serif;
    --font-body: 'Montserrat', sans-serif;

    /* Spacing */
    --spacing-unit: 8px;
    --max-width: 1200px;
    --content-width: 700px;
}

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

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.7;
    color: var(--dark-navy);
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 3);
    overflow: hidden;
}

@media screen {}

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-bg);
    z-index: -2;
}

.stars-light-blue {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, var(--main-light-blue) 1.5px, transparent 1.5px),
        radial-gradient(circle at 60% 70%, var(--main-light-blue) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, var(--main-light-blue) 1px, transparent 1px),
        radial-gradient(circle at 30% 80%, var(--main-light-blue) 1.5px, transparent 1.5px),
        radial-gradient(circle at 90% 60%, var(--main-light-blue) 1px, transparent 1px);
    background-size: 200px 200px, 250px 250px, 180px 180px, 220px 220px, 190px 190px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px, 160px 20px;
    background-repeat: repeat;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
    animation: shimmer-light-blue 5s ease-in-out infinite;
}

.stars-white {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 15% 50%, var(--white) 1px, transparent 1px),
        radial-gradient(circle at 45% 15%, var(--white) 1.5px, transparent 1.5px),
        radial-gradient(circle at 70% 45%, var(--white) 2px, transparent 2px),
        radial-gradient(circle at 85% 85%, var(--white) 1px, transparent 1px),
        radial-gradient(circle at 25% 60%, var(--white) 1px, transparent 1px),
        radial-gradient(circle at 95% 35%, var(--white) 1.5px, transparent 1.5px);
    background-size: 210px 210px, 240px 240px, 200px 200px, 230px 230px, 195px 195px, 215px 215px;
    background-position: 20px 80px, 110px 10px, 50px 200px, 140px 140px, 90px 240px, 170px 180px;
    background-repeat: repeat;
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
    animation: shimmer-white 3.5s ease-in-out infinite 0.8s;
}

.stars-gold {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 50% 90%, var(--gold-accent) 1.5px, transparent 1.5px),
        radial-gradient(circle at 10% 10%, var(--gold-accent) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, var(--gold-accent) 1px, transparent 1px);
    background-size: 260px 260px, 185px 185px, 205px 205px;
    background-position: 30px 150px, 120px 50px, 80px 210px;
    background-repeat: repeat;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
    animation: shimmer-gold 4.5s ease-in-out infinite 1.5s;
}

@keyframes shimmer-light-blue {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes shimmer-white {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

@keyframes shimmer-gold {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.hero-content {
    width: 80%;
    max-width: 900px;
    text-align: center;
    z-index: 1;
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    margin-bottom: calc(var(--spacing-unit) * 6);
    animation: fadeInUp 1.2s ease-out;
}

.main-logo {
    max-width: 450px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.4));
}

.hero-text {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--white);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1.2s ease-out 0.4s both;
}

/* ===== Kit Signup Form ===== */
.hero-form {
    container-type: inline-size;
    container-name: kit-form;
    margin: calc(var(--spacing-unit) * 5) auto 0;
    width: 100%;
    max-width: 580px;
    animation: fadeInUp 1.2s ease-out 0.7s both;
}

.hero-form .formkit-form {
    width: 100%;
}

.hero-form [data-style="clean"] {
    width: 100%;
}

/* Error alerts */
.hero-form .formkit-alert {
    display: none;
    list-style: none;
    background: rgba(242, 100, 59, 0.15);
    border: 1px solid rgba(242, 100, 59, 0.5);
    border-radius: 8px;
    padding: 10px 16px;
    color: #ffb8a0;
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}

.hero-form .formkit-alert:not(:empty) {
    display: block;
}

/* Success state */
.hero-form .formkit-alert-success {
    background: rgba(16, 191, 122, 0.15);
    border-color: rgba(16, 191, 122, 0.5);
    color: #7effd4;
}

/* Row layout — stacked by default, side-by-side at wider widths */
.hero-form .formkit-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 0;
}

@container kit-form (min-width: 460px) {
    .hero-form .formkit-fields {
        flex-direction: row;
    }
}

/* Input wrapper */
.hero-form .formkit-field {
    flex: 1 1 auto;
    margin: 0;
}

/* Email input */
.hero-form .formkit-input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 18px;
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--dark-navy);
    background: rgba(255, 255, 255, 0.96);
    border: 2px solid transparent;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

@container kit-form (min-width: 460px) {
    .hero-form .formkit-input {
        border-radius: 8px 0 0 8px;
        border-right-color: transparent;
    }
}

.hero-form .formkit-input:focus {
    border-color: var(--gold-accent);
    background: #fff;
}

.hero-form .formkit-input::placeholder {
    color: rgba(22, 27, 64, 0.45);
}

/* Submit button */
.hero-form .formkit-submit {
    flex: 0 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 28px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 0.3px;
    color: #fff;
    background: var(--gold-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.2s ease, transform 0.1s ease;
    width: 100%;
    margin: 0;
}

@container kit-form (min-width: 460px) {
    .hero-form .formkit-submit {
        width: auto;
        border-radius: 0 8px 8px 0;
    }
}

.hero-form .formkit-submit:hover {
    background: #cfa050;
}

.hero-form .formkit-submit:active {
    transform: scale(0.98);
}

/* Spinner */
.hero-form .formkit-spinner {
    display: flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    width: auto;
    height: auto;
    overflow: visible;
    opacity: 0;
    transition: opacity 0.2s;
}

.hero-form .formkit-submit[data-active] .formkit-spinner {
    opacity: 1;
}

.hero-form .formkit-submit[data-active]>span {
    opacity: 0;
}

.hero-form .formkit-spinner>div {
    width: 7px;
    height: 7px;
    margin: 0;
    background: #fff;
    border-radius: 50%;
    opacity: 0.8;
    animation: kit-bounce 1.4s infinite ease-in-out both;
}

.hero-form .formkit-spinner>div:nth-child(1) {
    animation-delay: -0.32s;
}

.hero-form .formkit-spinner>div:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes kit-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* "Built with Kit" attribution */
.hero-form .formkit-powered-by-convertkit-container {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.hero-form .formkit-powered-by-convertkit {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.hero-form .formkit-powered-by-convertkit:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* About Section */
.about {
    background: var(--white);
    padding: calc(var(--spacing-unit) * 15) calc(var(--spacing-unit) * 3);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.about h2,
.brewing h2 {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 400;
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 8);
}

.about h2 {
    color: var(--dark-bg);
}

.brewing h2 {
    color: var(--white);
}

.about-content {
    max-width: var(--content-width);
    margin: 0 auto;
}

.about-content p {
    margin-bottom: calc(var(--spacing-unit) * 4);
    color: var(--dark-bg);
}

.about-content p:nth-child(3) {
    margin-bottom: 0;
}

/* Currently Brewing Section */
.brewing {
    position: relative;
    background: var(--dark-bg);
    padding: calc(var(--spacing-unit) * 15) calc(var(--spacing-unit) * 3);
    overflow: hidden;
}

.blueprint-grid {
    display: none;
}

.game-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 12px;
    padding: calc(var(--spacing-unit) * 6);
    box-shadow: 0 8px 32px rgba(22, 27, 64, 0.12);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(22, 27, 64, 0.18);
}

.coming-soon-badge {
    position: absolute;
    top: calc(var(--spacing-unit) * 3);
    right: calc(var(--spacing-unit) * 3);
    background: var(--warm-accent);
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.card-visual {
    display: flex;
    justify-content: center;
    margin-bottom: calc(var(--spacing-unit) * 4);
}

.potion-icon {
    width: 120px;
    height: auto;
}

.card-text {
    text-align: center;
    color: var(--dark-navy);
    font-size: 16px;
    margin: 0;
}

/* Footer */
.footer {
    background: var(--dark-navy);
    padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 3);
    text-align: center;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-text p {
    margin: calc(var(--spacing-unit) * 0.5) 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        min-height: 85vh;
        padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2);
    }

    .logo-container {
        margin-bottom: 0;
    }

    .main-logo {
        max-width: 400px;
    }

    .about,
    .brewing {
        padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 2);
    }

    .about h2,
    .brewing h2 {
        margin-bottom: calc(var(--spacing-unit) * 6);
    }

    body {
        font-size: 16px;
    }

    .game-card {
        padding: calc(var(--spacing-unit) * 4);
    }

    .potion-icon {
        width: 100px;
    }
}

@media (max-width: 480px) {
    .main-logo {
        max-width: 320px;
    }

    .about,
    .brewing {
        padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 2);
    }

    .game-card {
        padding: calc(var(--spacing-unit) * 3);
    }
}