/* ===================================
   Southeastern Building Products
   Custom Styles — Terracotta & Sand
   =================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
}

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

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

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf6f1;
}
::-webkit-scrollbar-thumb {
    background: #d94a1e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c23a14;
}

/* --- Navigation --- */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav-fixed.scrolled {
    background: rgba(250, 246, 241, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(107, 101, 96, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d94a1e;
    transition: width 0.3s ease;
}

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

/* Mobile menu */
.mobile-menu {
    top: 80px;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    position: relative;
}

/* Menu button animation */
.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Hero --- */
.hero {
    position: relative;
    background: #3a0f07;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(58, 15, 7, 0.88) 0%,
        rgba(160, 46, 17, 0.72) 50%,
        rgba(58, 15, 7, 0.85) 100%
    );
}

.hero-headline {
    opacity: 1;
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-eyebrow {
    opacity: 1;
    animation: heroFadeUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-subtext {
    opacity: 1;
    animation: heroFadeUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-ctas {
    opacity: 1;
    animation: heroFadeUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

/* Scroll line animation */
.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #d94a1e;
    color: #faf6f1;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 14px 28px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #c23a14;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary .btn-arrow {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #faf6f1;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 14px 28px;
    border-radius: 100px;
    border: 1.5px solid rgba(250, 246, 241, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: rgba(250, 246, 241, 0.7);
    background: rgba(250, 246, 241, 0.08);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.0625rem;
}

/* --- Section Shared --- */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #d94a1e;
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: #d94a1e;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    color: #6b6560;
}

.section-desc {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #6b6560;
    margin-top: 1rem;
}

/* --- Stats Bar --- */
.stats-bar {
    position: relative;
}

/* --- Product Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-card {
    background: #faf6f1;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(217, 74, 30, 0.12);
}

.product-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-card-img img {
    transform: scale(1.06);
}

.product-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(58, 15, 7, 0.6) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover .product-card-overlay {
    opacity: 1;
}

.product-card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #faf6f1;
    background: rgba(217, 74, 30, 0.85);
    padding: 6px 12px;
    border-radius: 100px;
}

.product-card-content {
    padding: 24px;
}

.product-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.375rem;
    font-weight: 600;
    color: #6b6560;
    margin-bottom: 8px;
}

.product-card-desc {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #6b6560;
    margin-bottom: 16px;
}

.product-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #d94a1e;
    transition: gap 0.3s ease;
}

.product-card-link:hover {
    gap: 10px;
}

/* --- About Section --- */
.about-image-wrapper {
    position: relative;
}

.about-image-main {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(217, 74, 30, 0.15);
}

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

.about-image-accent {
    position: absolute;
    bottom: -40px;
    right: -30px;
    width: 55%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 4px solid #faf6f1;
}

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

.about-image-badge {
    position: absolute;
    top: -20px;
    right: -20px;
    background: #d94a1e;
    color: #faf6f1;
    padding: 20px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(217, 74, 30, 0.3);
}

.about-image-badge span:first-of-type {
    display: block;
    line-height: 1;
}

.about-image-badge span:last-of-type {
    display: block;
    font-size: 0.75rem;
    margin-top: 4px;
    line-height: 1.3;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fdf0eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Service Cards --- */
.service-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 36px;
    transition: all 0.4s ease;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.service-card-title {
    font-family: 'Playfair Display', Georgia, serif;
}

.service-card-desc {
    line-height: 1.7;
}

/* --- Quote Section --- */
.quote-mark {
    font-family: 'Playfair Display', Georgia, serif;
}

/* --- Contact --- */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fdf0eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Map --- */
.map-wrapper {
    height: 100%;
    min-height: 450px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12);
}

/* --- Footer --- */
.footer {
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d94a1e, transparent);
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #d94a1e;
    color: #faf6f1;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.3s ease;
    z-index: 40;
    box-shadow: 0 8px 24px rgba(217, 74, 30, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #c23a14;
    transform: translateY(-2px);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .about-image-accent {
        right: -10px;
        bottom: -20px;
        width: 65%;
    }

    .about-image-badge {
        top: -10px;
        right: -10px;
        padding: 14px 18px;
    }

    .about-image-badge span:first-of-type {
        font-size: 2.5rem;
    }

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

    .stats-bar {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Focus styles --- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #d94a1e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Print --- */
@media print {
    .nav-fixed,
    .back-to-top,
    .hero-overlay {
        display: none;
    }

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