/* ===== Design tokens ===== */
:root {
  --charcoal: #1e1e1e;
  --concrete: #e8e6e1;
  --concrete-dark: #d8d5cd;
  --steel: #35506b;
  --steel-dark: #253850;
  --yellow: #f2b705;
  --rebar: #c1440e;
  --white: #ffffff;
  --ink: #232323;
  --muted: #6b6b64;

  --font-display: 'Oswald', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--concrete);
  line-height: 1.5;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--steel);
  margin: 0 0 8px;
}

.muted { color: var(--muted); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: 2px;
}
.btn-primary {
  background: var(--yellow);
  color: var(--charcoal);
  font-weight: 600;
}
.btn-primary:hover { background: #ffc61a; }

/* ===== Header ===== */
.site-header {
  background: var(--charcoal);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 14px; height: 14px;
  background: var(--yellow);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  color: var(--white);
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}
.brand-name span { color: var(--yellow); }
.brand-name.light { color: var(--charcoal); }
.brand-name.light span { color: var(--steel); }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  color: var(--concrete);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.main-nav a:hover { color: var(--yellow); }

.hazard-strip {
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow),
    var(--yellow) 16px,
    var(--charcoal) 16px,
    var(--charcoal) 32px
  );
}

/* ===== Hero ===== */
.hero {
  background: var(--charcoal);
  color: var(--white);
  padding: 90px 0 100px;
  position: relative;
}
.hero-inner { max-width: 700px; }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 0.98;
  color: var(--white);
  margin-bottom: 18px;
}
.hero-sub {
  font-size: 1.05rem;
  color: #cfcfc9;
  max-width: 520px;
  margin-bottom: 32px;
}

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-dark {
  background: var(--steel-dark);
  color: var(--white);
}
.section-dark .eyebrow { color: var(--yellow); }
.section-dark h2 { color: var(--white); }
.section-head { margin-bottom: 40px; }

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.project-card {
  background: var(--white);
  border: 1px solid var(--concrete-dark);
  position: relative;
}
.project-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #cfcfc9;
}
.project-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.project-frame img:hover { transform: scale(1.04); }
.project-frame .corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 3px solid var(--yellow);
  z-index: 2;
}
.corner.tl { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.corner.tr { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.corner.bl { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.corner.br { bottom: 6px; right: 6px; border-left: none; border-top: none; }

.project-more-imgs {
  display: flex;
  gap: 6px;
  padding: 10px 14px 0;
  overflow-x: auto;
}
.project-more-imgs img {
  width: 52px; height: 40px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}
.project-more-imgs img:hover { border-color: var(--yellow); }

.project-info { padding: 14px 16px 18px; }
.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--steel);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 4px;
}
.project-info h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.project-info p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ===== Reviews ===== */
.reviews-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}
.review-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 20px;
}
.review-stars { color: var(--yellow); letter-spacing: 2px; margin-bottom: 8px; }
.review-comment { margin: 0 0 12px; }
.review-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a9b8c4;
}
.review-meta .project-ref { color: var(--yellow); }

.review-form-card {
  background: var(--white);
  color: var(--ink);
  padding: 32px;
  max-width: 560px;
  margin: 0 auto;
  border-top: 6px solid var(--yellow);
}
.review-form-card h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--steel);
}
.optional { text-transform: none; color: var(--muted); letter-spacing: 0; }
input[type="text"], select, textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--concrete-dark);
  background: var(--concrete);
  border-radius: 2px;
}
textarea { resize: vertical; }

.star-input { display: flex; gap: 4px; }
.star-input button {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: #ccc7ba;
  padding: 0;
  line-height: 1;
}
.star-input button.active { color: var(--yellow); }

.review-status {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.review-status.ok { color: #2f7a3f; }
.review-status.error { color: var(--rebar); }

/* ===== Footer ===== */
.site-footer {
  background: var(--charcoal);
  color: var(--concrete);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-inner .muted { color: #9a9a92; margin-top: 6px; }
.footer-contact p { margin: 2px 0; font-family: var(--font-mono); font-size: 0.85rem; }

/* ===== Lightbox ===== */
/* The hidden attribute must win when present, so display:flex only
   applies while the element is NOT hidden. Also add an explicit
   [hidden] rule as a safety net against any future rule collisions. */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.92);
  z-index: 100;
}
.lightbox[hidden] {
  display: none;
}
.lightbox:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
}

@media (max-width: 640px) {
  .main-nav { display: none; }
  .hero { padding: 60px 0 70px; }
  .section { padding: 56px 0; }
}
