/* Connect Page Styles - RAYGUN OS
 *
 * Refined with [!breakthrough] analysis:
 * - Visual hierarchy (Lab featured, Email secondary)
 * - Energy injection (icons, warmer background, liberal word glows)
 * - Consistency (all buttons/links same treatment)
 * - Polish (toast, animations, deeper shadows, better contrast)
 */

/* ============================================
   BASE & BACKGROUND
   ============================================ */

.connect-page {
    min-height: calc(100vh - 80px);
    /* Warmer, more visible gradient */
    background: linear-gradient(
        180deg,
        var(--bg-primary) 0%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 100%
    );
    /* Subtle warm overlay - smoother transition */
    background-image:
        radial-gradient(
            ellipse at top,
            var(--color-orange-faint) 0%,
            transparent 70%
        ),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    background-size: 100% 100%, 100% 100%;
    background-repeat: no-repeat;
}

/* Dark mode: Deeper, warmer background with stronger orange tint */
[data-theme="dark"] .connect-page {
    background: linear-gradient(
        180deg,
        var(--bg-primary) 0%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 100%
    );
    background-image:
        radial-gradient(
            ellipse at top,
            rgba(243, 156, 18, 0.15) 0%,
            transparent 70%
        ),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    background-size: 100% 100%, 100% 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */

.connect-hero {
    text-align: center;
    padding: var(--space-20) var(--space-4) var(--space-16) var(--space-4);
    max-width: var(--container-md);
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: var(--text-7xl);
    font-weight: var(--font-extrabold);
    color: var(--text-primary);
    margin: 0 0 var(--space-6) 0;
    letter-spacing: var(--tracking-tight);
}

.hero-subtitle {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    line-height: var(--line-relaxed);
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--line-relaxed);
}

/* Word glow effect (liberal use for energy) */
.glow-word {
    color: var(--color-orange);
    font-weight: var(--font-semibold);
    display: inline-block;
    animation: wordPulse 7s ease-in-out infinite;
}

@keyframes wordPulse {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(230, 126, 34, 0.4),
            0 0 18px rgba(230, 126, 34, 0.22);
    }
    50% {
        text-shadow:
            0 0 7px rgba(230, 126, 34, 0.25),
            0 0 14px rgba(230, 126, 34, 0.15);
    }
}

/* ============================================
   CONNECT CONTENT
   ============================================ */

.connect-content {
    max-width: var(--container-md);
    margin: 0 auto;
    padding: 0 var(--space-4) var(--space-16) var(--space-4);
}

/* ============================================
   SECTIONS (Base styles)
   ============================================ */

.connect-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal) ease;
    position: relative;
}

.connect-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--color-orange-faint);
}

/* Dark mode: Deeper shadows */
[data-theme="dark"] .connect-section {
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .connect-section:hover {
    box-shadow: var(--shadow-xl);
}

/* Section Icons */
.section-icon {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-4);
    display: block;
    text-align: center;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.section-title {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    letter-spacing: var(--tracking-tight);
    text-align: center;
}

.section-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin: 0 0 var(--space-6) 0;
    line-height: var(--line-relaxed);
    text-align: center;
}

/* ============================================
   FEATURED SECTION (Lab - PRIMARY focus)
   ============================================ */

.featured-section {
    padding: var(--space-12);
    border: 2px solid var(--color-orange);
    background: linear-gradient(
        135deg,
        var(--bg-secondary) 0%,
        var(--color-orange-faint) 100%
    );
    box-shadow:
        var(--shadow-lg),
        0 0 0 1px var(--color-orange-faint);
}

.featured-section .section-icon {
    font-size: var(--text-6xl);
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.featured-section .section-title {
    font-size: var(--text-4xl);
}

.featured-section:hover {
    transform: translateY(-6px);
    box-shadow:
        var(--shadow-xl),
        0 0 30px var(--color-orange-faint);
}

/* Preserve border on mobile tap (prevent disappearing on :active) */
.featured-section:active {
    border: 2px solid var(--color-orange);
    transform: translateY(-4px);
}

/* Dark mode: Stronger featured treatment */
[data-theme="dark"] .featured-section {
    background: linear-gradient(
        135deg,
        var(--bg-secondary) 0%,
        rgba(243, 156, 18, 0.1) 100%
    );
    box-shadow:
        var(--shadow-xl),
        0 0 0 1px rgba(243, 156, 18, 0.3);
}

[data-theme="dark"] .featured-section:hover {
    box-shadow:
        var(--shadow-2xl),
        0 0 40px rgba(243, 156, 18, 0.3);
}

/* ============================================
   SECTION DIVIDER
   ============================================ */

.section-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-10) 0;
    padding: 0 var(--space-8);
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--color-orange) 50%,
        transparent 100%
    );
}

.divider-text {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

/* ============================================
   EMAIL SECTION (Secondary option)
   ============================================ */

.email-section {
    padding: var(--space-8);
    /* Slightly smaller, less prominent than featured */
}

.email-display {
    text-align: center;
    margin: var(--space-8) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
}

.email-masked {
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    padding: var(--space-3) var(--space-6);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.btn-copy-email {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: white;
    background: var(--color-orange);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 300ms ease-out,
                background 200ms ease-out;
    position: relative;
    overflow: hidden;
}

/* Sweep gradient effect (SAME as form button) */
.btn-copy-email::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 600ms ease-out;
    pointer-events: none;
}

.btn-copy-email:hover::before {
    left: 100%;
}

.btn-copy-email:hover {
    background: var(--color-orange-hover);
    transform: translateY(-2px);
    box-shadow:
        var(--glow-orange),
        var(--shadow-lg);
    animation: energyPulse 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@keyframes energyPulse {
    0% { transform: translateY(-2px) scale(1); }
    50% { transform: translateY(-2px) scale(1.02); }
    100% { transform: translateY(-2px) scale(1); }
}

.btn-icon {
    font-size: var(--text-lg);
}

.email-note {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin: var(--space-6) 0 0 0;
    line-height: var(--line-relaxed);
    text-align: center;
    font-style: italic;
}

/* ============================================
   LAB SECTION CONTENT
   ============================================ */

.lab-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-6) 0;
}

.lab-benefits li {
    font-size: var(--text-md);
    color: var(--text-secondary);
    padding-left: var(--space-6);
    margin-bottom: var(--space-3);
    position: relative;
    line-height: var(--line-relaxed);
}

.lab-benefits li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-orange);
    font-weight: var(--font-bold);
    font-size: var(--text-lg);
}

.lab-promise {
    font-size: var(--text-md);
    color: var(--text-primary);
    margin: 0 0 var(--space-4) 0;
    line-height: var(--line-relaxed);
    text-align: center;
}

.lab-validation {
    font-size: var(--text-md);
    color: var(--text-secondary);
    margin: 0 0 var(--space-8) 0;
    line-height: var(--line-relaxed);
    padding: var(--space-5);
    background: var(--bg-tertiary);
    border-left: 4px solid var(--color-orange);
    border-radius: var(--radius-base);
}

/* ============================================
   FORM STYLES
   ============================================ */

.lab-form {
    margin-top: var(--space-8);
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.required {
    color: var(--color-error);
    font-weight: var(--font-bold);
}

.optional {
    color: var(--text-tertiary);
    font-weight: var(--font-normal);
    font-size: var(--text-sm);
}

.form-input {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    font-family: var(--font-body);
    font-size: 16px; /* Prevents iOS zoom */
    line-height: var(--line-normal);
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal) ease,
                transform var(--transition-fast) ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-orange);
    box-shadow: var(--shadow-focus);
    background: var(--bg-secondary);
    transform: scale(1.01);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   SUBMIT BUTTON (Homepage-level polish)
   ============================================ */

.btn-submit {
    display: inline-block;
    width: 100%;
    padding: var(--space-5) var(--space-8);
    font-family: var(--font-body);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: white;
    background: var(--color-orange);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 300ms ease-out,
                background 200ms ease-out;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

/* Sweep gradient effect */
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 600ms ease-out;
    pointer-events: none;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: var(--color-orange-hover);
    transform: translateY(-2px);
    box-shadow:
        var(--glow-orange-strong),
        var(--shadow-xl);
    animation: energyPulse 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.form-note {
    font-size: var(--text-base);
    color: var(--text-secondary); /* Changed from muted for better contrast */
    margin: var(--space-5) 0 0 0;
    line-height: var(--line-relaxed);
    font-weight: var(--font-medium);
    text-align: center;
}

/* Dark mode: Better contrast for form note */
[data-theme="dark"] .form-note {
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

/* ============================================
   OTHER LINKS SECTION
   ============================================ */

.other-links {
    text-align: center;
    padding: var(--space-16) var(--space-4) var(--space-16) var(--space-4);
    max-width: var(--container-md);
    margin: 0 auto;
}

.other-links-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    margin: 0 0 var(--space-6) 0;
}

.other-links-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
}

.other-link {
    font-size: var(--text-md);
    color: var(--color-teal);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: all var(--transition-fast) ease;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-base);
    position: relative;
}

.other-link::after {
    content: '→';
    margin-left: var(--space-2);
    opacity: 0;
    transform: translateX(-4px);
    transition: all var(--transition-fast) ease;
}

.other-link:hover {
    color: var(--color-teal-hover);
    background: var(--color-teal-faint);
    transform: translateX(4px);
    text-shadow: 0 0 15px rgba(0, 168, 171, 0.3);
}

.other-link:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.toast {
    position: fixed;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%) translateY(200px);
    background: var(--color-orange);
    color: white;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    z-index: var(--z-toast);
    opacity: 0;
    transition: all var(--transition-medium) cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   FOOTER (Standardized pattern)
   ============================================ */

.site-footer {
    padding: var(--space-10) 0 var(--space-8) 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.site-footer .container {
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    font-size: 0.875rem;
    color: var(--color-teal);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast) ease;
}

.footer-link:hover {
    color: var(--color-teal-bright);
}

.footer-separator {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE (Mobile)
   ============================================ */

@media (max-width: 768px) {
    .hero-title {
        font-size: var(--text-5xl);
    }

    .hero-subtitle {
        font-size: var(--text-xl);
    }

    .hero-description {
        font-size: var(--text-md);
    }

    .connect-section {
        padding: var(--space-6);
    }

    .featured-section {
        padding: var(--space-8);
    }

    .section-title {
        font-size: var(--text-2xl);
    }

    .featured-section .section-title {
        font-size: var(--text-3xl);
    }

    .email-masked {
        font-size: var(--text-md);
        padding: var(--space-2) var(--space-4);
    }

    .btn-copy-email,
    .btn-submit {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-md);
    }

    .section-divider {
        padding: 0 var(--space-4);
    }
}

@media (min-width: 768px) {
    .site-footer .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .other-links-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================
   ACCESSIBILITY: REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .connect-section,
    .btn-copy-email,
    .btn-submit,
    .other-link,
    .glow-word,
    .form-input,
    .toast {
        transition: none;
        animation: none;
    }

    .glow-word {
        text-shadow:
            0 0 10px rgba(230, 126, 34, 0.4),
            0 0 18px rgba(230, 126, 34, 0.22);
    }

    .btn-copy-email::before,
    .btn-submit::before {
        display: none;
    }

    .featured-section .section-icon {
        animation: none;
    }

    .other-link::after {
        opacity: 1;
        transform: translateX(0);
    }
}
