/* =========================================================
   Real Interface Studios — "Signal Navy" design system
   Shared stylesheet for all pages. Mobile-first, fluid type,
   breakpoints at 480 / 768 / 1024 / 1280.
   ========================================================= */

:root {
  /* Navy scale */
  --navy-950: #060b16;
  --navy-900: #0a1526;
  --navy-800: #0f1d33;
  --navy-700: #152847;
  --navy-600: #1d3660;
  --navy-500: #274978;

  /* Accents */
  --gold-300: #ecd8a4;
  --gold-400: #ddbb73;
  --gold-500: #cda85a;
  --gold-600: #b08f43;
  --blue-400: #5aa2ff;
  --blue-300: #8cc0ff;

  /* Ink / text */
  --ink-100: #f3f6fb;
  --ink-200: #dde4ef;
  --ink-300: #b7c2d6;
  --ink-500: #8493ac;
  --ink-700: #56637c;

  /* Surfaces */
  --surface-glass: rgba(21, 40, 71, 0.55);
  --surface-glass-strong: rgba(15, 29, 51, 0.78);
  --border-soft: rgba(221, 187, 115, 0.18);
  --border-faint: rgba(255, 255, 255, 0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.55);
  --shadow-glow-gold: 0 0 0 1px rgba(221, 187, 115, 0.35), 0 8px 30px -8px rgba(221, 187, 115, 0.35);

  --container-w: 1180px;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--navy-950);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink-200);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(93, 140, 214, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(221, 187, 115, 0.10), transparent 55%),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-950) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink-100);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; line-height: 1.7; color: var(--ink-300); }

a { color: var(--blue-300); text-decoration: none; }
a:hover { color: var(--gold-400); }

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

.container {
  width: min(92%, var(--container-w));
  margin-inline: auto;
}

.accent { color: var(--gold-400); }

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--blue-300);
  margin: 0 0 0.35em;
}

.divider {
  height: 1px;
  width: 100%;
  margin: 0.9em 0 1.2em;
  background: linear-gradient(90deg, var(--gold-500), transparent 75%);
  opacity: 0.6;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.75em 1.5em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--navy-950);
}
.btn-primary:hover {
  color: var(--navy-950);
  box-shadow: var(--shadow-glow-gold);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-soft);
  color: var(--ink-100);
}
.btn-outline:hover {
  border-color: var(--gold-400);
  color: var(--gold-400);
  transform: translateY(-1px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 11, 22, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-faint);
}

/* This wrapper only measures width for the container queries below —
   the element being restyled (.header-inner) must be a descendant of
   it, not the same element, or the @container rules silently no-op. */
.header-shell {
  container-type: inline-size;
  container-name: header;
}

/* Mobile-first: logo + tagline share one column, hamburger sits
   in its own column to the right, vertically centered against them. */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "logo nav"
    "tagline nav";
  align-items: center;
  column-gap: clamp(0.75rem, 3vw, 1.5rem);
  row-gap: 0.3rem;
  padding: 0.85rem 0;
}

.brand {
  grid-area: logo;
  display: flex;
  align-items: center;
  position: relative;
  border-radius: 14px;
}
.brand-logo {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

/* Soft pulsating backlight behind the banner */
.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: brand-glow-pulse 3.2s ease-in-out infinite;
}

@keyframes brand-glow-pulse {
  0%, 100% { box-shadow: 0 0 16px 2px rgba(92, 162, 255, 0.35); }
  50% { box-shadow: 0 0 28px 6px rgba(92, 162, 255, 0.65); }
}

@media (prefers-reduced-motion: reduce) {
  .brand::after { animation: none; }
}

.nav-row {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-glass);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink-100);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(240px, 80vw);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
/* Border/background/shadow only apply once open — otherwise the
   collapsed (0-height) box still paints its border as a stray line
   under the hamburger button even while "closed". */
.site-nav.is-open {
  background: rgba(8, 15, 28, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  max-height: 360px;
}

.nav-link {
  padding: 0.9rem 1.25rem;
  color: var(--ink-200);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  border-top: 1px solid var(--border-faint);
}
.nav-link:first-child { border-top: none; }
.nav-link.active { color: var(--gold-400); }
.nav-link:hover { color: var(--gold-400); background: rgba(255,255,255,0.03); }

.tagline {
  grid-area: tagline;
  align-self: start;
  margin: 0;
  /* Sized off the header's own width (container query), not the
     viewport, so it keeps scaling correctly once the header hits
     its max content width instead of overshooting. */
  font-size: clamp(0.65rem, 1.7cqw, 1rem);
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: var(--ink-500);
}

/* Desktop nav kicks back in at the same point it always did (~860px).
   Sizing below is tied to the header's own width via container query
   units, so it scales fluidly and never overshoots into wrapping. */
@container header (min-width: 860px) {
  .header-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "logo tagline"
      "logo nav";
  }
  .brand { height: 100%; }
  .nav-row { justify-content: flex-start; }

  .tagline {
    align-self: end;
    /* Shrink to the text's actual rendered width (not the full
       column) so JS can measure it accurately to size the nav row. */
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    font-size: clamp(1rem, 1.6cqw, 1.3rem);
  }

  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open {
    position: static;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    overflow: visible;
    background: transparent;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    justify-content: space-between;
    column-gap: clamp(0.15rem, 0.8cqw, 0.5rem);
    row-gap: 0.35rem;
    /* Width is set inline by JS to match the tagline's rendered
       width; this is just a sane fallback before that runs. */
    width: 100%;
  }
  .nav-link {
    border-top: none;
    padding: 0.5em clamp(0.45em, 1cqw, 0.85em);
    font-size: clamp(0.82rem, 1.3cqw, 1.05rem);
    border-radius: 999px;
    white-space: nowrap;
  }
  .nav-link.active, .nav-link:hover { background: rgba(221, 187, 115, 0.12); }
}

/* ---------- Hero / homepage ---------- */

main { display: block; }

.hero { padding: clamp(1.5rem, 4vw, 3rem) 0 0; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 1.25rem;
}

.news-panel {
  background: var(--surface-glass);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.news-heading { flex-shrink: 0; }

.news-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}
.news-list li {
  color: var(--ink-300);
  padding: 0.6em 0;
  border-bottom: 1px dashed var(--border-faint);
  font-size: 0.95rem;
}
.news-list li:last-child { border-bottom: none; }

.social-row {
  flex-shrink: 0;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.social-icons { display: flex; gap: 0.6rem; }
.social-icons img {
  width: 30px; height: 30px; border-radius: 8px;
  transition: transform 0.2s ease;
}
.social-icons a:hover img { transform: translateY(-2px); }
.follow-text { font-family: var(--font-display); font-weight: 600; color: var(--ink-100); }

/* Slideshow + lightbox trigger */
.slideshow {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-faint);
  box-shadow: var(--shadow-soft);
  /* Matches the native dimensions of cradle-of-dragons-isekai-manga.webp
     (551 x 476) so the container's shape follows the actual artwork
     instead of an arbitrary ratio. */
  aspect-ratio: 551 / 476;
  background: var(--navy-800);
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
}
.slide.active { opacity: 1; visibility: visible; }
.slide a { display: block; width: 100%; height: 100%; }
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.slide-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}
.slide-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.35); cursor: pointer;
  padding: 0;
}
.slide-dots button.active { background: var(--gold-400); }

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 0.85fr 1.15fr; align-items: stretch; gap: 0; }
  .slideshow { align-self: start; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
  .news-panel { height: 100%; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
}

/* ---------- Services bar ---------- */

.services-bar {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(2rem, 5vw, 3rem) 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border-top: 1px solid var(--border-faint);
  border-bottom: 1px solid var(--border-faint);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: center;
}

.services-intro h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.75em; }

.services-copy p { font-size: 0.95rem; }

.shop-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.2rem;
  padding: 1.75rem 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--navy-950);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shop-callout:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow-gold); color: var(--navy-950); }
.shop-callout-title { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.04em; }
.shop-callout-sub { font-weight: 600; font-size: 0.9rem; }

@media (min-width: 860px) {
  .services-grid { grid-template-columns: 1fr 1.4fr 0.7fr; }
}

/* ---------- Feature grid (bottom cards) ---------- */

.feature-grid {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-soft);
}
.feature-card img { aspect-ratio: 16/10; object-fit: cover; }
.feature-card p, .feature-card .btn { margin: 0 1.25rem; }
.feature-card p { margin-top: 1.1rem; font-size: 0.92rem; }
.feature-card .btn { margin-bottom: 1.25rem; margin-top: 1rem; align-self: flex-start; }

@media (min-width: 768px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
}
@media (min-width: 1024px) {
  .feature-grid { gap: 1.5rem; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-faint);
  color: var(--ink-700);
  font-size: 0.8rem;
  text-align: center;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 9, 17, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  padding: 1.5rem;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-img {
  max-width: min(94vw, 1100px);
  max-height: 88vh;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.05);
  color: var(--ink-100);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--gold-400); color: var(--gold-400); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.05);
  color: var(--ink-100);
  font-size: 1.6rem;
  cursor: pointer;
}
.lightbox-nav.prev { left: clamp(10px, 3vw, 40px); }
.lightbox-nav.next { right: clamp(10px, 3vw, 40px); }
.lightbox-nav:hover { border-color: var(--gold-400); color: var(--gold-400); }
.lightbox-nav[hidden], .lightbox-close[hidden] { display: none; }

/* ---------- Small phone safety net (down to 320px) ---------- */
@media (max-width: 380px) {
  .container { width: 94%; }
  .shop-callout-title { font-size: 1.35rem; }
}

/* =========================================================
   Inner-page components
   Shared building blocks for about/projects/gallery/shop/
   contact/book-detail/audiobook pages.
   ========================================================= */

/* ---------- Page hero ---------- */
.page-hero { padding: clamp(1.75rem, 5vw, 3rem) 0 0.25rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.75rem); }
.page-hero .divider { max-width: 260px; }
.page-hero .lede { max-width: 640px; font-size: 1rem; }

/* ---------- Generic section ---------- */
.section { padding: clamp(1.75rem, 4.5vw, 3rem) 0; }
.section.tight { padding-top: 0; }
.section + .section { border-top: 1px solid var(--border-faint); }
.section-title { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: 0.3em; }
.section-lede { max-width: 720px; }

/* ---------- Split panel: media + copy, reusable & reversible ---------- */
.split-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.split-panel:last-child { margin-bottom: 0; }
.split-panel[id] { scroll-margin-top: 110px; }
.split-media img, .split-media video { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
/* Transparent character/illustration art shouldn't be stretched to fill
   the column or boxed in a hard card — let it sit at a sane size with a
   soft shadow that follows its own silhouette instead. */
/* Utility: hide an element on narrow viewports only (e.g. decorative
   art that only reads well next to text at 2-column desktop width). */
@media (max-width: 767px) {
  .mobile-hide { display: none; }
}

.split-media img.illustration {
  width: auto;
  max-width: min(100%, 240px);
  max-height: 320px;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}
.split-body h2, .split-body h3 { margin-bottom: 0.4em; }
@media (min-width: 768px) {
  .split-panel { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .split-panel--reverse .split-media { order: 2; }
  .split-panel--reverse .split-body { order: 1; }
  /* For wide banner-style media (e.g. product screenshots) that read
     better full-width above the copy instead of squeezed into a column. */
  .split-panel--stacked { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Responsive card grids ---------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) {
  .card-grid.cols-2, .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 480px) {
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .card-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1080px) {
  .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Plain info card (services, notes, etc.) ---------- */
.info-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
}
.info-card h3 { color: var(--gold-400); font-size: 1rem; margin-bottom: 0.5em; }
.info-card p { font-size: 0.9rem; margin: 0; }

/* ---------- Bio / talent cards ---------- */
.bio-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface-glass);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
}
.bio-card img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--border-soft); }
.bio-card h3 { font-size: 1rem; margin-bottom: 0.25em; color: var(--gold-400); }
.bio-card p { font-size: 0.85rem; margin: 0; }

/* ---------- Responsive video embeds ---------- */
.media-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--navy-800);
}
.media-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Review / testimonial quotes ---------- */
.quote-block {
  background: var(--surface-glass);
  border-left: 3px solid var(--gold-400);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.25rem;
}
.quote-block p { font-style: italic; color: var(--ink-200); margin-bottom: 0.6em; }
.quote-block p:last-of-type { margin-bottom: 0; }
.quote-block .quote-cite { display: block; text-align: right; color: var(--ink-500); font-size: 0.85rem; margin-top: 0.5rem; font-style: normal; }

/* ---------- Production / cast credits ---------- */
.credits-list { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; font-size: 0.9rem; margin: 1.25rem 0; }
.credits-list dt { color: var(--ink-500); }
.credits-list dd { margin: 0; color: var(--ink-100); font-weight: 600; }

/* ---------- Buy / CTA button rows ---------- */
.buy-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; }
.buy-row.center { justify-content: center; }

/* ---------- Book / product cover card ---------- */
.book-cover { text-align: center; }
.book-cover img { border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); margin: 0 auto 1rem; max-width: 320px; width: 100%; }

/* Small corner badge overlaid on a media element (e.g. "best seller" ribbon) */
.media-frame { position: relative; }
.media-frame .media-badge {
  position: absolute;
  top: -14px;
  right: -10px;
  width: clamp(70px, 20vw, 120px);
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
}

.stat-line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  text-align: center;
  margin: 0.9rem 0;
  color: var(--ink-100);
}

/* ---------- Gallery grid (with lightbox) ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.gallery-grid img {
  border-radius: var(--radius-md);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: zoom-in;
  width: 100%;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease;
}
.gallery-grid img:hover { transform: scale(1.03); }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

/* ---------- Contact layout ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .contact-form-wrap { display: flex; flex-direction: column; height: 100%; }
  .contact-form-wrap .contact-form { flex: 1; }
  .contact-form-wrap .contact-form textarea { flex: 1; min-height: 0; }
}

.contact-card { background: var(--surface-glass); border: 1px solid var(--border-faint); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); }
.contact-card-body { padding: clamp(1.25rem, 3vw, 1.75rem); }
.contact-card-body p { font-size: 0.95rem; }

/* Layered photo pair — main shot spans full width, second photo
   overlaps it near the bottom-right corner, raised above with its
   own border + shadow (mirrors the original studiobg/studiobg1 effect). */
.image-overlap { position: relative; }
.image-overlap .overlap-main { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.image-overlap .overlap-badge {
  position: absolute;
  right: clamp(0px, 2%, 12px);
  bottom: 0;
  width: min(52%, 260px);
  height: auto;
  filter: drop-shadow(0 16px 26px rgba(0,0,0,0.55));
}

.contact-form { display: flex; flex-direction: column; gap: 0.9rem; background: var(--surface-glass); border: 1px solid var(--border-faint); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem); }
.contact-form input, .contact-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-sm);
  padding: 0.8em 1em;
  color: var(--ink-100);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--ink-500); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--gold-400); }
.contact-form .btn { align-self: flex-start; }

/* ---------- Confirmation panel (e.g. message sent) ---------- */
.confirm-panel {
  text-align: center;
  max-width: 520px;
  margin: clamp(2rem, 8vw, 4rem) auto;
  background: var(--surface-glass);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 6vw, 3rem);
}
.confirm-panel h2 { color: var(--gold-400); }
