/* ─────────────────────────────────────────────
   Flanigan Construction — Shared Stylesheet
───────────────────────────────────────────── */

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

:root {
    --walnut:      #1C1108;
    --bark:        #3D2B1A;
    --amber:       #C47B2B;
    --amber-light: #D4952F;
    --green:       #2D5A3D;
    --cream:       #F5EFE0;
    --sand:        #D4C9B5;
    --muted:       #9C8C7A;
    --serif:       'Playfair Display', Georgia, serif;
    --sans:        'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--walnut);
    color: var(--cream);
    -webkit-font-smoothing: antialiased;
}

/* ─── NAV ──────────────────────────────────── */
.nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    background: var(--walnut);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s;
}

.nav.scrolled {
    border-bottom-color: rgba(196,123,43,.2);
    box-shadow: 0 2px 32px rgba(0,0,0,.5);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
}

.nav-logo img { height: 70px; width: auto; max-width: 276px; display: block; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--sand);
    font-size: .8125rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--cream); }

.nav-cta {
    background: var(--amber) !important;
    color: var(--walnut) !important;
    padding: .5rem 1.25rem !important;
    border-radius: 3px;
    font-weight: 600 !important;
    transition: background .2s !important;
}

.nav-cta:hover { background: var(--amber-light) !important; }

.nav-links .nav-google {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    text-transform: none;
    letter-spacing: 0;
    font-size: .8rem;
    opacity: .75;
    transition: opacity .2s;
}

.nav-links .nav-google:hover { opacity: 1; color: var(--sand); }
.nav-links .nav-google svg { flex-shrink: 0; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--cream);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 84px; left: 0; right: 0;
    background: var(--bark);
    border-top: 1px solid rgba(196,123,43,.2);
    border-bottom: 1px solid rgba(196,123,43,.15);
    padding: 1.5rem 2rem 2rem;
    z-index: 99;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
    text-decoration: none;
    color: var(--sand);
    font-size: .9375rem;
    font-weight: 500;
    padding: .875rem 0;
    border-bottom: 1px solid rgba(212,201,181,.08);
    transition: color .2s;
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--cream); }

.nav-mobile .mob-cta {
    margin-top: 1rem;
    background: var(--amber);
    color: var(--walnut) !important;
    font-weight: 600 !important;
    text-align: center;
    padding: .875rem 1.5rem !important;
    border-radius: 3px;
    border-bottom: none !important;
}

.mob-group-label {
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--amber);
    padding: 1.25rem 0 .25rem;
}

/* ─── NAV DROPDOWN ──────────────────────────── */
.nav-has-dropdown { position: relative; }

.nav-has-dropdown > a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.nav-has-dropdown > a svg { transition: transform .2s; flex-shrink: 0; }
.nav-has-dropdown:hover > a svg { transform: rotate(180deg); }

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: var(--bark);
    border: 1px solid rgba(196,123,43,.2);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    list-style: none;
    min-width: 200px;
    padding: .5rem 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s, visibility .2s, transform .2s;
}

.nav-has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown li a {
    display: block;
    padding: .625rem 1.25rem;
    font-size: .75rem;
    white-space: nowrap;
}

.nav-dropdown li a:hover {
    background: rgba(196,123,43,.1);
    color: var(--cream);
}

/* ─── PAGE HEADER ──────────────────────────── */
.page-header {
    background: var(--walnut);
    padding: 9rem 2rem 5rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        94deg,
        transparent 0, transparent 8px,
        rgba(196,123,43,.018) 8px, rgba(196,123,43,.018) 9px,
        transparent 9px, transparent 70px
    );
    pointer-events: none;
}

.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 80% at 10% 60%, rgba(196,123,43,.1) 0%, transparent 100%);
    pointer-events: none;
}

.page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 4rem;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1rem;
}

.eyebrow::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--amber);
    flex-shrink: 0;
}

.page-header h1 {
    font-family: var(--serif);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    line-height: 1.08;
    color: var(--cream);
    margin-bottom: 1.125rem;
}

.page-header p {
    font-size: 1.0625rem;
    line-height: 1.72;
    color: var(--sand);
    font-weight: 300;
    margin-bottom: 2rem;
}

.header-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* header quick-stats card */
.header-card {
    background: var(--bark);
    border: 1px solid rgba(196,123,43,.2);
    border-radius: 6px;
    padding: 2rem 1.75rem;
}

.header-card h3 {
    font-family: var(--serif);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 1.25rem;
}

.stat-list { list-style: none; display: flex; flex-direction: column; gap: .875rem; }

.stat-list li {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
    color: var(--sand);
    line-height: 1.4;
}

.stat-list svg { color: var(--amber); flex-shrink: 0; }

/* ─── BUTTONS ──────────────────────────────── */
.btn-primary {
    display: inline-block;
    background: var(--amber);
    color: var(--walnut);
    text-decoration: none;
    padding: .875rem 2rem;
    font-weight: 600;
    font-size: .9375rem;
    border-radius: 3px;
    transition: background .2s, transform .15s;
}

.btn-primary:hover { background: var(--amber-light); transform: translateY(-1px); }

.btn-outline {
    display: inline-block;
    border: 1.5px solid rgba(212,201,181,.45);
    color: var(--cream);
    text-decoration: none;
    padding: .875rem 2rem;
    font-weight: 500;
    font-size: .9375rem;
    border-radius: 3px;
    transition: border-color .2s, transform .15s;
}

.btn-outline:hover { border-color: var(--cream); transform: translateY(-1px); }

/* ─── SHARED SECTION ───────────────────────── */
.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5.5rem 2rem;
}

.section-label {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: .75rem;
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(1.875rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.14;
    margin-bottom: .875rem;
}

.section-sub {
    font-size: 1rem;
    line-height: 1.72;
    font-weight: 300;
    max-width: 560px;
}

.section-header { margin-bottom: 3.25rem; }

/* ─── TASK CARDS ───────────────────────────── */
.tasks-section { background: var(--cream); color: var(--walnut); }
.tasks-section .section-sub { color: #6B5A45; }

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.task-card {
    background: #fff;
    border: 1px solid var(--sand);
    border-radius: 5px;
    padding: 1.75rem 1.5rem;
}

.task-card-icon { color: var(--green); margin-bottom: 1rem; }

.task-card h3 {
    font-family: var(--serif);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--walnut);
    margin-bottom: .875rem;
}

.task-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }

.task-list li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .875rem;
    color: #6B5A45;
    line-height: 1.5;
}

.task-list li::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--amber);
    border-radius: 50%;
    margin-top: .45rem;
    flex-shrink: 0;
}

/* ─── WHY FLANIGAN ─────────────────────────── */
.why-section { background: var(--bark); }

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.why-card {
    background: rgba(28,17,8,.5);
    border: 1px solid rgba(212,201,181,.12);
    border-radius: 5px;
    padding: 2rem 1.75rem;
}

.why-num {
    font-family: var(--serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(196,123,43,.3);
    line-height: 1;
    margin-bottom: .875rem;
}

.why-card h3 {
    font-family: var(--serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: .625rem;
}

.why-card p { font-size: .9rem; line-height: 1.7; color: var(--sand); font-weight: 300; }

/* ─── WORK SAMPLES ─────────────────────────── */
.work-section { background: var(--walnut); }

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.work-card {
    background: var(--bark);
    border: 1px solid rgba(212,201,181,.12);
    border-radius: 5px;
    overflow: hidden;
    transition: border-color .25s, transform .25s;
}

.work-card:hover { border-color: rgba(196,123,43,.35); transform: translateY(-2px); }

.work-img {
    height: 200px;
    background: rgba(61,43,26,.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    position: relative;
    overflow: hidden;
}

.work-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        93deg,
        transparent 0, transparent 10px,
        rgba(196,123,43,.025) 10px, rgba(196,123,43,.025) 11px,
        transparent 11px, transparent 90px
    );
}

.work-img svg { color: rgba(196,123,43,.28); position: relative; z-index: 1; }

.work-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.img-label { position: relative; z-index: 1; text-align: center; }

.img-label strong {
    display: block;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(212,201,181,.4);
}

.img-label span { font-size: .625rem; color: rgba(212,201,181,.22); }

.work-body { padding: 1.25rem 1.5rem 1.5rem; }

.work-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }

.tag {
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .11em;
    text-transform: uppercase;
    padding: .25rem .625rem;
    border-radius: 2px;
}

.tag-place {
    background: rgba(196,123,43,.14);
    color: var(--amber);
    border: 1px solid rgba(196,123,43,.28);
}

.work-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: .35rem;
}

.work-desc { font-size: .8125rem; line-height: 1.65; color: var(--muted); }

.tag-type {
    background: rgba(45,90,61,.15);
    color: #5aad78;
    border: 1px solid rgba(45,90,61,.3);
}

/* ─── WORK SPOTLIGHT ───────────────────────── */
.work-spotlight {
    background: var(--bark);
    border-top: 1px solid rgba(196,123,43,.12);
    border-bottom: 1px solid rgba(196,123,43,.12);
}

.spotlight-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 5rem;
    align-items: center;
}

.spotlight-img-wrap { position: relative; }

.spotlight-img-wrap::after {
    content: '';
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 1px solid rgba(196,123,43,.22);
    border-radius: 4px;
    pointer-events: none;
}

.spotlight-img-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    position: relative;
    z-index: 1;
}

.spotlight-text {
    padding-left: 1.75rem;
    border-left: 2px solid rgba(196,123,43,.35);
}

.spotlight-eyebrow {
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1rem;
}

.spotlight-tags {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.spotlight-title {
    font-family: var(--serif);
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--cream);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.spotlight-desc {
    font-size: .9rem;
    line-height: 1.8;
    color: var(--sand);
    margin-bottom: 1.75rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--amber);
    text-decoration: none;
    font-weight: 600;
    font-size: .9375rem;
    transition: gap .2s;
}

.link-arrow:hover { gap: .8rem; }

/* ─── FAQ ──────────────────────────────────── */
.faq-section { background: var(--cream); color: var(--walnut); }
.faq-section .section-sub { color: #6B5A45; }

.faq-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--sand);
    border-radius: 5px;
    overflow: hidden;
}

.faq-item { border-bottom: 1px solid var(--sand); }
.faq-item:last-child { border-bottom: none; }

.faq-q {
    width: 100%;
    background: none;
    border: none;
    padding: 1.375rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    text-align: left;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--walnut);
    transition: background .2s;
}

.faq-q:hover { background: rgba(212,201,181,.2); }

.faq-q svg { flex-shrink: 0; color: var(--amber); transition: transform .25s; }

.faq-item.open .faq-q svg { transform: rotate(180deg); }

.faq-a {
    display: none;
    padding: 0 1.5rem 1.375rem;
    font-size: .9375rem;
    line-height: 1.72;
    color: #6B5A45;
}

.faq-item.open .faq-a { display: block; }

/* ─── CTA BANNER ───────────────────────────── */
.cta-banner {
    background: var(--green);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 45% 110% at 92% 50%, rgba(196,123,43,.13) 0%, transparent 100%);
    pointer-events: none;
}

.cta-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
}

.cta-text h2 {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--cream);
    margin-bottom: .875rem;
}

.cta-text p {
    font-size: 1rem;
    line-height: 1.68;
    color: rgba(245,239,224,.72);
    max-width: 420px;
    font-weight: 300;
}

/* ─── FOOTER ───────────────────────────────── */
.site-footer { background: var(--walnut); border-top: 1px solid rgba(196,123,43,.18); }

.footer-inner { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem 2.25rem; }

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
    padding-bottom: 2.75rem;
    border-bottom: 1px solid rgba(212,201,181,.1);
    margin-bottom: 2rem;
}

.footer-logo img { height: 58px; width: auto; max-width: 220px; display: block; margin-bottom: 1rem; }

.footer-tagline { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: .9375rem; }

.footer-nav { display: flex; gap: 3.5rem; flex-wrap: wrap; }

.fnav-group h4 {
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.125rem;
}

.fnav-group ul { list-style: none; display: flex; flex-direction: column; gap: .625rem; }

.fnav-group a { text-decoration: none; color: var(--sand); font-size: .875rem; transition: color .2s; }
.fnav-group a:hover,
.fnav-group a.active { color: var(--cream); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-copy { font-size: .75rem; color: var(--muted); }

.footer-social a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    color: var(--sand);
    text-decoration: none;
    transition: color .2s;
}

.footer-social a:hover { color: var(--cream); }

/* ─── RESPONSIVE ───────────────────────────── */
@media (max-width: 900px) {
    .page-header-inner { grid-template-columns: 1fr; }
    .header-card { display: none; }
    .why-grid { grid-template-columns: 1fr; }
    .work-grid { grid-template-columns: 1fr; }
    .spotlight-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 3rem 1.25rem;
    }
    .spotlight-img-wrap::after { display: none; }
    .spotlight-text {
        border-left: none;
        padding-left: 0;
        border-top: 2px solid rgba(196,123,43,.35);
        padding-top: 1.5rem;
    }
}

/* ─── ABOUT PAGE ──────────────────────────── */
.section-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.split-text .section-label { margin-bottom: .75rem; }
.split-text .section-title { margin-bottom: 1.5rem; }

.section-body {
    font-size: .9375rem;
    line-height: 1.85;
    color: var(--sand);
    margin-bottom: 1.25rem;
}

.split-values {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: .5rem;
}

.value-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.value-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(196,123,43,.1);
    border: 1px solid rgba(196,123,43,.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--amber);
}

.value-item h4 {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: .4rem;
}

.value-item p {
    font-size: .875rem;
    line-height: 1.75;
    color: var(--sand);
}

/* Services strip on about page */
.services-strip { background: var(--bark); border-top: 1px solid rgba(196,123,43,.12); border-bottom: 1px solid rgba(196,123,43,.12); }

.strip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: rgba(196,123,43,.1);
    border: 1px solid rgba(196,123,43,.1);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 3rem;
}

.strip-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1.5rem;
    background: var(--bark);
    color: var(--sand);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: background .2s, color .2s;
}

.strip-item svg { color: var(--amber); flex-shrink: 0; }
.strip-item:hover { background: rgba(196,123,43,.08); color: var(--cream); }

@media (max-width: 900px) {
    .section-split { grid-template-columns: 1fr; gap: 3rem; }
    .strip-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
    .strip-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .tasks-grid { grid-template-columns: 1fr; }
    .footer-nav { gap: 2rem; }
}

@media (max-width: 540px) {
    .header-ctas { flex-direction: column; }
    .cta-inner { flex-direction: column; }
    .btn-primary, .btn-outline { text-align: center; }
}

/* ─── OUR WORK / PORTFOLIO ─────────────────── */
.portfolio-section {
    background: var(--walnut);
    padding: 5rem 0 6rem;
}

.portfolio-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.project-card {
    background: var(--bark);
    border: 1px solid rgba(196,123,43,.15);
    border-radius: 6px;
    overflow: hidden;
}

/* Single image */
.project-img img {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    object-position: center;
}

/* Before / After */
.project-ba {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: rgba(196,123,43,.2);
}

.ba-wrap {
    position: relative;
    overflow: hidden;
}

.ba-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    object-position: center;
}

.ba-label {
    position: absolute;
    bottom: .625rem;
    left: .625rem;
    background: rgba(28,17,8,.72);
    color: var(--cream);
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .25rem .625rem;
    border-radius: 2px;
    backdrop-filter: blur(4px);
}

.ba-label.after {
    background: rgba(196,123,43,.9);
    color: var(--walnut);
}

/* Card content */
.project-meta {
    padding: 1.375rem 1.5rem 1.625rem;
}

.project-tag {
    display: inline-block;
    font-size: .625rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: .625rem;
}

.project-title {
    font-family: var(--serif);
    font-size: 1.1875rem;
    font-weight: 600;
    color: var(--cream);
    line-height: 1.3;
    margin-bottom: .5rem;
}

.project-desc {
    font-size: .875rem;
    line-height: 1.72;
    color: var(--sand);
}

@media (max-width: 820px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}

/* ─── LIGHTBOX ─────────────────────────────── */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(28,17,8,.96);
    align-items: center;
    justify-content: center;
    padding: 1.5rem 5rem;
}

#lightbox.open { display: flex; }

.lb-close {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    background: rgba(245,239,224,.1);
    border: 1px solid rgba(245,239,224,.18);
    border-radius: 50%;
    color: var(--cream);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 501;
}

.lb-close:hover { background: rgba(245,239,224,.22); }

.lb-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.lb-img-wrap { position: relative; display: inline-block; }

.lb-img-wrap img {
    max-width: min(88vw, 1040px);
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.lb-badge {
    position: absolute;
    bottom: .75rem;
    left: .75rem;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .28rem .7rem;
    border-radius: 2px;
}

.lb-badge.lb-after  { background: rgba(196,123,43,.9); color: var(--walnut); }
.lb-badge.lb-before { background: rgba(28,17,8,.75);   color: var(--cream); backdrop-filter: blur(4px); }

.lb-prev,
.lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(245,239,224,.1);
    border: 1px solid rgba(245,239,224,.18);
    border-radius: 50%;
    color: var(--cream);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 501;
}

.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-prev:hover, .lb-next:hover { background: rgba(245,239,224,.22); }

.lb-counter {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: .75rem;
    letter-spacing: .1em;
    color: rgba(245,239,224,.45);
    font-weight: 500;
    z-index: 501;
}

/* Make portfolio images feel tappable */
.project-img img,
.ba-wrap img { cursor: zoom-in; }

@media (max-width: 600px) {
    #lightbox { padding: 1rem 3.5rem; }
    .lb-prev { left: .375rem; }
    .lb-next { right: .375rem; }
    .lb-prev, .lb-next { width: 40px; height: 40px; }
}
