/* ==========================================================================
   ShotsBySkaza — stylesheet
   Design tokens live at the top as CSS custom properties. Everything below
   derives its color/type/spacing decisions from these.
   ========================================================================== */

:root {
  /* Color */
  --bg: #0b0d14;
  --bg-panel: #12151f;
  --bg-panel-2: #171b28;
  --line: rgba(244, 245, 250, 0.09);
  --line-strong: rgba(244, 245, 250, 0.16);
  --text: #f4f5fa;
  --text-muted: #9096ab;
  --text-faint: #5b6178;
  --brand: #4557f3;
  --brand-light: #8391ff;
  --brand-dim: #2c3899;
  --focus: #ffb347;

  /* Type */
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* Layout */
  --header-h: 84px;
  --gutter: clamp(1.25rem, 3vw, 3rem);
  --max-w: 1400px;
  --radius: 3px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-alpha: 1;
}

/* ---------------- Reset ---------------- */

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin: 0 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brand-light);
  display: inline-block;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Fixed grain/texture overlay for a bit of atmosphere without relying on any one photo */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(11, 13, 20, var(--header-alpha));
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid rgba(244, 245, 250, calc(0.09 * var(--header-alpha)));
  transition: border-color 0.25s var(--ease);
}

.header-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.logo img {
  height: 38px;
  width: 38px;
  object-fit: contain;
}

.logo span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Primary nav (center) */

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

.site-nav > li > a,
.dropdown-trigger {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  padding: 0.4rem 0.1rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav > li > a::after,
.dropdown-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.site-nav > li > a:hover::after,
.site-nav > li > a[aria-current="page"]::after,
.dropdown-trigger:hover::after {
  transform: scaleX(1);
}

.site-nav > li > a[aria-current="page"] {
  color: var(--brand-light);
}

.caret {
  font-size: 0.7em;
  transition: transform 0.2s var(--ease);
}

.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 178px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dropdown.is-open .caret { transform: rotate(180deg); }

.dropdown-menu a {
  display: block;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  border-radius: 2px;
  color: var(--text-muted);
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background: rgba(69, 87, 243, 0.12);
  color: var(--text);
}

/* Right side: social + contact */

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-shrink: 0;
}

.icon-link {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.icon-link:hover {
  border-color: var(--brand);
  color: var(--brand-light);
  background: rgba(69, 87, 243, 0.12);
}

.icon-link svg { width: 16px; height: 16px; }

.btn-contact {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  white-space: nowrap;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-contact:hover { background: var(--brand-light); transform: translateY(-1px); }

.mobile-only-contact { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Homepage gallery lead ----------------
   The homepage has no hero text — the photo grid starts below the header,
   with some clear breathing room in between rather than sitting flush
   against it. */

.gallery-lead {
  padding-top: calc(var(--header-h) + 2.5rem);
  padding-bottom: 2.5rem;
}

/* Simple page header, used on portraits/sports/events/gallery pages */

.page-head {
  padding: calc(var(--header-h) + 3.6rem) 0 2.8rem;
}

.page-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.page-head p {
  margin-top: 1rem;
  color: var(--text-muted);
  max-width: 52ch;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.6rem;
  transition: color 0.2s var(--ease);
}

.back-link:hover { color: var(--brand-light); }

/* ---------------- Section scaffolding ---------------- */

section { position: relative; z-index: 1; }

.section-head {
  padding: 5rem 0 2.2rem;
}

.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ---------------- Masonry gallery ----------------
   Edge-to-edge, tight gaps, capped column count so tiles stay large —
   used the same way on every gallery page (homepage, category pages,
   client galleries). */

.masonry {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 6px;
  grid-auto-flow: row dense;
  gap: 6px;
  padding: 0 6px 6px;
  max-width: none;
}

@media (min-width: 640px) { .masonry { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .masonry { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1900px) { .masonry { grid-template-columns: repeat(4, 1fr); } }

.masonry.is-loading { min-height: 40vh; }

.photo-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-panel);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.photo-card.is-visible { opacity: 1; transform: translateY(0); }

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

.photo-card:hover img { transform: scale(1.035); }

/* Viewfinder corner-bracket signature detail, appears on hover/focus */

.photo-card::before,
.photo-card::after,
.photo-card .corner-a,
.photo-card .corner-b {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--brand-light);
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 2;
  pointer-events: none;
}

.photo-card::before { top: 8px; left: 8px; border-top: 2px solid; border-left: 2px solid; transform: translate(-4px, -4px); }
.photo-card::after { bottom: 8px; right: 8px; border-bottom: 2px solid; border-right: 2px solid; transform: translate(4px, 4px); }
.photo-card .corner-a { top: 8px; right: 8px; border-top: 2px solid; border-right: 2px solid; transform: translate(4px, -4px); }
.photo-card .corner-b { bottom: 8px; left: 8px; border-bottom: 2px solid; border-left: 2px solid; transform: translate(-4px, 4px); }

.photo-card:hover::before,
.photo-card:hover::after,
.photo-card:hover .corner-a,
.photo-card:hover .corner-b,
.photo-card:focus-visible::before,
.photo-card:focus-visible::after,
.photo-card:focus-visible .corner-a,
.photo-card:focus-visible .corner-b {
  opacity: 1;
  transform: translate(0, 0);
}

.gallery-empty,
.gallery-error {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 2.4rem 1.6rem;
  text-align: center;
  break-inside: avoid;
}

.gallery-error { color: #ff9d7a; border-color: rgba(255, 157, 122, 0.35); }

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 7, 11, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
  padding: 4vh 4vw;
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-figure {
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.lightbox-figure img {
  max-width: 92vw;
  max-height: 80vh;
  width: auto;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(244, 245, 250, 0.06);
  border: 1px solid var(--line-strong);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: var(--brand); border-color: var(--brand); }

.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

@media (max-width: 620px) {
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; }
  .lightbox-close { top: 14px; right: 14px; }
}

/* ---------------- About ---------------- */

.about {
  padding: 5.5rem 0 6rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
}

.about h2 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.05; }

.about-body p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.2rem;
}

.about-body p:last-child { margin-bottom: 0; }

.about-body strong { color: var(--text); font-weight: 600; }

/* ---------------- Client galleries ---------------- */

.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  padding-bottom: 5.5rem;
}

.client-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-panel);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.client-card:hover { border-color: var(--brand); transform: translateY(-3px); }

.client-card .thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-panel-2);
  overflow: hidden;
}

.client-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.client-card .thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  color: var(--text-faint);
}

.client-card .meta { padding: 0.9rem 1rem 1.1rem; }

.client-card .meta .name {
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.client-card .meta .count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 0.3rem;
}

.client-empty {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-faint);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 3rem 1.6rem;
  text-align: center;
  line-height: 1.8;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.6rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer .email {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.site-footer .email:hover { color: var(--brand-light); }

.site-footer .copyright {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------------- Responsive nav (mobile) ---------------- */

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }

  .site-nav.is-open { max-height: 70vh; overflow-y: auto; }

  .site-nav > li { border-top: 1px solid var(--line); }
  .site-nav > li > a, .dropdown-trigger {
    width: 100%;
    padding: 1rem var(--gutter);
    text-shadow: none;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border: none;
    box-shadow: none;
    background: var(--bg-panel-2);
    transition: max-height 0.25s var(--ease);
  }

  .dropdown.is-open .dropdown-menu {
    max-height: 220px;
    padding: 0.3rem 0;
  }

  .dropdown-menu a { padding-left: calc(var(--gutter) + 1rem); }

  .header-actions .btn-contact { display: none; }
  .mobile-only-contact { display: block; }
}

@media (max-width: 560px) {
  .header-inner { padding: 0 1.1rem; }
  :root { --gutter: 1.1rem; }
}
