/*
Theme Name: Beloveful Photography
Theme URI: https://beloveful.com
Author: Tony Menias
Description: Native WordPress photography portfolio theme converted from the Beloveful React website.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: beloveful
*/

:root {
  --bg: #fff;
  --text: #111;
  --muted: #666;
  --border: #dedede;
  --panel: rgba(255, 255, 255, .94);
  --max: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
body.is-dark {
  --bg: #0d0d0d;
  --text: #f7f7f7;
  --muted: #aaa;
  --border: #333;
  --panel: rgba(13, 13, 13, .94);
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 1rem;
  padding: .7rem 1rem;
  z-index: 10000;
  background: #fff;
  color: #000;
}
.site-shell { min-height: 100vh; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(12px);
}
.home .site-header {
  position: fixed;
  inset: 0 0 auto;
  border: 0;
  color: #fff;
  background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent);
  backdrop-filter: none;
}
.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: auto;
  padding: .75rem 0;
}
.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  text-decoration: none;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.custom-logo { width: auto; max-height: 58px; }
.site-nav { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.site-nav .menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover,
.site-nav .current-menu-item > a { text-decoration: underline; text-underline-offset: 5px; }
.menu-toggle,
.theme-toggle {
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.menu-toggle { display: none; padding: .55rem .8rem; }
.theme-toggle { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; }
.content {
  width: min(var(--max), calc(100% - 2rem));
  min-height: 65vh;
  margin: auto;
  padding: clamp(2rem, 5vw, 5rem) 0;
}
.page-header { max-width: 800px; margin: 0 auto 3rem; text-align: center; }
.page-title { margin: 0 0 .5rem; font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 300; line-height: 1.1; }
.page-description { color: var(--muted); }
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #111;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 12s ease-out both; }
.hero-caption {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 3;
  color: #fff;
  font-size: .8rem;
  text-shadow: 0 1px 3px #000;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.06); } }
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 2rem;
}
.filter-link {
  padding: .45rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  font-size: .9rem;
}
.filter-link:hover,
.filter-link.is-active { background: var(--text); color: var(--bg); }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.portfolio-card { text-decoration: none; }
.portfolio-cover {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e7e7e7;
}
.portfolio-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.portfolio-card:hover img { transform: scale(1.035); }
.portfolio-card h2 { margin: .65rem 0 0; font-size: 1.1rem; font-weight: 500; }
.portfolio-card p { margin: 0; color: var(--muted); font-size: .85rem; }
.gallery-masonry { columns: 4 260px; column-gap: 3px; }
.gallery-item {
  display: block;
  width: 100%;
  margin: 0 0 3px;
  padding: 0;
  break-inside: avoid;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.gallery-item img { width: 100%; transition: transform .25s ease; }
.gallery-item:hover img { transform: scale(1.015); }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 2rem;
  background: rgba(0,0,0,.94);
}
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.lightbox button {
  position: fixed;
  z-index: 2;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; }
.lightbox-next { right: 1rem; top: 50%; }
.entry-content { max-width: 840px; margin: auto; }
.entry-content > * { max-width: 100%; }
.site-footer { border-top: 1px solid var(--border); }
.home .site-footer { display: none; }
.footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: .85rem;
}
.footer-menu { display: flex; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.footer-menu a { text-decoration: none; }

@media (max-width: 800px) {
  .header-inner { display: flex; align-items: center; justify-content: space-between; }
  .brand { justify-content: flex-start; font-size: 1.1rem; }
  .menu-toggle { display: block; }
  .theme-toggle { position: static; }
  .site-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    padding: 1.25rem;
    background: var(--panel);
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.is-open { display: block; }
  .site-nav .menu { flex-direction: column; }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .lightbox { padding: .5rem; }
}

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