/* ================================================
   RESET & BASE
   ================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg:     #ffffff;
  --color-text:   #0a0a0a;
  --color-muted:  #3a3a3a;
  --color-border: #ececec;
  --font-logo:    'Hanken Grotesk', sans-serif;
  --font-body:    'Hanken Grotesk', sans-serif;
  --font-serif:   'Lora', serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
  --gap-grid:     16px;
  --pad-h:        64px;
  /* Top and bottom bars keep a wider margin than the galleries */
  --nav-pad-h:    80px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }
a   { color: inherit; }

/* ================================================
   ACCESSIBILITY
   ================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================
   NAVIGATION
   ================================================ */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* More top than bottom padding drops the row slightly without adding height */
  padding: 28px var(--nav-pad-h) 14px;
  background: var(--color-bg);
}

.nav-logo {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.nav-logo:hover { opacity: 0.6; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--color-text);
  line-height: 0;
}

.icon-close { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.nav-links a:hover {
  opacity: 0.6;
}

.nav-links a.active {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--nav-pad-h) 32px;
  margin-top: auto;
}

/* Same type treatment as the top menu */
.footer-left {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--color-text);
}

.footer-instagram {
  display: flex;
  align-items: center;
  color: var(--color-text);
  transition: opacity 0.18s ease;
}

.footer-instagram:hover { opacity: 0.6; }

/* ================================================
   HOME — ASYMMETRIC GRID
   ================================================ */
.home-grid {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-grid);
  padding: var(--gap-grid) var(--pad-h) var(--pad-h);
}

/* One column of the masonry — built in gallery.js */
.gallery-column {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-grid);
}

.grid-item {
  border-radius: 2px;
  overflow: hidden;
  display: block;
}

.grid-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ================================================
   CATEGORY PAGE HEADER (sports / commercial / personal)
   ================================================ */
.page-head {
  padding: 40px var(--pad-h) 36px;
}

.page-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.page-desc {
  margin-top: 18px;
  max-width: 480px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-text);
}

/* 404: the header is the only content, so it needs room to breathe */
.error-head {
  padding-top: 120px;
  padding-bottom: 160px;
}

/* Inline, unlike .detail-link, so the sentence stays on one line */
.error-link {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.18s ease;
}
.error-link:hover { opacity: 0.55; }

@media (max-width: 768px) {
  .error-head { padding-top: 64px; padding-bottom: 96px; }
}

/* ================================================
   MASONRY GALLERY (category pages)
   ================================================ */
.masonry-gallery {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-grid);
  padding: 0 var(--pad-h) 60px;
}

.masonry-item {
  border-radius: 2px;
  overflow: hidden;
  display: block;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-loading,
.gallery-empty {
  font-size: 13px;
  color: var(--color-muted);
  padding: 0 var(--pad-h) 48px;
  letter-spacing: 0.01em;
}

/* ================================================
   CONTACT PAGE
   ================================================ */
.contact-top,
.contact-bottom {
  display: grid;
  gap: 96px;
  padding: 40px var(--pad-h) 64px;
  align-items: start;
}

.contact-top    { grid-template-columns: 1.15fr 1fr; }
.contact-bottom { grid-template-columns: 1fr 1.15fr; padding-bottom: 80px; }

/* --- Big headline (left, top row) --- */
.contact-headline {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--color-text);
}

/* --- Form (right, top row) --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Honeypot — display:none keeps it away from people and screen readers alike */
.form-honeypot { display: none; }

.form-eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.form-input,
.form-textarea {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 8px 0;
  outline: none;
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(10, 10, 10, 0.28);
}

.form-input:focus,
.form-textarea:focus {
  border-bottom-color: var(--color-text);
}

.form-textarea {
  resize: vertical;
  min-height: 84px;
}

.form-submit {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.22px;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-text);
  padding: 1px 6px 6px;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.2s ease;
}

.form-submit:hover    { opacity: 0.6; }
.form-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.form-status {
  font-size: 13px;
  min-height: 18px;
  letter-spacing: 0.01em;
}

.form-status--success { color: #2a6e2a; }
.form-status--error   { color: #b52d2d; }

/* --- Portrait (left, bottom row) --- */
.contact-portrait-wrap {
  position: relative;
  margin: 0;
}

.contact-portrait {
  width: 100%;
  /* height:auto lets aspect-ratio win over the intrinsic height attribute */
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  background: #f0f0ee;
}

.portrait-label {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* --- Details (right, bottom row) --- */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 6px;
}

.detail-label {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.email-big {
  display: block;
  margin-top: 12px;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600;
  letter-spacing: -0.8px;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.email-big:hover { opacity: 0.65; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-value {
  display: block;
  margin-top: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
}

.detail-sub {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-muted);
}

.detail-link {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.detail-link:hover { opacity: 0.65; }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1100px) {
  :root { --pad-h: 40px; }

  /* Column count is handled in gallery.js (columnCountFor) */
  .contact-top,
  .contact-bottom { gap: 56px; }
}

@media (max-width: 768px) {
  :root { --pad-h: 20px; }

  .site-nav {
    padding: 20px var(--pad-h);
    position: relative;
    z-index: 101;
  }

  .nav-logo,
  .nav-toggle {
    position: relative;
    z-index: 102;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .nav-toggle[aria-expanded="true"] .icon-hamburger { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-close    { display: block; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 var(--pad-h);
    gap: 20px;
  }

  .nav-links.is-open { display: flex; }

  .nav-links a {
    font-size: clamp(22px, 6.5vw, 30px);
    font-weight: 400;
    letter-spacing: 1.8px;
    line-height: 1.25;
  }

  .home-grid {
    gap: 6px;
    padding: 6px var(--pad-h) 36px;
  }

  .masonry-gallery {
    gap: 6px;
    padding: 0 var(--pad-h) 40px;
  }

  .gallery-column { gap: 6px; }

  .page-head { padding: 28px var(--pad-h) 24px; }

  .site-footer {
    padding: 24px var(--pad-h) 28px;
  }

  /* Contact → single column */
  .contact-top,
  .contact-bottom {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 32px var(--pad-h) 48px;
  }

  .contact-bottom { flex-direction: column; }
  .contact-portrait { aspect-ratio: 3 / 2; }
}

@media (max-width: 480px) {
  /* Galleries stay at 2 columns down to the smallest screens */
  .detail-grid { grid-template-columns: 1fr; gap: 20px; }
}
