/* 
 * StartupKaraikudi - Community Website Styles
 * Dark theme with vibrant red accents
 */

/* ========== CSS VARIABLES ========== */
:root {
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-glass: rgba(255, 255, 255, 0.05);

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    --accent: #E31937;
    --accent-light: #ff3d5a;
    --accent-dark: #b31229;
    --accent-glow: rgba(227, 25, 55, 0.3);

    --success: #10b981;
    --error: #ef4444;

    --border: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(227, 25, 55, 0.5);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Outfit', var(--font-primary);

    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 24px;

    /* Effects */
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
}

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(227, 25, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(227, 25, 55, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 24px;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    color: var(--text-secondary);
}

.text-gradient {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    color: var(--accent);
}

/* ========== LAYOUT ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.125rem;
}

/* ========== NAVIGATION ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.25rem;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 10px 24px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Mobile menu button */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent);
    color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.btn-lg {
    padding: 20px 40px;
    font-size: 1.125rem;
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero h1 {
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    max-width: 700px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 80px;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Background decoration */
.hero-decoration {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
}

.hero-decoration.top-right {
    top: -200px;
    right: -200px;
}

.hero-decoration.bottom-left {
    bottom: -200px;
    left: -200px;
    animation-delay: -4s;
}

/* ========== POLL SECTION ========== */
.poll-section {
    padding: 80px 0;
}

.poll-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.poll-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.poll-header {
    margin-bottom: 32px;
}

.poll-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.poll-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 12px;
}

.poll-header p {
    font-size: 1rem;
}

.poll-voting {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.poll-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 48px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    min-width: 180px;
}

.poll-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.poll-btn.poll-yes:hover {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.poll-btn.poll-no:hover {
    border-color: var(--accent);
    background: rgba(227, 25, 55, 0.1);
}

.poll-emoji {
    font-size: 2.5rem;
}

.poll-text {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Poll Results */
.poll-results {
    animation: fadeInUp 0.4s ease;
}

.poll-bar-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.poll-bar-wrapper {
    text-align: left;
}

.poll-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.poll-percent {
    color: var(--text-secondary);
}

.poll-bar {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.poll-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease-out;
    width: 0;
}

.poll-bar-yes {
    background: linear-gradient(90deg, var(--success), #34d399);
}

.poll-bar-no {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.poll-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.poll-total {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.poll-total span {
    font-weight: 700;
    color: var(--accent);
}

.poll-change {
    padding: 12px 24px;
    font-size: 0.875rem;
}

/* ========== ABOUT SECTION ========== */
.about {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.9375rem;
}

/* ========== JOIN SECTION ========== */
.join-section {
    position: relative;
}

.join-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.join-content h2 {
    margin-bottom: 16px;
}

.join-content p {
    margin-bottom: 32px;
}

.join-benefits {
    list-style: none;
}

.join-benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1rem;
}

.join-benefits .check-icon {
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    font-size: 0.875rem;
}

.join-form-wrapper {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
    backdrop-filter: blur(20px);
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 48px;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

.checkbox-item:hover {
    border-color: var(--accent);
}

.checkbox-item input {
    display: none;
}

.checkbox-item.checked {
    background: var(--accent);
    border-color: var(--accent);
}

.form-submit {
    width: 100%;
    margin-top: 8px;
}

/* Form messages */
.form-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 20px;
    display: none;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    display: block;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    display: block;
}

/* ========== CONTACT SECTION ========== */
.contact-section {
    background: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 64px;
}

.contact-info h3 {
    margin-bottom: 24px;
}

.contact-info p {
    margin-bottom: 32px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
}

.contact-form-wrapper {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
}

/* ========== FOOTER ========== */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-20px, 20px);
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {

    .join-wrapper,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .join-content {
        text-align: center;
    }

    .join-benefits {
        display: inline-block;
        text-align: left;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 64px 0;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .join-form-wrapper,
    .contact-form-wrapper {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .checkbox-group {
        flex-direction: column;
    }

    .checkbox-item {
        justify-content: center;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }
}

/* ========== LOADING SPINNER ========== */
.btn.loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== OPTIONAL SECTION TOGGLE ========== */
.optional-section {
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    background: rgba(255, 255, 255, 0.02);
}

.optional-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.optional-toggle:hover {
    color: var(--accent);
    background: rgba(227, 25, 55, 0.05);
}

.toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.optional-toggle:hover .toggle-icon {
    border-color: var(--accent);
    color: var(--accent);
}

.optional-toggle.active .toggle-icon {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: rotate(45deg);
}

.optional-fields {
    padding: 16px;
    padding-top: 8px;
    animation: fadeInUp 0.3s ease;
}

.optional-fields .form-group:last-child {
    margin-bottom: 0;
}