/* CSS Variables - Localized palette */
:root {
    --primary: #c2380f;
    /* Row House Brick */
    --primary-hover: #9c2a08;
    --secondary: #2C5E78;
    /* Harbor Blue */
    --secondary-hover: #1e4559;
    --dark: #1E293B;
    /* Deep Slate/Navy */
    --darker: #0F172A;
    --light: #F1F5F9;
    --white: #FFFFFF;
    --text-main: #334155;
    --text-muted: #64748B;

    /* Typography */
    --font-heading: 'Public Sans', sans-serif;
    --font-body: 'Public Sans', sans-serif;
    --font-hand: 'Caveat', cursive;

    /* Effects */
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    /* Slightly squarer for more industrial feel */
    --radius-lg: 12px;

    /* Timing */
    --transition: 0.25s ease-out;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: #FAFAFB;
    /* Very slight off-white paper feel */
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.5rem;
}

.handwritten {
    font-family: var(--font-hand);
    color: var(--primary);
    transform: rotate(-2deg);
    display: inline-block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.highlight {
    color: var(--primary);
}

.text-gradient {
    color: var(--primary);
    /* Dropping gradient for a more solid, reliable look */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    font-family: var(--font-heading);
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
    /* Rougher shadow for local business feel */
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--white);
}

.btn-secondary {
    background-color: white;
    color: var(--dark);
    border: 2px solid var(--dark);
    box-shadow: 4px 4px 0px var(--dark);
}

.btn-secondary:hover {
    background-color: var(--light);
}

.btn-light {
    background-color: var(--white);
    color: var(--primary);
    box-shadow: 4px 4px 0px var(--darker);
}

.btn-light:hover {
    background-color: #f8f8f8;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
    background-color: var(--darker);
    border-bottom: 4px solid var(--primary);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a:not(.btn) {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    opacity: 0.9;
}

.nav-links a:not(.btn):hover {
    opacity: 1;
    color: var(--primary);
}

.nav-btn {
    box-shadow: none !important;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    /* offset for navbar */
    background: url('https://loremflickr.com/1920/1080/rowhouse,roof/all') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.85);
    z-index: 1;
}

.texture-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: var(--white);
    margin-left: 0;
}

.handwritten-note {
    font-family: var(--font-hand);
    font-size: 1.8rem;
    color: #FBBF24;
    /* A yellow marker color */
    transform: rotate(-3deg);
    margin-bottom: -10px;
    margin-left: 20px;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 800px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 600px;
    color: #E2E8F0;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Services Section */
.services {
    background-color: var(--white);
    position: relative;
}

.section-header {
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--white);
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.card-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-bottom: 4px solid var(--primary);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 30px;
}

.handwritten-tag {
    display: block;
    font-family: var(--font-hand);
    font-size: 1.5rem;
    color: var(--secondary);
    font-weight: normal;
    transform: rotate(-2deg);
    margin-top: 5px;
}

.card-content h3 {
    margin-bottom: 15px;
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.polaroid {
    background: white;
    padding: 15px 15px 40px 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: rotate(-3deg);
    max-width: 450px;
    margin: 0 auto;
    border: 1px solid #eee;
}

.polaroid img {
    width: 100%;
    height: auto;
    filter: sepia(20%) contrast(110%);
}

.polaroid .caption {
    font-size: 1.6rem;
    color: var(--dark);
    text-align: center;
    margin-top: 15px;
    transform: rotate(1deg);
}

.subtitle {
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.signature {
    margin-top: 40px;
    font-size: 2.5rem;
    border-top: 2px dashed #CBD5E1;
    padding-top: 20px;
    width: 200px;
}

/* Guarantee Ribbon */
.cta-ribbon {
    background: var(--primary);
    padding: 70px 0;
    color: var(--white);
    border-top: 8px solid var(--darker);
    border-bottom: 8px solid var(--darker);
}

.cta-ribbon h2 {
    color: var(--white);
}

/* Contact Section */
.contact {
    background: var(--light);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.info-items {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-icon {
    font-size: 2rem;
    margin-top: -5px;
}

.phone-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary) !important;
}

.contact-form-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    border-top: 5px solid var(--secondary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #FFFAFA;
    /* Slight red tint on focus */
}

/* Footer */
footer {
    background: var(--darker);
    color: #94A3B8;
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand h3 {
    color: var(--white);
    margin-bottom: 15px;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #1E293B;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* Scroll Animations */
.fade-in,
.animate-up,
.slide-up,
.slide-in-right {
    opacity: 0;
    transition: all 0.6s ease-out;
}

.fade-in {
    transform: translateY(15px);
}

.animate-up {
    transform: translateY(30px);
}

.slide-up {
    transform: translateY(40px);
}

.slide-in-right {
    transform: translateX(30px);
}

.fade-in.visible,
.animate-up.visible,
.slide-up.visible,
.slide-in-right.visible {
    opacity: 1;
    transform: translate(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* Responsive */
@media (max-width: 992px) {

    .about-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .polaroid {
        margin-bottom: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 64px;
        /* header height */
        left: 0;
        width: 100%;
        background: var(--darker);
        flex-direction: column;
        padding: 30px 0;
        border-bottom: 4px solid var(--primary);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .handwritten-note {
        margin-left: 0;
        display: block;
        margin-bottom: 10px;
    }
}