/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --primary-color: #ffffff;
    --primary-dark: #cccccc;
    --primary-light: #cccccc;
    --text-color: #f8f9fa;
    --klein-blue: #002FA7;
    --bg-color: #050505;
    --card-color-rgb: 8, 8, 8;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 47, 167, 0.15);
    --transition-speed: 0.5s;
}

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 200;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
}

body {
    color: var(--text-color);
    line-height: 1.6;
    width: 100%;
}

/* ========================================
   LAYOUT CONTAINERS
   ======================================== */
main {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background-color: transparent;
    position: relative;
    z-index: 2;
}

#gradient-canvas {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    will-change: transform;
}

.content-wrapper {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    z-index: 2;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: transparent !important;
    color: white;
    padding: 20px;
    font-size: 14px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.logo-text {
    font-weight: 200;
    font-size: 1.5rem;
}

/* ========================================
   NAVIGATION
   ======================================== */
.side-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    position: relative;
}

.nav-dot:hover,
.nav-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.3);
    box-shadow: 0 0 12px var(--klein-blue);
}

.nav-dot::after {
    content: attr(data-label);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: #000000;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

.nav-dot:hover::after {
    opacity: 1;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
    min-height: 100vh;
    padding: 100px 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 200;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--klein-blue);
    border-radius: 2px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--primary-light);
    font-weight: 200;
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    padding-top: 180px;
}

.event-title {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 200;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #bbbbbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: var(--primary-light);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-description {
    font-size: 1.1rem;
    font-weight: 200;
    margin-bottom: 2rem;
    color: var(--primary-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    background-color: var(--primary-color);
    color: #000000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.15);
}

.back-btn {
    background: none;
    border: none;
    color: var(--primary-light);
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 0;
}

.back-btn:hover {
    color: var(--primary-color);
}

.choice-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
}

.choice-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--klein-blue);
    transform: translateY(-5px);
}

.choice-btn svg {
    width: 32px;
    height: 32px;
    stroke: var(--primary-light);
}

/* ========================================
   ANIMATIONS
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children > * {
    transition-delay: calc(0.15s * var(--stagger-index));
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

/* ========================================
   COMMUNITY CARDS
   ======================================== */
.community-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.community-card {
    background: rgba(var(--card-color-rgb), 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    perspective: 1500px;
    position: relative;
    min-height: 320px;
    transition: transform var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
    cursor: pointer;
}

.community-card:hover {
    transform: translateY(-10px);
    border-color: var(--klein-blue);
}

.community-card h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.community-card p {
    color: var(--primary-light);
}

.community-card.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    transform-style: preserve-3d;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 2rem;
    border-radius: 12px;
}

.card-back {
    transform: rotateY(180deg);
    background-color: var(--bg-color);
}

.card-back h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.card-back p {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.card-back ul {
    list-style: none;
    padding-left: 0;
}

.card-back li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.card-back li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--klein-blue);
    font-weight: 300;
    font-size: 1.2rem;
    line-height: 1;
}

.card-front-content {
    text-align: center;
    width: 100%;
}

.card-icon {
    position: absolute;
    bottom: 1rem;
    right: 1.5rem;
    opacity: 0.4;
    width: 24px;
    height: 24px;
    transition: opacity 0.3s ease;
}

.community-card:hover .card-icon {
    opacity: 0.7;
}

/* ========================================
   ETHOS SECTION
   ======================================== */
.ethos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.ethos-item {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ethos-item svg {
    width: 40px;
    height: 40px;
    stroke: var(--klein-blue);
    margin-bottom: 1rem;
}

.ethos-item h4 {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
}

.ethos-item p {
    color: var(--primary-light);
}

/* ========================================
   DIMENSIONS SECTION
   ======================================== */
.dimensions-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.dimension-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2.5rem;
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
}

.dimension-item.is-active .dimension-title {
    border-color: var(--klein-blue);
}

.dimension-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--klein-blue);
    letter-spacing: 2px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding-right: 1.5rem;
    border-right: 2px solid var(--border-color);
    text-align: center;
    align-self: stretch;
    display: flex;
    align-items: center;
    transition: border-color var(--transition-speed) ease;
}

.dimension-content h4 {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
    text-align: left;
}

.dimension-content p {
    color: var(--primary-light);
    text-align: left;
}

/* ========================================
   CRITERIA SECTION
   ======================================== */
.criteria-list {
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: left;
}

.criteria-item {
    background: transparent;
    border: none;
    border-left: 2px solid var(--border-color);
    border-radius: 0;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-left-color var(--transition-speed) ease;
}

.criteria-item.is-active {
    border-left-color: var(--klein-blue);
}

.criteria-item h4 {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    background-color: rgba(var(--card-color-rgb), 0.2);
    padding: 100px 2rem !important;
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: rgba(var(--card-color-rgb), 0.8);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s ease;
    position: relative;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-weight: 300;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--primary-light);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-content {
    padding: 2rem;
    min-height: 300px;
}

/* ========================================
   FORMS
   ======================================== */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-step.slide-in {
    animation: slideIn 0.4s ease-out forwards;
}

.form-step.slide-out {
    animation: slideOut 0.4s ease-in forwards;
}

.step-question {
    font-size: 1.2rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 2rem;
}

.choice-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

fieldset legend {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--klein-blue);
    padding: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 200;
    font-size: 0.9rem;
    color: var(--primary-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    font-weight: 200;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--klein-blue);
    box-shadow: 0 0 0 2px rgba(0, 47, 167, 0.2);
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: rgba(40, 167, 69, 0.125);
    border: 1px solid #28a745;
    color: #28a745;
}

.form-message.error {
    background-color: rgba(220, 53, 69, 0.125);
    border: 1px solid #dc3545;
    color: #dc3545;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    color: white;
    text-align: center;
    font-weight: 200;
    font-size: clamp(14px, 1.5vw, 18px);
    position: fixed;
    z-index: 1000;
    bottom: 2vh;
    left: 50%;
    transform: translateX(-50%);
}

/* ========================================
   MEDIA QUERIES
   ======================================== */

/* Tablet (601px - 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
    .community-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .header {
        height: 60px;
        padding: 0 20px;
    }

    .section {
        padding: 60px 1rem;
    }

    .hero {
        padding-top: 100px;
    }

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

    .section-header h2 {
        font-size: 2.2rem;
    }

    .side-nav {
        display: none;
    }

    .dimension-item {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .dimension-title {
        writing-mode: horizontal-tb;
        transform: none;
        border-right: none;
        padding-right: 0;
        border-bottom: 2px solid var(--border-color);
        padding-bottom: 1rem;
        width: 100%;
    }

    .dimension-content h4,
    .dimension-content p {
        text-align: center;
    }

    .choice-container {
        flex-direction: column;
    }

    .community-grid {
        grid-template-columns: 1fr;
    }
}

/* Desktop (min-width: 1025px) */
@media (min-width: 1025px) {
    .community-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
