/* Dotan Bahat — Defense practice
   Palette: dark grey, khaki green, white.
   Sharp corners, hairline rules, condensed display type. */

:root {
  --bg: #0c0d0b;
  --bg-raise: #0c0d0b;
  --paper: #ffffff;
  --paper-deep: #ffffff;
  --text: #ffffff;
  --muted: #ffffff;
  --line: rgba(255, 255, 255, 0.18);
  --line-strong: rgba(255, 255, 255, 0.38);
  --khaki: #6e7a3c;
  --brass: var(--khaki);
  --brass-deep: var(--khaki);
  --ink: #0c0d0b;
  --header-h: 5.75rem;
  --gutter: clamp(1.1rem, 2.6vw, 2.4rem);
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --body: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --mono: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; }

a { color: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

::selection {
  background: var(--brass);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--brass);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip:focus { top: 0.6rem; }

/* Header ------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 1.15rem var(--gutter);
  background: rgba(12, 13, 11, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 2px 0 var(--brass);
}

body.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0.22rem;
  border: 1px solid #fff;
  border-radius: 50%;
  box-sizing: border-box;
  flex: none;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-text small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.site-nav a:hover { color: var(--khaki); }

.nav-email {
  border: 0;
  background: var(--khaki);
  color: #fff !important;
  padding: 0.55rem 0.9rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-email:hover {
  background: #fff;
  color: var(--bg) !important;
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  padding: 0;
  cursor: pointer;
}

.nav-bars,
.nav-bars::before,
.nav-bars::after {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: var(--text);
  position: relative;
}

.nav-bars::before,
.nav-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-bars::before { top: -6px; }
.nav-bars::after { top: 6px; }

body.nav-open .nav-bars { background: transparent; }
body.nav-open .nav-bars::before { top: 0; transform: rotate(45deg); }
body.nav-open .nav-bars::after { top: 0; transform: rotate(-45deg); }

/* Hero -------------------------------------------------- */

.hero {
  position: relative;
  border-bottom: 0;
  padding: 0;
  background: var(--khaki);
  color: var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(15rem, 0.82fr) minmax(16rem, 1.18fr);
  gap: 1.75rem 4.5rem;
  align-items: start;
  padding: 4.2rem var(--gutter) 4.4rem;
}

.hero-statement { min-width: 0; }

.eyebrow {
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}

.hero h1 {
  margin: 0;
  color: var(--bg);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.15rem, 3.5vw, 3.15rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero-mail {
  display: inline-block;
  margin-top: 1.65rem;
  padding: 0.95rem 1.7rem;
  background: var(--bg);
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.hero-mail:hover { background: #fff; color: var(--bg); }

.hero-status {
  margin: 0.65rem 0 0;
  padding: 0;
  border: 0;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--muted);
}

.lede {
  margin: 0;
  max-width: 38rem;
  padding: 0.15rem 0 0;
  color: var(--bg);
  font-size: 1.19rem;
  font-weight: 400;
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-media {
  grid-area: media;
  position: relative;
  align-self: stretch;
  margin: 0;
  height: min(34vh, 300px);
  min-height: 0;
  max-height: 300px;
  overflow: hidden;
  background: var(--khaki);
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hero-media figcaption {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 0.8rem;
  align-items: flex-end;
  padding: 2.2rem 1rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 7, 0.82));
}

.hero-media figcaption span:first-child {
  font-family: var(--mono);
  color: var(--brass);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.hero-media figcaption strong {
  display: block;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.hero-media figcaption em {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Practice bar ------------------------------------------ */

.cap-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.cap-list li {
  padding: 1.05rem var(--gutter);
  border-right: 1px solid var(--line);
  min-width: 0;
}

.cap-list li:last-child { border-right: 0; }

.cap-list .cap-no {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--brass);
}

.cap-list strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.cap-list em {
  display: block;
  margin-top: 0.3rem;
  font-style: normal;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.client-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0;
  margin: 0;
  padding: 0.85rem var(--gutter);
  list-style: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.client-rail li:not(:last-child)::after {
  content: "·";
  margin: 0 0.7rem;
  color: var(--brass);
}

/* Work grid --------------------------------------------- */

.section-head {
  display: grid;
  grid-template-columns: minmax(15rem, 0.82fr) minmax(16rem, 1.18fr);
  gap: 1.75rem 4.5rem;
  align-items: end;
  padding: 2.6rem var(--gutter) 1.1rem;
}

.section-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}

.section-head h2,
.contact h2,
.case-head h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 0.92;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 3.15rem);
  max-width: none;
}

.work-line {
  display: block;
  white-space: nowrap;
}

#experience,
#work,
#contact { scroll-margin-top: calc(var(--header-h) + 0.4rem); }

.section-note {
  margin: 0;
  max-width: 38rem;
  justify-self: start;
  color: var(--muted);
  font-size: 0.95rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 16.5rem;
  gap: 0.5rem;
  padding: 0 var(--gutter) 0.6rem;
}

.work-grid .tile:nth-child(1) { grid-column: 1 / 8; grid-row: span 2; }
.work-grid .tile:nth-child(2) { grid-column: 8 / 13; grid-row: span 2; }
.work-grid .tile:nth-child(3) { grid-column: 1 / 5; }
.work-grid .tile:nth-child(4) { grid-column: 5 / 9; }
.work-grid .tile:nth-child(5) { grid-column: 9 / 13; }
.work-grid .tile:nth-child(6) { grid-column: 1 / 7; }
.work-grid .tile:nth-child(7) { grid-column: 7 / 13; }
.work-grid .tile:nth-child(8) { grid-column: 1 / 5; }
.work-grid .tile:nth-child(9) { grid-column: 5 / 9; }
.work-grid .tile:nth-child(10) { grid-column: 9 / 13; }

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 100%;
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.tile-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 7, 0.08) 20%, rgba(8, 9, 7, 0.82) 100%);
  transition: background 0.35s ease;
}

.tile:hover img,
.tile:focus-visible img { transform: scale(1.045); }

.tile:hover .tile-shade,
.tile:focus-visible .tile-shade {
  background:
    linear-gradient(180deg, rgba(8, 9, 7, 0.05) 10%, rgba(8, 9, 7, 0.88) 100%);
}

.tile:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.tile-no {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 1;
  padding: 0.28rem 0.42rem;
  background: rgba(12, 13, 11, 0.82);
  color: var(--brass);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.tile-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.85rem 0.95rem 0.8rem;
}

.tile-sector {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.tile strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 0.92;
}

.tile-feature strong { font-size: clamp(2.2rem, 3.6vw, 3.6rem); }

.tile em {
  display: block;
  margin-top: 0.28rem;
  font-style: normal;
  color: #fff;
  font-size: 0.92rem;
}

.tile-go {
  display: inline-block;
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tile:hover .tile-go,
.tile:focus-visible .tile-go {
  opacity: 1;
  transform: none;
}

/* Contact + footer -------------------------------------- */

.contact {
  padding: 4.2rem var(--gutter) 3.2rem;
  border-top: 1px solid var(--line);
}

.contact h2 {
  max-width: 12ch;
  font-size: clamp(2.6rem, 5.6vw, 5rem);
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 1.4rem;
}

.contact-email,
.contact-phone {
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.contact-email {
  font-size: clamp(1.8rem, 4.4vw, 3.6rem);
  color: var(--brass);
  border-bottom: 1px solid transparent;
}

.contact-email:hover { border-bottom-color: var(--brass); }

.contact-phone {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  color: var(--text);
}

.contact-phone:hover { color: var(--brass); }

.contact-note {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-note a { color: var(--text); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem var(--gutter) 1.3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--brass); }

/* Case study -------------------------------------------- */

.case-head {
  padding: 1.6rem var(--gutter) 1.8rem;
  max-width: 62rem;
}

@media (min-width: 981px) {
  .case-head {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    column-gap: clamp(1.5rem, 4vw, 4.5rem);
    align-items: end;
  }

  .case-tools { grid-column: 1 / -1; }
  .case-sector,
  .case-head h1,
  .case-scope { grid-column: 1; }
  .case-summary {
    grid-column: 2;
    grid-row: 2 / 5;
    align-self: end;
    margin-top: 0;
    max-width: 36rem;
  }
}

.case-tools {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.back {
  color: var(--brass);
  text-decoration: none;
}

.back:hover { color: var(--text); }

.case-count { margin: 0; color: var(--muted); }

.case-sector {
  margin: 0 0 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
}

.case-head h1 {
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  max-width: 12ch;
}

.case-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.case-scope li {
  border: 1px solid var(--line-strong);
  padding: 0.28rem 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.case-summary {
  margin-top: 1.25rem;
  max-width: 42rem;
  color: #fff;
}

.case-summary p { margin: 0 0 0.8rem; }
.case-summary p:last-child { margin-bottom: 0; }

.case-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-bottom: 0.6rem;
}

.shot { margin: 0; }

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-bleed { background: var(--bg); }

.shot-plate {
  margin-inline: var(--gutter);
  background: var(--paper);
  padding: clamp(1.2rem, 3vw, 2.6rem);
}

.shot-plate img { margin-inline: auto; }

.shot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding-inline: var(--gutter);
}

.shot-pair .shot { background: var(--paper); }
.shot-pair img { width: 100%; height: 100%; object-fit: cover; }

.zoom { display: block; cursor: zoom-in; }

.case-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.case-jump {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.3rem;
  min-height: 8.5rem;
  padding: 1.2rem var(--gutter);
  text-decoration: none;
  border-right: 1px solid var(--line);
}

.case-jump.next { text-align: right; align-items: flex-end; border-right: 0; }
.case-jump.only { grid-column: 1 / -1; }

.case-jump span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

.case-jump strong {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 0.95;
}

.case-jump:hover strong { color: var(--brass); }

.page-miss {
  min-height: 60vh;
  padding: 4rem var(--gutter);
}

.page-miss h1 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 5rem);
  text-transform: uppercase;
  line-height: 0.9;
}

.page-miss a { color: var(--brass); }

/* Lightbox ---------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.2rem 1.2rem;
  background: rgba(8, 9, 7, 0.94);
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: min(1200px, 100%);
  max-height: calc(100vh - 5rem);
  width: auto;
  height: auto;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  cursor: pointer;
}

.lightbox-close:hover { color: var(--brass); border-color: var(--brass); }

/* Responsive -------------------------------------------- */

@media (max-width: 980px) {
  .nav-toggle { display: grid; place-items: center; }

  .site-nav {
    position: fixed;
    z-index: 45;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    justify-content: flex-start;
    gap: 1.3rem;
    width: auto;
    height: calc(100svh - var(--header-h));
    height: calc(100vh - var(--header-h));
    margin: 0;
    padding: 1.6rem var(--gutter);
    background: rgba(12, 13, 11, 0.98);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    overflow: auto;
    transition: opacity 0.2s ease;
  }

  body.admin-bar .site-nav {
    top: calc(var(--header-h) + 32px);
    height: calc(100vh - var(--header-h) - 32px);
  }

  body.nav-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .site-nav a { font-size: 1.35rem; letter-spacing: 0.06em; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 2.6rem var(--gutter) 2.8rem;
  }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); max-width: none; }

  .cap-list { grid-template-columns: 1fr 1fr; }
  .cap-list li:nth-child(odd) { border-right: 1px solid var(--line); }
  .cap-list li:nth-child(2) { border-right: 0; }
  .cap-list li:nth-child(5) { grid-column: 1 / -1; border-right: 0; border-top: 1px solid var(--line); }

  .section-head { grid-template-columns: 1fr; gap: 0.8rem; }

  .work-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 15rem;
  }

  .work-grid .tile {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .work-grid .tile:first-child {
    grid-column: 1 / -1 !important;
    min-height: 22rem;
  }

  .shot-pair { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .brand-text small { display: none; }
  .cap-list { grid-template-columns: 1fr; }
  .cap-list li { border-right: 0 !important; border-top: 1px solid var(--line); }
  .cap-list li:first-child { border-top: 0; }
  .work-grid { grid-template-columns: 1fr; }
  .work-grid .tile:first-child { min-height: 18rem; }
  .case-nav { grid-template-columns: 1fr; }
  .case-jump { border-right: 0; border-bottom: 1px solid var(--line); }
  .case-jump.next { text-align: left; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile img,
  .tile-shade,
  .tile-go,
  .site-nav { transition: none; }
}
