/* ============================================
   A Affordable Fastener Co — Custom Styles
   Palette: Terracotta (#C4663A) + Sand (#FDF6EE)
   ============================================ */

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

:root {
    --terracotta: #C4663A;
    --terracotta-dark: #A8522A;
    --terracotta-light: #D4845E;
    --sand: #FDF6EE;
    --sand-dark: #F5E6D3;
    --sand-mid: #FAF0E4;
    --charcoal: #2C2420;
    --charcoal-light: #4A3F38;
    --warm-gray: #7A6E66;
    --warm-gray-light: #A89B93;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(44, 36, 32, 0.06);
    --shadow-md: 0 4px 20px rgba(44, 36, 32, 0.08);
    --shadow-lg: 0 8px 40px rgba(44, 36, 32, 0.12);
    --shadow-xl: 0 16px 60px rgba(44, 36, 32, 0.15);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--charcoal);
    background-color: var(--sand);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Nunito', 'DM Sans', sans-serif;
    font-weight: 800;
    line-height: 1.2;
    color: var(--charcoal);
}

a {
    color: var(--terracotta);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--terracotta-dark);
}

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

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

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 246, 238, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(196, 102, 58, 0.08);
    transition: box-shadow var(--transition), background var(--transition);
}

.navbar.scrolled {
    background: rgba(253, 246, 238, 0.97);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--charcoal);
}

.nav-logo-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    color: var(--charcoal-light);
    font-weight: 600;
    font-size: 0.925rem;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all var(--transition);
}

.nav-links a:hover {
    color: var(--terracotta);
    background: rgba(196, 102, 58, 0.08);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--terracotta) !important;
    color: var(--white) !important;
    padding: 10px 20px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(196, 102, 58, 0.35);
    transition: all var(--transition) !important;
}

.nav-cta:hover {
    background: var(--terracotta-dark) !important;
    color: var(--white) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(196, 102, 58, 0.45);
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(44, 36, 32, 0.85) 0%,
        rgba(44, 36, 32, 0.65) 50%,
        rgba(196, 102, 58, 0.3) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 120px 24px 100px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(196, 102, 58, 0.2);
    border: 1px solid rgba(196, 102, 58, 0.4);
    color: var(--sand);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}

.hero-headline {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    max-width: 700px;
}

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

.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(253, 246, 238, 0.8);
    max-width: 540px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-trust-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: rgba(253, 246, 238, 0.7);
    font-size: 0.875rem;
}

.hero-trust-item svg {
    color: var(--terracotta-light);
    margin-bottom: 4px;
}

.hero-trust-divider {
    width: 1px;
    height: 40px;
    background: rgba(253, 246, 238, 0.2);
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    z-index: 2;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(196, 102, 58, 0.35);
}

.btn-primary:hover {
    background: var(--terracotta-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(196, 102, 58, 0.45);
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

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

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ---------- Section Base ---------- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.text-accent {
    color: var(--terracotta);
}

.section-desc {
    font-size: 1.1rem;
    color: var(--warm-gray);
    line-height: 1.7;
}

/* ---------- Products ---------- */
.products-section {
    background: var(--sand);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-card-img {
    overflow: hidden;
    height: 200px;
}

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

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

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

.product-card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.product-card-body p {
    font-size: 0.925rem;
    color: var(--warm-gray);
    line-height: 1.65;
}

.products-note {
    text-align: center;
    font-size: 1.05rem;
    color: var(--warm-gray);
}

.link-accent {
    color: var(--terracotta);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(196, 102, 58, 0.3);
    text-underline-offset: 4px;
}

.link-accent:hover {
    text-decoration-color: var(--terracotta);
}

/* ---------- Why Us ---------- */
.why-section {
    background: var(--sand-dark);
}

.why-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.why-image-wrap {
    position: relative;
}

.why-image-wrap img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.why-image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    height: 200px;
    background: var(--terracotta);
    border-radius: var(--radius-xl);
    z-index: -1;
    opacity: 0.15;
}

.why-content {
    max-width: 500px;
}

.why-intro {
    font-size: 1.1rem;
    color: var(--warm-gray);
    line-height: 1.75;
    margin-bottom: 40px;
}

.why-features {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.why-feature {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.why-feature-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: var(--white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.why-feature h4 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.why-feature p {
    font-size: 0.9rem;
    color: var(--warm-gray);
    line-height: 1.65;
}

/* ---------- About ---------- */
.about-section {
    background: var(--white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content .section-header {
    margin-bottom: 40px;
}

.about-text {
    font-size: 1.1rem;
    color: var(--warm-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 56px;
    padding-top: 56px;
    border-top: 1px solid var(--sand-dark);
}

.about-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--terracotta);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--warm-gray);
    font-weight: 500;
}

.about-stat-divider {
    width: 1px;
    height: 48px;
    background: var(--sand-dark);
}

/* ---------- Testimonials ---------- */
.testimonials-section {
    background: var(--sand);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.testimonial-card {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.testimonial-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1rem;
    color: var(--charcoal-light);
    line-height: 1.75;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--charcoal);
}

/* ---------- CTA ---------- */
.cta-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
}

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

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(196, 102, 58, 0.9) 0%,
        rgba(168, 82, 42, 0.92) 100%
    );
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--white);
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.cta-text {
    font-size: 1.15rem;
    color: rgba(253, 246, 238, 0.85);
    line-height: 1.75;
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* ---------- Contact ---------- */
.contact-section {
    background: var(--sand-dark);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    align-items: start;
}

.contact-intro {
    font-size: 1.05rem;
    color: var(--warm-gray);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-detail {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.contact-detail-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: var(--white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.contact-detail h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.contact-detail p {
    font-size: 0.9rem;
    color: var(--warm-gray);
    line-height: 1.6;
}

.contact-form-wrap {
    max-width: 100%;
}

.contact-form-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.contact-form-card h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.form-note {
    font-size: 0.925rem;
    color: var(--warm-gray);
    margin-bottom: 32px;
    line-height: 1.6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--sand-dark);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: var(--charcoal);
    background: var(--sand);
    transition: all var(--transition);
    outline: 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 4px rgba(196, 102, 58, 0.1);
}

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

.form-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.form-success.show {
    display: block;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(196, 102, 58, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.form-success h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.form-success p {
    color: var(--warm-gray);
    font-size: 0.95rem;
}

.map-wrap {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--charcoal);
    color: rgba(253, 246, 238, 0.7);
    padding: 72px 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 60px;
    padding-bottom: 56px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-logo-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
}

.footer-tagline {
    font-size: 0.925rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--white);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(253, 246, 238, 0.6);
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 3px;
    opacity: 0.6;
}

.footer-bottom {
    border-top: 1px solid rgba(253, 246, 238, 0.08);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}

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

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }
    
    .why-layout {
        gap: 48px;
    }
    
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-top > div:first-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--sand);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 32px 40px;
        gap: 4px;
        box-shadow: var(--shadow-xl);
        transition: right var(--transition);
    }
    
    .nav-links.open {
        right: 0;
    }
    
    .nav-links a {
        width: 100%;
        padding: 14px 16px;
        font-size: 1.05rem;
    }
    
    .nav-cta {
        margin-top: 16px;
        justify-content: center;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(44, 36, 32, 0.5);
        z-index: 999;
    }
    
    .mobile-overlay.show {
        display: block;
    }
    
    .hero-content {
        padding: 120px 24px 80px;
    }
    
    .hero-trust {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .hero-trust-divider {
        display: none;
    }
    
    .section {
        padding: 72px 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .why-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .why-image-wrap img {
        height: 400px;
    }
    
    .why-image-accent {
        width: 120px;
        height: 120px;
        bottom: -12px;
        right: -12px;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .about-stat-divider {
        width: 48px;
        height: 1px;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid .testimonial-card:last-child {
        grid-column: span 1;
        max-width: 100%;
    }
    
    .cta-section {
        padding: 80px 0;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-form-card {
        padding: 28px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .footer-top > div:first-child {
        grid-column: span 1;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-actions .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}
