/* ==========================================================================
   Memories by Matt Photography — Site Stylesheet
   Custom WordPress theme baseline (static staging build)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f5f2;
  --ink: #12161c;
  --text: #171b21;
  --text-muted: #5b6270;
  --border: #e6e4de;
  --header-bg: #10141b;
  --header-bg-2: #171d27;
  --footer-bg: #0c0f14;
  --primary: #c9a15a;
  --primary-dark: #a9813f;
  --primary-ink: #10141b;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(16, 20, 27, 0.08);
  --shadow-lg: 0 20px 50px rgba(16, 20, 27, 0.16);
  --container: 1200px;
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Scoped Realtor invitation; no changes to existing page components. */
.realtor-invitation {
  width: min(600px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  margin: auto;
  padding: 44px 36px 30px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--header-bg);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-body);
}
.realtor-invitation::backdrop { background: rgba(12,15,20,.6); }
.realtor-invitation h2 { color: var(--white); font-size: clamp(1.5rem, 4vw, 2rem); }
.realtor-invitation-eyebrow { color: var(--primary); font-size: .8rem; font-weight: 700; letter-spacing: .12em; }
.realtor-invitation-close { position: absolute; top: 8px; right: 10px; width: 44px; height: 44px; border: 0; background: transparent; color: white; font: 32px/1 var(--font-body); cursor: pointer; }
.realtor-invitation-actions { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
.realtor-invitation .btn { white-space: normal; text-align: center; }
.realtor-invitation-footer { margin: 0; padding-top: 20px; border-top: 1px solid rgba(201,161,90,.35); font-size: .8rem; color: #d5d9df; text-align: center; }
.realtor-invitation :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (max-width: 600px) {
  .realtor-invitation { padding: 46px 22px 24px; }
  .realtor-invitation .btn { font-size: .82rem; padding: 13px 14px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 1200px) {
  main .container {
    max-width: 1360px;
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 8px 20px rgba(201, 161, 90, 0.35);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

/* Ghost button on light backgrounds (outside hero) */
.section .btn-ghost,
.card .btn-ghost {
  color: var(--ink);
  border-color: var(--border);
}
.section .btn-ghost:hover,
.card .btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(0,0,0,0.03);
}

.btn[disabled],
.btn.is-disabled {
  background: var(--bg-alt);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
  box-shadow: none;
}
.btn[disabled]:hover,
.btn.is-disabled:hover { transform: none; }

/* ---------------- Header ---------------- */
.header {
  background: linear-gradient(180deg, var(--header-bg), var(--header-bg-2));
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--white);
}
.brand img {
  height: 235px;
  width: auto;
}
.brand strong {
  font-size: 0.78rem;
  color: var(--white);
  display: block;
}
.brand-name {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9em;
  letter-spacing: 0.04em;
}
.brand span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
  border-color: var(--primary);
}

.header-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  padding: 9px 11px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  margin: 4px 0;
}

@media (max-width: 880px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg-2);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 20px 18px;
    display: none;
    box-shadow: 0 12px 20px rgba(0,0,0,0.25);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { width: 100%; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-toggle { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; }
  .header-cta .btn-primary { padding: 10px 16px; font-size: 0.85rem; }
  .brand img { height: 108px; }
}

/* ---------------- Hero ---------------- */
.hero {
  padding: 64px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: rgba(201,161,90,0.12);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark hero variant used when hero sits directly under dark header */
.hero.hero-dark { background: var(--header-bg); }
.hero.hero-dark .hero-content h1,
.hero.hero-dark .hero-content .lead { color: var(--white); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}

/* ---------------- Sections / Grids ---------------- */
.section { padding: 56px 0; }
.section-title { margin-bottom: 26px; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: relative;
}
.card h3 { margin-top: 0; }

.price {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--primary-dark);
  margin: 6px 0 4px;
}

.text-muted { color: var(--text-muted); }

.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.list { margin: 10px 0 0; padding-left: 20px; color: var(--text-muted); }
.list li { margin-bottom: 6px; }

.badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(201,161,90,0.4);
}

.note {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------------- CTA band ---------------- */
.cta-band {
  background: linear-gradient(135deg, var(--header-bg), var(--header-bg-2));
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.cta-band h2 { color: var(--white); margin: 0; }

/* ---------------- Portfolio grid / tiles ---------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .portfolio-grid { grid-template-columns: 1fr; } }

.tile {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  box-shadow: var(--shadow);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left bottom;
  transition: transform 0.35s ease;
}
.tile:hover img { transform: scale(1.06); }
.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.tile-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(12,15,20,0.55);
  border: 2px solid rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.tile-video:hover .tile-play-badge { background: rgba(12,15,20,0.75); }
.tile-play-badge svg { width: 22px; height: 22px; fill: var(--white); margin-left: 3px; }
.tile-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(0deg, rgba(12,15,20,0.85), rgba(12,15,20,0));
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Category filter pills on /portfolio.html */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.filter-pill {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-pill.is-active,
.filter-pill:hover {
  background: var(--header-bg);
  color: var(--white);
  border-color: var(--header-bg);
}

.project-card { text-decoration: none; color: inherit; }
.project-card .card-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: var(--bg-alt);
}
.project-card .card-media img { width: 100%; height: 100%; object-fit: cover; object-position: left bottom; transition: transform .35s ease; }
.project-card:hover .card-media img { transform: scale(1.05); }
.project-card .card-body {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 18px 20px;
  background: var(--white);
}
.project-card .card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.project-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: rgba(201,161,90,0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------------- Single project page ---------------- */
.project-hero {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  margin-bottom: 26px;
}
.project-hero img { width: 100%; height: 100%; object-fit: cover; }

.project-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
  cursor: zoom-in;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.04); }

.section-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8,10,14,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 30px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 84vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.22); }

/* ---------------- Publication / Featured press section ---------------- */
.publication {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}
.publication .publication-media {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.publication .publication-media img { width: 100%; height: auto; }
.publication blockquote {
  margin: 14px 0;
  padding-left: 16px;
  border-left: 3px solid var(--primary);
  color: var(--text-muted);
  font-style: italic;
}
@media (max-width: 800px) {
  .publication { grid-template-columns: 1fr; }
}

/* ---------------- Footer ---------------- */
.footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.75);
  padding: 50px 0 30px;
  margin-top: 30px;
}
.footer a { color: rgba(255,255,255,0.75); }
.footer a:hover { color: var(--white); }
.footer .btn-primary,
.footer .btn-primary:hover { color: var(--primary-ink); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer strong { display: block; margin-bottom: 4px; }
.footer-logo {
  height: 148px;
  width: auto;
  display: block;
  margin-bottom: 8px;
}
.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-logo { height: 102px; }
}

@media (min-width: 881px) {
  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    white-space: nowrap;
  }
}
