/* ============================================
   Perry Performance Garage — Styles
   Clean Minimalist · Terracotta + Sand
   ============================================ */

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

:root {
    --terracotta: #B85D42;
    --terracotta-dark: #9E4A32;
    --terracotta-light: #D4856A;
    --sand: #E8D5C0;
    --sand-light: #F5EDE3;
    --sand-lighter: #FAF6F1;
    --cream: #FDF9F5;
    --charcoal: #1A1A1A;
    --dark: #2C2C2C;
    --gray: #6B6B6B;
    --gray-light: #9A9A9A;
    --gray-lighter: #E0DCD7;
    --white: #FFFFFF;
    
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--charcoal);
    background-color: var(--cream);
    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;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ---------- Skip Link ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm);
    background: var(--charcoal);
    color: var(--white);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    z-index: 1000;
    font-size: 0.875rem;
    transition: top var(--transition);
}

.skip-link:focus {
    top: var(--space-sm);
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 249, 245, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-lighter);
    transition: box-shadow var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* ---------- Logo ---------- */
.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.logo-mark {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--terracotta);
    border: 1.5px solid var(--terracotta);
    padding: 0.25rem 0.375rem;
    border-radius: var(--radius-sm);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--charcoal);
}

.logo-tag {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray);
}

/* ---------- Navigation ---------- */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-list a:not(.btn) {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray);
    letter-spacing: 0.02em;
    transition: color var(--transition);
    position: relative;
}

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

.nav-list a:not(.btn):hover {
    color: var(--charcoal);
}

.nav-list a:not(.btn):hover::after {
    width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    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(-1px);
    box-shadow: 0 4px 12px rgba(184, 93, 66, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--charcoal);
    border-color: var(--gray-lighter);
}

.btn-outline:hover {
    border-color: var(--terracotta);
    color: var(--terracotta);
}

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

.btn-white:hover {
    background: var(--sand-light);
    border-color: var(--sand-light);
    transform: translateY(-1px);
}

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

.btn-ghost:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
}

.btn-nav {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-icon {
    display: flex;
    align-items: center;
}

/* ---------- Mobile Nav Toggle ---------- */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.nav-toggle-line {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--charcoal);
    transition: all var(--transition);
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--charcoal);
    overflow: hidden;
    padding-top: 72px;
}

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

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

.hero-pattern {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(26, 26, 26, 0.8) 50%, rgba(26, 26, 26, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    padding: var(--space-3xl) 0;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta-light);
    margin-bottom: var(--space-lg);
}

.label-line {
    width: 32px;
    height: 1px;
    background: var(--terracotta);
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.hero-headline em {
    font-style: italic;
    color: var(--sand);
}

.hero-headline .accent {
    color: var(--terracotta-light);
}

.hero-sub {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: var(--space-xl);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}

.trust-item svg {
    color: var(--terracotta-light);
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.3);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ---------- Section Shared ---------- */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--charcoal);
    margin-bottom: var(--space-xl);
}

.section-title em {
    font-style: italic;
    color: var(--terracotta);
}

/* ---------- Services ---------- */
.services {
    padding: var(--space-3xl) 0;
    background: var(--cream);
}

.section-header {
    margin-bottom: var(--space-2xl);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.service-card {
    padding: var(--space-xl);
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

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

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    color: var(--terracotta);
    transition: all var(--transition);
}

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

.service-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.service-desc {
    font-size: 0.9375rem;
    color: var(--gray);
    line-height: 1.7;
}

/* ---------- About ---------- */
.about {
    padding: var(--space-3xl) 0;
    background: var(--sand-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 6/7;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content {
    padding: var(--space-lg) 0;
}

.about-text {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.about-stats {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--gray-lighter);
}

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

.stat-number {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--charcoal);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--gray-lighter);
}

/* ---------- Why Us ---------- */
.why-us {
    padding: var(--space-3xl) 0;
    background: var(--cream);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.why-item {
    padding: var(--space-xl);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.why-item:hover {
    border-color: var(--terracotta-light);
}

.why-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--sand);
    line-height: 1;
    margin-bottom: var(--space-sm);
    transition: color var(--transition);
}

.why-item:hover .why-number {
    color: var(--terracotta-light);
}

.why-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.why-text {
    font-size: 0.9375rem;
    color: var(--gray);
    line-height: 1.7;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
    padding: var(--space-3xl) 0;
    background: var(--charcoal);
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

.cta-content {
    flex: 1;
    min-width: 280px;
}

.cta-headline {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

.cta-headline em {
    font-style: italic;
    color: var(--sand);
}

.cta-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ---------- Contact ---------- */
.contact {
    padding: var(--space-3xl) 0;
    background: var(--sand-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

.contact-desc {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    color: var(--terracotta);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray-light);
    margin-bottom: 0.25rem;
}

.contact-value {
    display: block;
    font-size: 0.9375rem;
    color: var(--charcoal);
    line-height: 1.5;
}

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

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

/* ---------- Contact Form ---------- */
.contact-form-wrap {
    background: var(--white);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--charcoal);
    background: var(--cream);
    border: 1px solid var(--gray-lighter);
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.875rem;
    transition: all var(--transition);
    outline: none;
    width: 100%;
}

.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(184, 93, 66, 0.08);
}

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

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

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239A9A9A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.5rem;
}

/* ---------- Form Success ---------- */
.form-success {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sand-light);
    border-radius: 50%;
    color: var(--terracotta);
}

.success-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.success-text {
    font-size: 0.9375rem;
    color: var(--gray);
    line-height: 1.7;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--charcoal);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .logo-mark {
    border-color: var(--terracotta-light);
    color: var(--terracotta-light);
}

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

.footer-brand .logo-tag {
    color: rgba(255, 255, 255, 0.4);
}

.footer-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.7;
    margin-top: var(--space-md);
    max-width: 280px;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: var(--space-md);
}

.footer-links ul,
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a,
.footer-contact a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    transition: color var(--transition);
}

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

.footer-contact li {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
}

.footer-bottom {
    padding-top: var(--space-lg);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.25);
}

/* ---------- 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: flex;
    }

    .main-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(253, 249, 245, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: var(--space-xl);
        transform: translateX(100%);
        transition: transform var(--transition);
    }

    .main-nav.open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-lg);
    }

    .nav-list a:not(.btn) {
        font-size: 1.125rem;
    }

    .hero-content {
        padding: var(--space-2xl) 0;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        justify-content: center;
    }

    .hero-trust {
        flex-direction: column;
        gap: var(--space-sm);
    }

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

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

    .about-image {
        aspect-ratio: 4/3;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .cta-actions {
        justify-content: center;
    }

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

    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-headline {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.625rem;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero-scroll {
        animation: none;
    }
}
