/* IronPin Aerial gallery. Tokens mirror ironpinaerial.com (client/src/index.css). */
:root {
  --charcoal: #1E252B;
  --deep: #141a1f;
  --orange: #E8500F;
  --orange-hover: #cc440d;
  --white: #FFFFFF;
  --secondary: #D6D9DC;
  --muted: #8f969c;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 2px;
  --head: 'Oswald', sans-serif;
  --body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--charcoal);
  color: var(--white);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
h1, h2, h3 {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin: 0;
}
a { color: inherit; }
button { font-family: inherit; }
img, video { display: block; max-width: 100%; }

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 3rem; } }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 26, 31, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header .container { display: flex; align-items: center; height: 68px; gap: 2rem; }
.site-header img { height: 56px; width: auto; }
.site-header nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.site-header nav a {
  font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--secondary); text-decoration: none;
}
.site-header nav a:hover { color: var(--orange); }

.btn-primary, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--body); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.75rem 1.75rem; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: background-color 150ms ease, color 150ms ease;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-hover); }
.btn-primary:active { transform: scale(0.97); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.3); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- hero ---- */
.hero { padding: 4rem 0 2.5rem; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.05; }
.hero h1 span { display: block; width: 56px; height: 4px; background: var(--orange); margin-top: 1rem; }
.hero p { max-width: 62ch; color: var(--secondary); font-size: 1.0625rem; margin: 1.25rem 0 0; }

/* ---- category chips ---- */
.chips {
  position: sticky; top: 68px; z-index: 40;
  background: var(--charcoal); border-bottom: 1px solid var(--border);
}
.chips .container { display: flex; gap: 0.5rem; overflow-x: auto; padding-top: 0.875rem; padding-bottom: 0.875rem; scrollbar-width: none; }
.chips .container::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; background: transparent; color: var(--secondary);
  border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius);
  font-family: var(--head); font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.5rem 0.9rem; cursor: pointer; white-space: nowrap; transition: all 150ms ease;
}
.chip small { color: var(--muted); margin-left: 0.4rem; font-family: var(--body); letter-spacing: 0; font-size: 0.75rem; }
.chip:hover { border-color: var(--orange); color: var(--white); }
.chip.active { background: var(--orange); border-color: var(--orange); color: var(--white); }
.chip.active small { color: rgba(255,255,255,0.8); }

/* ---- grid ---- */
.section-head { display: flex; align-items: baseline; gap: 1rem; margin: 2.5rem 0 1.25rem; }
.section-head h2 { font-size: 1.5rem; }
.section-head p { margin: 0; color: var(--secondary); font-size: 0.9375rem; }
.grid {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-bottom: 4rem;
}
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; } }
.tile {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--deep);
  border-radius: var(--radius); border: 0; padding: 0; cursor: pointer; text-align: left; color: inherit;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); }
.tile:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.tile .badge {
  position: absolute; left: 0.6rem; top: 0.6rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(20,26,31,0.85); color: var(--white); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.5rem; border-radius: var(--radius);
}
.tile .badge::before { content: ""; width: 0; height: 0; border-left: 7px solid var(--orange); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.tile .cap {
  position: absolute; inset: auto 0 0 0; padding: 1.75rem 0.75rem 0.6rem;
  background: linear-gradient(to top, rgba(20,26,31,0.9), transparent);
  font-size: 0.8125rem; color: var(--white); opacity: 0; transition: opacity 200ms ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
@media (hover: none) { .tile .cap { opacity: 1; } }

.empty { padding: 4rem 0; color: var(--secondary); text-align: center; }

/* ---- lightbox ---- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(10,13,16,0.96); display: none; flex-direction: column; }
.lb.open { display: flex; }
.lb-top { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; color: var(--secondary); font-size: 0.8125rem; }
.lb-top .cat { font-family: var(--head); text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange); }
.lb-top .count { color: var(--muted); }
.lb-top .spacer { flex: 1; }
.lb-btn {
  background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius);
  padding: 0.45rem 0.8rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
}
.lb-btn:hover { border-color: var(--orange); color: var(--orange); }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 3.5rem; }
@media (max-width: 640px) { .lb-stage { padding: 0; } }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; background: #000; }
.lb-stage video { width: min(100%, 1400px); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 64px; background: rgba(20,26,31,0.7); color: var(--white); border: 0; cursor: pointer; font-size: 1.5rem;
  border-radius: var(--radius);
}
.lb-nav:hover { background: var(--orange); }
.lb-nav.prev { left: 0.5rem; } .lb-nav.next { right: 0.5rem; }
.lb-caption { padding: 0.75rem 1rem 1rem; color: var(--secondary); font-size: 0.9375rem; text-align: center; min-height: 2.75rem; }
.lb-toast { position: fixed; bottom: 4.5rem; left: 50%; transform: translateX(-50%); background: var(--orange); color: #fff; padding: 0.5rem 1rem; border-radius: var(--radius); font-size: 0.8125rem; opacity: 0; transition: opacity 200ms; pointer-events: none; }
.lb-toast.show { opacity: 1; }

/* ---- footer ---- */
.site-footer { background: var(--deep); border-top: 1px solid rgba(255,255,255,0.08); padding: 2.5rem 0 2rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.site-footer img { height: 44px; width: auto; }
.site-footer p { margin: 0; color: var(--secondary); font-size: 0.8125rem; }
.site-footer a { color: var(--secondary); text-decoration: none; }
.site-footer a:hover { color: var(--orange); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

#lb-media { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 0; }
