/* ============================================================
   Coox & Son — shared stylesheet for project pages + projects index
   Mirrors the homepage (index.html) brand system so new pages feel native.
   Tokens kept in sync with index.html:
     --red #C8001C  --black #0E0E0E  --off #F5F2EE
     headings Barlow Condensed · body Outfit
   ============================================================ */

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

:root {
  --red:    #C8001C;
  --red-dk: #9E0016;
  --black:  #0E0E0E;
  --white:  #FFFFFF;
  --off:    #F5F2EE;
  --grey:   #5C5C5C;
  --light:  #E6E2DC;
  --font-h: 'Barlow Condensed', sans-serif;
  --font-b: 'Outfit', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-b); background: var(--white); color: var(--black); overflow-x: hidden; }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
section { padding: 80px 0; }

/* ── NAV (identical to homepage) ── */
nav { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 2px solid var(--black); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo img { height: 48px; width: auto; }
.nav-logo-text { font-family: var(--font-h); font-size: 1.1rem; font-weight: 700; line-height: 1.1; color: var(--black); letter-spacing: 0.02em; }
.nav-logo-text span { display: block; color: var(--red); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--black); text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--red); }
.nav-cta { background: var(--red); color: var(--white) !important; padding: 10px 20px; font-size: 0.78rem !important; transition: background 0.15s !important; }
.nav-cta:hover { background: var(--red-dk) !important; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--black); transition: all 0.2s; }
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--white); border-bottom: 2px solid var(--black); flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 0; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 24px; }
  .nav-cta { margin: 8px 24px; display: inline-block; }
}

/* ── BUTTONS (identical to homepage) ── */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-b); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 15px 28px; border: 2px solid transparent; cursor: pointer; transition: all 0.18s; }
.btn-red { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-red:hover { background: var(--red-dk); border-color: var(--red-dk); }
.btn-outline { background: transparent; color: var(--black); border-color: var(--black); }
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-light:hover { background: var(--white); color: var(--black); border-color: var(--white); }

/* ── SHARED SECTION HEADINGS ── */
.section-tag { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.section-tag::after { content: ''; display: block; width: 32px; height: 2px; background: var(--red); }
.section-title { font-family: var(--font-h); font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.01em; color: var(--black); margin-bottom: 16px; }
.section-sub { font-size: 0.95rem; color: var(--grey); line-height: 1.7; max-width: 560px; }

/* ── BREADCRUMB ── */
.breadcrumb { padding: 20px 0 0; font-size: 0.78rem; letter-spacing: 0.03em; color: var(--grey); }
.breadcrumb a { color: var(--grey); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { color: var(--black); font-weight: 500; }

/* ── PROJECT HERO ── */
.project-hero { padding: 44px 0 0; }
.project-hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); margin-bottom: 18px; }
.project-hero-eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--red); }
.project-hero h1 { font-family: var(--font-h); font-size: clamp(2.8rem, 6.5vw, 5.5rem); font-weight: 800; line-height: 0.92; letter-spacing: -0.01em; margin-bottom: 20px; }
.project-hero h1 em { font-style: normal; color: var(--red); }
.project-hero-sub { font-size: 1.05rem; color: var(--grey); line-height: 1.7; max-width: 660px; margin-bottom: 36px; }
.project-hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 2px solid var(--black); display: block; }

/* ── PROJECT FACTS STRIP ── */
.project-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; border: 2px solid var(--black); background: var(--black); }
.fact { background: var(--off); padding: 22px 24px; }
.fact:first-child { background: var(--red); }
.fact:first-child .fact-label, .fact:first-child .fact-value { color: var(--white); }
.fact-label { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); margin-bottom: 7px; }
.fact-value { font-family: var(--font-h); font-size: 1.2rem; font-weight: 700; line-height: 1.12; color: var(--black); }
@media (max-width: 640px) { .project-facts { grid-template-columns: 1fr 1fr; } }

/* ── NARRATIVE ── */
.project-narrative { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start; }
.project-narrative .lead { font-family: var(--font-h); font-size: 1.55rem; font-weight: 600; line-height: 1.28; color: var(--black); margin-bottom: 22px; }
.project-narrative p { font-size: 0.97rem; color: var(--grey); line-height: 1.8; margin-bottom: 18px; }
.project-narrative p strong { color: var(--black); font-weight: 600; }
.scope-box { background: var(--off); border-left: 4px solid var(--red); padding: 28px 30px; }
.scope-box h3 { font-family: var(--font-h); font-size: 1.15rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 18px; }
.scope-list { list-style: none; }
.scope-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--light); font-size: 0.92rem; color: var(--black); line-height: 1.4; }
.scope-list li:last-child { border-bottom: none; }
.scope-list .t { width: 18px; height: 18px; background: var(--red); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.scope-list .t svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 3; fill: none; }
@media (max-width: 768px) { .project-narrative { grid-template-columns: 1fr; gap: 36px; } }

/* ── PROJECT GALLERY ── */
.pgallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pgallery .g { aspect-ratio: 4/3; border: 2px solid var(--light); overflow: hidden; cursor: zoom-in; position: relative; background: var(--off); transition: border-color 0.2s, box-shadow 0.3s; }
.pgallery .g:hover { border-color: var(--red); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.pgallery .g img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(0.2,0,0.2,1); }
.pgallery .g:hover img { transform: scale(1.05); }
.pgallery .g.wide { grid-column: span 2; aspect-ratio: 16/9; }
@media (max-width: 600px) {
  .pgallery { grid-template-columns: 1fr 1fr; }
  .pgallery .g.wide { grid-column: auto; aspect-ratio: 4/3; }
}

/* ── FLAT / BEFORE BLOCKS (flat-by-flat project galleries) ── */
.gallery-intro { font-size: 1.02rem; color: var(--grey); line-height: 1.7; max-width: 640px; margin-bottom: 40px; }
.flat-block { margin-bottom: 56px; }
.flat-block:last-child { margin-bottom: 0; }
.flat-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--black); }
.flat-badge { flex-shrink: 0; width: 46px; height: 46px; background: var(--red); color: var(--white); font-family: var(--font-h); font-weight: 800; font-size: 1.35rem; display: flex; align-items: center; justify-content: center; }
.flat-badge.before { background: var(--black); }
.flat-head-text h2 { font-family: var(--font-h); font-size: 1.6rem; font-weight: 700; line-height: 1; letter-spacing: 0.01em; }
.flat-head-text p { font-size: 0.85rem; color: var(--grey); margin-top: 5px; line-height: 1.45; max-width: 560px; }
.flat-count { margin-left: auto; align-self: flex-start; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); white-space: nowrap; }
@media (max-width: 600px) { .flat-count { display: none; } .flat-badge { width: 40px; height: 40px; font-size: 1.2rem; } }

/* ── PROJECT CTA BAND ── */
.project-cta { background: var(--black); padding: 84px 0; text-align: center; }
.project-cta .section-tag { justify-content: center; }
.project-cta .section-title { color: var(--white); }
.project-cta p { color: rgba(255,255,255,0.6); max-width: 520px; margin: 0 auto 30px; line-height: 1.7; font-size: 0.97rem; }
.project-cta .btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── PROJECT CARDS (projects index + homepage) ── */
.project-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
@media (max-width: 768px) { .project-cards { grid-template-columns: 1fr; } }
.pcard { position: relative; display: block; text-decoration: none; color: var(--black); border: 2px solid var(--black); background: var(--white); overflow: hidden; transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s; }
.pcard:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0,0,0,0.14); }
.pcard-img { aspect-ratio: 3/2; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2,0,0.2,1); }
.pcard:hover .pcard-img img { transform: scale(1.06); }
.pcard-body { padding: 22px 24px 26px; border-top: 2px solid var(--black); }
.pcard-eyebrow { font-family: var(--font-h); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); margin-bottom: 9px; }
.pcard-title { font-family: var(--font-h); font-size: 1.75rem; font-weight: 700; line-height: 1.04; margin-bottom: 10px; }
.pcard-meta { font-size: 0.84rem; color: var(--grey); letter-spacing: 0.02em; line-height: 1.5; }
.pcard-arrow { margin-top: 16px; font-family: var(--font-h); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--black); display: inline-flex; align-items: center; gap: 8px; transition: gap 0.2s, color 0.2s; }
.pcard:hover .pcard-arrow { color: var(--red); gap: 12px; }

/* ── LIGHTBOX ── */
.lightbox { position: fixed; inset: 0; background: rgba(14,14,14,0.93); z-index: 300; display: none; align-items: center; justify-content: center; padding: 32px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; object-fit: contain; border: 2px solid var(--red); }
.lb-btn { position: absolute; background: var(--white); color: var(--black); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; transition: transform 0.2s, background 0.2s, color 0.2s; }
.lb-close { top: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.7rem; font-weight: 300; }
.lb-close:hover { transform: rotate(90deg); background: var(--red); color: var(--white); }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 48px; height: 56px; font-size: 1.8rem; }
.lb-prev { left: 24px; } .lb-next { right: 24px; }
.lb-prev:hover, .lb-next:hover { background: var(--red); color: var(--white); }
@media (max-width: 600px) { .lb-prev, .lb-next { width: 40px; height: 48px; } .lb-prev { left: 8px; } .lb-next { right: 8px; } }

/* ── FOOTER (identical to homepage) ── */
footer { background: var(--off); border-top: 3px solid var(--black); padding: 64px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr; gap: 32px; } }
.footer-brand-name { font-family: var(--font-h); font-size: 1.3rem; font-weight: 700; color: var(--black); margin-bottom: 4px; }
.footer-brand-name span { color: var(--red); }
.footer-brand p { font-size: 0.85rem; color: var(--grey); line-height: 1.7; max-width: 300px; margin-top: 12px; }
.footer-col h4 { font-family: var(--font-h); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--black); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { font-size: 0.85rem; color: var(--grey); padding: 5px 0; line-height: 1.4; }
.footer-contact a { color: var(--grey); text-decoration: none; font-size: 0.85rem; display: block; padding: 5px 0; transition: color 0.15s; }
.footer-contact a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid var(--light); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 0.75rem; color: var(--grey); }
.footer-bottom a { font-size: 0.75rem; color: var(--grey); text-decoration: none; }
.footer-bottom a:hover { color: var(--red); }

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 768px) { section { padding: 56px 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
