/* ═══════════════════════════════════════════════
   wbd3.com — William Boyle Demeritt III
   Dark editorial · Playfair Display + Inter · gold accent
   ═══════════════════════════════════════════════ */
:root {
  --bg: #0a0d12;
  --bg-soft: #0f141c;
  --panel: #111722;
  --card: #151c26;
  --line: #222b37;
  --ink: #eae6db;
  --muted: #9aa3af;
  --gold: #c9a24b;
  --gold-2: #e5c876;
  --gold-dim: rgba(201, 162, 75, .14);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --nav-h: 68px;
  --radius: 10px;
  --maxw: 1160px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: .2px; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold-2); }
h2 { font-size: clamp(30px, 4.2vw, 46px); margin-bottom: 18px; }
.eyebrow { font: 600 12px/1 var(--sans); text-transform: uppercase; letter-spacing: .22em; color: var(--gold); margin-bottom: 14px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #10131a; padding: 8px 14px; border-radius: 6px; z-index: 200; }
.skip:focus { left: 8px; }
.btn { display: inline-block; padding: 13px 26px; border-radius: 8px; font: 600 14px/1 var(--sans); letter-spacing: .04em; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #10131a; box-shadow: 0 6px 22px rgba(201, 162, 75, .25); }
.btn-gold:hover { color: #10131a; box-shadow: 0 8px 28px rgba(201, 162, 75, .4); }
.btn-ghost { border: 1px solid rgba(234, 230, 219, .28); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.sec-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.sec-ctas.center { justify-content: center; }
.lede { color: var(--muted); max-width: 64ch; font-size: 17px; }
.pull { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--gold-2); border-left: 2px solid var(--gold); padding-left: 18px; margin-top: 26px; }

/* ── Nav ── */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h); background: rgba(10, 13, 18, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s ease, background .2s ease; }
.nav.scrolled { background: rgba(10, 13, 18, .94); border-bottom-color: var(--line); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-family: var(--serif); font-weight: 800; font-size: 24px; color: var(--ink); letter-spacing: .02em; line-height: 1.15; }
.brand .brand-dot { color: var(--gold); }
.brand .brand-sub { display: block; font: 600 9px/1 var(--sans); letter-spacing: .34em; color: var(--muted); margin-top: 3px; }
.brand:hover { color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font: 500 13.5px/1 var(--sans); letter-spacing: .04em; padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease; }
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--gold); }
.nav-links .nav-cta { color: var(--gold); border: 1px solid rgba(201, 162, 75, .5); border-radius: 999px; padding: 8px 16px; }
.nav-links .nav-cta:hover { background: var(--gold-dim); border-color: var(--gold); color: var(--gold-2); }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }

/* ── Hero ── */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; transform: scale(1.04); animation: heroZoom 18s ease-out forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,13,18,.55) 0%, rgba(10,13,18,.62) 40%, var(--bg) 98%); }
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: calc(var(--nav-h) + 40px) 24px 0; }
.hero h1 { font-size: clamp(44px, 7.4vw, 88px); margin: 0 0 22px; max-width: 18ch; }
.hero-sub { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 56ch; margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-pillars { position: relative; z-index: 2; max-width: var(--maxw); margin: 64px auto 0; width: 100%; padding: 0 24px 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hero-pillars a { background: rgba(15, 20, 28, .92); backdrop-filter: blur(6px); padding: 22px 24px; color: var(--ink); font: 600 15px/1.3 var(--sans); display: flex; align-items: center; gap: 16px; transition: background .2s ease; }
.hero-pillars a:hover { background: var(--panel); color: var(--gold-2); }
.pillar-num { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 26px; line-height: 1; }

/* ── About ── */
.about { padding: 110px 0 90px; }
.about .grid-2 p { color: var(--muted); margin-bottom: 16px; }
.about .grid-2 p:last-child { margin-bottom: 0; }
.stats { max-width: var(--maxw); margin: 64px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 34px 20px 34px 0; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 28px; }
.stat strong { display: block; font-family: var(--serif); font-size: 40px; color: var(--gold-2); line-height: 1; margin-bottom: 8px; }
.stat span { color: var(--muted); font-size: 13.5px; }
.cred-band { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 44px; }
.cred-band span { color: var(--muted); font-size: 13.5px; letter-spacing: .02em; }
.cred-band span::before { content: '◆'; color: var(--gold); margin-right: 9px; font-size: 9px; vertical-align: 1px; }

/* ── Film section ── */
.film { padding: 110px 0 120px; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 12%, var(--bg-soft) 88%, var(--bg) 100%); }
.sec-head { margin-bottom: 46px; }
.sec-head h2 { max-width: 20ch; }
.sec-head .lede { margin-top: 6px; }
.cred-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.cred-tab { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 10px 18px; font: 600 13px/1 var(--sans); cursor: pointer; transition: all .18s ease; }
.cred-tab:hover { color: var(--ink); border-color: var(--gold-dim); }
.cred-tab.active { background: var(--gold); border-color: var(--gold); color: #10131a; }
.tab-count { opacity: .65; margin-left: 7px; font-size: 11px; }
.cred-panel { display: none; }
.cred-panel.active { display: block; animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.credit-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.credit { background: var(--card); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.credit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.credit h4 { font-family: var(--serif); font-size: 17.5px; font-weight: 700; color: var(--ink); }
.credit .role { font: 600 10.5px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.credit-meta { color: var(--muted); font-size: 13px; }
.credit .prod { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 3px 9px; align-self: flex-start; }

/* ── Gallery ── */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 46px; }
.g-item { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); aspect-ratio: 3/2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.g-item:hover img { transform: scale(1.05); }
.g-item figcaption { position: absolute; inset: auto 0 0 0; padding: 26px 14px 10px; background: linear-gradient(180deg, transparent, rgba(10,13,18,.88)); color: var(--ink); font: 500 12.5px/1.35 var(--sans); letter-spacing: .03em; }

/* ── Government ── */
.gov { padding: 120px 0; }
.gov h2 { max-width: 24ch; }
.gov .grid-2 p { color: var(--muted); margin-bottom: 16px; }
.gov strong { color: var(--ink); }
.gov-list { list-style: none; display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 30px; }
.gov-list li { background: var(--card); padding: 20px 22px; }
.gov-list strong { display: block; font: 700 15px/1.3 var(--sans); color: var(--gold-2); margin-bottom: 5px; }
.gov-list span { color: var(--muted); font-size: 14px; }

/* ── Marketing ── */
.marketing { padding: 110px 0 120px; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 10%, var(--bg-soft) 90%, var(--bg) 100%); }
.clients { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 8px 0 44px; }
.clients span { font-family: var(--serif); font-size: 21px; letter-spacing: .08em; color: var(--muted); transition: color .2s ease; }
.clients span:hover { color: var(--gold-2); }
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc { background: var(--card); padding: 26px 26px 30px; }
.svc h3 { font-size: 20px; margin-bottom: 10px; }
.svc p { color: var(--muted); font-size: 14.5px; }

/* ── Timeline ── */
.timeline-sec { padding: 120px 0 130px; }
.timeline { list-style: none; position: relative; max-width: 860px; margin: 54px auto 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--gold) 0%, var(--gold) 92%, transparent 100%); transform: translateX(-50%); }
.tl-item { position: relative; display: grid; grid-template-columns: 1fr 120px 1fr; align-items: start; margin-bottom: 34px; }
.tl-item:nth-child(odd) .tl-card { grid-column: 1; grid-row: 1; text-align: right; }
.tl-item:nth-child(odd) .tl-date { grid-column: 2; grid-row: 1; }
.tl-item:nth-child(even) .tl-date { grid-column: 2; grid-row: 1; }
.tl-item:nth-child(even) .tl-card { grid-column: 3; grid-row: 1; }
.tl-dot { position: absolute; left: 50%; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--gold); transform: translateX(-50%); z-index: 1; }
.tl-date { font: 600 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); padding-top: 2px; text-align: center; }
.tl-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.tl-card p { color: var(--ink); font-size: 15px; }
.tl-birth .tl-card, .tl-today .tl-card { border-color: rgba(201, 162, 75, .45); background: var(--gold-dim); }
.tl-birth .tl-card p, .tl-today .tl-card p { color: var(--gold-2); font-family: var(--serif); font-style: italic; font-size: 16.5px; }

/* ── Contact ── */
.contact { padding: 120px 0 130px; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 12%, var(--bg-soft) 88%, var(--bg) 100%); }
.contact h2 { max-width: 18ch; }
.contact .grid-2 > div > p { color: var(--muted); margin-bottom: 26px; }
.contact-direct { list-style: none; display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.contact-direct li { background: var(--card); padding: 14px 20px; display: flex; justify-content: space-between; gap: 16px; }
.contact-direct span { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; padding-top: 2px; }
.contact-direct a { font-weight: 600; }
.contact-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.contact-form label { display: block; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; margin: 16px 0 6px; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; background: #0d1218; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 12px 14px; font: 400 15px/1.4 var(--sans); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--gold); }
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form .btn { margin-top: 22px; border: 0; cursor: pointer; }
.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; width: 0; }
.form-status { margin-top: 14px; font-size: 14px; min-height: 20px; }
.form-status.ok { color: #9fe0ad; }
.form-status.err { color: #f0a49a; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--line); padding: 56px 0 44px; }
.foot-main { display: flex; gap: 40px; align-items: flex-start; margin-bottom: 30px; }
.foot-main p { color: var(--muted); font-size: 13.5px; max-width: 60ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 26px; }
.foot-links a { color: var(--muted); font-size: 13.5px; }
.foot-links a:hover { color: var(--gold-2); }
.foot-legal { color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 22px; }

/* ── Reveal (progressive enhancement: only hidden with .js) ── */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: 0; padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); padding-left: 28px; }
  .stat:nth-child(3) { border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .services { grid-template-columns: repeat(2, 1fr); }
  .credit-list { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero-pillars { grid-template-columns: 1fr; }
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; background: rgba(10,13,18,.97); padding: 18px 24px 26px; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--line); transform: translateY(-110%); transition: transform .25s ease; }
  .nav-links.open { transform: none; }
  .nav-burger { display: block; }
  .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .timeline::before { left: 8px; }
  .tl-item { grid-template-columns: 32px 1fr; gap: 0 12px; }
  .tl-item:nth-child(odd) .tl-card, .tl-item:nth-child(even) .tl-card { grid-column: 2; grid-row: auto; text-align: left; }
  .tl-item:nth-child(odd) .tl-date, .tl-item:nth-child(even) .tl-date { grid-column: 2; grid-row: 1; text-align: left; }
  .tl-item .tl-card { grid-row: 2 !important; }
  .tl-dot { left: 8px; transform: translateX(-50%); }
  .tl-date { padding-top: 0; margin-bottom: 8px; }
}
@media (max-width: 600px) {
  .services { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .hero-pillars a { padding: 18px; }
  .hero h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}
