/* =========================================
   Design System & Variables
   ========================================= */
:root {
    /* Color Palette - Premium Mono with subtle accents */
    --color-bg: #FFFFFF;
    --color-bg-light: #F9FAFB;
    --color-text: #111827;
    --color-text-muted: #6B7280;
    --color-text-light: #9CA3AF;

    --color-primary: #0F172A;
    /* Slate 900 */
    --color-primary-hover: #334155;
    /* Slate 700 */
    --color-secondary: #F1F5F9;
    --color-secondary-hover: #E2E8F0;

    --color-accent: #3B82F6;
    /* Optional single brand accent */

    --color-border: #E5E7EB;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    /* 8px */
    --space-sm: 1rem;
    /* 16px */
    --space-md: 2rem;
    /* 32px */
    --space-lg: 4rem;
    /* 64px */
    --space-xl: 8rem;
    /* 128px */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container-max-width: 1200px;
    --nav-height: 80px;
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* =========================================
   Typography
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--color-text);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-sm);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-sm);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
    font-size: 1.125rem;
}

.lead {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    font-weight: 400;
    margin-bottom: var(--space-md);
    max-width: 800px;
}

.text-center {
    text-align: center;
}

/* =========================================
   Layout & Utilities
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-xl) 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* Section Badge (Micro-typography) */
.section-badge {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
    position: relative;
    padding-left: 2rem;
}

.section-badge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 2px;
    background-color: var(--color-border);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 9999px;
    /* Pill shape */
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-hover);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* =========================================
   Navigation
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    /* Glassmorphism */
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
    height: 70px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 0.9375rem;
}

.nav-links a:not(.btn):hover {
    color: var(--color-text);
}

.btn-nav {
    padding: 0.5rem 1.25rem;
    background-color: var(--color-primary);
    color: #fff !important;
}

.btn-nav:hover {
    background-color: var(--color-primary-hover);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-secondary);
    color: var(--color-text-muted);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-border);
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* Hero Visual (Abstract Shapes) */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background-color: var(--color-secondary);
    z-index: 1;
}

.shape-2 {
    width: 300px;
    height: 300px;
    border: 2px solid var(--color-border);
    z-index: 2;
    animation-delay: -4s;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    100% {
        border-radius: 50% 50% 30% 70% / 70% 70% 30% 30%;
        transform: rotate(5deg);
    }
}

/* =========================================
   About Section
   ========================================= */
.about.section {
    padding-top: var(--space-lg);
}

.profile-img {
    position: relative;
    z-index: 3;
    width: 380px;
    height: 380px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite alternate-reverse;
    box-shadow: var(--shadow-lg);
    border: 12px solid #fff;
    background-color: var(--color-bg-light);
}

.about .about-content {
    max-width: 800px;
}

.about p {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    color: var(--color-text);
    line-height: 1.5;
    font-weight: 300;
}

/* =========================================
   Services Section
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.service-card {
    background: #fff;
    padding: var(--space-md);
    border-radius: 24px;
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.service-icon {
    width: 48px;
    height: 48px;
    background-color: var(--color-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.service-card:hover .service-icon {
    background-color: var(--color-primary);
    color: #fff;
    transition: all var(--transition-normal);
}

/* =========================================
   Testimonial Section
   ========================================= */
.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.quote-icon {
    color: var(--color-border);
    margin-bottom: var(--space-sm);
}

.quote-icon svg {
    width: 48px;
    height: 48px;
}

.testimonial blockquote {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 300;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.testimonial-author strong {
    display: block;
    font-size: 1.125rem;
    color: var(--color-text);
}

.testimonial-author span {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* =========================================
   CTA Section
   ========================================= */
.cta {
    background-color: var(--color-primary);
    color: #fff;
}

.cta h2,
.cta p {
    color: #fff;
}

.cta p {
    opacity: 0.8;
}

.cta .btn-primary {
    background-color: #fff;
    color: var(--color-primary);
}

.cta .btn-primary:hover {
    background-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(255, 255, 255, 0.2);
}

/* Contact Form */
.contact-form-container {
    max-width: 600px;
    margin: var(--space-md) auto 0;
    text-align: left;
}

.contact-form {
    background: #fff;
    padding: var(--space-md);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Soft border for dark bg */
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: var(--space-sm);
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text);
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: var(--color-text-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-submit-btn {
    width: 100%;
    margin-top: var(--space-sm);
}

/* =========================================
   Footer
   ========================================= */
.footer {
    border-top: 1px solid var(--color-border);
    padding: var(--space-lg) 0 var(--space-md);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.footer-contact {
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.footer-contact a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact a:hover {
    color: var(--color-primary);
}

.footer-links {
    display: flex;
    gap: var(--space-md);
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    font-size: 0.875rem;
    color: var(--color-text-light);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-md);
}

/* =========================================
   FIRE Calculator Styles
   ========================================= */
.calculator-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.calculator-form {
    background: #fff;
    padding: var(--space-md);
    border-radius: 24px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    text-align: left;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section h3 {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.form-section .section-desc {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* Dynamic Member Cards */
.member-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--color-border);
}

.member-header h4 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* Results Section */
.results-panel {
    background: #fff;
    padding: var(--space-md);
    border-radius: 24px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    text-align: left;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: right;
}

.results-table th,
.results-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.results-table th {
    background-color: var(--color-bg-light);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.results-table tbody tr:hover {
    background-color: var(--color-bg-light);
}

.results-table th:first-child,
.results-table td:first-child,
.results-table th:nth-child(2),
.results-table td:nth-child(2) {
    text-align: center;
}

.negative-val {
    color: #ef4444;
    font-weight: 600;
}

.positive-val {
    color: #10b981;
}

/* =========================================
   Animations
   ========================================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: var(--space-lg) 0;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        display: none;
        /* Hide visual on smaller screens for cleaner focus */
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* In a real app, implement a mobile menu toggle */
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--nav-height) + var(--space-xl));
        padding-bottom: var(--space-xl);
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}