:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --accent2: #f59e0b;
    --gradient: linear-gradient(135deg, #4f46e5, #06b6d4);
    --bg: #f8fafc;
    --text: #1e293b;
    --muted: #64748b;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --success: #16a34a;
    --success-bg: #ecfdf5;
    --warn: #dc2626;
    --warn-bg: #fef2f2;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.14);
    --font-heading: 'Baloo 2', 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    line-height: 1.25;
    margin-top: 0;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
    text-decoration: none;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient);
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
    flex-shrink: 0;
}

.logo:hover .logo-mark {
    transform: rotate(-10deg) scale(1.08);
}

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

.main-nav {
    display: flex;
    gap: 28px;
}

.main-nav a {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.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);
    display: block;
    transition: transform 0.2s ease;
}

/* Hero */
.hero {
    background: var(--gradient);
    color: #fff;
    text-align: center;
    padding: 72px 20px 100px;
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    background: rgba(255, 255, 255, 0.25);
    pointer-events: none;
}

.hero::before {
    width: 220px;
    height: 220px;
    top: -70px;
    left: -60px;
    animation: floatBlob 8s ease-in-out infinite;
}

.hero::after {
    width: 280px;
    height: 280px;
    bottom: -100px;
    right: -60px;
    background: rgba(245, 158, 11, 0.25);
    animation: floatBlob 10s ease-in-out infinite reverse;
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.08); }
}

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

.hero-eyebrow {
    display: inline-block;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 18px;
    animation: fadeInUp 0.6s ease both;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 14px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 560px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.badges-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.badge-pill {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.scroll-cue {
    display: inline-block;
    margin-top: 36px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.scroll-cue:hover { text-decoration: none; color: #fff; }

.scroll-cue .arrow {
    display: block;
    font-size: 1.1rem;
    animation: bounce 1.6s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

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

.page-hero {
    background: var(--gradient);
    color: #fff;
    text-align: center;
    padding: 56px 20px;
}

.page-hero h1 { margin-bottom: 8px; }

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Calculator card */
.calculator-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    max-width: 640px;
    margin: -56px auto 0;
    position: relative;
    animation: popIn 0.6s cubic-bezier(.22,1,.36,1) both;
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--muted);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-error {
    color: var(--warn);
    font-size: 0.9rem;
    min-height: 1.2em;
    margin-bottom: 8px;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    font-size: 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.4);
}

.btn-light {
    background: #fff;
    color: var(--primary);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}

.btn-block { width: 100%; }

.result-box {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.result-box.show {
    opacity: 1;
    transform: translateY(0);
}

.progress-track {
    position: relative;
    height: 10px;
    background: var(--border);
    border-radius: 6px;
    overflow: visible;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(.22,1,.36,1);
}

.progress-marker {
    position: absolute;
    top: -4px;
    left: 75%;
    width: 2px;
    height: 18px;
    background: var(--text);
    transition: left 0.3s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 8px;
}

.result-message {
    margin-top: 18px;
    padding: 16px;
    border-radius: 10px;
    font-weight: 600;
}

.result-message.success {
    background: var(--success-bg);
    color: var(--success);
}

.result-message.warn {
    background: var(--warn-bg);
    color: var(--warn);
}

/* Info sections */
.info-section {
    padding: 64px 20px;
}

.info-section.narrow {
    max-width: 720px;
    margin: 0 auto;
}

.section-kicker {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 28px;
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.step-icon {
    font-size: 1.9rem;
    margin-bottom: 10px;
    display: inline-block;
    transition: transform 0.25s ease;
}

.step-card:hover .step-icon {
    transform: scale(1.15) rotate(-6deg);
}

/* Example demo card */
.example-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow);
}

.example-inputs {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.example-chip {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.example-chip strong {
    display: block;
    color: var(--text);
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.example-arrow {
    font-size: 1.6rem;
    color: var(--primary);
}

.example-result {
    background: var(--success-bg);
    color: var(--success);
    border-radius: 10px;
    padding: 14px 18px;
    font-weight: 700;
    flex: 1;
    min-width: 220px;
}

/* Mistakes list */
.mistakes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.mistake-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent2);
    border-radius: 12px;
    padding: 18px 20px;
    transition: transform 0.2s ease;
}

.mistake-card:hover { transform: translateX(4px); }

.mistake-card h3 {
    font-size: 1.02rem;
    margin-bottom: 6px;
}

.mistake-card p { margin: 0; color: var(--muted); }

/* FAQ */
.faq-list { margin-top: 24px; }

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover { box-shadow: var(--shadow); }

.faq-item summary {
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 30px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: -4px;
    font-size: 1.4rem;
    color: var(--primary);
    transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
    transform: rotate(135deg);
}

.faq-item p {
    margin-top: 12px;
    color: var(--muted);
}

/* CTA band */
.cta-band {
    background: var(--gradient);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
    margin-top: 20px;
}

.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { opacity: 0.95; margin-bottom: 24px; }

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 48px 0 64px;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-card h2 { font-size: 1.2rem; margin: 10px 0; }
.blog-card h2 a { color: var(--text); text-decoration: none; }
.blog-card h2 a:hover { color: var(--primary); }

.blog-card-meta, .blog-post-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.82rem;
    color: var(--muted);
}

.blog-category {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
}

.read-more { font-weight: 700; }

.blog-post {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 0 72px;
}

.blog-post h1 { margin: 14px 0 6px; font-size: 2rem; }
.blog-author { color: var(--muted); margin-bottom: 20px; }
.blog-post-content p { margin-bottom: 16px; }
.back-link { display: inline-block; margin: 18px 0; font-weight: 600; }
.contact-email { font-size: 1.2rem; font-weight: 700; }

.error-section {
    text-align: center;
    padding: 90px 20px;
}

.error-section h1 { font-size: 4rem; color: var(--primary); }

/* Footer */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    margin-top: 40px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding: 48px 20px;
}

.site-footer .logo { color: #fff; }
.site-footer h4 { color: #fff; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    padding: 18px 20px;
    font-size: 0.85rem;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--border);
    }

    .main-nav.open { display: flex; }
    .main-nav a { padding: 14px 20px; border-bottom: 1px solid var(--border); }
    .main-nav a::after { display: none; }
    .nav-toggle { display: flex; }

    .form-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .mistakes-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.1rem; }
    .calculator-card { padding: 24px; margin: -40px 16px 0; }
    .example-card { flex-direction: column; align-items: stretch; }
}
