/* ==========================================================================
   HarbourProjects Ltd — Design System
   Piling, Foundation & Marine Engineering — Nigeria
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root{
  /* Color tokens */
  --ink: #14181D;
  --ink-soft: #262C33;
  --paper: #F6F4EE;
  --paper-dim: #EDE9DE;
  --steel: #5B6470;
  --steel-dim: #8C93A0;
  --amber: #B8791E;
  --amber-dim: #E4B36B;
  --rust: #7A4128;
  --line: #DAD5C8;
  --line-dark: #33393F;
  --white: #FFFFFF;
  --ok: #3F6B4A;

  /* Type */
  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  /* Scale */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem;

  --radius: 2px;
  --container: 1240px;
  --border: 1px solid var(--line);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--f-body);
  background:var(--paper);
  color:var(--ink);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  font-size:16px;
}
img{ max-width:100%; display:block; }
a{ color:inherit; }
h1,h2,h3,h4{ font-family:var(--f-display); margin:0 0 var(--s-4); line-height:1.12; letter-spacing:-.01em; }
h1{ font-size:clamp(2.4rem,5vw,4.2rem); font-weight:800; }
h2{ font-size:clamp(1.8rem,3.2vw,2.6rem); font-weight:700; }
h3{ font-size:1.35rem; font-weight:700; }
h4{ font-size:1.05rem; font-weight:600; }
p{ margin:0 0 var(--s-4); max-width:64ch; }
ul,ol{ margin:0 0 var(--s-4); padding-left:1.2em; }
.container{ max-width:var(--container); margin:0 auto; padding:0 var(--s-6); }
@media(max-width:640px){ .container{ padding:0 var(--s-5); } }

/* Focus visibility */
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:2px solid var(--amber); outline-offset:2px;
}
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

/* ---------- Skip link ---------- */
.skip-link{ position:absolute; left:-999px; top:0; background:var(--amber); color:var(--ink); padding:.75em 1.2em; z-index:200; }
.skip-link:focus{ left:var(--s-5); top:var(--s-5); }

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:100;
  background:rgba(246,244,238,.92); backdrop-filter:blur(6px);
  border-bottom:var(--border);
}
.header-row{ display:flex; align-items:center; justify-content:space-between; height:76px; }
.brand{ display:flex; align-items:center; gap:.6em; font-family:var(--f-display); font-weight:800; font-size:1.15rem; text-decoration:none; color:var(--ink); }
.brand-mark{ width:34px; height:34px; flex:none; }
.brand small{ display:block; font-family:var(--f-body); font-weight:500; font-size:.62rem; color:var(--steel); letter-spacing:.03em; }

.main-nav{ display:flex; align-items:center; gap:var(--s-6); }
.main-nav ul{ display:flex; gap:var(--s-5); list-style:none; margin:0; padding:0; }
.main-nav a{ text-decoration:none; font-size:.92rem; font-weight:500; color:var(--ink-soft); padding:.4em 0; border-bottom:2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"]{ color:var(--ink); border-color:var(--amber); }

.header-cta{ display:flex; align-items:center; gap:var(--s-3); }
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5em;
  font-family:var(--f-body); font-weight:600; font-size:.92rem;
  padding:.85em 1.5em; border-radius:var(--radius); text-decoration:none;
  border:1px solid var(--ink); cursor:pointer; white-space:nowrap;
  transition:background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary{ background:var(--ink); color:var(--paper); }
.btn-primary:hover{ background:var(--amber); border-color:var(--amber); color:var(--ink); }
.btn-ghost{ background:transparent; color:var(--ink); border-color:var(--line); }
.btn-ghost:hover{ border-color:var(--ink); }
.btn-wa{ background:var(--ok); border-color:var(--ok); color:var(--white); }
.btn-wa:hover{ background:#345a3e; }
.btn-sm{ padding:.6em 1.1em; font-size:.82rem; }

.nav-toggle{ display:none; background:none; border:1px solid var(--line); padding:.5em .7em; border-radius:var(--radius); cursor:pointer; }
.nav-toggle span{ display:block; width:20px; height:2px; background:var(--ink); margin:4px 0; }

@media(max-width:960px){
  .main-nav ul{ display:none; }
  .header-cta .btn-ghost{ display:none; }
  .nav-toggle{ display:block; }
}
@media(max-width:760px){
  .header-cta{ display:none; }
  .header-row{ height:64px; }
  .brand small{ display:none; }
}
@media(max-width:760px){
  .mobile-nav{ inset:64px 0 0 0; }
}

/* Mobile drawer */
.mobile-nav{ display:none; position:fixed; inset:76px 0 0 0; background:var(--paper); z-index:99; padding:var(--s-6); overflow-y:auto; }
.mobile-nav.open{ display:block; }
.mobile-nav ul{ list-style:none; margin:0 0 var(--s-6); padding:0; }
.mobile-nav li{ border-bottom:var(--border); }
.mobile-nav a{ display:block; padding:1em 0; font-family:var(--f-display); font-size:1.3rem; font-weight:600; text-decoration:none; color:var(--ink); }
.mobile-nav .header-cta{ flex-direction:column; align-items:stretch; }
.mobile-nav .btn{ width:100%; margin-bottom:var(--s-3); }

/* ---------- Buttons row ---------- */
.cta-row{ display:flex; flex-wrap:wrap; gap:var(--s-3); }

/* ---------- Hero ---------- */
.hero{ padding:var(--s-9) 0 var(--s-8); border-bottom:var(--border); position:relative; overflow:hidden; }
.hero-grid{ display:grid; grid-template-columns:1.15fr .85fr; gap:var(--s-8); align-items:end; }
.hero-eyebrow{ font-family:var(--f-mono); font-size:.78rem; color:var(--rust); margin-bottom:var(--s-4); }
.hero h1{ max-width:14ch; }
.hero-sub{ font-size:1.15rem; color:var(--ink-soft); max-width:46ch; }
.hero-diagram{ align-self:stretch; }
@media(max-width:900px){ .hero-grid{ grid-template-columns:1fr; } .hero-diagram{ order:-1; height:180px; } }

/* ---------- Section scaffolding ---------- */
.section{ padding:var(--s-8) 0; }
.section-border{ border-top:var(--border); }
.section-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:var(--s-6); margin-bottom:var(--s-7); flex-wrap:wrap; }
.section-head p{ margin:0; color:var(--steel); }
.section-dark{ background:var(--ink); color:var(--paper); }
.section-dark p{ color:#C4C9D0; }
.section-dark .stat-label{ color:#9FA6B0; }

/* ---------- Stat bar ---------- */
.stat-bar{ display:grid; grid-template-columns:repeat(4,1fr); border-top:var(--border); border-bottom:var(--border); }
.stat{ padding:var(--s-6) var(--s-5); border-left:var(--border); }
.stat:first-child{ border-left:none; }
.stat-num{ font-family:var(--f-mono); font-size:2.1rem; font-weight:600; color:var(--rust); display:block; }
.stat-label{ font-size:.82rem; color:var(--steel); margin-top:.3em; }
@media(max-width:760px){ .stat-bar{ grid-template-columns:repeat(2,1fr);} .stat:nth-child(3){ border-left:none; } }

/* ---------- Service cards ---------- */
.card-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--line); border:1px solid var(--line); }
.service-card{ background:var(--paper); padding:var(--s-6); text-decoration:none; color:var(--ink); display:flex; flex-direction:column; gap:var(--s-3); transition:background-color .15s; }
.service-card:hover{ background:var(--white); }
.service-card .idx{ font-family:var(--f-mono); font-size:.75rem; color:var(--steel-dim); }
.service-card h3{ margin:0; }
.service-card p{ margin:0; font-size:.92rem; color:var(--steel); }
.service-card .go{ margin-top:auto; font-size:.85rem; font-weight:600; color:var(--rust); }
@media(max-width:860px){ .card-grid{ grid-template-columns:1fr; } }

/* ---------- Differentiators ---------- */
.diff-list{ display:grid; grid-template-columns:repeat(2,1fr); gap:var(--s-6); }
.diff{ border-left:3px solid var(--amber); padding-left:var(--s-5); }
.diff h3{ margin-bottom:.4em; }
.diff p{ color:var(--steel); margin:0; }
@media(max-width:760px){ .diff-list{ grid-template-columns:1fr; } }

/* ---------- Projects ---------- */
.project-filter{ display:flex; flex-wrap:wrap; gap:var(--s-3); margin-bottom:var(--s-6); }
.project-filter select{
  font-family:var(--f-body); font-size:.88rem; padding:.65em 1em; border:1px solid var(--line);
  background:var(--white); border-radius:var(--radius); color:var(--ink);
}
.project-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s-5); }
.project-card{ text-decoration:none; color:var(--ink); border:var(--border); background:var(--white); display:flex; flex-direction:column; }
.project-thumb{ aspect-ratio:4/3; background:linear-gradient(135deg,var(--ink) 0%, var(--ink-soft) 60%, var(--steel) 130%); position:relative; overflow:hidden; }
.project-thumb svg{ position:absolute; inset:0; width:100%; height:100%; }
.project-tag{ position:absolute; top:var(--s-3); left:var(--s-3); background:var(--paper); font-family:var(--f-mono); font-size:.68rem; padding:.3em .6em; }
.project-body{ padding:var(--s-5); }
.project-body h3{ font-size:1.05rem; margin-bottom:.3em; }
.project-meta{ font-size:.8rem; color:var(--steel); font-family:var(--f-mono); }
.demo-flag{ display:inline-block; margin-top:.6em; font-size:.68rem; font-family:var(--f-mono); color:var(--rust); border:1px solid var(--rust); padding:.15em .5em; }
@media(max-width:900px){ .project-grid{ grid-template-columns:1fr 1fr; } }
@media(max-width:600px){ .project-grid{ grid-template-columns:1fr; } }

/* ---------- FAQ ---------- */
.faq-item{ border-top:var(--border); }
.faq-item:last-child{ border-bottom:var(--border); }
.faq-q{ width:100%; text-align:left; background:none; border:none; padding:var(--s-5) 0; display:flex; justify-content:space-between; align-items:center; gap:var(--s-4); cursor:pointer; font-family:var(--f-display); font-size:1.02rem; font-weight:600; color:var(--ink); }
.faq-q .plus{ font-family:var(--f-mono); font-size:1.2rem; color:var(--rust); flex:none; transition:transform .2s ease; }
.faq-item[open] .plus{ transform:rotate(45deg); }
.faq-a{ padding:0 0 var(--s-5); color:var(--steel); max-width:68ch; }
.faq-item summary::-webkit-details-marker{ display:none; }

/* ---------- Knowledge / Article cards ---------- */
.article-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s-5); }
.article-card{ text-decoration:none; color:var(--ink); border:var(--border); padding:var(--s-5); background:var(--white); display:flex; flex-direction:column; gap:var(--s-2); }
.article-cat{ font-family:var(--f-mono); font-size:.7rem; color:var(--rust); text-transform:uppercase; letter-spacing:.04em; }
.article-card h3{ font-size:1.05rem; }
.article-date{ margin-top:auto; font-size:.78rem; color:var(--steel); }
@media(max-width:860px){ .article-grid{ grid-template-columns:1fr; } }

/* ---------- Data table ---------- */
.table-scroll{ width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; margin-bottom:var(--s-6); }
table.spec-table{ width:100%; min-width:560px; border-collapse:collapse; font-size:.92rem; margin-bottom:0; }
.spec-table th,.spec-table td{ text-align:left; padding:.75em 1em; border-bottom:var(--border); white-space:nowrap; }
.spec-table th{ font-family:var(--f-mono); font-size:.75rem; text-transform:uppercase; letter-spacing:.03em; color:var(--steel); font-weight:600; }
.spec-table td.num{ font-family:var(--f-mono); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs{ font-size:.82rem; color:var(--steel); padding:var(--s-4) 0; }
.breadcrumbs a{ text-decoration:none; color:var(--steel); }
.breadcrumbs a:hover{ color:var(--ink); }
.breadcrumbs .sep{ margin:0 .5em; color:var(--line); }

/* ---------- Form ---------- */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--s-5); }
.field{ display:flex; flex-direction:column; gap:.4em; }
.field.full{ grid-column:1/-1; }
.field label{ font-size:.85rem; font-weight:600; }
.field input,.field select,.field textarea{
  font-family:var(--f-body); font-size:.95rem; padding:.85em 1em; border:1px solid var(--line);
  background:var(--white); border-radius:var(--radius); color:var(--ink);
}
.field textarea{ resize:vertical; min-height:120px; }
@media(max-width:700px){ .form-grid{ grid-template-columns:1fr; } }

/* ---------- Footer ---------- */
.site-footer{ background:var(--ink); color:#C4C9D0; padding:var(--s-8) 0 var(--s-6); }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr 1fr; gap:var(--s-6); }
.footer-col h4{ color:var(--paper); font-size:.85rem; text-transform:uppercase; letter-spacing:.04em; margin-bottom:1em; }
.footer-col ul{ list-style:none; padding:0; margin:0; }
.footer-col li{ margin-bottom:.6em; }
.footer-col a{ text-decoration:none; color:#C4C9D0; font-size:.9rem; }
.footer-col a:hover{ color:var(--amber-dim); }
.footer-brand p{ color:#9FA6B0; font-size:.9rem; }
.footer-bottom{ border-top:1px solid var(--line-dark); margin-top:var(--s-7); padding-top:var(--s-5); display:flex; justify-content:space-between; flex-wrap:wrap; gap:var(--s-3); font-size:.8rem; color:var(--steel-dim); }
.footer-bottom a{ color:#9FA6B0; text-decoration:none; margin-left:var(--s-4); }
.footer-col a, .footer-brand p{ overflow-wrap:anywhere; }
@media(max-width:900px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media(max-width:560px){ .footer-grid{ grid-template-columns:1fr; } }

/* ---------- WhatsApp float ---------- */
.wa-float{
  position:fixed; right:var(--s-5); bottom:var(--s-5); z-index:150;
  background:var(--ok); color:#fff; width:56px; height:56px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; text-decoration:none;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}
.wa-float svg{ width:26px; height:26px; }

/* ---------- Sticky mobile contact bar ---------- */
.mobile-cta-bar{ display:none; }
@media(max-width:760px){
  .mobile-cta-bar{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:140;
    background:var(--paper); border-top:var(--border); padding:var(--s-3) var(--s-4);
    gap:var(--s-3);
  }
  .mobile-cta-bar .btn{ flex:1; }
  body{ padding-bottom:74px; }
  .wa-float{ bottom:86px; }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero{ padding:var(--s-7) 0 var(--s-7); border-bottom:var(--border); }
.page-hero .kicker{ font-family:var(--f-mono); font-size:.78rem; color:var(--rust); margin-bottom:.8em; }
.page-hero p.lead{ font-size:1.1rem; color:var(--steel); max-width:60ch; }

/* ---------- Two column content + sidebar ---------- */
.content-layout{ display:grid; grid-template-columns:2fr 1fr; gap:var(--s-8); align-items:start; }
.content-layout .sidebar{ position:sticky; top:100px; border:var(--border); padding:var(--s-5); background:var(--white); }
.sidebar h4{ margin-bottom:.8em; }
.sidebar ul{ list-style:none; padding:0; margin:0 0 var(--s-5); }
.sidebar li{ border-bottom:var(--border); }
.sidebar a{ display:block; padding:.7em 0; text-decoration:none; font-size:.9rem; color:var(--ink-soft); }
.sidebar a:hover{ color:var(--rust); }
@media(max-width:900px){ .content-layout{ grid-template-columns:1fr; } .content-layout .sidebar{ position:static; } }

/* ---------- Utility ---------- */
.muted{ color:var(--steel); }
.mono{ font-family:var(--f-mono); }
.center{ text-align:center; }
.mb-0{ margin-bottom:0; }
.tag{ display:inline-block; font-family:var(--f-mono); font-size:.72rem; border:1px solid var(--line); padding:.25em .6em; border-radius:2px; color:var(--steel); }

/* ==========================================================================
   MOBILE HARDENING — 360 / 375 / 390 / 412 CSS VIEWPORTS
   Prevents layout overflow while preserving the desktop design.
   ========================================================================== */
html, body{ max-width:100%; }
body{ overflow-x:hidden; }
img, svg, video, iframe{ max-width:100%; }
button, input, select, textarea{ max-width:100%; }

/* Grid/flex children must be allowed to shrink below their content width. */
.header-row > *,
.hero-grid > *,
.section-head > *,
.content-layout > *,
.footer-grid > *,
.card-grid > *,
.project-grid > *,
.article-grid > *,
.diff-list > *,
.form-grid > *{ min-width:0; }

h1, h2, h3, h4, p, li, a, button, label, td, th{ overflow-wrap:anywhere; }

@media (max-width: 760px){
  .container{ width:100%; max-width:100%; padding-left:16px; padding-right:16px; }
  .header-row{ width:100%; height:64px; }
  .brand{ min-width:0; max-width:calc(100% - 52px); font-size:1rem; gap:.5em; }
  .brand-mark{ width:32px; height:32px; }
  .brand > span{ min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .nav-toggle{ flex:none; width:44px; height:40px; padding:.35em .55em; }
  .mobile-nav{ padding:16px; }
  .mobile-nav .header-cta{ display:flex; }

  .hero{ padding:48px 0 40px; }
  .hero-grid{ gap:28px; }
  .hero-diagram{ width:100%; min-width:0; height:180px; }
  .hero h1{ max-width:100%; font-size:clamp(2rem, 9.5vw, 3rem); }
  .hero-sub{ max-width:100%; font-size:1rem; }
  .cta-row{ width:100%; flex-direction:column; align-items:stretch; }
  .cta-row .btn{ width:100%; }

  .section{ padding:48px 0; }
  .section-head{ gap:20px; margin-bottom:32px; }
  .section-head > *{ max-width:100%; }

  .stat-bar{ grid-template-columns:1fr; }
  .stat{ border-left:none; border-bottom:var(--border); padding:20px 16px; }
  .stat:nth-child(3){ border-left:none; }
  .stat:last-child{ border-bottom:none; }

  .card-grid,
  .project-grid,
  .article-grid,
  .diff-list,
  .footer-grid{ grid-template-columns:1fr; }

  .service-card,
  .project-card,
  .article-card,
  .diff{ min-width:0; }

  .project-filter{ width:100%; }
  .project-filter select{ width:100%; min-width:0; }

  .form-grid{ grid-template-columns:1fr; }
  .field input,
  .field select,
  .field textarea{ width:100%; min-width:0; }

  .content-layout{ grid-template-columns:1fr; gap:32px; }
  .content-layout .sidebar{ width:100%; min-width:0; }

  .page-hero{ padding:36px 0; }
  .page-hero p.lead{ max-width:100%; font-size:1rem; }

  .footer-bottom{ flex-direction:column; align-items:flex-start; }
  .footer-bottom a{ margin-left:0; margin-right:16px; }

  .mobile-cta-bar{ padding:10px 12px; gap:8px; }
  .mobile-cta-bar .btn{ min-width:0; padding:.72em .55em; font-size:.76rem; line-height:1.2; }
}

@media (max-width: 380px){
  .container{ padding-left:14px; padding-right:14px; }
  .brand{ font-size:.94rem; }
  .brand-mark{ width:30px; height:30px; }
  .nav-toggle{ width:42px; }
  .hero{ padding-top:40px; }
  .hero h1{ font-size:clamp(1.9rem, 9.2vw, 2.5rem); }
  .hero-eyebrow{ font-size:.68rem; line-height:1.45; }
  .btn{ padding:.8em 1em; }
  .mobile-cta-bar .btn{ font-size:.72rem; padding:.7em .4em; }
}

@media (min-width: 381px) and (max-width: 430px){
  .container{ padding-left:16px; padding-right:16px; }
}

/* Tables remain scrollable inside their own box rather than expanding the page. */
.table-scroll{ max-width:100%; overflow-x:auto; }
.table-scroll table{ margin-right:0; }

/* Never let long URLs, email addresses or technical strings create page-wide overflow. */
main, header, footer, nav, section, article, aside, div{ min-width:0; }

/* Enquiry form status */
.form-status { margin-top: var(--s-4); padding: var(--s-4); border-radius: 6px; border: 1px solid #cfd8dc; background: #f4f8f6; }
.form-status.is-error { background: #fbf3f2; border-color: #e3b9b4; }
.form-status p { margin: var(--s-2) 0 var(--s-3); }
.form-status[hidden] { display: none; }

/* Header dropdown (Projects > Gallery) */
.main-nav .has-sub{ position:relative; }
.main-nav .has-sub > a::after{ content:"\25BE"; font-size:.7em; margin-left:.35em; opacity:.7; }
.main-nav .sub-menu{ display:none; position:absolute; top:100%; left:-14px; min-width:190px; flex-direction:column; gap:0; padding:6px 0; background:var(--paper); border:var(--border); box-shadow:0 8px 24px rgba(20,24,29,.08); z-index:120; }
.main-nav .sub-menu::before{ content:""; position:absolute; top:-14px; left:0; right:0; height:14px; }
.main-nav .has-sub:hover .sub-menu,
.main-nav .has-sub:focus-within .sub-menu{ display:flex; }
.main-nav .sub-menu a{ display:block; padding:.65em 1em; border-bottom:0; white-space:nowrap; }
.main-nav .sub-menu a:hover{ background:rgba(184,121,30,.10); }
.mobile-nav li.sub a{ padding-left:1.1em; font-size:1.1rem; font-weight:500; color:var(--ink-soft); }
.mobile-nav li.sub a::before{ content:"\2014\00a0"; color:var(--amber); }

/* Gallery */
.gallery-filter{ display:flex; flex-wrap:wrap; gap:var(--s-2); margin-bottom:var(--s-6); }
.gallery-filter button{ font:inherit; font-size:.88rem; font-weight:600; padding:.55em 1.1em; border:var(--border); background:var(--white); color:var(--ink); cursor:pointer; border-radius:var(--radius); }
.gallery-filter button[aria-pressed="true"]{ background:var(--ink); color:var(--paper); border-color:var(--ink); }
.gallery-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--s-4); }
.gallery-item{ position:relative; padding:0; border:var(--border); background:var(--white); cursor:zoom-in; display:block; overflow:hidden; text-align:left; }
.gallery-item img{ display:block; width:100%; aspect-ratio:4/3; object-fit:cover; }
.gallery-item figcaption{ padding:.7em .9em; font-size:.85rem; color:var(--ink-soft); border-top:var(--border); }
.gallery-item[hidden]{ display:none; }
@media(max-width:900px){ .gallery-grid{ grid-template-columns:repeat(2,1fr); } }
@media(max-width:520px){ .gallery-grid{ grid-template-columns:1fr; } }
.lightbox{ position:fixed; inset:0; z-index:300; background:rgba(20,24,29,.92); display:none; align-items:center; justify-content:center; flex-direction:column; padding:var(--s-5); }
.lightbox.open{ display:flex; }
.lightbox img{ max-width:min(92vw,1100px); max-height:76vh; background:var(--paper); }
.lightbox p{ color:#fff; margin:var(--s-4) 0 0; text-align:center; }
.lightbox button{ position:absolute; background:rgba(255,255,255,.12); color:#fff; border:0; font-size:1.8rem; width:48px; height:48px; cursor:pointer; border-radius:50%; }
.lightbox .lb-close{ top:16px; right:16px; } .lightbox .lb-prev{ left:16px; top:50%; } .lightbox .lb-next{ right:16px; top:50%; }

/* Launch fix: primary button was dark-on-dark inside dark sections */
.section-dark .btn-primary{background:var(--paper);color:var(--ink);border-color:var(--paper)}
.section-dark .btn-primary:hover{background:var(--amber);border-color:var(--amber);color:var(--ink)}

/* Article tables: allow long text to wrap */
.spec-table.article-table{ min-width:480px; }
.spec-table.article-table th,.spec-table.article-table td{ white-space:normal; vertical-align:top; }
.spec-table.article-table tbody th{ font-family:var(--f-body); text-transform:none; letter-spacing:0; font-size:.92rem; color:var(--ink); font-weight:600; }
.content-layout ul,.content-layout ol{ margin:0 0 var(--s-5) 1.25em; padding:0; max-width:64ch; }
.content-layout li{ margin-bottom:.4em; }
.sidebar a.btn-primary{ color:var(--paper); }
.sidebar a.btn-primary:hover{ color:var(--ink); }
.content-layout h2{ margin-top:var(--s-7); }
.content-layout > div > h2:first-child{ margin-top:0; }

/* Fix: sidebar link styles were overriding button padding/alignment */
.sidebar a.btn{ display:flex; align-items:center; justify-content:center; text-align:center; padding:.85em 1.5em; font-size:.92rem; line-height:1.4; border-bottom:1px solid var(--ink); }
.sidebar a.btn-wa,.sidebar a.btn-wa:hover{ color:#fff; }
.sidebar a.btn-ghost,.sidebar a.btn-ghost:hover{ color:var(--ink); }
.sidebar a.btn + a.btn{ margin-top:var(--s-3); }
/* Mobile bottom bar: a little more side padding */
@media(max-width:480px){ .mobile-cta-bar .btn{ padding:.72em .8em; } }
@media(max-width:360px){ .mobile-cta-bar .btn{ padding:.7em .55em; } }

/* Project cards with real photos */
.project-thumb img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.project-desc{ font-size:.9rem; color:var(--steel); margin:.6em 0 0; }
.project-card:hover{ border-color:var(--ink); }
.facts{ list-style:none; margin:0 0 var(--s-5); padding:0; max-width:64ch; }
.facts li{ padding:.5em 0; border-bottom:var(--border); margin:0; }
.facts li strong{ display:inline-block; min-width:9.5em; }
