/* ═══════════════════════════════════════════════════════════════
   Granite Garage Design - Styles
   Color Palette: #232020 #553739 #955E42 #9C914F #748E54
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
    --charcoal:   #232020;
    --maroon:     #553739;
    --copper:     #955E42;
    --olive:      #9C914F;
    --sage:       #748E54;

    --white:      #FAFAF8;
    --off-white:  #F2F0EB;
    --light-gray: #E8E5DE;
    --mid-gray:   #8A8680;
    --text:       #2D2A2A;
    --text-light: #5C5856;

    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --nav-height: 72px;
    --container:  1200px;
    --radius:     8px;
    --radius-lg:  16px;

    --shadow-sm:  0 1px 3px rgba(35, 32, 32, 0.08);
    --shadow-md:  0 4px 20px rgba(35, 32, 32, 0.1);
    --shadow-lg:  0 8px 40px rgba(35, 32, 32, 0.12);

    --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--white);
}

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

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

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}

button {
    outline: none;
}

/* ── Container ─────────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.btn-primary {
    background-color: var(--sage);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #647D47;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(116, 142, 84, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

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

.btn-full {
    width: 100%;
}

.btn-success {
    background-color: var(--sage) !important;
}

/* ── Navigation ────────────────────────────────────────────────── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#navbar.scrolled {
    background-color: var(--charcoal);
    box-shadow: 0 2px 20px rgba(35, 32, 32, 0.2);
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.02em;
}

.logo-icon {
    color: var(--sage);
    flex-shrink: 0;
}

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

.nav-link {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    transition: all 0.3s var(--ease);
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--white);
}

.nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-cta {
    background-color: var(--sage) !important;
    color: var(--white) !important;
    font-weight: 500;
    margin-left: 8px;
}

.nav-cta:hover {
    background-color: #647D47 !important;
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

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

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

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

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--charcoal);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(35, 32, 32, 0.55) 0%,
        rgba(35, 32, 32, 0.45) 50%,
        rgba(35, 32, 32, 0.7) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
}

.hero-tagline {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--white);
    background-color: var(--sage);
    padding: 8px 20px;
    border-radius: 4px;
    margin-bottom: 28px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.15rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

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

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.hero-scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ── Sections ──────────────────────────────────────────────────── */
.section {
    padding: 120px 0;
}

.section-alt {
    background-color: var(--off-white);
}

.section-dark {
    background-color: var(--charcoal);
    color: var(--white);
}

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

.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 16px;
}

.section-label-light {
    color: var(--olive);
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-dark .section-header h2 {
    color: var(--white);
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ── Services Grid ─────────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    padding: 40px 32px;
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    transition: all 0.4s var(--ease);
}

.section-alt .service-card {
    background: var(--white);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--off-white);
    border-radius: 12px;
    color: var(--copper);
    margin-bottom: 24px;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.925rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ── Process Timeline ──────────────────────────────────────────── */
.process-timeline {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 36px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--light-gray);
}

.process-step {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    position: relative;
}

.process-step:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    background-color: var(--copper);
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.step-content {
    padding-top: 14px;
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ── Approach Grid ─────────────────────────────────────────────── */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.approach-card {
    padding: 8px 0;
}

.approach-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--light-gray);
    line-height: 1;
    margin-bottom: 16px;
}

.approach-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.approach-card p {
    font-size: 0.925rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ── Portfolio Grid ────────────────────────────────────────────── */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.portfolio-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--light-gray);
    transition: all 0.4s var(--ease);
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.portfolio-large {
    grid-column: span 2;
}

.portfolio-image {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.portfolio-large .portfolio-image {
    height: 280px;
}

.portfolio-placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.portfolio-info {
    padding: 24px;
}

.portfolio-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--copper);
    background: rgba(149, 94, 66, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.portfolio-info h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 8px;
}

.portfolio-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ── About ─────────────────────────────────────────────────────── */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.about-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--light-gray);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--charcoal);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--mid-gray);
    letter-spacing: 0.03em;
}

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

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

/* ── Contact ───────────────────────────────────────────────────── */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-info h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.contact-info > p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 40px;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.contact-item svg {
    color: var(--sage);
    flex-shrink: 0;
}

/* ── Contact Form ──────────────────────────────────────────────── */
.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 40px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.form-group .optional {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    outline: none;
    transition: all 0.3s var(--ease);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--sage);
    background: rgba(255, 255, 255, 0.08);
}

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

.contact-form .btn-primary {
    margin-top: 8px;
    padding: 16px 32px;
    font-size: 1rem;
}

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
    background-color: #1a1818;
    padding: 48px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 8px;
}

/* ── Back to Top ───────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--charcoal);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.4s var(--ease);
    z-index: 999;
}

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

.back-to-top:hover {
    background-color: var(--sage);
    border-color: var(--sage);
    transform: translateY(-2px);
}

/* ── Scroll Reveal ─────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* Stagger animations for grid items */
.services-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.1s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.2s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.3s; }

.process-step.reveal:nth-child(2) { transition-delay: 0.15s; }
.process-step.reveal:nth-child(3) { transition-delay: 0.3s; }
.process-step.reveal:nth-child(4) { transition-delay: 0.45s; }

.approach-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.approach-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.approach-grid .reveal:nth-child(4) { transition-delay: 0.1s; }
.approach-grid .reveal:nth-child(5) { transition-delay: 0.2s; }
.approach-grid .reveal:nth-child(6) { transition-delay: 0.3s; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .services-grid,
    .approach-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-large {
        grid-column: span 2;
    }

    .about-layout,
    .contact-layout {
        gap: 48px;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    .section {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 48px;
    }

    /* Mobile nav */
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--charcoal);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 24px;
        gap: 12px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        padding: 16px 24px;
        width: 100%;
        text-align: center;
        font-size: 1.2rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.8);
    }

    .nav-link.active,
    .nav-link:hover {
        color: var(--white);
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-links li:last-child {
        margin-top: 32px;
    }

    .nav-cta {
        text-align: center;
        margin-left: 0;
        font-size: 1.1rem;
        padding: 16px 40px;
    }

    /* Hero */
    .hero {
        min-height: 100svh;
    }

    .hero-tagline {
        font-size: 0.75rem;
        padding: 0;
        background-color: transparent;
        color: rgba(255, 255, 255, 0.6);
    }

    .hero h1 {
        font-size: clamp(2.75rem, 10vw, 4rem);
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Grids */
    .services-grid,
    .approach-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .portfolio-large {
        grid-column: span 1;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        order: -1;
        aspect-ratio: 16/9;
    }

    .about-stats {
        gap: 24px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form-wrapper {
        padding: 24px;
    }

    /* Process */
    .process-timeline::before {
        left: 28px;
    }

    .step-number {
        width: 56px;
        height: 56px;
        font-size: 1rem;
    }

    .process-step {
        gap: 24px;
    }

    /* Back to top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

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

    .hero h1 {
        font-size: 2.5rem;
    }
}
