/* ===========================================================
   ManRay Photography — demo site
   Signature move: "The Set Change" — an occasion switcher that
   crossfades the hero photo + the page's whole accent theme at
   once, mirroring the real studio building a new balloon-arch
   backdrop for every occasion.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Gloock&family=Onest:wght@400;500;600;700;800&display=swap');

/* ---------- animatable colour custom properties ----------
   Registering these as <color> lets the browser interpolate them
   smoothly on transition, which is what makes "The Set Change"
   crossfade the whole theme instead of hard-cutting it. Falls back
   to an instant (non-animated) swap in browsers without @property
   support — same outcome the reduced-motion path already uses. */
@property --accent      { syntax: '<color>'; inherits: true; initial-value: #6B4EFF; }
@property --accent-2    { syntax: '<color>'; inherits: true; initial-value: #C9A227; }
@property --accent-soft { syntax: '<color>'; inherits: true; initial-value: #EFE9FF; }

:root {
  /* base palette — warm, light, not on the ledger */
  --paper:      #FBF8F4;
  --paper-alt:  #F3EEE6;
  --surface:    #FFFFFF;
  --ink:        #241E2E;
  --ink-soft:   #55506A;
  --ink-mute:   #8B8598;
  --line:       #E4DDD0;

  /* seed + derived — overridden per occasion below */
  --accent:      #6B4EFF;
  --accent-2:    #C9A227;
  --accent-soft: #EFE9FF;

  --whatsapp: #25D366;
  --whatsapp-ink: #0B1F14;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --maxw: 1180px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --set-change-duration: 450ms;
}

/* ---------- per-occasion theme tokens ----------
   Selecting an occasion swaps these; --accent/--accent-2/--accent-soft
   transition smoothly wherever they're used (buttons, active pill,
   dividers, etc). */
body[data-occasion="matric"] {
  --accent: #1B1015;
  --accent-2: #8C1C2B;
  --accent-soft: #F3DEE1;
}
body[data-occasion="studio"] {
  --accent: #C2410C;
  --accent-2: #F4A340;
  --accent-soft: #FCEBD9;
}
body[data-occasion="maternity"] {
  --accent: #5B7553;
  --accent-2: #A8C2A0;
  --accent-soft: #EEF3EA;
}
body[data-occasion="family"] {
  --accent: #3B5A7A;
  --accent-2: #8FAFC7;
  --accent-soft: #EAF1F6;
}

@media (prefers-reduced-motion: no-preference) {
  body {
    transition:
      --accent var(--set-change-duration) ease-out,
      --accent-2 var(--set-change-duration) ease-out,
      --accent-soft var(--set-change-duration) ease-out;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display {
  font-family: 'Gloock', 'Iowan Old Style', Georgia, serif;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- buttons (design matched to Tarita Capetown Photography's real
   .btn-secondary — outline pill that inverts to a solid fill on hover) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 10px 18px; font-size: 14px; min-height: 38px; }
.btn-whatsapp {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
}
.btn-whatsapp:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* inverted for the dark book-panel section */
.book-panel .btn-whatsapp {
  border-color: rgba(255,255,255,0.85);
  color: #fff;
}
.book-panel .btn-whatsapp:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- header ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251,248,244,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 20px;
}
.logo {
  font-family: 'Gloock', serif;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
nav.primary-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}
nav.primary-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 150ms;
}
nav.primary-nav a:hover { color: var(--ink); }
header.top .btn { flex-shrink: 0; }

/* ---------- hamburger + mobile menu ---------- */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle svg { width: 24px; height: 24px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  transform: translateY(-100%);
  transition: transform 300ms var(--ease-out);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.mobile-menu nav a {
  font-family: 'Gloock', serif;
  font-size: 30px;
  color: var(--ink);
  text-decoration: none;
}
.mobile-menu-foot {
  position: absolute;
  bottom: 32px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.menu-close svg { width: 24px; height: 24px; }

@media (max-width: 820px) {
  nav.primary-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 720px) {
  header.top .btn { display: none; }
}
@media (min-width: 821px) {
  .mobile-menu { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 24px 0 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 56px;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  /* image first, then heading/subtext/CTA — matches the Tarita mobile pattern */
  .hero-visual { order: 1; }
  .hero-copy { order: 2; }
}
@media (min-width: 961px) {
  /* cap the hero photo's height so the switcher stays above the fold on
     wide viewports — at 4:5 filling the whole grid column it can run
     well past typical laptop viewport height */
  .hero-visual { display: flex; justify-content: flex-end; }
  .set-stage { width: 100%; max-width: 420px; }
}

.hero-copy h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.08;
  max-width: 14ch;
  margin-bottom: 20px;
}
.hero-copy p.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.hero-trust .stars { display: flex; gap: 2px; color: var(--ink); }
.hero-trust .stars svg { width: 15px; height: 15px; }
@media (max-width: 960px) {
  .hero-trust { display: none; }
}

/* ---------- the set change: hero photo + occasion switcher ---------- */
.set-stage {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-alt);
  box-shadow: 0 30px 60px -30px rgba(36,30,46,0.35);
}
.set-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 0;
  transition: opacity var(--set-change-duration) ease-out;
  will-change: opacity;
}
.set-photo.is-active { opacity: 1; }

/* dark scrim behind the caption — a soft text-shadow alone isn't reliable
   contrast against a light or busy part of a real photo (per the eye-friendly-
   hero rule: text-over-photo needs a scrim/panel, never raw photo behind text) */
.set-scrim {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 58%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(10,8,6,0.75) 0%, rgba(10,8,6,0.38) 50%, rgba(10,8,6,0) 100%);
}

/* subtle grain wash unifying the bright photos — texture, not a filter over everything */
.set-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.set-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 84px;
  z-index: 2;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  -webkit-text-stroke: 0.5px rgba(0,0,0,0.55);
  text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 4px 16px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--set-change-duration) ease-out, transform var(--set-change-duration) ease-out;
}
.set-caption.is-active { opacity: 1; transform: translateY(0); }

/* the switcher itself — light, warm-tinted glass, not the dark/vibrant default */
.set-switcher {
  position: absolute;
  z-index: 2;
  left: 12px;
  right: 12px;
  bottom: 14px;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 100px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 10px 30px -12px rgba(36,30,46,0.4);
  overflow-x: auto;
  scrollbar-width: none;
}
.set-switcher::-webkit-scrollbar { display: none; }
.set-switcher button {
  flex: 1 0 auto;
  scroll-snap-align: start;
  border: none;
  background: transparent;
  font-family: 'Onest', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 200ms, background-color 200ms;
}
.set-switcher button.is-active {
  color: #fff;
  background: var(--accent);
  transition: color 200ms, background-color var(--set-change-duration) ease-out;
}
@media (max-width: 960px) {
  /* mobile hero: 3 pills is plenty in the compact glass bar — drop the 4th */
  .set-switcher button:nth-child(4) { display: none; }
}
@media (max-width: 480px) {
  .set-switcher { overflow-x: scroll; scroll-snap-type: x mandatory; justify-content: flex-start; }
  .set-switcher button { flex: 0 0 auto; }
}

/* ---------- trust strip ---------- */
/* ---------- section shell ---------- */
section { padding: 84px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .eyebrow-plain {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); font-size: 17px; max-width: 52ch; margin: 0 auto; }

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 400ms var(--ease-out);
}
.gallery-grid img:hover { transform: scale(1.03); }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

.gallery-more { text-align: center; margin-top: 36px; }
.gallery-more-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.gallery-more-links a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 10px 18px; text-decoration: none;
  transition: border-color 200ms, background-color 200ms;
}
.gallery-more-links a:hover { border-color: var(--ink); background: var(--surface); }
.gallery-more-links svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- reviews (card wall — real Facebook / Google recommendations) ---------- */
.reviews-wall { columns: 3 300px; column-gap: 20px; }
@media (max-width: 620px) { .reviews-wall { columns: 1; } }
.rw-card {
  break-inside: avoid;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 28px;
}
.rw-card .rw-stars { display: flex; gap: 3px; color: var(--accent-2); margin-bottom: 13px; }
.rw-card .rw-stars svg { width: 15px; height: 15px; }
.rw-card q {
  display: block; quotes: none;
  font-family: 'Onest', sans-serif;
  font-size: 15.5px; line-height: 1.62; color: var(--ink-soft);
  margin-bottom: 18px;
}
.rw-who {
  font-family: 'Onest', sans-serif; font-weight: 600;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-mute);
}
.rw-role {
  font-size: 12.5px; color: var(--ink-mute);
  text-transform: none; letter-spacing: 0; font-weight: 500; margin-top: 2px;
}

/* ---------- find the studio ---------- */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 860px) { .studio-grid { grid-template-columns: 1fr; } }
.studio-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px;
}
.studio-card h3 { font-size: 20px; margin-bottom: 20px; }
.studio-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft, var(--line)); font-size: 14.5px; color: var(--ink-soft); }
.studio-row:first-of-type { border-top: 0; padding-top: 0; }
.studio-row svg { width: 19px; height: 19px; color: var(--ink); flex-shrink: 0; margin-top: 2px; }
.studio-row strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.studio-row a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); }
.studio-map { border-radius: var(--radius-md); overflow: hidden; min-height: 280px; border: 1px solid var(--line); }
.studio-map iframe { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; }

/* ---------- book (glass CTA card) ---------- */
.book-section { text-align: center; }
.book-glass {
  max-width: 620px;
  margin: 0 auto;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-lg);
  padding: 56px 44px;
  box-shadow: 0 30px 60px -30px rgba(36,30,46,0.25);
}
.book-glass h2 { margin: 10px 0 14px; }
.book-glass p { color: var(--ink-soft); margin: 0 0 28px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: var(--ink);
  font-weight: 400;
  flex-shrink: 0;
  transition: transform 200ms ease-out;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 14px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }

/* ---------- FAQ-ish nothing / footer ---------- */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--paper-alt); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-family: 'Gloock', serif; font-size: 20px; margin-bottom: 10px; color: var(--ink); }
.footer-brand span { color: var(--ink); }
.footer-col .k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink); font-weight: 700; margin-bottom: 10px; }
.footer-col .v { font-size: 15px; color: var(--ink-soft); margin-bottom: 8px; }
.footer-col .v a { color: var(--ink-soft); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.footer-col .v a:hover { color: var(--ink); }
.footer-col .v a svg { width: 17px; height: 17px; flex-shrink: 0; }
.foot-fine { font-size: 13px; color: var(--ink-mute); text-align: center; padding-top: 24px; border-top: 1px solid var(--line); margin: 0; }
.foot-fine a { color: var(--ink-mute); text-decoration: underline; }

/* ---------- gallery lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18,14,10,0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-img {
  max-width: 86vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  background: rgba(15,12,10,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transition: background-color 200ms;
}
.lightbox-close:hover { background: rgba(15,12,10,0.8); }
.lightbox-close svg { width: 20px; height: 20px; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  background: rgba(15,12,10,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  transition: background-color 200ms;
}
.lightbox-nav:hover { background: rgba(15,12,10,0.8); }
.lightbox-nav svg { width: 22px; height: 22px; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
@media (max-width: 640px) {
  .lightbox-img { max-width: 92vw; max-height: 74vh; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-nav svg { width: 18px; height: 18px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ---------- focus states (accessibility) ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
