/* 
  Ultra-Premium Pastel Financial Aesthetic
  Sophisticated, Cohesive, Minimalist
*/

:root {
    /* Pastel & Soft Colors */
    --primary: #10b981;
    /* Emerald 500 */
    --primary-hover: #059669;
    /* Emerald 600 */
    --secondary: #0f172a;
    /* Slate 900 for dark text/headings */

    --bg-main: #ffffff;
    --bg-pastel-light: #f8fafc;
    /* Slate 50 */
    --bg-pastel-accent: #e0f2fe;
    /* Light pastel blue */

    --text-dark: #334155;
    /* Slate 700 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border: #e2e8f0;
    /* Slate 200 */
    --border-hover: #cbd5e1;

    --danger: #f43f5e;
    /* Rose 500 */

    --font-body: 'Inter', system-ui, sans-serif;

    /* Modern Rounding */
    --radius-xl: 32px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;

    /* Soft Shadows that feel premium */
    --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.08);

    /* Snappy yet smooth transitions */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Basics */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.center-text {
    text-align: center;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--secondary);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 48px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--primary);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-cta {
    background: var(--primary);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.nav-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background: white;
    color: var(--text-dark);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
    background: var(--bg-pastel-light);
    border-color: var(--border-hover);
    color: var(--secondary);
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 18px 24px;
    font-size: 1.1rem;
}

/* Layout Utilities */
.btn-row {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.btn-row.space-between {
    justify-content: space-between;
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(241, 245, 249, 0.8) 50%, rgba(224, 242, 254, 0.6) 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-content {
    max-width: 580px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.trust-indicators {
    display: flex;
    gap: 24px;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.trust-item i {
    color: #fbbf24;
    /* Pastel Star gold */
    font-size: 1.25rem;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.floating-card {
    position: absolute;
    top: -30px;
    right: -20px;
    background: var(--bg-main);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.02);
    z-index: 2;
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.fc-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.fc-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.fc-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-circle {
    width: 48px;
    height: 48px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

/* Sections (Glassmorphism so background rock passes behind) */
.section-gray {
    background: rgba(248, 250, 252, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 100px 0;
}

.section-white {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 100px 0;
}

.section-pastel {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.65) 0%, rgba(224, 242, 254, 0.65) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 100px 0;
}

/* Feature Grids */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.step-card {
    background: var(--bg-main);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.step-number {
    background: var(--bg-pastel-accent);
    color: #0284c7;
    /* Sky 600 */
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.expenses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.expense-item {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: var(--bg-main);
    border: 1px solid rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.expense-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.expense-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-pastel-accent);
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.75rem;
    flex-shrink: 0;
}

.expense-text h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.expense-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Calculator Container */
.calculator-header h2 {
    color: var(--secondary);
}

.calculator-header .subtitle {
    color: var(--text-muted);
}

.calc-wrapper {
    max-width: 720px;
    /* Slim enough for beauty, wide enough for modern 3-grid */
    background: var(--bg-main);
    color: var(--text-dark);
    border-radius: var(--radius-xl);
    padding: 48px 56px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.premium-divider {
    border: none;
    border-top: 1px dashed var(--border-hover);
    margin: 40px 0;
    opacity: 0.6;
}

/* Section Title Row */
.section-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.badge-num {
    width: 32px;
    height: 32px;
    background: var(--bg-pastel-accent);
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1rem;
}

.section-title-row h3 {
    font-size: 1.4rem;
    margin: 0;
}

.step-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-left: 44px;
    /* align with text, bypassing badge */
}

/* Form Styles */
.modern-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 24px;
}

.input-wrap {
    display: flex;
    flex-direction: column;
}

.input-wrap label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-icon-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-main);
    color: var(--secondary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.input-icon-wrapper input:hover {
    border-color: var(--border-hover);
}

.input-icon-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-main);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Checkbox Cards */
.toggles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.allowance-card {
    cursor: pointer;
    display: block;
}

.allowance-card input {
    display: none;
}

.ac-content {
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 20px 12px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.ac-content i {
    font-size: 1.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    transition: var(--transition);
}

.ac-content h4 {
    font-size: 0.85rem;
    margin-bottom: 0;
    color: var(--secondary);
    font-weight: 600;
}

.allowance-card:hover .ac-content {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.allowance-card input:checked+.ac-content {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.04);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.allowance-card input:checked+.ac-content i {
    color: var(--primary);
}

/* Dynamic Hidden Fields inside Calc */
.dynamic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.dyn-field {
    background: var(--bg-pastel-light);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

.dyn-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
}

.dyn-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

.dyn-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.calc-action-row {
    margin-top: 40px;
}

/* Result Step */
.result-card {
    background: var(--bg-main);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 32px;
    margin-top: 24px;
    text-align: center;
}

.r-status {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.r-amount {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    margin: 16px 0;
    line-height: 1;
}

/* Breakdown Panel */
.breakdown-panel {
    background: var(--bg-pastel-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-top: 32px;
    text-align: left;
}

.breakdown-panel h4 {
    font-size: 1.125rem;
    margin-bottom: 24px;
    color: var(--secondary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.bp-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.bp-row span {
    font-weight: 500;
}

.bp-row strong {
    font-weight: 700;
    font-family: monospace;
    font-size: 1.05rem;
}

.bp-total {
    border-top: 2px dashed var(--border-hover);
    padding-top: 16px;
    margin-top: 4px;
    font-size: 1.1rem;
    color: var(--secondary);
}

.bp-total strong {
    font-size: 1.25rem;
}

.bp-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    width: 100%;
    margin-top: 4px;
    line-height: 1.5;
}

#bp-row-bands {
    flex-wrap: wrap;
}

/* Breakdowns Expandable */
.bp-expandable {
    background: var(--bg-main);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    margin-top: -8px;
    border: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

.bp-row.expandable {
    cursor: pointer;
    transition: var(--transition);
    padding: 8px 12px;
    margin: 0 -12px 14px -12px;
    border-radius: var(--radius-sm);
}

.bp-row.expandable:hover {
    background: var(--bg-main);
}

.bp-row.expandable i {
    transition: transform 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.bp-row.expandable.open i {
    transform: rotate(180deg);
}

.bp-sub-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.bp-sub-row:last-child {
    margin-bottom: 0;
}

.bp-sub-row strong {
    font-family: monospace;
    color: var(--text-dark);
}

/* Typography Helpers */
.text-emerald {
    color: var(--primary) !important;
}

.text-slate {
    color: var(--text-muted) !important;
}

.text-red {
    color: var(--danger) !important;
}

.mt-3 {
    margin-top: 24px !important;
}

.calc-disclaimer {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-pastel-light);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    line-height: 1.5;
    border: 1px solid var(--border);
}

/* Background Morphing Rock (Eran Mendel style / SVGator morph) */
.bg-rock-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90vw;
    height: 90vw;
    max-width: 1000px;
    max-height: 1000px;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    /* Hardware acceleration for smooth scrolling */
    will-change: transform, top, left;
}

.bg-rock-wrapper svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 20px 40px rgba(16, 185, 129, 0.25));
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
footer {
    background: var(--bg-main);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    padding: 60px 0;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 16px;
}

.footer-logo i {
    color: var(--primary);
}

.footer-content p {
    max-width: 500px;
    margin: 0 auto 24px;
}

.legal {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .modern-grid-3 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 600px) {
    .calc-wrapper {
        padding: 24px;
    }

    .r-amount {
        font-size: 3rem;
    }

    .breakdown-panel {
        padding: 16px;
    }
}