/* =============================================
   KGrace Photography — styles
   ============================================= */

:root {
  --cream:      #faf8f5;
  --cream-dark: #f0ebe3;
  --dark:       #141414;
  --dark-mid:   #1e1e1e;
  --accent:     #c4956a;
  --accent-dk:  #a87a52;
  --text:       #1a1a1a;
  --text-muted: #6b6b6b;
  --border:     #e0d8cc;
  --white:      #ffffff;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Montserrat', system-ui, sans-serif;

  --nav-h: 72px;
  --radius: 4px;
  --gap:    10px;
  --section-pad: 96px 24px;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--text); background: var(--cream); line-height: 1.65; }
img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ─────────────────────────────── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.5rem; }
em { font-style: italic; }
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all 0.25s ease;
}
.btn-light { background: var(--white); color: var(--dark); }
.btn-light:hover { background: var(--cream); }
.btn-outline-light { border: 1.5px solid rgba(255,255,255,0.7); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: #2a2a2a; }

/* ── Navbar ─────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#navbar.scrolled {
  background: rgba(20,20,20,0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.logo span { font-style: italic; font-weight: 300; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-ig {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 8px 14px;
  border-radius: 20px;
  transition: all 0.2s !important;
}
.nav-ig:hover { background: var(--accent) !important; color: var(--white) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); transition: all 0.3s; border-radius: 2px; }

/* ── Hero ───────────────────────────────────── */
#hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.05);
  transition: transform 8s ease;
}
#hero.loaded .hero-img { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 50%, rgba(0,0,0,0.7) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  max-width: 800px;
}
.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero-content h1 { color: var(--white); margin-bottom: 20px; }
.hero-sub {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 40px;
  letter-spacing: 0.03em;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-hint span {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 12px;
  position: relative;
}
.scroll-hint span::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 8px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80%       { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

/* ── Gallery ────────────────────────────────── */
#gallery {
  background: var(--dark);
  padding: var(--section-pad);
}
#gallery.portfolio-page {
  padding-top: calc(var(--nav-h) + 64px);
}
#gallery .section-header { text-align: center; margin-bottom: 48px; }
#gallery .section-header h2 { color: var(--white); }
#gallery .eyebrow { color: var(--accent); }

/* ── View more button (home gallery) ────────── */
.gallery-more {
  text-align: center;
  margin-top: 40px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 9px 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  transition: all 0.2s;
}
.filter-btn:hover { color: var(--white); border-color: rgba(255,255,255,0.4); }
.filter-btn.active { background: var(--accent); color: var(--white); border-color: var(--accent); }

.gallery-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  background: var(--dark-mid);
  aspect-ratio: 3/4;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.3s;
  opacity: 0;
}
.gallery-item img.loaded { opacity: 1; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
}
.gallery-item:hover .gallery-item-overlay { background: rgba(0,0,0,0.25); }
.gallery-item.hidden { display: none; }

/* ── Lightbox ───────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
}
.lightbox[hidden] { display: none; }
.lb-img-wrap {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lb-caption {
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  margin-top: 16px;
  text-align: center;
  max-width: 600px;
  font-style: italic;
}
.lb-close {
  position: fixed;
  top: 20px; right: 28px;
  font-size: 2.2rem;
  color: rgba(255,255,255,0.7);
  line-height: 1;
  transition: color 0.2s;
  z-index: 2;
}
.lb-close:hover { color: var(--white); }
.lb-prev, .lb-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  font-size: 3rem;
  color: rgba(255,255,255,0.5);
  padding: 16px;
  line-height: 1;
  transition: color 0.2s;
  user-select: none;
  z-index: 2;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-prev:hover, .lb-next:hover { color: var(--white); }

/* ── About ──────────────────────────────────── */
#about {
  padding: var(--section-pad);
  background: var(--cream);
}
.about-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-img-wrap { position: relative; }
.about-img-wrap::before {
  content: '';
  position: absolute;
  top: -18px; left: -18px;
  right: 18px; bottom: 18px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  z-index: 0;
}
.about-img-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
}
.about-text h2 { margin-bottom: 24px; }
.about-text p  { color: var(--text-muted); margin-bottom: 18px; font-size: 0.95rem; line-height: 1.8; }
.about-text .btn { margin-top: 8px; }

/* ── Services ───────────────────────────────── */
#services {
  background: var(--dark);
  padding: var(--section-pad);
}
#services .section-header { text-align: center; margin-bottom: 56px; }
#services .section-header h2 { color: var(--white); }
#services .eyebrow { color: var(--accent); }

.services-grid {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark-mid);
  transition: transform 0.3s ease;
}
.service-card:hover { transform: translateY(-6px); }
.service-img {
  height: 260px;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
  overflow: hidden;
}
.service-card:hover .service-img { transform: scale(1.04); }
.service-body { padding: 24px; }
.service-body h3 { font-family: var(--font-display); color: var(--white); margin-bottom: 10px; font-size: 1.35rem; }
.service-body p  { color: rgba(255,255,255,0.55); font-size: 0.85rem; line-height: 1.75; }

/* ── Contact ────────────────────────────────── */
#contact {
  position: relative;
  padding: 120px 24px;
  text-align: center;
  overflow: hidden;
}
.contact-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,8,6,0.78);
}
.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}
#contact .eyebrow { color: var(--accent); display: block; margin-bottom: 12px; }
#contact h2 { color: var(--white); margin-bottom: 20px; }
.contact-sub {
  color: rgba(255,255,255,0.65);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 48px;
}
.contact-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  border: 1.5px solid rgba(196,149,106,0.4);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255,255,255,0.05);
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
  min-width: 240px;
}
.contact-card:hover {
  background: rgba(196,149,106,0.15);
  border-color: var(--accent);
  transform: translateY(-3px);
}
.contact-card svg { color: var(--accent); flex-shrink: 0; }
.contact-card-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 3px;
}
.contact-card-handle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
}
.contact-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
}
.contact-location svg { color: var(--accent); }

/* ── Footer ─────────────────────────────────── */
footer {
  background: var(--dark);
  padding: 48px 24px;
  text-align: center;
}
.footer-inner { max-width: 600px; margin: 0 auto; }
.footer-logo { font-family: var(--font-display); font-size: 1.6rem; color: var(--white); margin-bottom: 6px; }
.footer-location { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.08em; margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 24px; }
.footer-links a { font-size: 0.82rem; color: var(--accent); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.25); margin-bottom: 8px; }
.footer-credit { font-size: 0.8rem; color: rgba(255,255,255,0.38); margin-top: 6px; }
.footer-credit a { color: rgba(255,255,255,0.7); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.footer-credit a:hover { color: #c9943a !important; }

/* ── Section header helper ──────────────────── */
.section-header { margin-bottom: 56px; }
.section-header.light h2 { color: var(--white); }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1200px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner   { gap: 48px; }
}

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

  .nav-links {
    display: none; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(20,20,20,0.98);
    padding: 24px 32px 32px; gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-ig { width: fit-content; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .about-inner { grid-template-columns: 1fr; }
  .about-img-wrap { max-width: 380px; margin: 0 auto; }

  .services-grid { grid-template-columns: 1fr; }

  .contact-cards { flex-direction: column; align-items: center; }
  .contact-card  { width: 100%; max-width: 340px; }

  .lb-prev, .lb-next { font-size: 2rem; }
  .lightbox { padding: 60px 20px 40px; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
}
