:root {
    --dusty-grape: #54428e;
    --lavender-purple: #8963ba;
    --celadon: #afe3c0;
    --willow-green: #90c290;
    --dusty-olive: #688b58;
    --forest-green: #2E7D32;
    --bg-light: #ffffff;
    --bg-dark: #1a1a1a;
    --text-main: #1a1a1a;
    --text-light: #f5f5f5;
    --muted: #666;
    --border: #e5e5e5;
    --shadow: rgba(0,0,0,0.08);

    --font-sans: ui-sans-serif, "SF Pro Text", "Segoe UI", "Open Sans", Roboto, "Liberation Sans", "Noto Sans", sans-serif;
    --font-serif: ui-serif, "New York", "Times New Roman", "Liberation Serif", serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", "Consolas", monospace;

    --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
    --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 1rem);
    --space-md: clamp(1rem, 0.8rem + 1vw, 2rem);
    --space-lg: clamp(2rem, 1.6rem + 2vw, 3rem);
    --space-xl: clamp(3rem, 2.4rem + 3vw, 4rem);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    --max-w: 1100px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1a1a1a;
        --text-main: #f5f5f5;
        --muted: #aaa;
        --border: #333;
        --shadow: rgba(0,0,0,0.25);
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    color: var(--text-main);
    background: var(--bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

h1 {
    font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
}
h2 {
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}
h3 {
    font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
}

a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

.container {
    width: min(100% - var(--space-md), var(--max-w));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-dark);
    color: var(--text-light);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

.logo img {
    height: 2.5rem;
    width: auto;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: transparent;
    color: var(--text-light);
}

.hamburger {
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    position: relative;
}
.hamburger::after,
.hamburger::before {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
}
.hamburger::before {
    top: -6px;
}
.hamburger::after {
    top: 6px;
}

.primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}
.primary-nav.open {
    max-height: 20rem;
}
.primary-nav ul {
    list-style: none;
    padding: var(--space-sm);
}
.primary-nav li {
    margin: var(--space-xs) 0;
}
.primary-nav a {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}
.primary-nav a:hover {
    background: rgba(255,255,255,0.08);
    text-decoration: none;
}

.section {
    padding: var(--space-lg) 0;
}
.section.services {
    background: var(--bg-light);
}
.section.how-it-works {
    background: var(--bg-dark);
    color: var(--text-light);
}
.section.testimonials {
    background: #fafafa;
}
@media (prefers-color-scheme: dark) {
    .section.testimonials {
        background: #111;
    }
}
.section.recent-work {
    background: var(--bg-light);
}

.eyebrow {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--dusty-olive);
    margin-bottom: var(--space-xs);
}

.service-cards {
    display: grid;
    gap: var(--space-md);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.card {
    background: var(--bg-light);
    color: var(--text-main);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
}

.card h3 {
    padding: var(--space-sm) var(--space-sm) 0;
}

.before-after {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
    position: relative;
}
.before-after figure {
    position: relative;
    margin: 0;
}
.before-after img {
    width: 100%;
    height: auto;
    display: block;
}
.label {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
}
.label.before {
    background: var(--bg-dark);
}
.label.after {
    background: var(--forest-green);
}

.card-footer {
    padding: var(--space-sm);
    font-weight: 600;
    color: var(--forest-green);
}

.cta-block {
    margin-top: var(--space-md);
    text-align: center;
    font-weight: 600;
}

.steps {
    counter-reset: step;
    list-style: none;
    display: grid;
    gap: var(--space-md);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.step {
    position: relative;
    padding: var(--space-md);
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
}
.step-num {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--forest-green);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: var(--space-sm);
}

.testimonial-carousel {
    position: relative;
}
.carousel-track {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: var(--space-sm);
}
.carousel-track::-webkit-scrollbar {
    height: 0.4rem;
}
.carousel-track::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}

.testimonial-card {
    flex: 0 0 min(100%, 320px);
    scroll-snap-align: start;
    background: var(--bg-light);
    color: var(--text-main);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px var(--shadow);
    padding: var(--space-md);
}

.reviewer {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}
.avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--willow-green);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}
.badge {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-left: var(--space-xs);
}
.stars {
    color: var(--forest-green);
    margin-bottom: var(--space-xs);
}
.testimonial-card p {
    font-size: 0.95rem;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}
.carousel-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 0;
    background: var(--forest-green);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
}

.gallery {
    display: grid;
    gap: var(--space-md);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.gallery figcaption {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: var(--space-xs);
}

.contact-section .contact-form {
    max-width: 600px;
    margin: var(--space-md) auto 0;
    display: grid;
    gap: var(--space-md);
}
.form-group {
    display: grid;
    gap: var(--space-xs);
}
.form-group label {
    font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-light);
    color: var(--text-main);
    font-family: inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius-md);
    border: 0;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.btn-primary {
    background: var(--forest-green);
    color: #fff;
}
.btn-outline {
    background: transparent;
    color: var(--forest-green);
    border: 2px solid var(--forest-green);
}
.btn:hover {
    opacity: 0.9;
    text-decoration: none;
}

.alt-contact {
    text-align: center;
    margin-top: var(--space-md);
}

.site-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--space-md) 0;
    text-align: center;
}
.site-footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

/* Modal */
.modal {
    border: 0;
    border-radius: var(--radius-lg);
    max-width: 90vw;
    width: min(100%, 420px);
    padding: 0;
    background: transparent;
}
.modal::backdrop {
    background: rgba(0,0,0,0.6);
}
.modal-content {
    background: var(--bg-light);
    color: var(--text-main);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}
.modal-header .badge {
    background: var(--forest-green);
    color: #fff;
    padding: 0.15em 0.5em;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}
.close-btn {
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: inherit;
    cursor: pointer;
}
.service-list {
    list-style: none;
    margin: var(--space-sm) 0;
}
.service-list li {
    display: flex;
    gap: var(--space-xs);
    margin: var(--space-xs) 0;
}
.trust-note {
    background: var(--metadata-bg, #f5f5f5);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    margin: var(--space-sm) 0;
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}
@media (prefers-color-scheme: dark) {
    .trust-note {
        background: #222;
    }
}
.modal-actions {
    display: grid;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* Contact form interactivity */
.field-error {
    color: #c62828;
    font-size: 0.85rem;
    min-height: 1.1em;
    font-family: var(--font-sans);
}
.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #c62828;
}
.field-hint {
    font-size: 0.8rem;
    color: var(--muted);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.form-status {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
}
.form-status:empty {
    display: none;
}
.form-status.success {
    background: var(--celadon);
    color: #1b5e20;
}
.form-status.error {
    background: #fdecea;
    color: #b71c1c;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

/* Character counter */
.char-counter {
    font-size: 0.8rem;
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-sans);
}
.char-counter.near-limit {
    color: #e65100;
    font-weight: 600;
}

/* Draft status and restore notice */
.draft-status {
    font-size: 0.8rem;
    color: var(--muted);
    min-height: 1em;
    font-family: var(--font-sans);
}

.draft-restore {
    background: #f5f2fa;
    border-left: 4px solid var(--lavender-purple);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-sans);
}
@media (prefers-color-scheme: dark) {
    .draft-restore {
        background: #26222e;
    }
}

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--dusty-grape);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
