/* =====================================================
   NAVIGENI — Design System
   ===================================================== */
:root {
    --bg: #03091a;
    --surface: #080f24;
    --surface-2: #0d1633;
    --border: rgba(255, 255, 255, 0.07);
    --accent: #1d4ed8;
    --accent-light: #3b82f6;
    --sky: #0ea5e9;
    --white: #ffffff;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --serif: 'Cormorant Garamond', serif;
    --sans: 'Inter', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: var(--sans);
    line-height: 1.65;
    overflow-x: hidden;
}

body.loading {
    overflow: hidden;
}

img {
    display: block;
    width: 100%;
    object-fit: cover;
}

/* =====================================================
   LOADER
   ===================================================== */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.loader-logo {
    font-family: var(--serif);
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.3em;
}

.loader-bar {
    width: 180px;
    height: 1px;
    background: var(--border);
    border-radius: 9999px;
    overflow: hidden;
}

.loader-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-light), var(--sky));
    border-radius: inherit;
    animation: loadFill 1.6s var(--ease-out) forwards;
}

@keyframes loadFill {
    to {
        width: 100%;
    }
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.25rem 0;
    transition: background 0.4s ease, padding 0.4s ease;
}

.navbar.scrolled {
    background: rgba(3, 9, 26, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    color: var(--muted-2);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-cta {
    margin-left: 1rem;
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(3, 9, 26, 0.25) 0%,
            rgba(3, 9, 26, 0.5) 40%,
            rgba(3, 9, 26, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 4rem;
    align-items: flex-end;
    padding-top: 6rem;
}

.hero-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sky);
    margin-bottom: 1.25rem;
}

.headline {
    font-family: var(--serif);
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.headline em {
    font-style: italic;
    background: linear-gradient(135deg, #bfdbfe, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subheadline {
    margin-top: 1.5rem;
    color: var(--muted-2);
    font-size: 1.05rem;
    max-width: 480px;
    line-height: 1.75;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
}

.hero-scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--white), transparent);
    animation: scrollBob 2s ease-in-out infinite;
}

@keyframes scrollBob {

    0%,
    100% {
        transform: scaleY(1);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1.4);
        opacity: 1;
    }
}

/* =====================================================
   CHATBOT
   ===================================================== */
.chatbot-container {
    background: rgba(8, 15, 36, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 540px;
}

.chatbot-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--sky));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.avatar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    position: absolute;
    bottom: 1px;
    right: 1px;
    border: 2px solid var(--surface);
}

.chatbot-header h3 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.chatbot-status {
    font-size: 0.72rem;
    color: #4ade80;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.msg {
    max-width: 90%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.6;
}

.msg-bot {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 12px 12px 12px 2px;
    align-self: flex-start;
    color: var(--muted-2);
}

.msg-user {
    background: var(--accent);
    border-radius: 12px 12px 2px 12px;
    align-self: flex-end;
    color: white;
}

.msg-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 0.875rem 1rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    animation: typingBounce 1.4s ease infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }
}

.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem 0;
}

.suggestion-chip {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted-2);
    border-radius: 999px;
    padding: 0.35rem 0.875rem;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: var(--sans);
    transition: all 0.2s;
    white-space: nowrap;
}

.suggestion-chip:hover {
    border-color: var(--accent-light);
    color: var(--white);
}

.chatbot-input-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

#chatbot-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    color: var(--white);
    font-family: var(--sans);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

#chatbot-input:focus {
    border-color: var(--accent-light);
}

#chatbot-input::placeholder {
    color: var(--muted);
}

#chatbot-send {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}

#chatbot-send:hover {
    background: var(--accent-light);
    transform: scale(1.05);
}

.chatbot-disclaimer {
    font-size: 0.68rem;
    color: var(--muted);
    text-align: center;
    padding: 0.4rem 1.25rem 0.75rem;
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
    padding: 8rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-label {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--sky);
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(2.25rem, 4vw, 3.75rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--muted-2);
    font-size: 1.05rem;
    max-width: 580px;
    margin-bottom: 3.5rem;
}

/* Problem */
.problem-section {
    position: relative;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.problem-card {
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s;
}

.problem-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.card-number {
    font-family: var(--serif);
    font-size: 4rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: -0.5rem;
    right: 1rem;
    line-height: 1;
}

.problem-card h3 {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.problem-card p {
    color: var(--muted-2);
    font-size: 0.9rem;
}

/* Image Breaks */
.img-break {
    position: relative;
    height: 55vh;
    overflow: hidden;
}

.img-break-src {
    height: 120%;
    width: 100%;
    object-fit: cover;
    will-change: transform;
}

.img-break-overlay,
.overlay-dark {
    position: absolute;
    inset: 0;
    background: rgba(3, 9, 26, 0.6);
}

.img-break-text {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.img-break-text blockquote {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.3;
}

/* Calculator */
.calculator-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}

.card-surface {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted-2);
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--white);
    font-family: var(--sans);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-light);
}

.calc-results h3 {
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.875rem;
    font-size: 0.875rem;
    color: var(--muted-2);
}

.result-row .val {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--white);
}

.result-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

.result-row.total span,
.result-row.total .val {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--sans);
}

.result-row.total-highlight span {
    color: var(--sky);
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--sans);
}

.cta-box {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.cta-box p {
    font-size: 0.8rem;
    color: var(--muted-2);
    margin-bottom: 0.875rem;
}

/* Gallery */
.gallery-section {
    padding-bottom: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 420px;
    margin-top: 3rem;
    overflow: hidden;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.25rem 1.25rem;
    background: linear-gradient(to top, rgba(3, 9, 26, 0.85), transparent);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-2);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Authority */
.authority-section {
    position: relative;
    overflow: hidden;
    padding: 10rem 0;
}

.img-bg-section {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.img-bg-section img {
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

.authority-content {
    position: relative;
    z-index: 2;
}

.authority-body {
    color: var(--muted-2);
    font-size: 1.05rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

.authority-cards {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
}

.authority-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 300;
    line-height: 1;
    background: linear-gradient(135deg, #bfdbfe, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted-2);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.authority-section .lead-magnet.card-surface {
    background: rgba(8, 15, 36, 0.85);
    backdrop-filter: blur(16px);
    max-width: 420px;
}

.authority-section .lead-magnet h3 {
    font-family: var(--sans);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.authority-section .lead-magnet p {
    color: var(--muted-2);
    font-size: 0.875rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.footer-brand h2 {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 0.35rem;
}

.footer-brand p {
    color: var(--muted);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    color: var(--muted);
    font-size: 0.7rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-family: var(--sans);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

.affiliate-link {
    color: var(--sky);
    text-decoration: none;
    border-bottom: 1px dotted var(--sky);
    transition: opacity 0.2s;
}

.affiliate-link:hover {
    opacity: 0.75;
}

.mt-2 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 1100px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .chatbot-container {
        max-width: 100%;
    }

    .problem-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-cta {
        display: none;
    }

    .calculator-container {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        height: auto;
    }

    .gallery-item {
        height: 220px;
    }

    .authority-cards {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .problem-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 5rem 0;
    }
}