/* ============================================
   Tony's Painting Services — Custom Styles
   ============================================ */

/* --- Base & Utilities --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(196, 102, 74, 0.2);
    color: #1a1a1a;
}

/* --- Section Labels --- */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c4664a;
    background: linear-gradient(135deg, rgba(196, 102, 74, 0.1) 0%, rgba(196, 102, 74, 0.05) 100%);
    padding: 0.4em 0.8em;
    border-radius: 100px;
    border: 1px solid rgba(196, 102, 74, 0.15);
}

/* --- Hero Badge --- */
.hero-badge {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

/* --- Hero Headline --- */
.hero-headline {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

/* --- Hero Subheadline --- */
.hero-sub {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.55s;
    opacity: 0;
}

/* --- Hero CTAs --- */
.hero-ctas {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Service Cards --- */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
    transform: translateY(-6px);
}

/* --- Form Inputs --- */
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e7e7e7;
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: #2c2c2c;
    background-color: #fefdf9;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    outline: none;
}

.input-field::placeholder {
    color: #a1a1a1;
}

.input-field:hover {
    border-color: #d1d1d1;
}

.input-field:focus {
    border-color: #c4664a;
    box-shadow: 0 0 0 3px rgba(196, 102, 74, 0.1);
    background-color: #ffffff;
}

.input-field:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

/* --- Primary Button --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #c4664a 0%, #d4755a 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(196, 102, 74, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b85a3f 0%, #c4664a 100%);
    box-shadow: 0 6px 20px rgba(196, 102, 74, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(196, 102, 74, 0.3);
}

/* --- Nav Links --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #c4664a;
    transition: all 0.25s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 60%;
}

/* --- Process Steps --- */
.process-step {
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 32px;
    right: -1.5rem;
    width: calc(100% - 64px);
    height: 2px;
    background: linear-gradient(90deg, rgba(196, 102, 74, 0.2) 0%, rgba(196, 102, 74, 0.05) 100%);
    display: none;
}

@media (min-width: 1024px) {
    .process-step:not(:last-child)::after {
        display: block;
        right: calc(-1 * (1 * 16px));
        width: calc(100% - 64px - 32px);
    }
}

/* --- Gallery Items --- */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(26, 26, 26, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }

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

/* --- Mobile Menu --- */
.mobile-link {
    display: block;
    border-radius: 0.75rem;
}

/* --- Form Error State --- */
.input-field.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.input-error-msg {
    display: none;
    font-size: 0.8125rem;
    color: #e74c3c;
    margin-top: 0.375rem;
}

.input-field.error + .input-error-msg {
    display: block;
}

/* --- Focus Visible --- */
:focus-visible {
    outline: 2px solid #c4664a;
    outline-offset: 2px;
}

/* --- Responsive Typography --- */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* --- Print Styles --- */
@media print {
    header, footer, .hero-badge, .scroll-indicator {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
