/* ============================================================
   Alex Rivera Photography — Main Stylesheet
   ============================================================ */

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

:root {
  --bg:     #191919;
  --bg2:    #222;
  --text:   #e8e8e8;
  --dim:    #888;
  --gold:   #c9a46e;
  --border: #2e2e2e;
  --gap:    8px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  min-height: 100vh;
}

/* ── HEADER ──────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg);
  padding: 22px 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 300;
  font-size: 1.45rem;
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

nav { display: flex; align-items: center; }

nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color .2s;
}
nav a:hover  { color: var(--text); }
nav a.active { color: var(--gold); }
.nsep { color: var(--gold); margin: 0 12px; font-size: 0.45rem; line-height: 1; }

/* Hamburger — shown only on small screens (see RESPONSIVE) */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
}
.menu-btn span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: transform .25s, opacity .25s;
}
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── MAIN ────────────────────────────────────────────────── */
main { padding-top: 130px; min-height: 100vh; }

/* ── PAGE TRANSITIONS ────────────────────────────────────── */
.page { display: none; animation: fadeIn .3s ease; }
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HEADING ────────────────────────────────────────── */
.pg-head {
  padding: 0 80px 28px;
  font-size: .78rem;
  color: var(--dim);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ── HERO PHOTO ──────────────────────────────────────────── */
.hero {
  width: 100%;
  height: 75vh;
  overflow: hidden;
  margin-bottom: var(--gap);
  position: relative;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.25,.46,.45,.94);
}
.hero:hover img { transform: scale(1.04); }

/* ── MASONRY GRID ────────────────────────────────────────── */
.masonry {
  columns: 3;
  column-gap: var(--gap);
  padding: 0 80px var(--gap);
}

.m-item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  position: relative;
  z-index: 1;
  transition: z-index 0s .55s;
  cursor: pointer;
}
.m-item:hover {
  z-index: 50;
  transition: z-index 0s 0s;
}
.m-item img {
  width: 100%;
  display: block;
  position: relative;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), box-shadow .45s ease;
  transform-origin: center center;
}
.m-item:hover img {
  transform: scale(1.45);
  box-shadow: 0 24px 64px rgba(0,0,0,.75);
}
.m-item .ov {
  position: absolute; inset: 0;
  pointer-events: none;
}

/* ── GALLERY FILTERS ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 28px;
  padding: 0 80px 28px;
  flex-wrap: wrap;
}
.fbtn {
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--dim);
  font-family: 'Inter', sans-serif;
  font-size: .83rem;
  cursor: pointer;
  padding: 4px 0;
  transition: color .2s, border-color .2s;
}
.fbtn:hover  { color: var(--text); }
.fbtn.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ── SHOP GRID ───────────────────────────────────────────── */
.shop-grid {
  columns: 3;
  column-gap: var(--gap);
  padding: 0 80px var(--gap);
}
.s-item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  position: relative;
  z-index: 1;
  transition: z-index 0s .45s;
  cursor: pointer;
}
.s-item:hover {
  z-index: 50;
  transition: z-index 0s 0s;
}
.s-item img {
  width: 100%; display: block;
  position: relative;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), box-shadow .45s ease;
}
.s-item:hover img {
  transform: scale(1.45);
  box-shadow: 0 24px 64px rgba(0,0,0,.75);
}

/* ── ABOUT ───────────────────────────────────────────────── */
.about-wrap { padding: 0 80px 80px; max-width: 920px; }
.about-wrap img {
  width: 100%;
  max-width: 680px;
  display: block;
  margin-bottom: 36px;
}
.about-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 16px;
}
.about-text {
  color: var(--dim);
  font-size: .875rem;
  line-height: 1.85;
  max-width: 620px;
}

/* ── CONTACT ─────────────────────────────────────────────── */
.contact-wrap {
  padding: 0 80px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.c-label { font-size: .85rem; font-weight: 500; color: var(--dim); margin-bottom: 14px; }
.c-desc  { font-size: .85rem; color: var(--dim); line-height: 1.85; }

.c-form { display: flex; flex-direction: column; }
.f-inp {
  background: transparent;
  border: 1px solid var(--border);
  border-bottom: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  padding: 14px 16px;
  outline: none;
  width: 100%;
  transition: border-color .2s;
}
.f-inp:focus { border-color: var(--gold); }
.f-inp::placeholder { color: var(--dim); }
select.f-inp { appearance: none; cursor: pointer; }
select.f-inp:invalid { color: var(--dim); }
select.f-inp option { background: var(--bg); color: var(--text); }
input[type="date"].f-inp { color-scheme: dark; }
.f-honey { display: none; }
.f-status { margin-top: 14px; font-size: .82rem; min-height: 1.2em; }
.f-status.ok  { color: var(--gold); }
.f-status.err { color: #e07070; }
.btn-send:disabled { opacity: .5; cursor: wait; }
textarea.f-inp {
  border-bottom: 1px solid var(--border);
  min-height: 140px;
  resize: vertical;
}
.btn-send {
  margin-top: 16px;
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-size: .83rem;
  letter-spacing: .06em;
  padding: 13px 32px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-send:hover { background: var(--gold); color: var(--bg); }

/* ── VIDEOS ──────────────────────────────────────────────── */
.videos-grid {
  padding: 0 80px 60px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.v-card { cursor: pointer; }
.v-thumb { position: relative; overflow: hidden; }
.v-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.v-card:hover .v-thumb img { transform: scale(1.03); }
.play-ov {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.32);
  transition: background .2s;
}
.v-card:hover .play-ov { background: rgba(0,0,0,.5); }
.play-ov svg { width: 52px; height: 52px; fill: rgba(255,255,255,.88); }
.v-title { font-size: .85rem; color: var(--dim); margin-top: 12px; }

/* ── BLOG ────────────────────────────────────────────────── */
.blog-grid {
  padding: 0 80px 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.b-card { overflow: hidden; cursor: pointer; }
.b-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  margin-bottom: 14px;
  transition: transform .4s;
}
.b-card:hover img { transform: scale(1.02); }
.b-date    { font-size: .72rem; color: var(--gold); margin-bottom: 7px; }
.b-title   { font-size: .9rem; font-weight: 500; margin-bottom: 8px; }
.b-excerpt { font-size: .8rem; color: var(--dim); line-height: 1.75; }

/* ── LIGHTBOX ────────────────────────────────────────────── */
.lb {
  display: none;
  position: fixed; inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.lb.open {
  display: flex;
  animation: lbFadeIn .3s ease forwards;
}
@keyframes lbFadeIn {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,.92); }
}
.lb-img-wrap {
  max-width: 92vw;
  max-height: 92vh;
  animation: lbScale .35s cubic-bezier(.34,1.3,.64,1) forwards;
}
@keyframes lbScale {
  from { transform: scale(.82); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.lb img {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  box-shadow: 0 32px 80px rgba(0,0,0,.8);
}
.lb-close {
  position: absolute; top: 20px; right: 28px;
  background: none; border: none;
  color: #fff; font-size: 2.2rem; line-height: 1;
  cursor: pointer; opacity: .6;
  transition: opacity .2s;
  z-index: 201;
}
.lb-close:hover { opacity: 1; }
.lb-hint {
  position: absolute; bottom: 22px;
  font-size: .72rem; color: rgba(255,255,255,.35);
  letter-spacing: .08em;
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 80px;
  margin-top: 60px;
}
.f-social {
  display: flex; justify-content: center;
  gap: 24px; margin-bottom: 18px;
}
.f-social a { color: var(--dim); text-decoration: none; transition: color .2s; }
.f-social a:hover { color: var(--text); }
.f-nav { display: flex; justify-content: center; flex-wrap: wrap; }
.f-nav a {
  color: var(--dim); text-decoration: none;
  font-size: .78rem; cursor: pointer;
  transition: color .2s;
}
.f-nav a:hover { color: var(--text); }
.fsep { color: var(--gold); margin: 0 10px; font-size: .4rem; vertical-align: middle; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 960px) {
  header { padding: 18px 24px; }
  main   { padding-top: 110px; }
  .masonry, .shop-grid { columns: 2; padding: 0 24px var(--gap); }
  .contact-wrap, .videos-grid, .blog-grid {
    grid-template-columns: 1fr;
    padding-left: 24px;
    padding-right: 24px;
  }
  .about-wrap, .filter-bar, .pg-head { padding-left: 24px; padding-right: 24px; }
  footer { padding: 28px 24px; }
}
@media (max-width: 820px) {
  /* Hamburger replaces the inline nav */
  .menu-btn { display: flex; }
  nav {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
  }
  body.menu-open { overflow: hidden; }
  body.menu-open nav { opacity: 1; visibility: visible; }
  nav a { font-size: 1.15rem; letter-spacing: .04em; padding: 6px 20px; }
  .nsep { display: none; }
}
@media (max-width: 600px) {
  header { padding: 14px 16px; }
  main   { padding-top: 84px; }
  .logo  { font-size: 1rem; }

  /* Show the hero photo uncropped instead of a tall sliver */
  .hero { height: auto; aspect-ratio: 3 / 2; }

  .masonry, .shop-grid { columns: 1; padding: 0 16px var(--gap); }
  .about-wrap, .pg-head { padding-left: 16px; padding-right: 16px; }
  .contact-wrap, .videos-grid, .blog-grid { padding-left: 16px; padding-right: 16px; gap: 40px; }
  footer { padding: 28px 16px; }

  /* Filters scroll sideways instead of wrapping */
  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 22px;
    padding: 0 16px 22px;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .fbtn { flex-shrink: 0; font-size: .9rem; padding: 8px 0; }

  /* 16px stops iOS from zooming in when a field is tapped */
  .f-inp { font-size: 16px; }
  .btn-send { align-self: stretch; padding: 15px 32px; }

  .lb-close { top: 10px; right: 12px; padding: 8px 12px; }
  .lb img, .lb-img-wrap { max-width: 100vw; }
}

/* Touch screens: no hover zoom (it sticks after a tap and covers neighbours) */
@media (hover: none) {
  .hero:hover img, .m-item:hover img, .s-item:hover img { transform: none; box-shadow: none; }
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-msg {
  color: var(--dim);
  padding: 40px 0;
  text-align: center;
  column-span: all;
  grid-column: 1 / -1;
}
