/* =========================================================================
   YV MASONRY -- design system v2                                      -DY
   -------------------------------------------------------------------------
   Direction: "set in stone". Every color is pulled from the actual jobs:
   charcoal pavers (ink), mortar (paper/joints), reclaimed brick (accent).
   Square corners everywhere -- stone isn't rounded. The signature element
   is the portfolio grid, laid out in running bond like a real wall.
   ========================================================================= */

:root {
    /* -DY palette sampled from dad's real projects */
    --ink: #211e1a;        /* charcoal paver */
    --ink-soft: #2c2925;   /* lifted charcoal for cards on dark */
    --paper: #f7f5f1;      /* pale mortar -- page background */
    --mortar: #e9e4dc;     /* mortar -- alternate section bg */
    --line: #d9d2c7;       /* hairline borders */
    --brick: #a03e2d;      /* reclaimed brick -- the one accent */
    --brick-deep: #82301f; /* hover state */
    --stone: #756e64;      /* secondary text */

    --font-display: 'Bricolage Grotesque', 'Arial Black', sans-serif;
    --font-body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;

    --radius: 2px;         /* -DY barely-there radius, masonry is square */
}

/* Reset and base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
}
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
img { display: block; }

::selection { background: var(--brick); color: var(--paper); }

/* =========================================================================
   Type system
   ========================================================================= */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; }

/* -DY eyebrow: small stamped label + rule, used above every section title */
.eyebrow {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--brick);
    margin-bottom: 0.9rem;
}
.eyebrow::before {
    content: ''; width: 28px; height: 2px;
    background: var(--brick); flex-shrink: 0;
}

.section-title {
    font-size: clamp(2rem, 4.2vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}
.section-subtitle {
    color: var(--stone);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    max-width: 56ch;
}
.section-head { margin-bottom: 2.5rem; }

/* =========================================================================
   Navigation
   ========================================================================= */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: rgba(247, 245, 241, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000; padding: 0.9rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 2px 16px rgba(33, 30, 26, 0.06);
}
.nav-container {
    max-width: 1160px; margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    text-decoration: none; color: inherit;
}
/* -DY brick-shaped logo mark, echoes the favicon */
.logo-mark {
    background: var(--brick); color: var(--paper);
    font-weight: 800; font-size: 0.95rem;
    padding: 4px 9px; border-radius: var(--radius);
    letter-spacing: 0.02em;
}
.nav-logo h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }

.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-link {
    text-decoration: none; color: var(--ink); font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.25s ease; position: relative;
}
.nav-link:hover { color: var(--brick); }
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -6px; left: 0; background: var(--brick);
    transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }
.hamburger { display: none; flex-direction: column; cursor: pointer; padding: 4px; }
.bar { width: 24px; height: 2px; background: var(--ink); margin: 3px 0; transition: 0.3s; }

/* =========================================================================
   Hero -- full-bleed photo of the work, scrim from the left
   ========================================================================= */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex; align-items: center;
    background: var(--ink); /* -DY fallback if the photo is missing */
    color: var(--paper);
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
    /* -DY slight desaturate so the headline owns the frame */
    filter: saturate(0.9);
}
.hero-bg.no-image img { display: none; }
.hero-bg::after {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(33, 30, 26, 0.88) 0%, rgba(33, 30, 26, 0.62) 45%, rgba(33, 30, 26, 0.25) 100%),
        linear-gradient(0deg, rgba(33, 30, 26, 0.55) 0%, transparent 35%);
}
.hero-content {
    position: relative; z-index: 1;
    max-width: 1160px; width: 100%;
    margin: 0 auto; padding: 140px 24px 90px;
}
.hero-text { max-width: 640px; }
.hero .eyebrow { color: #d8a08f; }
.hero .eyebrow::before { background: #d8a08f; }
.hero-text h1 {
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -0.015em;
    margin-bottom: 1.4rem;
}
.hero-text p {
    font-size: 1.15rem; max-width: 46ch;
    margin-bottom: 2.2rem; color: rgba(247, 245, 241, 0.85);
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* -DY "course" strip along the hero's bottom edge: brick / mortar / charcoal */
.hero-course {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    display: grid; grid-template-columns: 1fr 1fr 1fr; height: 6px;
}
.hero-course span:nth-child(1) { background: var(--brick); }
.hero-course span:nth-child(2) { background: var(--mortar); }
.hero-course span:nth-child(3) { background: #8c857b; }

/* Buttons: rectangular, like cut stone */
.btn {
    padding: 14px 28px; border-radius: var(--radius);
    text-decoration: none; font-weight: 600;
    font-size: 0.95rem; letter-spacing: 0.02em;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
    display: inline-block; border: none; cursor: pointer;
    font-family: var(--font-body);
}
.btn-primary { background: var(--brick); color: var(--paper); }
.btn-primary:hover { background: var(--brick-deep); transform: translateY(-2px); }
.btn-secondary {
    background: transparent; color: var(--paper);
    box-shadow: inset 0 0 0 2px rgba(247, 245, 241, 0.7);
}
.btn-secondary:hover { background: var(--paper); color: var(--ink); transform: translateY(-2px); }

/* =========================================================================
   Services
   ========================================================================= */
.services { padding: 96px 0; background: var(--paper); }
.services-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.service-card {
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--ink); /* -DY each card gets a material color */
    border-radius: var(--radius);
    padding: 2.2rem 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:nth-child(1) { border-top-color: var(--brick); }   /* masonry = brick */
.service-card:nth-child(2) { border-top-color: #8c857b; }        /* concrete = gray */
.service-card:nth-child(3) { border-top-color: #5b7a4e; }        /* landscape = green */
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(33, 30, 26, 0.10);
}
.service-icon { margin-bottom: 1.2rem; }
.service-icon i { font-size: 1.6rem; color: var(--ink); }
.service-card h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.7rem; }
.service-card p { color: var(--stone); font-size: 0.98rem; }

/* =========================================================================
   Portfolio -- THE SIGNATURE                                          -DY
   -------------------------------------------------------------------------
   Cards are laid in running bond on a charcoal field, with thin gaps as
   mortar joints. Spans alternate per course: 4+2 / 2+4 / 3+3, so no two
   neighboring courses line up -- exactly how a wall is built.
   ========================================================================= */
.portfolio { padding: 96px 0; background: var(--ink); color: var(--paper); }
.portfolio .section-title { color: var(--paper); }
.portfolio .section-subtitle { color: rgba(247, 245, 241, 0.6); }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 300px;
    gap: 10px; /* -DY the mortar joint */
}
.portfolio-item {
    position: relative;
    border-radius: var(--radius); overflow: hidden;
    border: none; padding: 0; cursor: pointer;
    background: var(--ink-soft);
    transition: transform 0.3s ease;
    font: inherit; color: inherit; text-align: left;
}
/* -DY running bond spans (6 projects). Adding a 7th+ falls back to span 3. */
.portfolio-item { grid-column: span 3; }
.portfolio-item:nth-child(1) { grid-column: span 4; }
.portfolio-item:nth-child(2) { grid-column: span 2; }
.portfolio-item:nth-child(3) { grid-column: span 2; }
.portfolio-item:nth-child(4) { grid-column: span 4; }

.portfolio-item:hover { transform: translateY(-4px); }
.portfolio-item:focus-visible { outline: 3px solid var(--brick); outline-offset: 3px; }
.portfolio-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}
.portfolio-item:hover img { transform: scale(1.04); }
.portfolio-overlay {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 2.2rem 1.25rem 1.1rem;
    background: linear-gradient(to top, rgba(20, 18, 15, 0.92) 0%, rgba(20, 18, 15, 0.45) 60%, transparent 100%);
}
.portfolio-overlay h3 {
    font-size: 1.15rem; font-weight: 700; margin-bottom: 0.2rem;
}
.portfolio-overlay .media-count {
    font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
    color: rgba(247, 245, 241, 0.7);
}

/* =========================================================================
   About
   ========================================================================= */
.about { padding: 96px 0; background: var(--mortar); }
.about-content {
    display: grid; grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem; align-items: center;
}
.about-text p {
    margin-bottom: 1.4rem; color: #4d473f;
    font-size: 1.05rem; line-height: 1.75;
}
.about-features { margin-top: 2rem; display: grid; gap: 0.9rem; }
.feature { display: flex; align-items: center; }
/* -DY check marks sit in small brick squares */
.feature i {
    color: var(--paper); background: var(--brick);
    width: 26px; height: 26px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    margin-right: 0.9rem; font-size: 0.75rem;
}
.feature span { font-weight: 600; }
.about-image { display: flex; justify-content: center; }
.about-image img {
    width: 100%; max-width: 420px; border-radius: var(--radius);
    object-fit: cover; box-shadow: 14px 14px 0 var(--line); /* -DY offset slab shadow */
}
.about-placeholder {
    background: var(--ink); border-radius: var(--radius);
    padding: 4rem; text-align: center; color: var(--paper);
    width: 100%; max-width: 420px;
    box-shadow: 14px 14px 0 var(--line);
}
.about-placeholder i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.8; }
.about-placeholder p { font-weight: 600; font-size: 1.1rem; }
.about-image .about-placeholder { display: none; }
.about-image.no-image img { display: none; }
.about-image.no-image .about-placeholder { display: block; }

/* =========================================================================
   Contact
   ========================================================================= */
.contact { padding: 96px 0; }
.contact-content { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; }
.contact-info h3 {
    font-family: var(--font-display);
    font-size: 1.8rem; font-weight: 700; margin-bottom: 0.8rem;
}
.contact-info > p { color: var(--stone); margin-bottom: 2rem; font-size: 1.05rem; }
.contact-details { display: flex; flex-direction: column; gap: 1.4rem; }
.contact-item {
    display: flex; align-items: center; gap: 1rem;
    text-decoration: none; color: inherit;
}
.contact-item i {
    width: 48px; height: 48px; flex-shrink: 0;
    background: var(--ink);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--paper); font-size: 1.1rem;
    transition: background 0.25s ease;
}
a.contact-item:hover i { background: var(--brick); }
.contact-item h4 {
    font-family: var(--font-body);
    font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--stone); margin-bottom: 0.15rem;
}
.contact-item p { color: var(--ink); margin: 0; font-weight: 600; font-size: 1.05rem; }
.contact-form {
    background: #fff; padding: 2.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.hidden-field { position: absolute; left: -5000px; }
.form-group { margin-bottom: 1.4rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 13px 15px;
    border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 1rem; transition: border-color 0.25s ease, box-shadow 0.25s ease;
    font-family: inherit; background: var(--paper); color: var(--ink);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #9b948a; }
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--brick);
    box-shadow: 0 0 0 3px rgba(160, 62, 45, 0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.contact-form .btn { width: 100%; }
.form-status { margin-top: 1rem; font-weight: 500; min-height: 1.2em; }
.form-status.success { color: #3f7a3a; }
.form-status.error { color: var(--brick); }

/* =========================================================================
   Footer
   ========================================================================= */
.footer { background: var(--ink); color: var(--paper); padding: 64px 0 24px; }
.footer-content {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.5rem; margin-bottom: 2.5rem;
}
.footer-section h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 1rem; }
.footer-section h4 {
    font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(247, 245, 241, 0.55); margin-bottom: 1rem;
}
.footer-section p, .footer-section ul li { color: rgba(247, 245, 241, 0.7); line-height: 1.7; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.4rem; }
.footer-bottom {
    border-top: 1px solid rgba(247, 245, 241, 0.14);
    padding-top: 20px; text-align: center;
    color: rgba(247, 245, 241, 0.5); font-size: 0.9rem;
}

/* =========================================================================
   Gallery modal (lightbox)
   ========================================================================= */
.gallery {
    position: fixed; inset: 0;
    background: rgba(20, 18, 15, 0.95);
    display: none; z-index: 2000;
    padding: 60px 20px 80px;
}
.gallery.open { display: flex; flex-direction: column; }
.gallery-stage {
    flex: 1; display: flex; align-items: center; justify-content: center;
    min-height: 0;
}
.gallery-image, .gallery-video {
    max-width: 95%; max-height: 100%;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.gallery-video { background: #000; }
.gallery-meta {
    display: flex; justify-content: space-between; align-items: center;
    color: var(--paper); padding: 14px 8px 0;
    font-size: 0.95rem;
    max-width: 1100px; width: 100%; margin: 0 auto;
}
.gallery-title { font-family: var(--font-display); font-weight: 700; }
.gallery-counter { opacity: 0.75; font-variant-numeric: tabular-nums; }

.gallery-close, .gallery-prev, .gallery-next {
    position: absolute; background: rgba(247, 245, 241, 0.08);
    border: 1px solid rgba(247, 245, 241, 0.25);
    color: var(--paper); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius); transition: background 0.2s ease;
}
.gallery-close:hover, .gallery-prev:hover, .gallery-next:hover {
    background: var(--brick);
}
.gallery-close { top: 16px; right: 20px; width: 44px; height: 44px; font-size: 1.7rem; line-height: 1; }
.gallery-prev, .gallery-next {
    top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px; font-size: 1.2rem;
}
.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
    /* -DY bond collapses to alternating 2-up courses */
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; }
    .portfolio-item,
    .portfolio-item:nth-child(n) { grid-column: span 1; }
    .portfolio-item:nth-child(3n+1) { grid-column: span 2; }
    .about-content, .contact-content { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed; left: -100%; top: 62px;
        flex-direction: column; background: var(--paper);
        width: 100%; text-align: center;
        transition: 0.3s; box-shadow: 0 10px 27px rgba(33, 30, 26, 0.08);
        padding: 2rem 0; gap: 1.4rem;
        border-bottom: 1px solid var(--line);
    }
    .nav-menu.active { left: 0; }
    .hero-content { padding: 120px 24px 80px; }
    .hero-buttons { gap: 0.8rem; }
    .services-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 2rem; }
    .gallery-prev, .gallery-next { width: 42px; height: 42px; }
    .gallery-prev { left: 8px; }
    .gallery-next { right: 8px; }
}

@media (max-width: 560px) {
    .portfolio-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; }
    .portfolio-item:nth-child(n) { grid-column: span 1; }
    .btn { padding: 12px 22px; font-size: 0.9rem; }
    .service-card, .contact-form { padding: 1.6rem; }
    .about-image img, .about-placeholder { box-shadow: 8px 8px 0 var(--line); }
}

/* =========================================================================
   Motion
   ========================================================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease-out; }

/* -DY respect users who turn animations off */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}