/* --- CSS Variables and Global Styles --- */
:root {
    --bg: #0F172A;
    --surface: #1E293B; /* Lighter than spec for better card contrast */
    --text: #E2E8F0; /* Softer white than pure #FFFFFF */
    --muted: #94A3B8;
    --primary: #6D28D9;
    --accent: #FBBF24;
    --line: #334155;
    --focus: #A78BFA;

    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius: 0.75rem; /* rounded-xl */
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 24px); /* Offset for sticky header */
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; color: var(--text); }

p {
    margin-bottom: 1.5rem;
    max-width: 65ch;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 250ms ease;
}

a:hover {
    text-decoration: underline;
    color: white;
}

ul {
    list-style-position: inside;
    padding-left: 0.5rem;
}

ul li {
    margin-bottom: 0.5rem;
}

/* --- Utility & Layout Classes --- */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem; /* 24px */
    padding-right: 1.5rem; /* 24px */
}

.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2-col {
    grid-template-columns: 1fr;
}

.grid-3-col {
    grid-template-columns: 1fr;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--text);
}

.section-header p {
    color: var(--muted);
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
}

/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent);
    color: var(--bg);
    padding: 0.5rem 1rem;
    z-index: 1000;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 0;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Header & Navigation --- */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-height);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.wordmark {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text);
}
.wordmark:hover { color: var(--text); text-decoration: none;}

.primary-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-top: 1rem;
}

.primary-nav li {
    margin: 0;
}

.primary-nav a {
    display: block;
    padding: 0.75rem 0;
    font-weight: 500;
    color: var(--muted);
    text-align: center;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
    color: var(--text);
    text-decoration: none;
    background-color: var(--surface);
    border-radius: var(--radius);
}

.primary-nav .btn-ghost {
    display: none;
}

/* --- Components --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 250ms ease;
    text-align: center;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background-color: var(--primary);
    color: var(--text);
}
.btn-primary:hover {
    background-color: #7E22CE; /* Darker primary */
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--text);
}
.btn-secondary:hover {
    background-color: var(--primary);
}

.btn-ghost {
    background-color: transparent;
    color: var(--muted);
}
.btn-ghost:hover {
    background-color: var(--surface);
    color: var(--text);
}

.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    background-color: var(--surface);
    color: var(--muted);
    border: 1px solid var(--line);
}

.card {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card ul { margin-bottom: 1.5rem; }

.card-link {
    margin-top: auto;
    font-weight: 600;
}

/* --- Section: Hero --- */
.hero {
    padding-top: 4rem;
    padding-bottom: 4rem;
}
.hero-grid {
    display: grid;
    gap: 2rem;
    align-items: center;
}
.subhead { color: var(--muted); font-size: 1.125rem; }
.button-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero-image img { border-radius: var(--radius); }

/* --- Section: Work Gallery --- */
.gallery figure {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.gallery figcaption {
    padding: 1rem;
    background-color: var(--surface);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
}

/* --- Section: Process --- */
.process-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}
.step { display: flex; flex-direction: column; align-items: center; }
.step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--surface);
    border: 2px solid var(--line);
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.step h3 { margin-bottom: 0; }
.step-arrow { display: none; }
.note { text-align: center; color: var(--muted); margin-top: 2rem; }

/* --- Section: Why Monarch --- */
.feature-block {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    text-align: left;
}
.feature-icon { font-size: 2.5rem; }

/* --- Section: Testimonials --- */
.testimonial-card {
    justify-content: space-between;
}

.testimonial-card blockquote {
    font-style: italic;
    color: var(--text);
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.testimonial-card footer {
    font-weight: 600;
    color: var(--muted);
}

/* --- Section: Pricing --- */
.pricing-card {
    text-align: center;
    align-items: center;
}
.price {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
}
.pricing-card ul {
    text-align: left;
    margin-bottom: 2rem;
}
.pricing-card .btn {
    margin-top: auto;
    width: 100%;
}

/* --- Section: CTA Strip --- */
.cta-strip {
    background-color: var(--primary);
    padding: 4rem 1.5rem;
    text-align: center;
}
.cta-strip h2 { color: var(--text); }
.cta-strip p { color: rgba(255, 255, 255, 0.8); margin-left: auto; margin-right: auto; }
.cta-strip .btn-cta {
    background-color: var(--text);
    color: var(--primary);
    font-weight: 800;
}
.cta-strip .btn-cta:hover {
    background-color: var(--accent);
    color: var(--bg);
}

/* --- Section: Contact --- */
.contact-info ul {
    list-style: none;
    padding: 0;
}
.contact-info li {
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.contact-form {
    display: grid;
    gap: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--muted);
}
.form-group input,
.form-group select,
.form-group textarea {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--focus);
    outline: none;
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394A3B8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* --- Footer --- */
.site-footer-bottom {
    background-color: var(--surface);
    border-top: 1px solid var(--line);
    padding: 2rem 0;
    font-size: 0.875rem;
    color: var(--muted);
}
.footer-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
}
.footer-center {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.footer-center a {
    color: var(--muted);
}
.copyright {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    text-align: center;
}
.copyright p {
    margin-bottom: 0;
}

/* --- Media Queries (Tablet & Up) --- */
@media (min-width: 768px) {
    .container {
        padding-left: 2rem; /* 32px */
        padding-right: 2rem; /* 32px */
    }

    .grid-2-col { grid-template-columns: repeat(2, 1fr); }
    .grid-3-col { grid-template-columns: repeat(2, 1fr); }

    .header-container {
        flex-wrap: nowrap;
        height: var(--header-height);
    }
    
    .primary-nav {
        flex-direction: row;
        width: auto;
        align-items: center;
        gap: 0.5rem;
    }

    .primary-nav ul {
        flex-direction: row;
        margin-top: 0;
        gap: 0.5rem;
    }
    
    .primary-nav a { padding: 0.5rem 1rem; }
    
    .primary-nav .btn-ghost {
        display: inline-block;
        margin-left: 1rem;
    }

    .hero-grid { grid-template-columns: 1fr 1fr; }
    
    .process-steps {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    .step-arrow {
        display: block;
        font-size: 2rem;
        color: var(--muted);
    }
    
    .contact-form { grid-template-columns: repeat(2, 1fr); }
    .form-group-full { grid-column: 1 / -1; }
    
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* --- Media Queries (Desktop & Up) --- */
@media (min-width: 1024px) {
    .grid-3-col {
        grid-template-columns: repeat(3, 1fr);
    }
}