/* ============================================
   KreweConnect Landing Page — Styles
   Mardi Gras Dark Theme
   ============================================ */

/* --- Design Tokens --- */
:root {
    --purple: #5B2D8E;
    --purple-light: #7B4DB0;
    --purple-glow: rgba(91, 45, 142, 0.3);
    --gold: #D4A843;
    --gold-light: #E8C76A;
    --gold-glow: rgba(212, 168, 67, 0.3);
    --green: #1B6B3A;
    --green-light: #2A8F4F;
    --green-glow: rgba(27, 107, 58, 0.3);
    --bg: #0A0E17;
    --bg-elevated: #101520;
    --card: #141824;
    --card-hover: #1A2030;
    --white: #FFFFFF;
    --gray: #A0AEC0;
    --gray-dim: #636E80;
    --border: rgba(160, 174, 192, 0.1);
    --border-hover: rgba(160, 174, 192, 0.2);
    --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.4);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--gray);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    color: var(--white);
    line-height: 1.2;
    font-weight: 700;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--gold-light);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition);
    background: transparent;
}

.nav.scrolled {
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-fleur {
    color: var(--gold);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-links a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
    background: var(--purple) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: var(--purple-light) !important;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 50%, var(--purple-glow), transparent),
        radial-gradient(ellipse 50% 40% at 80% 30%, var(--gold-glow), transparent),
        radial-gradient(ellipse 40% 50% at 60% 80%, var(--green-glow), transparent);
    opacity: 0.5;
    animation: gradientPulse 12s ease-in-out infinite alternate;
}

@keyframes gradientPulse {
    0% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
    100% { opacity: 0.4; transform: scale(1); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-fleur {
    margin: 0 auto 24px;
    animation: floatFleur 6s ease-in-out infinite;
}

@keyframes floatFleur {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-title-krewe {
    color: var(--white);
}

.hero-title-connect {
    color: var(--gold);
}

.hero-tagline {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: var(--gray);
    font-weight: 400;
    margin-bottom: 20px;
    font-style: italic;
}

.hero-statement {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--gray);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gray-dim);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #C49A38);
    color: #0A0E17;
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 168, 67, 0.35);
    color: #0A0E17;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.btn-primary:active {
    transform: translateY(0);
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
    background: rgba(212, 168, 67, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 560px;
    margin: 0 auto;
}

/* --- Features --- */
.features {
    background: var(--bg-elevated);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--gold), var(--green));
    opacity: 0;
    transition: opacity var(--transition);
}

.feature-card:hover {
    background: var(--card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon--purple {
    background: rgba(91, 45, 142, 0.12);
    color: var(--purple-light);
}

.feature-icon--gold {
    background: rgba(212, 168, 67, 0.12);
    color: var(--gold);
}

.feature-icon--green {
    background: rgba(27, 107, 58, 0.12);
    color: var(--green-light);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- How It Works --- */
.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.step {
    text-align: center;
    flex: 1;
    max-width: 280px;
    padding: 0 20px;
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 80px;
    flex-shrink: 0;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--gold));
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--gold);
}

.step h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.step p {
    font-size: 0.9rem;
}

/* --- Screenshots --- */
.screenshots {
    background: var(--bg-elevated);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.screenshots-grid .screenshot-mockup:first-child {
    grid-column: 1;
}

.screenshot-mockup {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow);
}

.browser-chrome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #1A1E2C;
    border-bottom: 1px solid var(--border);
}

.browser-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.browser-dots span:nth-child(1) { background: #FF5F57; }
.browser-dots span:nth-child(2) { background: #FEBC2E; }
.browser-dots span:nth-child(3) { background: #28C840; }

.browser-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--gray-dim);
}

.screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 24px;
    color: var(--gray-dim);
    font-size: 0.9rem;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(255, 255, 255, 0.01) 20px,
            rgba(255, 255, 255, 0.01) 40px
        );
}

@media (min-width: 768px) {
    .screenshots-grid {
        grid-template-columns: 1fr 1fr;
    }
    .screenshots-grid .screenshot-mockup:first-child {
        grid-column: 1 / -1;
    }
}

/* --- About --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: start;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-content h2 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    margin-bottom: 20px;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 32px;
}

.about-coming-soon {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
}

.coming-soon-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--green-light);
    background: rgba(27, 107, 58, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.about-coming-soon h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.about-coming-soon p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.value-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.value-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.value-item h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.value-item p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Contact --- */
.contact {
    background: var(--bg-elevated);
}

.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.required {
    color: var(--gold);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: all var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-dim);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-glow);
}

.form-group input.error,
.form-group select.error {
    border-color: #E53E3E;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23A0AEC0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select option {
    background: var(--card);
    color: var(--white);
}

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

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 1.05rem;
    margin-top: 8px;
}

.form-success {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    margin-bottom: 24px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.form-success h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.form-success p {
    color: var(--gray);
}

/* --- Footer --- */
.footer {
    padding: 60px 0 32px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--gray-dim);
}

.footer-links h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    color: var(--gray);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gray-dim);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--gray-dim);
}

.footer-bottom a {
    color: var(--gray);
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

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

/* --- Reveal stagger for feature cards --- */
.features-grid .feature-card:nth-child(1) { transition-delay: 0s; }
.features-grid .feature-card:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.2s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 72px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--card);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 4px;
        transition: right var(--transition);
        border-left: 1px solid var(--border);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        width: 100%;
        padding: 12px 16px;
    }

    .steps {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .step-connector {
        padding-top: 0;
        transform: rotate(90deg);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 28px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    .screenshots-grid .screenshot-mockup:first-child {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2.6rem;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .animate-in {
        opacity: 1;
        transform: none;
    }
}

/* --- Focus styles for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
