/* Layout: dark industrial site, emerald accent, full-width bands with a centered 1200px container. Single dark look, as on the current site. */
:root {
  --bg: hsl(216 16% 12%);
  --bg-2: hsl(217 16% 16%);
  --bg-3: hsl(217 16% 19%);
  --fg: hsl(0 0% 96%);
  --muted: hsl(215 19% 66%);
  --line: hsl(217 16% 24%);
  --accent: hsl(160 84% 39%);
  --accent-hi: hsl(160 84% 46%);
  --accent-ink: #fff;
  --error: hsl(0 72% 66%);
  --font-head: "Barlow", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 8px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band { padding-block: clamp(56px, 8vw, 96px); }
.band-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--accent); }
.lede { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 16px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin-bottom: 40px; }
.section-head .stack { max-width: 720px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 6px; font: 600 0.95rem/1 var(--font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { border-color: var(--line); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav .btn { color: var(--accent-ink); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 6px; width: 44px; height: 44px; cursor: pointer; }
.menu-btn svg { margin: auto; }
@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .nav { display: none; position: absolute; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav .btn { margin-top: 16px; border-bottom: 0; }
}

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, hsl(216 16% 9% / .95) 0%, hsl(216 16% 9% / .82) 45%, hsl(216 16% 9% / .45) 100%); }
.hero .wrap { padding-block: clamp(72px, 12vw, 150px); display: grid; gap: 24px; max-width: 1200px; }
.hero h1 { max-width: 18ch; }
.page-hero { border-bottom: 1px solid var(--line); background: radial-gradient(1200px 400px at 85% -10%, hsl(160 84% 39% / .12), transparent 60%), var(--bg); }
.page-hero .wrap { padding-block: clamp(56px, 9vw, 104px); display: grid; gap: 18px; }

/* Cards and grids */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.card p { color: var(--muted); }
.icon-chip { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: hsl(160 84% 39% / .14); color: var(--accent); }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: start; color: var(--fg); }
.checks li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; background: hsl(160 84% 39% / .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%2310b981' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

/* Project cards */
.pcard { display: grid; grid-template-rows: auto 1fr; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: border-color .15s, transform .15s; min-width: 0; }
.pcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.pcard-img { aspect-ratio: 4 / 3; width: 100%; max-width: 100%; object-fit: cover; background: var(--bg-3); }
.pcard-body { padding: 20px 22px 24px; display: grid; gap: 8px; align-content: start; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .82rem; color: var(--muted); }
.pcard p { color: var(--muted); font-size: .95rem; }
.pcard .link-arrow { margin-top: 6px; font-size: .92rem; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line); color: var(--fg); }
.badge-accent { border-color: hsl(160 84% 39% / .5); color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px; }
.filter { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 .92rem var(--font-body); cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filters .count { margin-left: auto; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* Steps */
.steps { counter-reset: s; }
.step-num { font-family: var(--font-head); font-size: 2.2rem; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-2); padding: 28px; display: grid; gap: 4px; }
.stat b { font-family: var(--font-head); font-size: 2.6rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .92rem; }

/* CTA band */
.cta { background: linear-gradient(135deg, hsl(160 84% 22%), hsl(190 60% 18%)); border-radius: 12px; padding: clamp(32px, 6vw, 56px); display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: center; }
.cta p { color: hsl(0 0% 100% / .82); }
.cta .checks li { color: #fff; }
.cta .btn-primary { background: #fff; color: hsl(160 84% 20%); }
.cta .btn-primary:hover { background: hsl(160 60% 92%); }

/* Contact */
.contact-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.info-list { display: grid; gap: 20px; }
.info-item { display: grid; gap: 2px; }
.info-item .label { font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.info-item .val { font-size: 1.02rem; word-break: break-word; }
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .9rem; font-weight: 500; }
.field .hint { font-size: .82rem; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: 400 1rem var(--font-body); }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px hsl(160 84% 39% / .25); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-radius: 6px; font-size: .95rem; }
.form-status.ok { background: hsl(160 84% 39% / .14); border: 1px solid hsl(160 84% 39% / .5); }
.form-status.err { background: hsl(0 72% 50% / .12); border: 1px solid hsl(0 72% 60% / .5); color: var(--error); }
.form-status.note { background: var(--bg-3); border: 1px solid var(--line); color: var(--muted); }

/* Project detail */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--fg); }
.detail { display: grid; gap: 40px; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 920px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.detail-main { display: grid; gap: 36px; min-width: 0; }
.detail-block { display: grid; gap: 10px; }
.detail-block p { color: var(--muted); max-width: 70ch; }
.label-sm { font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.specs { display: grid; gap: 0; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); font-size: .9rem; }
.specs dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 96px); }
@media (max-width: 920px) { .aside { position: static; } }
.awards { display: grid; gap: 10px; }
.award { padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-3); }
.award b { display: block; }
.award span { color: var(--muted); font-size: .9rem; }

/* Gallery */
.gallery { display: grid; gap: 12px; }
.g-stage { position: relative; background: #0b0e12; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; max-width: 100%; }
.g-stage img, .g-stage video { width: 100%; height: 100%; object-fit: contain; }
.g-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid hsl(0 0% 100% / .2); background: hsl(216 16% 9% / .7); color: #fff; cursor: pointer; display: grid; place-items: center; }
.g-btn:hover { background: var(--accent); border-color: var(--accent); }
.g-prev { left: 12px; } .g-next { right: 12px; }
.g-bar { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-cap { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.g-thumb { flex: none; width: 88px; height: 64px; border-radius: 4px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--bg-3); cursor: pointer; opacity: .65; }
.g-thumb[aria-current="true"] { border-color: var(--accent); opacity: 1; }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb .vid { width: 100%; height: 100%; display: grid; place-items: center; color: var(--accent); font-size: .72rem; font-weight: 600; letter-spacing: .08em; }
.pn { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.pn a { display: grid; gap: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--bg-2); }
.pn a:hover { border-color: var(--accent); }
.pn .next { text-align: right; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: hsl(216 16% 10%); }
.site-footer .wrap { padding-block: 56px 32px; display: grid; gap: 40px; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); } }
.foot-grid h4 { font-family: var(--font-body); font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { text-decoration: none; color: var(--fg); }
.foot-grid a:hover { color: var(--accent); }
.foot-brand { display: grid; gap: 14px; align-content: start; }
.foot-brand img { height: 48px; width: auto; }
.foot-brand p { color: var(--muted); max-width: 40ch; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.foot-bottom .badges { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-contact { display: grid; gap: 12px; }
.foot-contact .label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; }
.foot-contact .val { word-break: break-word; }

.preview-bar { background: hsl(38 92% 50%); color: hsl(30 60% 12%); font-size: .86rem; font-weight: 600; text-align: center; padding: 8px 16px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Layout fixes */
.pcard { align-content: start; }
.pcard-img { height: auto; align-self: start; }
.gallery, .detail-main > *, .cta > *, .contact-grid > * { min-width: 0; }
.g-media { width: 100%; height: 100%; }
.checks li { min-width: 0; overflow-wrap: anywhere; }
.gallery { grid-template-columns: minmax(0, 1fr); }
.g-pos { white-space: nowrap; flex: none; }
.stat b.stat-word { font-size: clamp(1.9rem, 3vw, 2.3rem); }
