/* ==========================================================================
   Elizabeth Baldwin Connects — Design System
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
    /* Brand Palette */
    --gold:         #C9A84C;
    --gold-light:   #E8D599;
    --gold-dark:    #A68A38;
    --navy:         #0A1628;
    --navy-mid:     #112240;
    --navy-light:   #1A3358;
    --swedish-blue: #006AA7;
    --swedish-gold: #FECC02;
    --white:        #FAFAFA;
    --text:         #CBD5E1;
    --text-bright:  #E2E8F0;
    --text-muted:   #64748B;

    /* Gradients */
    --grad-gold: linear-gradient(135deg, #C9A84C 0%, #E8D599 50%, #C9A84C 100%);
    --grad-hero: linear-gradient(180deg, rgba(10,22,40,0.92) 0%, rgba(10,22,40,0.80) 50%, rgba(10,22,40,0.95) 100%);
    --grad-card: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Inter', -apple-system, sans-serif;

    /* Spacing */
    --section-pad: clamp(80px, 10vw, 140px);
    --container: min(1200px, 90vw);

    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--navy);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: var(--container); margin: 0 auto; }

/* ---------- Particle Canvas ---------- */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* ---------- Animated Gradient Text ---------- */
.gradient-text {
    background: var(--grad-gold);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}

.navbar.scrolled {
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    padding: 10px 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--gold);
    transition: transform 0.3s var(--ease-spring);
}

.nav-logo:hover .logo-icon {
    transform: rotate(15deg) scale(1.1);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--white);
    letter-spacing: 0.01em;
}

.logo-text em {
    color: var(--gold);
    font-style: italic;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    position: relative;
    transition: color 0.3s;
}

.nav-links a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0; right: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out);
}

.nav-links a:not(.nav-cta):hover {
    color: var(--white);
}

.nav-links a:not(.nav-cta):hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-cta {
    background: var(--grad-gold);
    color: var(--navy) !important;
    font-weight: 600 !important;
    padding: 10px 24px;
    border-radius: 50px;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201,168,76,0.35);
}

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

.nav-toggle span {
    width: 26px;
    height: 2px;
    background: var(--white);
    display: block;
    transition: 0.3s var(--ease-out);
    border-radius: 2px;
}

.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); }

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.98);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--white);
    transition: color 0.3s;
}

.mobile-menu a:hover { color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 120px 0 60px;
    background: url('assets/hero-bg.png') center / cover no-repeat;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: var(--grad-hero);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gold);
    margin-bottom: 20px;
}

.swedish-flag {
    font-size: 1.4rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.btn-primary {
    background: var(--grad-gold);
    color: var(--navy);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(201,168,76,0.35);
}

.btn-outline {
    border: 1.5px solid rgba(201,168,76,0.4);
    color: var(--gold);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(201,168,76,0.08);
    border-color: var(--gold);
    transform: translateY(-3px);
}

.btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--ease-out);
}

.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-full { width: 100%; justify-content: center; }

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    text-align: left;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--white);
    display: inline;
}

.stat-plus {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--gold);
}

.stat-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

/* Hero Image */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.image-frame {
    position: relative;
    width: 380px;
    height: 460px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

.image-glow {
    position: absolute;
    inset: -4px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--gold), var(--swedish-blue), var(--gold));
    z-index: -1;
    opacity: 0.5;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.02); }
}

.image-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(10,22,40,0.85);
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid rgba(201,168,76,0.3);
}

/* Floating cards */
.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(10,22,40,0.85);
    backdrop-filter: blur(15px);
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid rgba(201,168,76,0.15);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-bright);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.floating-card svg {
    width: 20px;
    height: 20px;
    color: var(--gold);
    flex-shrink: 0;
}

.card-1 {
    top: 30px;
    right: -20px;
    animation: floatY 6s ease-in-out infinite;
}

.card-2 {
    bottom: 60px;
    left: -30px;
    animation: floatY 6s ease-in-out 2s infinite;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 40px;
}

.scroll-indicator span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.6); }
}

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

.section-tag {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: var(--white);
    font-weight: 700;
    line-height: 1.2;
}

/* ---------- About Section ---------- */
.about {
    padding: var(--section-pad) 0;
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.about-card {
    background: var(--grad-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 40px 32px;
    transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}

.about-card:hover {
    transform: translateY(-8px);
    border-color: rgba(201,168,76,0.2);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.about-icon {
    width: 56px;
    height: 56px;
    color: var(--gold);
    margin-bottom: 24px;
}

.about-icon svg {
    width: 100%;
    height: 100%;
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--white);
    margin-bottom: 14px;
}

.about-card p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ---------- Services Section ---------- */
.services {
    padding: var(--section-pad) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(201,168,76,0.02) 50%, transparent 100%);
    position: relative;
    z-index: 2;
}

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

.service-card {
    background: var(--grad-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 40px 36px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(201,168,76,0.2);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.service-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: rgba(201,168,76,0.08);
    position: absolute;
    top: 20px;
    right: 28px;
    line-height: 1;
    transition: color 0.4s;
}

.service-card:hover .service-number {
    color: rgba(201,168,76,0.15);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--white);
    margin-bottom: 14px;
}

.service-card p {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 420px;
}

.service-line {
    width: 50px;
    height: 3px;
    background: var(--grad-gold);
    border-radius: 3px;
    margin-top: 24px;
    transition: width 0.4s var(--ease-out);
}

.service-card:hover .service-line { width: 80px; }

/* ---------- Testimonials Section ---------- */
.testimonials {
    padding: var(--section-pad) 0;
    position: relative;
    z-index: 2;
}

.testimonials-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.testimonial-card {
    background: var(--grad-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 36px 32px;
    transition: transform 0.4s var(--ease-out), border-color 0.4s;
}

.testimonial-card:hover {
    transform: translateY(-6px);
    border-color: rgba(201,168,76,0.15);
}

.stars {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

blockquote {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text-bright);
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--grad-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--navy);
}

.author-name {
    font-weight: 600;
    color: var(--white);
    font-size: 0.95rem;
}

.author-title {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ---------- Contact Section ---------- */
.contact {
    padding: var(--section-pad) 0;
    position: relative;
    z-index: 2;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    background: var(--grad-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 28px;
    padding: 60px;
}

.contact-content .section-tag { text-align: left; }

.contact-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.2;
}

.contact-description {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 36px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group {
    position: relative;
}

.form-group label {
    position: absolute;
    top: -8px;
    left: 16px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    background: var(--navy);
    padding: 0 6px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    opacity: 1;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.3s, background 0.3s;
    outline: none;
}

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

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    background: rgba(201,168,76,0.03);
}

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

/* Contact Visual */
.contact-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.connection-graphic {
    position: relative;
    width: 300px;
    height: 300px;
}

.node {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 20px rgba(201,168,76,0.5);
}

.node-1 { top: 40px; left: 50%; transform: translateX(-50%); animation: nodePulse 3s ease-in-out infinite; }
.node-2 { top: 140px; left: 30px; animation: nodePulse 3s ease-in-out 0.5s infinite; }
.node-3 { top: 140px; right: 30px; animation: nodePulse 3s ease-in-out 1s infinite; }
.node-4 { bottom: 20px; left: 80px; animation: nodePulse 3s ease-in-out 1.5s infinite; }
.node-5 { bottom: 20px; right: 80px; animation: nodePulse 3s ease-in-out 2s infinite; }

@keyframes nodePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(201,168,76,0.5); }
    50% { transform: scale(1.3); box-shadow: 0 0 30px rgba(201,168,76,0.8); }
}

.node-1 { animation: nodePulse 3s ease-in-out infinite, floatY 5s ease-in-out infinite; }

.connection-lines {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.connection-lines line {
    animation: lineFlow 4s ease-in-out infinite;
}

@keyframes lineFlow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* ---------- Footer ---------- */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative;
    z-index: 2;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.footer-brand .logo-text {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 12px;
}

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

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text);
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ---------- Scroll Animation Classes ---------- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-animate="fade-left"] {
    transform: translateX(50px);
}

[data-animate].animated {
    opacity: 1;
    transform: translate(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description { margin-left: auto; margin-right: auto; }
    .hero-ctas { justify-content: center; }
    .hero-stats { justify-content: center; }

    .hero-image { margin-top: 40px; }
    .floating-card { display: none; }

    .about-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
    .services-grid { grid-template-columns: 1fr; }
    .testimonials-track { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 40px 28px;
    }

    .contact-visual { display: none; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .mobile-menu { display: flex; }

    .hero h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .stat { text-align: center; }

    .image-frame {
        width: 280px;
        height: 350px;
    }

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

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .footer-links { flex-wrap: wrap; justify-content: center; }
}
