/* --- Root Variables --- */
:root {
    /* Light Mode Colors */
    --surface-primary: #ffffff;
    --surface-secondary: #f9fafb;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --brand-primary: #2563eb;
    --brand-accent: #16a34a;
    --border-primary: #e5e7eb;

    /* Dark Mode Colors (as defined in spec) */
    --dark-surface-primary: #111827;
    --dark-surface-secondary: #1f2937;
    --dark-text-primary: #f3f4f6;
    --dark-text-secondary: #9ca3af;
    --dark-brand-primary: #3b82f6;
    --dark-brand-accent: #22c55e;
    --dark-border-primary: #374151;

    /* Typography */
    --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;

    /* Design tokens */
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 4px 10px rgb(0 0 0 / 0.06);
    --shadow-md: 0 12px 24px rgb(0 0 0 / 0.10);
    --shadow-lg: 0 24px 48px rgb(0 0 0 / 0.16);
}

[data-theme="dark"] {
    --surface-primary: var(--dark-surface-primary);
    --surface-secondary: var(--dark-surface-secondary);
    --text-primary: var(--dark-text-primary);
    --text-secondary: var(--dark-text-secondary);
    --brand-primary: var(--dark-brand-primary);
    --brand-accent: var(--dark-brand-accent);
    --border-primary: var(--dark-border-primary);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed nav */
}

body {
    font-family: var(--font-sans);
    background-color: var(--surface-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px; /* Corresponds to text-base */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 68px; /* Prevent content from hiding behind fixed nav */
}

/* --- Typography Scale --- */
.h1, .h2, .h3 {
    letter-spacing: -0.025em;
}

.h1 { 
    font-size: clamp(2rem, 3.5vw + 0.5rem, 4rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
} /* text-4xl font-bold */
.h2 { 
    font-size: clamp(1.5rem, 2vw + 0.5rem, 2.5rem);
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 1rem;
} /* text-3xl font-bold */
.h3 { 
    font-size: clamp(1.125rem, 0.5vw + 1rem, 1.5rem);
    line-height: 1.5;
    font-weight: 700;
    margin-bottom: 0.75rem;
} /* text-xl font-semibold */

@media (min-width: 768px) { /* md: breakpoint */
    .h1 { font-size: 3.75rem; line-height: 1; } /* md:text-6xl */
    .h2 { font-size: 2.25rem; line-height: 2.5rem; } /* md:text-4xl */
}

.subheading {
    font-size: 1.25rem;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

/* --- Navigation --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: color-mix(in srgb, var(--surface-primary) 86%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid color-mix(in srgb, var(--border-primary) 75%, transparent);
    box-shadow: 0 2px 20px rgb(0 0 0 / 0.06);
    transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.main-nav.scrolled {
    background-color: color-mix(in srgb, var(--surface-primary) 94%, transparent);
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.08);
}

.main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links a {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    position: relative;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.2s ease;
}

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

.nav-links a.active {
    color: var(--brand-primary);
}

.nav-links a:hover {
    color: var(--brand-primary);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--brand-primary);
    background-color: var(--surface-secondary);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

.moon-icon { display: none; }
.sun-icon { display: block; }

[data-theme="dark"] .moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: none; }

/* Hamburger menu button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
    z-index: 101;
}
.hamburger svg {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
}
.hamburger:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Mobile nav overlay */
.mobile-nav {
    display: none !important;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
}
.mobile-nav.open {
    display: block !important;
}
.mobile-nav .mobile-nav-panel {
    background: var(--surface-primary);
    box-shadow: var(--shadow-lg);
    position: absolute;
    top: 0; right: 0;
    width: 80vw;
    max-width: 320px;
    height: 100%;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.mobile-nav .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.mobile-nav .nav-links a {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

/* Hide desktop nav links on mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hamburger {
        display: block;
    }
}

/* --- Hero Section --- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82vh;
    padding: 6rem 0;
    text-align: center;
    color: var(--dark-text-primary);
    background-image: url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(180deg, rgba(17,24,39,0.55) 0%, rgba(17,24,39,0.65) 40%, rgba(17,24,39,0.75) 100%),
        rgb(25 40 50 / 0.45);
}

.hero .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero .h1 {
    margin-bottom: 1.5rem;
}

.hero .subheading {
    color: var(--dark-text-secondary);
    margin-bottom: 1.25rem;
}

.hero .actions {
    display: inline-flex;
    gap: 0.875rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* --- Feature Section --- */
.feature-section {
    background-color: var(--surface-primary);
    text-align: center;
    padding: 6rem 0;
}

.feature-section .h2 {
    margin-bottom: 1.5rem;
}

.feature-section .subheading {
    margin-bottom: 3rem;
}

.feature-body {
    max-width: 75ch;
    margin: 0 auto;
    color: var(--text-secondary);
    text-align: left;
    font-size: 1.125rem;
    line-height: 1.75;
}

/* --- Value Props Section --- */
.value-props-section {
    background-color: var(--surface-secondary);
    text-align: center;
}

.value-props-section .h2 {
    margin-bottom: 3rem;
}

.value-props-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: left;
}

@media (min-width: 768px) {
    .value-props-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.value-prop-item .h3 {
    color: var(--brand-primary);
}

.value-prop-item p {
    color: var(--text-secondary);
}

.value-prop-card {
    border: 1px solid var(--border-primary);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    background-color: var(--surface-primary);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
}
.value-prop-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* --- Information Section --- */
/* This section was merged into the feature-section and is no longer in use. */
/* The styles have been removed to keep the stylesheet clean. */

/* --- Parallax Divider --- */
.parallax-divider {
    min-height: 60vh;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.parallax-divider-1 {
    background-image: url('../images/body.jpg');
}

.parallax-divider-2 {
    background-image: url('../images/small_business_owner.jpg');
}

@media (max-width: 1024px), (prefers-reduced-motion: reduce) {
    .parallax-divider {
        background-attachment: scroll;
        background-position: center top;
    }
}

/* --- Contact Grid --- */
.contact-grid {
    text-align: center;
    background-color: var(--surface-secondary);
}

.contact-grid .h2 {
    margin-bottom: 1rem;
}

.contact-grid .subheading {
    margin-bottom: 4rem;
}

.contact-grid .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: left;
}

@media (min-width: 768px) {
    .contact-grid .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-item {
    border: 1px solid var(--border-primary);
    padding: 2.5rem;
    border-radius: 12px;
    background-color: var(--surface-primary);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}
@media (max-width: 600px) {
    .grid-item {
        padding: 1.25rem;
        border-radius: 10px;
        margin-left: auto;
        margin-right: auto;
        width: 95vw;
        max-width: 400px;
    }
    .contact-grid .grid {
        gap: 1.25rem;
    }
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.grid-item .icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--brand-primary);
    margin-left: auto;
    margin-right: auto;
}

.grid-item .h3 {
    margin-bottom: 0.75rem;
}

.grid-item p {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 2rem;
}

.contact-detail {
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 1rem;
    text-align: center;
    word-break: break-all;
}

.cta-button {
    display: inline-block;
    background-color: var(--brand-primary);
    color: var(--surface-primary);
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.2s;
    text-align: center;
    box-shadow: var(--shadow-sm);
    will-change: transform;
}

.cta-button:hover {
    background-color: var(--dark-brand-primary);
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.cta-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand-primary) 60%, transparent);
    outline-offset: 3px;
}

.cta-button--secondary {
    background-color: transparent;
    color: var(--brand-primary);
    border: 1px solid var(--border-primary);
}

.cta-button--secondary:hover {
    background-color: var(--surface-secondary);
    color: var(--brand-primary);
    transform: translateY(-2px);
}

.address {
    font-style: normal;
    color: var(--text-secondary);
    line-height: 1.5;
}

.address .hours {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* --- Footer --- */
.footer {
    position: relative;
    padding-top: 20vh;
    padding-bottom: 20vh;
    background-color: var(--dark-surface-primary);
    color: var(--dark-text-secondary);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/footer.jpg');
    background-size: cover;
    opacity: 0.08;
    filter: grayscale(100%);
    z-index: 0;
}

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

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
}

.footer a {
    color: var(--dark-text-secondary);
    text-decoration: none;
}

.footer a:hover {
    color: var(--dark-text-primary);
    text-decoration: underline;
}

/* Sharper focus and nicer text selection */
:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 3px;
    border-radius: 6px;
}
::selection {
    background: var(--brand-primary);
    color: var(--surface-primary);
}

/* Respect reduced motion across the page */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Center icon wrappers and SVGs */
.section-icon,
.value-prop-icon,
.icon {
    display: flex;
    align-items: center;
    justify-content: center; /* Ensure horizontal centering */
}

.section-icon svg,
.value-prop-icon svg,
.icon svg {
    display: block;
    /* Remove margin: auto; as flex parent centers child */
}

/* Section icon size and color */
.section-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem auto;
    background: var(--surface-primary);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}
.section-icon svg {
    width: 64px;
    height: 64px;
    color: var(--brand-primary);
}
.section-icon svg path {
    fill: var(--brand-primary);
}

/* Value prop icon size and color */
.value-prop-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    background: var(--surface-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-left: auto;
    margin-right: auto;
}

/* Contact grid icon size and color */
.icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--brand-primary);
    margin-left: auto;
    margin-right: auto;
}
.icon svg {
    width: 100%;
    height: 100%;
    color: var(--brand-primary);
}
