/* ============================================
   Twin Cities Driving Academy — Stylesheet
   Palette: Terracotta + Sand
   ============================================ */

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

:root {
    --terracotta: #C0603C;
    --terracotta-dark: #A04E2E;
    --terracotta-light: #D4856A;
    --sand: #F5EDE3;
    --sand-light: #FAF6F1;
    --sand-dark: #E8DDD0;
    --charcoal: #2C2825;
    --charcoal-light: #4A4540;
    --warm-gray: #8A8278;
    --white: #FFFFFF;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--charcoal);
    background-color: var(--sand-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 246, 241, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sand-dark);
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(250, 246, 241, 0.97);
    box-shadow: 0 1px 20px rgba(44, 40, 37, 0.06);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--charcoal);
    letter-spacing: -0.01em;
}

.nav-logo svg {
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-menu a {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--charcoal-light);
    letter-spacing: 0.02em;
    transition: color var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--terracotta);
    transition: width var(--transition);
}

.nav-menu a:hover {
    color: var(--terracotta);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-cta {
    font-weight: 400 !important;
    color: var(--terracotta) !important;
    border: 1px solid var(--terracotta);
    padding: 0.5rem 1.1rem;
    border-radius: 100px;
    font-size: 0.82rem !important;
    letter-spacing: 0.01em;
    transition: all var(--transition) !important;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    background: var(--terracotta) !important;
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--charcoal);
    padding: 0.5rem;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(44, 40, 37, 0.72) 0%,
        rgba(44, 40, 37, 0.55) 50%,
        rgba(192, 96, 60, 0.4) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 780px;
    padding: 2rem;
    color: var(--white);
}

.hero-eyebrow {
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.5rem;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.hero-sub {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    padding: 0.9rem 2rem;
    border-radius: 100px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
    border-color: var(--terracotta);
}

.btn-primary:hover {
    background: var(--terracotta-dark);
    border-color: var(--terracotta-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(192, 96, 60, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--charcoal);
    border-color: var(--white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.1rem 2.8rem;
    font-size: 0.95rem;
}

.btn-full {
    width: 100%;
}

/* ---- Section Labels & Titles ---- */
.section-label {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--charcoal);
    margin-bottom: 1.2rem;
}

/* ---- Services ---- */
.services {
    padding: 7rem 0;
    background: var(--sand-light);
}

.services .container {
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--sand-dark);
    border-radius: 12px;
    padding: 2.2rem 1.6rem;
    text-align: left;
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(44, 40, 37, 0.08);
    border-color: var(--terracotta-light);
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--sand);
    color: var(--terracotta);
    margin-bottom: 1.4rem;
    transition: all var(--transition);
}

.service-card:hover .service-icon {
    background: var(--terracotta);
    color: var(--white);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 0.7rem;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--warm-gray);
}

/* ---- About ---- */
.about {
    padding: 7rem 0;
    background: var(--sand);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    border-radius: 12px;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
}

.about-content .section-title {
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--charcoal-light);
    margin-bottom: 1.2rem;
}

.about-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--sand-dark);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--terracotta);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--warm-gray);
}

/* ---- CTA ---- */
.cta {
    padding: 6rem 0;
    background: var(--charcoal);
}

.cta .section-label {
    color: var(--terracotta-light);
}

.cta .section-title {
    color: var(--white);
}

.cta p {
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.7);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.cta-inner {
    text-align: center;
}

.cta .btn-primary {
    font-size: 0.95rem;
}

/* ---- Contact ---- */
.contact {
    padding: 7rem 0;
    background: var(--sand-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info address {
    font-style: normal;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--charcoal-light);
    margin-bottom: 1rem;
}

.contact-item svg {
    flex-shrink: 0;
    margin-top: 0.3rem;
    color: var(--terracotta);
}

.contact-item a {
    color: var(--charcoal-light);
    transition: color var(--transition);
}

.contact-item a:hover {
    color: var(--terracotta);
}

.contact-map {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(44, 40, 37, 0.08);
}

.contact-form-wrap {
    background: var(--white);
    border: 1px solid var(--sand-dark);
    border-radius: 12px;
    padding: 2.5rem;
}

.contact-form-wrap h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--charcoal);
    margin-bottom: 1.8rem;
    letter-spacing: -0.01em;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 300;
    color: var(--charcoal);
    background: var(--sand-light);
    border: 1px solid var(--sand-dark);
    border-radius: 8px;
    outline: none;
    transition: all var(--transition);
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--terracotta);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(192, 96, 60, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--warm-gray);
    opacity: 0.7;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-success {
    text-align: center;
    padding: 2rem;
    color: var(--terracotta);
}

.form-success svg {
    margin: 0 auto 1rem;
    color: var(--terracotta);
}

.form-success p {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--charcoal-light);
}

/* ---- Footer ---- */
.footer {
    background: var(--charcoal);
    color: rgba(255, 255, 255, 0.6);
    padding: 4rem 0 2rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
    font-size: 0.88rem;
    font-weight: 300;
    line-height: 1.7;
    margin-top: 1rem;
    max-width: 280px;
}

.footer-brand .nav-logo span {
    color: var(--white);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    font-size: 0.88rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--terracotta-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(250, 246, 241, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem 2rem 2rem;
        gap: 1.2rem;
        border-bottom: 1px solid var(--sand-dark);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu a {
        font-size: 1rem;
        padding: 0.5rem 0;
    }

    .nav-cta {
        text-align: center;
        margin-top: 0.5rem;
    }

    .hero-headline {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-sub {
        font-size: 1rem;
    }

    .services {
        padding: 5rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card {
        padding: 1.8rem 1.4rem;
    }

    .about {
        padding: 5rem 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-image img {
        height: 320px;
    }

    .about-stats {
        gap: 1.5rem;
    }

    .cta {
        padding: 4.5rem 0;
    }

    .contact {
        padding: 5rem 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .contact-form-wrap {
        padding: 1.8rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .nav-inner {
        padding: 0 1.25rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .about-stats {
        flex-direction: column;
        gap: 1.2rem;
    }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Focus Styles ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--terracotta);
    outline-offset: 2px;
}
