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

:root {
  --bg: #0a0a0a;
  --surface: #111;
  --text: #f0ece8;
  --muted: #666;
  --border: #1e1e1e;
  --overlay: rgba(0, 0, 0, 0.6);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── Header ─── */

header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 48px 32px 28px;
  border-bottom: 1px solid var(--border);
}

h1 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tagline {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 5px;
}

/* ─── Filter nav ─── */

.filter-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid #252525;
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter-btn:hover {
  border-color: #444;
  color: #aaa;
}

.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ─── Grid ─── */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 2px;
  min-height: 60vh;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .grid { grid-template-columns: 1fr; gap: 1px; padding: 1px; }
  header { padding: 28px 20px 20px; flex-direction: column; align-items: flex-start; }
}

/* ─── Cards ─── */

.card {
  background: var(--surface);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-thumb-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0d0d0d;
}

.card-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-thumb {
  transform: scale(1.04);
}

.card-hover {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover .card-hover {
  opacity: 1;
}

.play-btn {
  width: 52px;
  height: 52px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.card:hover .play-btn {
  transform: scale(1.08);
}

.play-btn svg {
  margin-left: 3px;
}

.card-label {
  padding: 12px 14px 14px;
  flex: 1;
}

.card-client {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.card-title {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
}

.card-role {
  display: block;
  font-size: 11px;
  color: #444;
  margin-top: 3px;
}

/* ─── Empty state ─── */

.empty {
  grid-column: 1 / -1;
  padding: 80px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ─── Modal ─── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  cursor: pointer;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: -38px;
  right: 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s;
}

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

.modal-meta {
  margin-bottom: 14px;
}

.modal-client {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.modal-title {
  font-size: 20px;
  font-weight: 400;
}

.modal-role {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ─── Contact ─── */

#contact {
  padding: 80px 32px;
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 480px;
  margin: 0 auto;
}

.contact-heading {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-row input,
.form-row textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: #444;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #333;
}

.form-submit {
  background: var(--text);
  border: none;
  color: var(--bg);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 2px;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.15s;
}

.form-submit:hover { opacity: 0.85; }

@media (max-width: 540px) {
  #contact { padding: 60px 20px; }
}

/* ─── Footer ─── */

footer {
  padding: 36px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

footer a:hover { color: var(--text); }

/* ─── Photo modal ─── */

.photo-stage {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  max-height: 75vh;
  overflow: hidden;
}

.photo-stage img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.photo-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 14px 0 0;
}

.photo-nav button {
  background: transparent;
  border: 1px solid #333;
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-nav button:hover {
  color: var(--text);
  border-color: #666;
}

#photo-counter {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  min-width: 48px;
  text-align: center;
}

/* Photo icon on card */
.photo-icon {
  width: 52px;
  height: 52px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.card:hover .photo-icon {
  transform: scale(1.08);
}

/* ─── Modal scroll wrapper ─── */

.modal-scroll {
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.modal-scroll::-webkit-scrollbar {
  width: 4px;
}

.modal-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.modal-scroll::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

/* ─── Case study / description ─── */

.modal-description {
  display: none;
  padding: 24px 0 8px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.modal-description:not(:empty) {
  display: block;
}

.cs-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px 20px;
  margin-bottom: 14px;
}

.cs-row:last-child {
  margin-bottom: 0;
}

.cs-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
  line-height: 1.5;
}

.cs-text {
  font-size: 13px;
  line-height: 1.7;
  color: #999;
  margin: 0;
}

@media (max-width: 540px) {
  .cs-row {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 16px;
  }
}

/* ─── Reduced motion ─── */

@media (prefers-reduced-motion: reduce) {
  .card-thumb, .card-hover, .play-btn { transition: none; }
}
