/* ============================================================
   CONRED Inc. — main stylesheet
   Palette drawn from supplied logo artwork:
   charcoal #222528 · red #DB262D · white · concrete grey
   ============================================================ */

:root {
  --white: #ffffff;
  --charcoal: #202427;
  --charcoal-deep: #16181b;
  --red: #e31e24;
  --concrete: #ededeb;
  --grey: #6f7276;
  --line: #dcdcd9;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 4vw, 64px);
  --header-h: 84px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Focus visibility */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.on-dark :focus-visible, .hero :focus-visible, .menu-overlay :focus-visible, .lightbox :focus-visible {
  outline-color: var(--white);
}

/* Skip link */
.skip-link {
  position: absolute; left: var(--pad); top: -60px; z-index: 200;
  background: var(--charcoal); color: var(--white);
  padding: 10px 18px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---- Datum mark: small red tick echoing the logo slash ---- */
.datum {
  display: inline-block;
  width: 14px; height: 10px;
  background: var(--red);
  transform: skewX(-18deg);
  margin-right: 12px;
  flex: none;
}

/* ---- Labels & type ---- */
.label {
  display: flex; align-items: center;
  font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--grey);
}
.on-dark .label { color: rgba(255, 255, 255, .75); }

h1, h2, h3 {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .015em;
  line-height: 1.06;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--pad);
}
.site-header.solid {
  position: sticky;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; }
.brand img { height: 22px; width: auto; }
@media (min-width: 720px) { .brand img { height: 26px; } }

.nav-desktop { display: none; }
@media (min-width: 900px) {
  .nav-desktop { display: flex; gap: 40px; align-items: center; }
  .nav-desktop a {
    font-size: 13px; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease;
  }
  .nav-desktop a:hover { border-color: currentColor; }
  .nav-desktop a[aria-current="page"] { border-color: var(--red); }
  .hero-header .nav-desktop a { color: var(--white); }
}

/* Hamburger */
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
  width: 44px; height: 44px; align-items: flex-end;
  z-index: 130;
}
.nav-toggle span {
  display: block; height: 2px; width: 26px;
  background: var(--charcoal);
  transition: transform .25s ease, opacity .2s ease, width .25s ease;
}
.hero-header .nav-toggle span, .nav-toggle.open span { background: var(--white); }
.nav-toggle span:nth-child(2) { width: 20px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); width: 26px; }
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* Full-screen mobile menu */
.menu-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: var(--charcoal-deep);
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility 0s .3s;
}
.menu-overlay.open { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.menu-overlay nav { display: flex; flex-direction: column; gap: 8px; }
.menu-overlay a {
  color: var(--white);
  font-size: clamp(28px, 8vw, 44px);
  font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  padding: 10px 0;
  display: flex; align-items: center;
}
.menu-overlay a .datum { opacity: 0; transition: opacity .2s ease; height: 12px; width: 18px; }
.menu-overlay a:hover .datum,
.menu-overlay a[aria-current="page"] .datum { opacity: 1; }
.menu-overlay .menu-foot {
  position: absolute; bottom: 32px; left: var(--pad);
  color: rgba(255,255,255,.55); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
body.menu-locked { overflow: hidden; }
/* Keep the toggle clickable above the open overlay; hide the light-page brand under it */
body.menu-locked .site-header { z-index: 130; background: transparent; border-color: transparent; }
body.menu-locked .site-header .brand,
body.menu-locked .nav-desktop { visibility: hidden; }

/* ============================================================
   Homepage hero slideshow
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
  background: var(--charcoal-deep);
}

.slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
  visibility: hidden;
}
.slide.active { opacity: 1; visibility: visible; z-index: 1; }

.slide picture, .slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Light scrim only where text sits — photos stay visible */
.slide::after {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to top, rgba(16,18,20,.55) 0%, rgba(16,18,20,0) 45%),
    linear-gradient(to bottom, rgba(16,18,20,.35) 0%, rgba(16,18,20,0) 22%);
  pointer-events: none;
}

.slide-link { position: absolute; inset: 0; z-index: 3; display: block; }

.slide-content {
  position: absolute; z-index: 4;
  left: var(--pad); right: var(--pad);
  bottom: clamp(88px, 14vh, 140px);
  color: var(--white);
  pointer-events: none;
}
.slide-content .label { margin-bottom: 14px; }
.slide-content h1, .slide-content h2 {
  color: var(--white);
  font-size: clamp(34px, 6vw, 76px);
  max-width: 14ch;
}
.view-work {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 22px;
  color: var(--white);
  font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.5);
  padding-bottom: 6px;
  transition: border-color .2s ease;
}
.view-work:hover { border-color: var(--white); }
.view-work .arrow { transition: transform .25s ease; }
.slide-link:hover ~ .slide-content .view-work .arrow,
.view-work:hover .arrow { transform: translateX(5px); }

.slide img.pos-up { object-position: center 40%; }

/* Slide controls */
.hero-controls {
  position: absolute; z-index: 5;
  left: var(--pad); right: var(--pad); bottom: 32px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--white);
}
.hero-index { display: flex; align-items: center; gap: 16px; }
.hero-count { font-size: 12px; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.hero-bars { display: flex; gap: 8px; }
.hero-bars button {
  width: 34px; height: 14px;
  display: flex; align-items: center;
  padding: 0;
}
.hero-bars button::before {
  content: "";
  display: block; width: 100%; height: 2px;
  background: rgba(255,255,255,.45);
  transition: background .3s ease;
}
.hero-bars button.active::before { background: var(--red); height: 3px; }
.hero-arrows { display: flex; gap: 6px; }
.hero-arrows button {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.35);
  transition: border-color .2s ease, background .2s ease;
}
.hero-arrows button:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.hero-arrows svg { width: 18px; height: 18px; }
@media (max-width: 719px) { .hero-arrows { display: none; } }

/* ============================================================
   Interior page scaffolding
   ============================================================ */
.page-head {
  padding: calc(48px) var(--pad) 40px;
  border-bottom: 1px solid var(--line);
}
.page-head .label { margin-bottom: 16px; }
.page-head h1 { font-size: clamp(34px, 5.4vw, 64px); }
.page-head .scope {
  margin-top: 22px;
  max-width: 62ch;
  color: var(--grey);
  font-size: 15px;
  line-height: 1.7;
}

main { min-height: 50vh; }

/* ============================================================
   Gallery grid
   ============================================================ */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 3vw, 44px);
  padding: clamp(28px, 4vw, 64px) var(--pad) clamp(48px, 6vw, 96px);
}
@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(12, 1fr); align-items: start; }
  .g-wide  { grid-column: span 7; }
  .g-std   { grid-column: span 5; }
  .g-half  { grid-column: span 6; }
  .g-tall  { grid-column: span 4; }
  .g-fill  { grid-column: span 8; }
}
.gallery figure { margin: 0; }
.gallery button.g-item {
  display: block; width: 100%; padding: 0;
  overflow: hidden;
  background: var(--concrete);
}
.gallery img {
  width: 100%;
  transition: transform .5s ease, opacity .4s ease;
}
.gallery button.g-item:hover img { transform: scale(1.02); }

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(20, 22, 25, .97);
  display: none;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
  width: auto; height: auto;
  margin: 0 auto;
}
.lb-close {
  position: absolute; top: 18px; right: 18px;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white);
}
.lb-close svg { width: 20px; height: 20px; }
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.3);
  transition: border-color .2s ease;
}
.lb-prev:hover, .lb-next:hover { border-color: var(--white); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-prev svg, .lb-next svg { width: 18px; height: 18px; }
@media (max-width: 719px) {
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lb-prev { left: auto; right: 84px; }
}
.lb-counter {
  position: absolute; bottom: 30px; left: var(--pad);
  color: rgba(255,255,255,.7);
  font-size: 12px; letter-spacing: .18em; font-variant-numeric: tabular-nums;
}

/* ============================================================
   About
   ============================================================ */
.about-body {
  padding: clamp(40px, 6vw, 88px) var(--pad);
  display: grid; gap: clamp(32px, 5vw, 72px);
}
@media (min-width: 900px) {
  .about-body { grid-template-columns: 5fr 7fr; }
}
.about-copy p {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 1.45;
  max-width: 26ch;
}
.capabilities { border-top: 1px solid var(--line); }
.capabilities li {
  list-style: none;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase;
}
.capabilities .datum { width: 10px; height: 8px; margin: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 36px;
  background: var(--charcoal);
  color: var(--white);
  padding: 18px 32px;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transition: background .2s ease;
}
.btn:hover { background: var(--red); }

.image-band { background: var(--charcoal-deep); }
.image-band img { width: 100%; max-height: 70vh; object-fit: cover; }

/* ============================================================
   Contact
   ============================================================ */
.contact-body {
  padding: clamp(40px, 6vw, 88px) var(--pad) clamp(64px, 8vw, 120px);
  display: grid; gap: clamp(40px, 6vw, 96px);
}
@media (min-width: 900px) {
  .contact-body { grid-template-columns: 4fr 6fr; }
}
.contact-info dl { display: grid; gap: 22px; }
.contact-info dt {
  font-size: 11px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--grey);
  margin-bottom: 4px;
}
.contact-info dd { font-size: 17px; font-weight: 500; }
.contact-info a { border-bottom: 1px solid var(--line); transition: border-color .2s ease; }
.contact-info a:hover { border-color: var(--red); }
.placeholder-note { color: var(--red); font-size: 13px; font-weight: 500; }

form.contact-form { display: grid; gap: 22px; }
@media (min-width: 640px) {
  form.contact-form { grid-template-columns: 1fr 1fr; }
  .field-full { grid-column: 1 / -1; }
}
.field label {
  display: block;
  font-size: 11px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--grey);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  font: inherit; font-size: 16px;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 16px;
  transition: border-color .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--charcoal);
}
.field textarea { min-height: 160px; resize: vertical; }
.field .error-msg { display: none; color: var(--red); font-size: 13px; margin-top: 6px; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.field.invalid .error-msg { display: block; }

/* Honeypot — visually removed, still in DOM for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.form-status { grid-column: 1 / -1; display: none; padding: 18px 20px; font-size: 15px; }
.form-status.success { display: block; background: var(--concrete); border-left: 3px solid var(--charcoal); }
.form-status.error { display: block; background: #fbeeee; border-left: 3px solid var(--red); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--charcoal-deep);
  color: var(--white);
  padding: clamp(40px, 6vw, 72px) var(--pad) 32px;
}
.footer-top {
  display: flex; flex-wrap: wrap; gap: 32px;
  align-items: flex-start; justify-content: space-between;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.site-footer .brand img { height: 20px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px 32px; }
.footer-nav a {
  font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.8);
  transition: color .2s ease;
}
.footer-nav a:hover { color: var(--white); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px 32px;
  justify-content: space-between;
  padding-top: 24px;
  color: rgba(255,255,255,.55);
  font-size: 12px; letter-spacing: .08em;
}
.footer-bottom a { color: rgba(255,255,255,.7); }
.footer-bottom a:hover { color: var(--white); }

/* ============================================================
   404
   ============================================================ */
.page-404 {
  min-height: 100vh; min-height: 100dvh;
  background: var(--charcoal-deep);
  color: var(--white);
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  padding: 0 var(--pad);
}
.page-404 img { height: 26px; margin-bottom: 48px; }
.page-404 h1 { font-size: clamp(40px, 8vw, 88px); color: var(--white); }
.page-404 p { margin-top: 18px; color: rgba(255,255,255,.7); }
.page-404 .btn { background: var(--white); color: var(--charcoal); }
.page-404 .btn:hover { background: var(--red); color: var(--white); }

/* ============================================================
   Motion preferences
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
