/* =========================================================
   Strikes Market — gallery.css
   Garden Tree-inspired · matches home + recipes
   ========================================================= */

:root {
  --ink: #021e05;
  --forest: #374629;
  --forest-med: #546a40;
  --lemon: #d1e437;
  --lemon-soft: #f0fa99;
  --olive: #798c4f;
  --cream: #f9f7ef;
  --cream-deep: #f0ebd9;
  --rust: #9a3718;
  --line: rgba(2, 30, 5, 0.12);
  --line-soft: rgba(2, 30, 5, 0.06);
  --white: #ffffff;

  --font-display: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --container: 1400px;
  --gutter: clamp(20px, 4vw, 64px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-slow: cubic-bezier(0.33, 1, 0.68, 1);

  --nav-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
p { margin: 0 0 1em; }
p:last-child { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0;
  color: var(--ink);
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--lemon-soft); padding: 10px 16px;
  z-index: 9999;
}
.skip-link:focus { left: 0; top: 0; }

/* ================= NAV ================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 32px;
  height: var(--nav-h);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-mark { width: 42px; height: 42px; object-fit: contain; mix-blend-mode: multiply; }
.brand-word { font-family: var(--font-display); font-size: 24px; font-weight: 500; letter-spacing: 0; line-height: 1; }
.brand-word em { font-style: italic; letter-spacing: 0.03em; margin-right: 2px; }

.nav-links { display: flex; justify-content: center; gap: clamp(16px, 2.4vw, 32px); }
.nav-links a {
  font-family: var(--font-body);
  font-size: 15px; font-weight: 400;
  color: var(--ink);
  padding: 6px 0;
  position: relative;
  opacity: .75;
  transition: opacity .2s var(--ease);
}
.nav-links a:hover { opacity: 1; }
.nav-links a.is-current { opacity: 1; font-weight: 500; }
.nav-links a.is-current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--lemon);
}

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  background: var(--forest);
  color: var(--lemon-soft);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-cta:hover { background: var(--lemon-soft); color: var(--forest); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; gap: 6px;
  align-items: center; justify-content: center;
  color: var(--ink);
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 12px var(--gutter) 28px;
  gap: 2px;
  background: var(--white);
  border-top: 1px solid var(--line-soft);
}
.nav-mobile a { padding: 16px 0; font-family: var(--font-display); font-size: 24px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
.nav-mobile a.is-current { color: var(--forest); }
.nav-mobile .mobile-phone { margin-top: 14px; background: var(--forest); color: var(--lemon-soft); padding: 16px; text-align: center; font-size: 16px; border: none; }

@media (max-width: 920px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-inner { grid-template-columns: auto 1fr auto; }
  .nav.is-open .nav-mobile { display: flex; }
}

main { padding-top: var(--nav-h); }

/* ================= LABEL + HEADING ================= */
.label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--forest);
  margin: 0 0 20px;
}
.big-heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 28px;
}
.big-heading em { font-style: italic; color: var(--forest); font-weight: 500; }

/* ================= PAGE INTRO ================= */
.page-intro {
  padding: clamp(72px, 10vw, 120px) var(--gutter) clamp(48px, 7vw, 80px);
  max-width: 920px;
  margin: 0 auto;
}
.lede {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.65;
  color: var(--ink);
  opacity: .82;
  max-width: 42em;
  margin: 0;
}

/* ================= CONTROLS ================= */
.controls {
  max-width: var(--container);
  margin: 0 auto clamp(32px, 5vw, 48px);
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.view-toggle {
  display: inline-flex;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 14px;
}
.view-link {
  padding: 10px 18px;
  font-family: inherit;
  font-size: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.view-link:hover { background: var(--cream); }
.view-link.is-active {
  background: var(--forest);
  color: var(--lemon-soft);
  border-color: var(--forest);
}
.view-toggle .divider { display: none; }

.photo-count {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--forest-med);
  margin: 0;
}
.photo-count span {
  color: var(--ink);
  font-weight: 500;
  margin-right: 3px;
}

/* ================= GALLERY ================= */
.gallery-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(80px, 10vw, 140px);
}

.gallery[data-view="masonry"] {
  column-count: 4;
  column-gap: 16px;
}
@media (max-width: 1100px) { .gallery[data-view="masonry"] { column-count: 3; } }
@media (max-width: 720px)  { .gallery[data-view="masonry"] { column-count: 2; column-gap: 12px; } }
@media (max-width: 460px)  { .gallery[data-view="masonry"] { column-count: 1; } }

.gallery[data-view="masonry"] .tile {
  break-inside: avoid;
  margin-bottom: 16px;
}
@media (max-width: 720px) { .gallery[data-view="masonry"] .tile { margin-bottom: 12px; } }

.gallery[data-view="grid"] {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .gallery[data-view="grid"] { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .gallery[data-view="grid"] { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.gallery[data-view="grid"] .tile { aspect-ratio: 1/1; }
.gallery[data-view="grid"] .tile .tile-img { aspect-ratio: auto; height: 100%; }
.gallery[data-view="grid"] .tile-caption { display: none; }

.tile {
  display: block;
  width: 100%;
  text-align: left;
  cursor: zoom-in;
}
.tile:focus-visible { outline: 2px solid var(--lemon); outline-offset: 3px; }

.tile-img {
  position: relative;
  width: 100%;
  background: var(--cream-deep);
  overflow: hidden;
  transition: transform .5s var(--ease-slow);
}
.tile:hover .tile-img { transform: translateY(-4px); }
.tile img {
  width: 100%;
  display: block;
  transition: transform 1.2s var(--ease-slow), opacity .3s var(--ease);
}
.tile img[data-src] { opacity: 0; }
.tile:hover img { transform: scale(1.04); }

.tile-caption {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--forest-med);
  line-height: 1.4;
}
.tile-caption em {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest);
  margin-right: 6px;
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) { .tile img, .tile-img { transition: none; } }

/* ================= LIGHTBOX ================= */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(2, 30, 5, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px 24px;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.lightbox.is-open { display: flex; opacity: 1; }
.lb-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
}
.lb-figure figcaption {
  color: var(--lemon-soft);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: .75;
}
.lb-close, .lb-nav {
  position: absolute;
  width: 48px; height: 48px;
  background: var(--white);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: var(--lemon); }
.lb-close { top: 22px; right: 22px; }
.lb-prev  { left: 22px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 22px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }
  .lb-close { top: 12px; right: 12px; }
}

/* ================= FOOTER ================= */
.footer {
  background: var(--ink);
  color: var(--lemon-soft);
  padding: clamp(80px, 9vw, 130px) var(--gutter) clamp(32px, 4vw, 60px);
}
.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(240, 250, 153, 0.15);
  margin-bottom: 32px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-logo { width: 56px; height: 56px; object-fit: contain; margin-bottom: 8px; }
.footer-mark { font-family: var(--font-display); font-size: 26px; font-weight: 500; color: var(--lemon-soft); margin: 0; line-height: 1; }
.footer-tag { font-family: var(--font-body); font-size: 14px; color: rgba(240, 250, 153, 0.65); margin: 0; }
.footer-col p { margin: 0 0 .6em; font-size: 15px; line-height: 1.6; color: rgba(240, 250, 153, 0.82); }
.footer-col a { transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--lemon); }
.footer-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lemon);
  margin: 0 0 16px !important;
}
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-family: var(--font-body); font-size: 15px; color: rgba(240, 250, 153, 0.82); transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--lemon); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(240, 250, 153, 0.55);
}
.footer-bottom p { margin: 0; }

@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; gap: 32px; } }

/* ================= FOCUS + MOTION ================= */
:focus-visible { outline: 2px solid var(--lemon); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.nav { padding-top: env(safe-area-inset-top, 0px); }

@media (max-width: 720px) {
  .view-link {
    padding: 10px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
