/* ═══════════════════════════════════════════════════════════════════════════
   MOQBridge — Ultra Premium Futuristic Design System
   Color System:
     --cyan:    #00d4ff  (Primary glow / CTA)
     --purple:  #9d4edd  (Secondary glow)
     --pink:    #ff006e  (Accent / highlight)
     --gold:    #ffd60a  (Premium accent)
     --green:   #00ff88  (Success / profit)
     --bg-deep: #030310  (Page background)
     --bg-card: #0a0a1f  (Card background)
═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ────────────────────────────────────────────────────────── */
:root {
    --cyan:          #00d4ff;
    --cyan-dim:      #00d4ff66;
    --purple:        #9d4edd;
    --purple-dim:    #9d4edd66;
    --pink:          #ff006e;
    --pink-dim:      #ff006e55;
    --gold:          #ffd60a;
    --gold-dim:      #ffd60a44;
    --green:         #00ff88;
    --green-dim:     #00ff8844;
    --orange:        #ff6b35;
    --red:           #ff3366;

    /* ── Soft medium-dark palette (lifted from near-black for better readability) ── */
    --bg-deep:       #13162a;
    --bg-body:       #191c33;
    --bg-card:       #232745;
    --bg-card-hover: #2c3158;
    --bg-glass:      rgba(35, 39, 69, 0.72);
    --bg-input:      rgba(42, 47, 82, 0.85);

    --text-primary:  #f6f7ff;
    --text-secondary:#d4d7f0;
    --text-muted:    #aab0d6;
    --text-white:    #ffffff;

    --border-subtle: rgba(120, 160, 255, 0.18);
    --border-glow:   rgba(0, 212, 255, 0.4);
    --border-purple: rgba(157, 78, 221, 0.3);

    --font-display:  'Orbitron', sans-serif;   /* brand moments only: logo, hero, section titles */
    --font-heading:  'Inter', sans-serif;       /* readable headings: card titles, h3-h6 */
    --font-body:     'Rajdhani', sans-serif;
    --font-text:     'Inter', sans-serif;
    --font-mono:     'Space Mono', monospace;

    --radius-sm:     6px;
    --radius:        12px;
    --radius-lg:     20px;
    --radius-xl:     32px;
    --radius-full:   9999px;

    --shadow-glow:   0 0 30px rgba(0, 212, 255, 0.25);
    --shadow-purple: 0 0 30px rgba(157, 78, 221, 0.25);
    --shadow-card:   0 8px 32px rgba(0, 0, 0, 0.6), 0 0 1px rgba(0, 212, 255, 0.2);
    --shadow-deep:   0 24px 64px rgba(0, 0, 0, 0.8);

    --transition:    0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    --navbar-h:      108px;

    /* ── Short-form aliases (used throughout template files) ── */
    --card-bg:       #232745;
    --border:        rgba(120, 160, 255, 0.18);
    --text:          #f0f1ff;

    /* ── Additional border aliases ── */
    --border-cyan:   rgba(0, 212, 255, 0.3);
    --border-pink:   rgba(255, 0, 110, 0.3);
    --border-purple: rgba(157, 78, 221, 0.3);
    --glass-bg:      rgba(35, 39, 69, 0.72);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    font-size: 16px;
}

body {
    font-family: var(--font-text);
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 1.02rem;
    line-height: 1.75;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

p { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.75; }

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 0%, rgba(157, 78, 221, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(0, 212, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.main-content { position: relative; z-index: 1; }

a { color: var(--cyan); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text-white); }

img { max-width: 100%; height: auto; }

/* ─── Typography ───────────────────────────────────────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}
/* Brand-display headings keep the futuristic Orbitron look */
.font-display, .hero-title, .section-title,
.logo-text, .preloader-logo .logo-text {
    font-family: var(--font-display) !important;
}

.gradient-text {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 60%, var(--pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-green {
    background: linear-gradient(135deg, var(--green) 0%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1600px; margin: 0 auto; padding: 0 24px; }

.section { padding: 100px 0; }
.section-sm { padding: 60px 0; }
.section-lg { padding: 140px 0; }

/* ─── Preloader ────────────────────────────────────────────────────────────── */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-deep);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-inner { text-align: center; }
.preloader-logo .logo-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-white);
    letter-spacing: 0.1em;
}
.preloader-logo .logo-accent { color: var(--cyan); }
.preloader-bar {
    width: 240px;
    height: 2px;
    background: rgba(0, 212, 255, 0.15);
    border-radius: 2px;
    margin: 20px auto 12px;
    overflow: hidden;
}
.preloader-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 2px;
    animation: fillBar 1.8s ease forwards;
}
@keyframes fillBar { to { width: 100%; } }
.preloader-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: blink 1s ease infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ─── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-h);
    z-index: 1000;
    transition: var(--transition);
}
.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 16, 0.0);
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}
.navbar.scrolled::before {
    background: rgba(19, 22, 42, 0.9);
    backdrop-filter: blur(20px) saturate(1.5);
    border-bottom-color: var(--border-subtle);
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: relative;
    z-index: 1;
}
/* Logo — left column */
.nav-logo  { justify-self: start; }
/* Nav links — middle column, truly centred */
.nav-links { justify-self: center; }
/* Actions (CTA + hamburger) — right column */
.nav-actions { justify-self: end; }

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-icon svg { filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6)); }
.logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-white);
    letter-spacing: 0.08em;
}
.logo-accent { color: var(--cyan); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-link {
    font-family: var(--font-text);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    letter-spacing: 0.03em;
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-white);
    background: rgba(0, 212, 255, 0.08);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--cyan);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--cyan);
}

.nav-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: var(--bg-deep);
    font-size: 0.6rem;
    font-weight: 800;
    font-family: var(--font-display);
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.1em;
    margin-right: 4px;
    vertical-align: middle;
}

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(32, 36, 62, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 280px;
    max-height: min(72vh, 560px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}
.dropdown-menu::-webkit-scrollbar { width: 6px; }
.dropdown-menu::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.3); border-radius: 3px; }
.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-family: var(--font-text);
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.dropdown-menu a:hover {
    background: rgba(0, 212, 255, 0.08);
    color: var(--cyan);
}
.dropdown-menu a i { width: 18px; color: var(--cyan); opacity: 0.7; }

/* CTA button */
.btn-nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: var(--bg-deep) !important;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: var(--transition);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    white-space: nowrap;
}
.btn-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.nav-actions { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    transition: width 0.1s linear;
    box-shadow: 0 0 8px var(--cyan);
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: var(--transition);
}
.btn:hover::before { opacity: 1; }

.btn-primary {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
    color: var(--bg-deep);
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.35), 0 4px 16px rgba(0, 0, 0, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5), 0 8px 24px rgba(0, 0, 0, 0.5);
    color: var(--bg-deep);
}

.btn-secondary {
    background: transparent;
    color: var(--cyan);
    border: 1px solid rgba(0, 212, 255, 0.4);
    box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.05);
}
.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--cyan);
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.2);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
    color: var(--bg-deep);
    box-shadow: 0 0 24px rgba(255, 214, 10, 0.35);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 214, 10, 0.5);
    color: var(--bg-deep);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    border-color: var(--border-glow);
}

.btn-sm { padding: 10px 22px; font-size: 0.78rem; }
.btn-lg { padding: 18px 44px; font-size: 1rem; }
.btn-xl { padding: 22px 56px; font-size: 1.1rem; }

/* ─── Cards ────────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}
.card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    transform: translateY(-4px);
}

.card-glow {
    box-shadow: var(--shadow-card);
}
.card-glow::after {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}
.card-glow:hover::after { opacity: 0.3; }

/* ─── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-family: var(--font-text);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-text);
    font-size: 0.95rem;
    padding: 14px 18px;
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15), 0 0 20px rgba(0, 212, 255, 0.1);
    background: rgba(0, 212, 255, 0.03);
}
.form-control::placeholder { color: var(--text-muted); }

.form-control-prefix {
    position: relative;
}
.form-control-prefix .prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    pointer-events: none;
}
.form-control-prefix input { padding-left: 40px; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%2300d4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}
select.form-control option { background: var(--bg-card); }

/* Range slider */
.range-slider { appearance: none; width: 100%; height: 4px; background: var(--border-subtle); border-radius: 4px; outline: none; cursor: pointer; }
.range-slider::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--purple)); cursor: pointer; box-shadow: 0 0 10px var(--cyan); }
.range-value { font-family: var(--font-mono); color: var(--cyan); font-size: 1.1rem; font-weight: 700; }

/* ─── Page Guide cards (moqbridge_page_guide) ──────────────────────────────── */
.pg-card { will-change: transform; }
.pg-card:hover {
    transform: translateY(-5px);
    filter: brightness(1.12) saturate(1.1);
}

/* ─── Section Labels ───────────────────────────────────────────────────────── */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--cyan);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}
.section-label i { font-size: 0.75rem; }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-white);
    margin-bottom: 20px;
}

.section-subtitle {
    font-family: var(--font-text);
    font-size: 1.18rem;
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 680px;
}

/* ─── Stats / Metrics ──────────────────────────────────────────────────────── */
.stat-card {
    text-align: center;
    padding: 28px 20px;
}
.stat-number {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label {
    font-family: var(--font-text);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ─── Badges / Tags ────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.badge-cyan { background: rgba(0, 212, 255, 0.12); color: var(--cyan); border: 1px solid rgba(0, 212, 255, 0.25); }
.badge-purple { background: rgba(157, 78, 221, 0.12); color: var(--purple); border: 1px solid rgba(157, 78, 221, 0.25); }
.badge-green { background: rgba(0, 255, 136, 0.1); color: var(--green); border: 1px solid rgba(0, 255, 136, 0.2); }
.badge-gold { background: rgba(255, 214, 10, 0.1); color: var(--gold); border: 1px solid rgba(255, 214, 10, 0.2); }
.badge-red { background: rgba(255, 51, 102, 0.1); color: var(--red); border: 1px solid rgba(255, 51, 102, 0.2); }

/* ─── Glowing Dividers ─────────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
    margin: 60px 0;
    opacity: 0.3;
}
.divider-sm { margin: 32px 0; }

/* ─── Calculator Layout ────────────────────────────────────────────────────── */
.calc-wrapper {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 32px;
    align-items: start;
    padding-top: calc(var(--navbar-h) + 40px);
}

.calc-form-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.calc-result-panel {
    position: sticky;
    top: calc(var(--navbar-h) + 24px);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 36px;
    overflow: hidden;
}
.calc-result-panel::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.calc-page-header {
    padding: calc(var(--navbar-h) + 40px) 0 0;
}

.calc-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 6px;
    margin-bottom: 32px;
}
.calc-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
}
.calc-tab.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(157, 78, 221, 0.2));
    color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

/* Result Display */
.result-main {
    text-align: center;
    padding: 28px 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 24px;
}
.result-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.result-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.result-currency {
    font-size: 1.6rem;
    vertical-align: super;
    font-size: 1.5rem;
}

.result-breakdown { list-style: none; }
.result-breakdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.result-breakdown li:last-child { border-bottom: none; }
.result-breakdown li strong { color: var(--text-primary); font-family: var(--font-mono); }

/* Viability Score */
.viability-ring {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    position: relative;
}
.viability-ring svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border-subtle); stroke-width: 8; }
.ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 326;
    stroke-dashoffset: 326;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ring-number {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-white);
}
.ring-sublabel { font-size: 0.6rem; color: var(--text-muted); letter-spacing: 0.1em; }

/* ─── Hero Section ─────────────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: calc(var(--navbar-h) + 60px) 0 80px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 70% at 5% 30%, rgba(0, 212, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 95% 20%, rgba(157, 78, 221, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 50% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 60%);
    z-index: 0;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
    z-index: 0;
    animation: gridPulse 8s ease infinite;
}
@keyframes gridPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }

.hero-content { position: relative; z-index: 1; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: var(--cyan);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    margin-bottom: 28px;
    animation: badgePulse 3s ease infinite;
}
.hero-badge-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--green);
    animation: dotPulse 2s ease infinite;
}
@keyframes dotPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.7; } }
@keyframes badgePulse { 0%,100% { box-shadow: 0 0 0 rgba(0, 212, 255, 0); } 50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.15); } }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4.2vw, 3.4rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
}

.hero-subtitle {
    font-family: var(--font-text);
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
.hero-stat-item {
    display: flex;
    flex-direction: column;
}
.hero-stat-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-white);
}
.hero-stat-label {
    font-family: var(--font-text);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ─── Feature Cards Grid ───────────────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
}
.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    transform: scaleX(0);
    transition: var(--transition);
}
.feature-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}
.feature-card:hover::after { transform: scaleX(1); }

.feature-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
    position: relative;
}
.feature-icon-cyan { background: rgba(0, 212, 255, 0.1); color: var(--cyan); box-shadow: 0 0 20px rgba(0, 212, 255, 0.15); }
.feature-icon-purple { background: rgba(157, 78, 221, 0.1); color: var(--purple); box-shadow: 0 0 20px rgba(157, 78, 221, 0.15); }
.feature-icon-gold { background: rgba(255, 214, 10, 0.1); color: var(--gold); box-shadow: 0 0 20px rgba(255, 214, 10, 0.15); }
.feature-icon-green { background: rgba(0, 255, 136, 0.1); color: var(--green); box-shadow: 0 0 20px rgba(0, 255, 136, 0.15); }
.feature-icon-pink { background: rgba(255, 0, 110, 0.1); color: var(--pink); box-shadow: 0 0 20px rgba(255, 0, 110, 0.15); }
.feature-icon-orange { background: rgba(255, 107, 53, 0.1); color: var(--orange); box-shadow: 0 0 20px rgba(255, 107, 53, 0.15); }

.feature-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}
.feature-desc {
    font-family: var(--font-text);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}
.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 16px;
    letter-spacing: 0.05em;
    transition: var(--transition);
}
.feature-link:hover { gap: 10px; color: var(--text-white); }

/* ─── Testimonials ─────────────────────────────────────────────────────────── */
.testimonial-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
}
.testimonial-stars { color: var(--gold); font-size: 0.9rem; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--bg-deep);
}
.testimonial-name { font-family: var(--font-body); font-weight: 600; color: var(--text-white); font-size: 0.9rem; }
.testimonial-role { font-size: 0.78rem; color: var(--text-muted); }

/* ─── Pricing Cards ────────────────────────────────────────────────────────── */
.pricing-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    transition: var(--transition);
    position: relative;
}
.pricing-card.featured {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.15), var(--shadow-card);
}
.pricing-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: var(--bg-deep);
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 5px 18px;
    border-radius: 0 0 var(--radius) var(--radius);
}
.pricing-plan { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }
.pricing-price { font-family: var(--font-display); font-size: 3.2rem; font-weight: 900; color: var(--text-white); line-height: 1; margin-bottom: 6px; }
.pricing-price sup { font-size: 1.4rem; vertical-align: top; margin-top: 0.4em; color: var(--cyan); }
.pricing-period { font-size: 0.85rem; color: var(--text-muted); }
.pricing-desc { color: var(--text-secondary); font-size: 0.9rem; margin: 16px 0 24px; line-height: 1.6; }
.pricing-features { list-style: none; margin-bottom: 32px; }
.pricing-features li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px;
}
.pricing-features li i { color: var(--cyan); margin-top: 2px; flex-shrink: 0; }
.pricing-features li.disabled { opacity: 0.4; }
.pricing-features li.disabled i { color: var(--text-muted); }

/* ─── Blog Cards ───────────────────────────────────────────────────────────── */
.blog-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}
.blog-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow), var(--shadow-card);
}
.blog-card-img {
    height: 200px;
    background: linear-gradient(135deg, var(--bg-card), rgba(0, 212, 255, 0.06));
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-card-img i { font-size: 3rem; opacity: 0.2; color: var(--cyan); }
.blog-card-body { padding: 24px; }
.blog-card-cat {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.blog-card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 10px;
    line-height: 1.4;
}
.blog-card-title a { color: inherit; }
.blog-card-title a:hover { color: var(--cyan); }
.blog-card-excerpt { font-size: 0.87rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 16px; }
.blog-card-meta { display: flex; align-items: center; gap: 16px; font-size: 0.78rem; color: var(--text-muted); }
.blog-card-meta span { display: flex; align-items: center; gap: 4px; }

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border-subtle);
    padding: 80px 0 0;
    position: relative;
    overflow: hidden;
}
.footer-glow {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 600px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 60px;
}
.footer-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-size: 1.2rem; font-weight: 900;
    color: var(--text-white); margin-bottom: 16px;
}
.footer-logo span { color: var(--text-white); }
.footer-logo span span { color: var(--cyan); }
.footer-tagline { color: var(--text-muted); font-size: 0.88rem; line-height: 1.65; margin-bottom: 24px; }
.footer-social { display: flex; gap: 10px; margin-bottom: 24px; }
.footer-social a {
    width: 38px; height: 38px;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 0.85rem;
    transition: var(--transition);
}
.footer-social a:hover { color: var(--cyan); border-color: var(--cyan); background: rgba(0, 212, 255, 0.08); box-shadow: 0 0 14px rgba(0, 212, 255, 0.2); }
.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-item { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; color: var(--text-muted); background: rgba(255,255,255,0.04); border: 1px solid var(--border-subtle); padding: 4px 10px; border-radius: var(--radius-full); }
.badge-item i { color: var(--cyan); }
.footer-heading { font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; color: var(--text-white); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 20px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-muted); font-size: 0.88rem; transition: var(--transition); }
.footer-links a:hover { color: var(--cyan); padding-left: 4px; }
.footer-newsletter p { font-size: 0.82rem; color: var(--text-muted); margin: 24px 0 10px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
    flex: 1; background: var(--bg-input); border: 1px solid var(--border-subtle);
    border-radius: var(--radius); color: var(--text-primary); padding: 10px 14px; font-size: 0.85rem; outline: none;
}
.newsletter-form input:focus { border-color: var(--cyan); }
.newsletter-form button {
    width: 40px; height: 40px; border: none; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--cyan), var(--purple)); color: var(--bg-deep);
    cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.newsletter-form button:hover { transform: scale(1.05); box-shadow: 0 0 14px rgba(0, 212, 255, 0.4); }
.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-muted); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 0.82rem; color: var(--text-muted); }
.footer-bottom-links a:hover { color: var(--cyan); }

/* ─── Back to Top ──────────────────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 32px; right: 32px;
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: var(--bg-deep);
    border: none; border-radius: 50%;
    cursor: pointer; font-size: 0.9rem;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(0, 212, 255, 0.6); }

/* ─── Toast Notifications ──────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
    background: rgba(10, 10, 34, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 14px 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow-card);
    animation: toastIn 0.3s ease;
    min-width: 280px;
}
.toast-success { border-color: rgba(0, 255, 136, 0.3); }
.toast-success i { color: var(--green); }
.toast-error { border-color: rgba(255, 51, 102, 0.3); }
.toast-error i { color: var(--red); }
.toast-info { border-color: rgba(0, 212, 255, 0.3); }
.toast-info i { color: var(--cyan); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cyan), var(--purple)); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }

/* ─── Selection ────────────────────────────────────────────────────────────── */
::selection { background: rgba(0, 212, 255, 0.2); color: var(--text-white); }

/* ─── Utility classes ──────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-green { color: var(--green); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--text-white); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; } .mb-5 { margin-bottom: 48px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.d-flex { display: flex; } .d-grid { display: grid; } .d-block { display: block; }
.align-center { align-items: center; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ─── Responsive ───────────────────────────────────────────────────────────── */

/* Global overflow guard — prevents any element from causing horizontal scroll */
html, body { overflow-x: hidden; max-width: 100%; }
*, *::before, *::after { box-sizing: border-box; }

/* Reusable 2-column form row — stacks to 1 col below 560px */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Large result numbers — fluid font size so they never overflow */
.result-value,
.result-big-num {
    font-size: clamp(1.6rem, 6vw, 3rem);
    word-break: break-word;
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .calc-wrapper { grid-template-columns: 1fr; }
    .calc-result-panel { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    /* Grid children default to min-width:auto and refuse to shrink — this forces
       horizontal overflow (dead space on the right) on narrow screens. Reset it. */
    .calc-wrapper > *,
    .calc-form-panel,
    .calc-result-panel { min-width: 0; max-width: 100%; }
}

@media (max-width: 768px) {
    :root { --navbar-h: 80px; }
    /* Switch back to flex on mobile (only 2 visible children: logo + toggle) */
    .nav-container { display: flex; justify-content: space-between; padding: 0 18px; }
    .nav-logo  { justify-self: unset; }
    .nav-links { justify-self: unset; display: none; position: fixed; top: var(--navbar-h); left: 0; right: 0; bottom: 0; background: rgba(22, 25, 46, 0.98); backdrop-filter: blur(20px); flex-direction: column; align-items: flex-start; padding: 24px; gap: 4px; overflow-y: auto; }
    .nav-links.open { display: flex; }
    .nav-link { width: 100%; padding: 14px 16px; font-size: 1.05rem; }
    /* Dropdown becomes a full-width inline list inside the mobile menu.
       Force every desktop positioning value off so it can never clip off-screen. */
    .nav-dropdown { width: 100%; position: static; }
    /* Mobile dropdowns: collapsed by default, tap to expand (accordion) */
    .nav-dropdown .dropdown-menu {
        position: static !important; left: auto !important; right: auto !important;
        transform: none !important; width: 100%; min-width: 0;
        max-height: 0; overflow: hidden;
        opacity: 0; visibility: hidden;
        background: rgba(0, 212, 255, 0.04); border: none;
        border-left: 2px solid var(--border-subtle); border-radius: 0;
        margin: 0; padding: 0;
        transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.25s ease, padding 0.25s ease;
    }
    .nav-dropdown.mob-open .dropdown-menu {
        max-height: 800px; opacity: 1; visibility: visible;
        margin: 2px 0 8px; padding: 4px 0;
    }
    /* Chevron rotates when submenu is open */
    .nav-dropdown > .nav-link .fa-chevron-down { transition: transform 0.25s ease; display: inline-block; }
    .nav-dropdown.mob-open > .nav-link .fa-chevron-down { transform: rotate(180deg); }
    /* Calculator submenu items: comfortable tap targets, indent, allow wrapping */
    .nav-dropdown .dropdown-menu a { padding: 11px 14px 11px 18px; font-size: 0.98rem; white-space: normal; }
    .nav-toggle { display: flex; }
    .btn-nav-cta { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .hero-stats { gap: 24px; }
    .section { padding: 70px 0; }

    /* Calculator — single column, tighter panels */
    .calc-wrapper { gap: 20px; padding-top: calc(var(--navbar-h) + 20px); }
    .calc-form-panel  { padding: 24px 20px; }
    .calc-result-panel { padding: 24px 20px; overflow: visible; }

    /* Form rows stack on tablet */
    .form-row { grid-template-columns: 1fr; gap: 0; min-width: 0; }
    .form-group { min-width: 0; }
    .form-control { max-width: 100%; }

    /* Result numbers scale down */
    .result-value,
    .result-big-num { font-size: clamp(1.4rem, 5vw, 2.2rem); }

    /* All inline large numbers on tablet range */
    [style*="font-size:3rem"],
    [style*="font-size: 3rem"],
    [style*="font-size:2.8rem"],
    [style*="font-size: 2.8rem"] {
        font-size: clamp(1.5rem, 5vw, 2.4rem) !important;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 600px) {
    /* Override any card with large inline padding — targets AI report form, About cards, etc. */
    .card[style*="padding:40px"],
    .card[style*="padding: 40px"],
    .card[style*="padding:48px"],
    .card[style*="padding: 48px"],
    .card[style*="padding:36px"],
    .card[style*="padding: 36px"] {
        padding: 20px 16px !important;
    }
    /* Long form labels — allow wrapping, never clip */
    .form-label, label.form-label {
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }
    /* AI report 2-col form grid → 1 col */
    #aiReportForm [style*="display:grid"],
    #aiReportForm [style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .container { padding: 0 14px; }
    .card { padding: 20px 16px !important; }
    .calc-form-panel, .calc-result-panel { padding: 18px 14px; }

    /* Reduce top padding on calculator page header on mobile */
    .container[style*="padding-top:calc(var(--navbar-h)"] {
        padding-top: calc(var(--navbar-h) + 16px) !important;
        padding-bottom: 40px !important;
    }
    /* Result panel — allow content to show (don't clip) */
    .calc-result-panel { overflow: visible; }

    /* Form rows stack on phone */
    .form-row { grid-template-columns: 1fr; gap: 0; }

    /* All inline large numbers — clamp fluid */
    [style*="font-size:3rem"],
    [style*="font-size: 3rem"],
    [style*="font-size:2.8rem"],
    [style*="font-size: 2.8rem"],
    [style*="font-size:2.5rem"],
    [style*="font-size: 2.5rem"] {
        font-size: clamp(1.3rem, 5vw, 2rem) !important;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    /* Inline 2-col grids from PHP — force single column */
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Inline grids with fixed right column (e.g. 1fr 420px) */
    [style*="grid-template-columns:1fr 4"] {
        grid-template-columns: 1fr !important;
    }

    /* Breakdown list text */
    .result-breakdown li { font-size: 0.82rem; }
    .result-breakdown li strong { font-size: 0.82rem; }

    /* Result card grid stats */
    .calc-result-panel [style*="display:grid"] { gap: 8px !important; }
}

/* ─── 3D Logo Frame ──────────────────────────────────────────────────────── */

/* Nav (header) logo — fits within 108px navbar height */
.logo-3d-frame-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(0,212,255,0.12) 0%, rgba(157,78,221,0.08) 100%);
    border: 2px solid rgba(0,212,255,0.55);
    box-shadow:
        /* outer purple ring */
        0 0 0 1px rgba(157,78,221,0.30),
        /* 3D depth ledges */
        0 3px 0 0 rgba(0,180,220,0.35),
        0 6px 0 0 rgba(0,130,170,0.20),
        0 9px 0 0 rgba(0,80,120,0.12),
        /* outer glow */
        0 0 16px rgba(0,212,255,0.30),
        0 0 32px rgba(157,78,221,0.15),
        /* inner top shine */
        inset 0 1px 0 rgba(255,255,255,0.14),
        inset 0 -1px 0 rgba(0,0,0,0.30);
    transform: perspective(500px) rotateX(6deg);
    transition: transform 0.30s ease, box-shadow 0.30s ease;
}
/* corner accent — top-right */
.logo-3d-frame-nav::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--cyan);
    border-right: 2px solid var(--cyan);
    border-radius: 0 10px 0 0;
    filter: drop-shadow(0 0 3px var(--cyan));
}
/* corner accent — bottom-left */
.logo-3d-frame-nav::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid rgba(157,78,221,0.8);
    border-left: 2px solid rgba(157,78,221,0.8);
    border-radius: 0 0 0 10px;
    filter: drop-shadow(0 0 3px rgba(157,78,221,0.8));
}
.nav-logo:hover .logo-3d-frame-nav {
    transform: perspective(500px) rotateX(0deg) translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(157,78,221,0.50),
        0 6px 0 0 rgba(0,180,220,0.45),
        0 10px 0 0 rgba(0,130,170,0.25),
        0 0 24px rgba(0,212,255,0.45),
        0 0 48px rgba(157,78,221,0.25),
        inset 0 1px 0 rgba(255,255,255,0.18),
        inset 0 -1px 0 rgba(0,0,0,0.25);
}

/* Footer logo — larger & more prominent */
.logo-3d-frame-footer {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(0,212,255,0.10) 0%, rgba(157,78,221,0.08) 100%);
    border: 2px solid rgba(0,212,255,0.50);
    box-shadow:
        /* outer purple ring */
        0 0 0 1px rgba(157,78,221,0.25),
        /* 3D depth ledges — more pronounced in footer */
        0 4px 0 0 rgba(0,180,220,0.40),
        0 8px 0 0 rgba(0,140,180,0.25),
        0 12px 0 0 rgba(0,100,140,0.15),
        0 16px 0 0 rgba(0,60,100,0.08),
        /* glow */
        0 0 24px rgba(0,212,255,0.25),
        0 0 50px rgba(157,78,221,0.15),
        /* inner shine */
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -2px 0 rgba(0,0,0,0.35);
    transform: perspective(600px) rotateX(7deg);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    margin-bottom: 4px; /* compensate for bottom depth shadows */
}
/* corner accents */
.logo-3d-frame-footer::after {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 14px;
    height: 14px;
    border-top: 2px solid var(--cyan);
    border-right: 2px solid var(--cyan);
    border-radius: 0 16px 0 0;
    filter: drop-shadow(0 0 5px var(--cyan));
}
.logo-3d-frame-footer::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 14px;
    height: 14px;
    border-bottom: 2px solid rgba(157,78,221,0.9);
    border-left: 2px solid rgba(157,78,221,0.9);
    border-radius: 0 0 0 16px;
    filter: drop-shadow(0 0 5px rgba(157,78,221,0.9));
}
.footer-logo:hover .logo-3d-frame-footer {
    transform: perspective(600px) rotateX(0deg) translateY(-3px);
    box-shadow:
        0 0 0 1px rgba(157,78,221,0.45),
        0 8px 0 0 rgba(0,180,220,0.50),
        0 14px 0 0 rgba(0,130,170,0.30),
        0 0 35px rgba(0,212,255,0.40),
        0 0 70px rgba(157,78,221,0.22),
        inset 0 1px 0 rgba(255,255,255,0.18),
        inset 0 -2px 0 rgba(0,0,0,0.25);
}

@media (max-width: 768px) {
    .logo-3d-frame-nav {
        padding: 4px 6px;
        border-radius: 10px;
    }
    .logo-3d-frame-nav img { height: 58px !important; }
    .logo-3d-frame-nav::after,
    .logo-3d-frame-nav::before { width: 8px; height: 8px; }
}
