/* Agidion Landing Page - Brand Styles */

:root {
    /* Brand Colors - Night Sky Theme */
    --bg-deep: #0A0A0F;
    --bg-dark: #14141F;
    --bg-card: #1E1E2E;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(59, 89, 152, 0.3);
    
    /* Text */
    --text-primary: #E8E8ED;
    --text-secondary: #8B8B9E;
    --text-muted: #606070;
    
    /* Accent - Night Sky Blue & Gold */
    --accent-primary: #F5D76E;
    --accent-hover: #F7DC7E;
    --accent-glow: rgba(245, 215, 110, 0.3);
    --accent-blue: #3B5998;
    --accent-blue-dim: #1E3A5F;
    
    /* Gradient */
    --gradient-text: linear-gradient(135deg, #F5D76E 0%, #E8E8ED 50%, #3B5998 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(59, 89, 152, 0.2) 0%, transparent 70%);
    --gradient-bg: linear-gradient(180deg, #0A0A0F 0%, #12121F 50%, #0A0A0F 100%);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
     overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100svh; /* iOS Safari: uses height when browser chrome is visible */
}

/* Star Pattern Background - SVG */
.star-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image: url('starfield.svg');
    background-repeat: repeat;
    background-size: 400px 400px;
    opacity: 0.8;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

/* Links - Proper Styling */
a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo:hover {
    opacity: 0.85;
}

.logo-img {
    height: 100px;
    width: auto;
    /* animation: logoFloat 6s ease-in-out infinite; */
}

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

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-deep);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn-small {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;      /* fallback for older browsers */
    min-height: 100svh;     /* iOS Safari 15.4+: fits within the visible viewport */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-xl) 0;
    /* account for iPhone home indicator / safe area at the bottom */
    padding-bottom: max(var(--space-xl), env(safe-area-inset-bottom));
    overflow: hidden;
}

/* Desktop: pin header top + footer bottom via absolute so only
   hero-content participates in flex centering */
@media (min-width: 601px) {
    .hero-header {
        position: absolute;
        top: var(--space-xl);
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
    }
    .site-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        margin-top: 0;
    }
}

/* Mobile: normal flow so nothing overlaps */
@media (max-width: 600px) {
    .hero {
        justify-content: space-between;
        align-items: stretch;
    }
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: var(--gradient-glow);
    pointer-events: none;
    z-index: 0;
}

/* Logo - visible above content */
.hero-glow .logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -280%);
    width: 120px;
    height: 120px;
    opacity: 0.9;
    z-index: 2;
    filter: drop-shadow(0 0 12px rgba(147, 112, 219, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.05em;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.hero-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto var(--space-xl);
    line-height: 1.7;
}

/* Hero Signup Form */
.hero-signup {
    margin-bottom: var(--space-3xl);
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 450px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}

.form-input {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

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

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-note {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-helper {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

/* About Section in Hero */
.hero-about {
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--border-subtle);
}

.about-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.about-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md) var(--space-xl);
    max-width: 550px;
    margin: 0 auto;
    text-align: left;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.about-feature-icon {
    font-size: 1rem;
}

/* Footer */
.footer {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--border-subtle);
    position: relative;
    z-index: 1;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    align-items: center;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.footer-logo {
    height: 28px;
    width: auto;
}

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

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

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

.footer-link:hover {
    color: var(--accent-primary);
}

.footer-social {
    display: flex;
    gap: var(--space-lg);
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: var(--accent-primary);
}

.site-footer {
    width: 100%;
    padding: var(--space-xl) 0;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    padding-top: var(--space-lg);
}

/* Mobile Responsive */
/* ── Form success state ──────────────────────────────────────────────────── */

.signup-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 20px 12px;
    animation: successFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes successFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Gold ring — new signup or resent */
.success-icon-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(245, 215, 110, 0.07);
    border: 1.5px solid rgba(245, 215, 110, 0.4);
    box-shadow: 0 0 20px rgba(245, 215, 110, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    animation: ringScale 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

/* Green ring — already confirmed */
.success-icon-ring--green {
    background: rgba(74, 222, 128, 0.07);
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.12);
}

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

.success-headline {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.025em;
}

.success-body {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 20px;
    max-width: 300px;
}

.success-hint {
    display: inline-block;
    font-size: 0.775rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 6px 18px;
    border-radius: var(--radius-full);
    letter-spacing: 0.01em;
}

/* ── Success state: viewport-fit on small screens ───────────────────────── */
/*
 * Once the success card is shown the hero title/subtitle are no longer needed.
 * On small viewports (<= 600 px) we hide them so the card always fits inside
 * 100svh without any scrolling.  On larger screens everything stays visible.
 */
@media (max-width: 600px) {
    .hero--success .hero-title,
    .hero--success .hero-subtitle {
        display: none;
    }

    /* remove the large bottom gap that was meant to space the form from the footer */
    .hero--success .hero-signup {
        margin-bottom: 0;
    }
}

/* ── Inline form error ───────────────────────────────────────────────────── */

.form-error {
    color: #f87171;
    font-size: 0.875rem;
    margin-top: 10px;
    text-align: center;
}

/* ── Cookie consent banner ───────────────────────────────────────────────── */

.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(130%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    width: calc(100% - 48px);
    max-width: 580px;

    background: #14141F;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(245, 215, 110, 0.05);

    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.cookie-banner--visible {
    transform: translateX(-50%) translateY(0);
}

.cookie-banner-text {
    flex: 1;
    min-width: 200px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.cookie-banner-text strong { color: var(--text-primary); font-weight: 600; }

.cookie-banner-text a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-btn-accept {
    padding: 9px 20px;
    background: var(--accent-primary);
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
    white-space: nowrap;
}

.cookie-btn-accept:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-glow);
}

.cookie-btn-decline {
    padding: 9px 14px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}

.cookie-btn-decline:hover {
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 480px) {
    .cookie-banner {
        bottom: 12px;
        padding: 16px;
        flex-direction: column;
        gap: 14px;
    }
    .cookie-banner-actions { width: 100%; }
    .cookie-btn-accept, .cookie-btn-decline { flex: 1; text-align: center; }
}

/* ── End of additions ────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-feature {
        justify-content: center;
    }
    
    .form-group {
        flex-direction: column;
        align-items: center;
    }
    
    .form-group {
        width: 100%;
    }
    
    .form-input {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
    
    .btn {
        width: 100%;
        max-width: 100%;
    }
    
    /* Footer links side by side on mobile */
    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-lg);
    }
    
    .footer-link {
        display: inline-block;
    }
}