/* Base Reset & Theme Variables */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0284c7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

/* Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 8%;
    border-bottom: 1px solid #334155;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-main);
}

@media (max-width: 520px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
        padding: 1rem 6%;
    }

    nav {
        gap: 1.25rem;
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 8% 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: #0f172a;
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.15s;
}

.btn:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Services Grid */
.services {
    padding: 3rem 8% 5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #334155;
}

.card h3 {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Call to Action / Footer */
.cta-box {
    text-align: center;
    background-color: var(--bg-card);
    margin: 0 8% 4rem;
    padding: 3rem 2rem;
    border-radius: 12px;
    border: 1px solid #334155;
}

.cta-box h2 {
    margin-bottom: 0.75rem;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid #334155;
}

/* Expandable Project Intake Form */
.intake-wrapper {
    max-width: 600px;
    margin: 1.5rem auto 0;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.intake-wrapper.is-hidden {
    opacity: 0;
    transform: translateY(10px);
}

.intake-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 6px;
    border: 1px solid #475569;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Base Reset & Theme Variables */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0284c7;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

/* Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 8%;
    border-bottom: 1px solid #334155;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 5rem 8% 4rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: #0f172a;
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.15s;
}

.btn:hover {
    background-color: var(--accent-hover);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Services Grid */
.services {
    padding: 3rem 8% 5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid #334155;
}

.card h3 {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Call to Action / Footer */
.cta-box {
    text-align: center;
    background-color: var(--bg-card);
    margin: 0 8% 4rem;
    padding: 3rem 2rem;
    border-radius: 12px;
    border: 1px solid #334155;
}

.cta-box h2 {
    margin-bottom: 0.75rem;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid #334155;
}

/* Expandable Project Intake Form */
.intake-wrapper {
    max-width: 600px;
    margin: 1.5rem auto 0;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.intake-wrapper.is-hidden {
    opacity: 0;
    transform: translateY(10px);
}

.intake-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 6px;
    border: 1px solid #475569;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
}

.form-actions .btn {
    border: none;
    cursor: pointer;
    flex: 1;
    width: auto;
    font-size: 1rem;
}

.form-actions .btn-cancel {
    flex: 0 0 auto;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid #475569;
}

.form-actions .btn-cancel:hover {
    background-color: #334155;
    color: var(--text-main);
    transform: none;
}

@media (max-width: 520px) {
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-actions .btn,
    .form-actions .btn-cancel {
        width: 100%;
    }
}

.form-status {
    margin-top: 0.9rem;
    font-size: 0.9rem;
    color: #fca5a5;
    text-align: center;
}

.intake-success {
    padding: 1.5rem;
    border-radius: 8px;
    background-color: var(--bg-dark);
    border: 1px solid var(--accent);
    text-align: center;
}

.intake-success h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.intake-success p {
    margin-bottom: 1.25rem !important;
    font-size: 0.95rem;
}

.intake-success .btn-secondary {
    display: inline-block;
    width: auto;
    padding: 0.65rem 1.5rem;
}

.alt-contact {
    margin-top: 1.25rem;
    margin-bottom: 0 !important;
    font-size: 0.9rem;
}

.alt-contact a {
    color: var(--accent);
    text-decoration: none;
}

.alt-contact a:hover {
    text-decoration: underline;
}

.form-status {
    margin-top: 0.9rem;
    font-size: 0.9rem;
    color: #fca5a5;
    text-align: center;
}

.intake-success {
    padding: 1.5rem;
    border-radius: 8px;
    background-color: var(--bg-dark);
    border: 1px solid var(--accent);
    text-align: center;
}

.intake-success h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.intake-success p {
    margin-bottom: 1.25rem !important;
    font-size: 0.95rem;
}

.intake-success .btn-secondary {
    display: inline-block;
    width: auto;
    padding: 0.65rem 1.5rem;
}

.alt-contact {
    margin-top: 1.25rem;
    margin-bottom: 0 !important;
    font-size: 0.9rem;
}

.alt-contact a {
    color: var(--accent);
    text-decoration: none;
}

.alt-contact a:hover {
    text-decoration: underline;
}

/* Clickable Service Cards */
.card-link,
.card-link:hover,
.card-link:focus,
.card-link:visited {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s, background-color 0.2s;
}

.card-link h3,
.card-link p {
    text-decoration: none;
}

.card-link:hover,
.card-link:focus-visible {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.card-cta {
    display: inline-block;
    margin-top: auto;
    padding-top: 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.card-link:hover .card-cta,
.card-link:focus-visible .card-cta {
    text-decoration: underline;
    text-underline-offset: 4px;
}