/* ============================================
   VM LIVE V3 — PREMIUM MINIMALIST STYLESHEET
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Design Tokens ── */
:root {
  --bg: #fafaf9;
  --bg-alt: #f0efed;
  --fg: #1a1a19;
  --fg-secondary: #5c5c58;
  --fg-muted: #9c9c97;
  --accent: #1a1a19;
  --accent-soft: rgba(26,26,25,0.06);
  --border: rgba(26,26,25,0.09);
  --radius: 16px;
  --radius-sm: 8px;

  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: none; }
ul { list-style: none; }

::selection {
  background: var(--fg);
  color: var(--bg);
}

/* ── Custom Cursor ── */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px; height: 6px;
  background: #ffffff;
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-ring {
  width: 40px; height: 40px;
  border: 1.5px solid rgba(255,255,255,0.65);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), border-color 0.3s;
}

body.cursor-hover .cursor-ring {
  width: 60px; height: 60px;
  border-color: rgba(255,255,255,0.9);
}

body.cursor-hover .cursor-dot {
  width: 0; height: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cursor-dot,
  .cursor-ring {
    transition: none;
  }
}

/* ── Preloader ── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.preloader-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--bg);
  text-transform: uppercase;
}

.preloader-line {
  width: 60px;
  height: 2px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.preloader-line::after {
  content: '';
  position: absolute;
  left: -100%;
  width: 100%; height: 100%;
  background: var(--bg);
  animation: preload-slide 1.2s var(--ease-in-out) infinite;
}

@keyframes preload-slide {
  0% { left: -100%; }
  50% { left: 0; }
  100% { left: 100%; }
}

/* ── Header ── */
.main-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 9000;
  padding: 0 clamp(20px, 4vw, 48px);
  transition: background 0.4s, box-shadow 0.4s;
}

.main-header.scrolled {
  background: rgba(250,250,249,0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-svg {
  height: 20px;
  width: auto;
}

.logo-lockup {
  position: relative;
  display: block;
  width: 75px;
  height: 20px;
}

.logo-lockup .logo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

.logo-vm-static {
  clip-path: inset(0 37.6% 0 0);
}

.logo-live-write {
  clip-path: inset(0 0 0 62.4%);
}

@media (min-width: 1450px) {
  .logo-lockup {
    width: 94px;
    height: 25px;
  }
}

@media (max-width: 768px) {
  .logo-lockup {
    width: 71px;
    height: 19px;
  }
}

.main-nav {
  display: flex;
  gap: 40px;
}

.nav-item {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-item::before {
  content: attr(data-index);
  position: absolute;
  top: -12px;
  left: 0;
  font-size: 9px;
  font-weight: 600;
  color: var(--fg-muted);
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s var(--ease-out);
}

.nav-item:hover { color: var(--fg); }
.nav-item:hover::before { opacity: 1; transform: translateY(0); }

/* Menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  transition: all 0.3s var(--ease-out);
}

.menu-toggle.open span:first-child { transform: rotate(45deg) translate(3px, 3px); }
.menu-toggle.open span:last-child { transform: rotate(-45deg) translate(3px, -3px); }

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s var(--ease-out);
}

.mobile-nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}

.mobile-nav-link {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 400;
  color: var(--fg);
  transition: opacity 0.3s;
}

.mobile-nav-link:hover { opacity: 0.5; }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(120px, 15vh, 180px) clamp(20px, 6vw, 80px) 80px;
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}

.hero-heading em {
  font-style: italic;
  color: var(--fg-secondary);
}

.hero-heading .line {
  display: block;
  overflow: hidden;
}

.hero-heading .line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out);
}

.hero-heading .line.revealed > span {
  transform: translateY(0);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--fg-secondary);
  max-width: 600px;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-out) 0.4s;
}

.hero-sub.revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 18px 36px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 50px;
  transition: all 0.4s var(--ease-out);
  opacity: 0;
  transform: translateY(30px);
}

.hero-cta.revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero-cta:hover {
  background: #333;
  transform: scale(1.04);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  width: 100%; height: 100%;
  background: var(--fg);
  animation: scroll-anim 2s var(--ease-in-out) infinite;
}

@keyframes scroll-anim {
  0% { top: -100%; }
  50% { top: 0; }
  100% { top: 100%; }
}

.hero-scroll-indicator span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ── Marquee Strip ── */
.marquee-strip {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg);
}

.marquee-track {
  display: flex;
  gap: 32px;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.marquee-track .dot {
  font-size: 6px;
  opacity: 0.3;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Sections ── */
.section {
  padding: clamp(80px, 10vw, 140px) clamp(20px, 6vw, 80px);
  max-width: 1440px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 50px;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-heading em {
  font-style: italic;
  color: var(--fg-secondary);
}

/* ── Project Grid ── */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  aspect-ratio: 3/2;
  max-width: 960px; /* Reduced by ~30% for a cleaner centered look */
  margin: 0 auto;
  transition: grid-template-columns 0.65s var(--ease-out), grid-template-rows 0.65s var(--ease-out);
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f0efed;
  transition: opacity 0.65s var(--ease-out), filter 0.65s var(--ease-out);
  cursor: pointer;
  border: 1px solid var(--border);
  width: 100%;
  height: 100%;
}

/* Project Column Stretching */
.project-grid:has(.project-card:nth-child(1):hover),
.project-grid:has(.project-card:nth-child(1).touched),
.project-grid:has(.project-card:nth-child(4):hover),
.project-grid:has(.project-card:nth-child(4).touched) {
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
}

.project-grid:has(.project-card:nth-child(2):hover),
.project-grid:has(.project-card:nth-child(2).touched),
.project-grid:has(.project-card:nth-child(5):hover),
.project-grid:has(.project-card:nth-child(5).touched) {
  grid-template-columns: 0.8fr 1.4fr 0.8fr;
}

.project-grid:has(.project-card:nth-child(3):hover),
.project-grid:has(.project-card:nth-child(3).touched),
.project-grid:has(.project-card:nth-child(6):hover),
.project-grid:has(.project-card:nth-child(6).touched) {
  grid-template-columns: 0.8fr 0.8fr 1.4fr;
}

/* Project Row Stretching */
.project-grid:has(.project-card:nth-child(-n+3):hover),
.project-grid:has(.project-card:nth-child(-n+3).touched) {
  grid-template-rows: 1.3fr 0.7fr;
}

.project-grid:has(.project-card:nth-child(n+4):hover),
.project-grid:has(.project-card:nth-child(n+4).touched) {
  grid-template-rows: 0.7fr 1.3fr;
}

.card-img-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3; /* 30% translucent default preview */
  transform: scale(1.0);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  z-index: 0;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,25,0.7) 0%, rgba(26,26,25,0.2) 60%, rgba(26,26,25,0) 100%);
  opacity: 0; /* Active on hover */
  transition: opacity 0.65s var(--ease-out);
}

/* Project Grid Hover Interactions */
.project-grid:hover .project-card:not(:hover),
.project-grid:has(.project-card.touched) .project-card:not(.touched) {
  opacity: 0.45;
  filter: grayscale(0.2);
}

.project-card:hover,
.project-card.touched {
  z-index: 5;
  box-shadow: 0 30px 60px rgba(26,26,25,0.12);
  border-color: transparent;
}

.project-card:hover .card-img-wrap,
.project-card.touched .card-img-wrap {
  opacity: 1;
  transform: scale(1.04);
}

.project-card:hover .card-img-wrap::after,
.project-card.touched .card-img-wrap::after {
  opacity: 1;
}

.project-card:hover .product-glimpse,
.project-card.touched .product-glimpse {
  background: transparent;
}

.project-card:hover .glimpse-abbr,
.project-card.touched .glimpse-abbr {
  color: #ffffff;
}

.project-card:hover .glimpse-name,
.project-card.touched .glimpse-name {
  color: #ffffff;
}

/* ── Horizontal Scroll Gallery ── */
.hscroll-section {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 40px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: grab;
}

.hscroll-section::-webkit-scrollbar {
  display: none;
}

.hscroll-section.active-drag {
  cursor: grabbing;
}

.hscroll-track {
  display: flex;
  gap: 20px;
  padding: 0 clamp(20px, 4vw, 80px);
}

.hscroll-card {
  flex: 0 0 clamp(300px, 35vw, 500px);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.hscroll-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.hscroll-card:hover img {
  transform: scale(1.04);
}

/* ── Services ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-card {
  padding: clamp(28px, 3vw, 44px);
  background: var(--bg);
  transition: background 0.4s;
}

.service-card:hover {
  background: var(--bg-alt);
}

.service-num {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent-soft);
  line-height: 1;
  margin-bottom: 20px;
  transition: color 0.4s;
  display: block;
  font-family: var(--font-sans);
}

.service-card:hover .service-num {
  color: var(--fg);
}

.service-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-secondary);
}

/* ── About ── */
.about-top {
  max-width: 820px;
  margin-bottom: 80px;
}

.about-top .section-heading {
  margin-top: 16px;
  margin-bottom: 24px;
}

.about-desc {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
  color: var(--fg-secondary);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-item {
  background: var(--bg);
  padding: clamp(24px, 2.4vw, 36px);
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-suffix {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 700;
  color: var(--fg-secondary);
  margin-left: 4px;
}

.stat-value {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.stat-value .stat-number,
.stat-value .stat-suffix {
  font: inherit;
  color: inherit;
  margin: 0;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 12px;
}

/* ── Testimonials ── */
.testimonials-block {
  margin-top: clamp(80px, 9vw, 128px);
}

.testimonials-header {
  padding-bottom: clamp(20px, 2.2vw, 28px);
  border-bottom: 1px solid var(--border);
}

.testimonials-eyebrow {
  color: #f21610;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.testimonials-stage {
  position: relative;
  border-bottom: 1px solid var(--border);
}

.testimonials-viewport {
  position: relative;
  min-height: clamp(440px, 40vw, 560px);
}

.testimonial-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(40px, 4vw, 56px);
  padding: clamp(48px, 5vw, 72px) clamp(32px, 3.5vw, 52px) clamp(96px, 8vw, 112px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 420ms;
}

.testimonial-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.testimonial-slide blockquote {
  align-self: center;
  max-width: 1050px;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 4vw, 3.8rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.testimonial-signature {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 28px);
  max-width: 680px;
}

.testimonial-signature img {
  width: clamp(180px, 17vw, 228px);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 32%;
}

.testimonial-attribution {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.testimonial-attribution strong,
.testimonial-attribution span {
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.testimonial-attribution strong {
  font-weight: 700;
  color: var(--fg);
}

.testimonial-attribution span {
  color: var(--fg-muted);
}

.testimonials-controls {
  position: absolute;
  left: clamp(32px, 3.5vw, 52px);
  right: clamp(32px, 3.5vw, 52px);
  bottom: clamp(28px, 3vw, 42px);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 32px;
}

.testimonials-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(36px, 1fr));
  gap: 10px;
  max-width: 480px;
}

.testimonial-progress-step {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.testimonial-progress-step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--border);
  transition: background-color 220ms ease, height 220ms ease;
}

.testimonial-progress-step.is-active::after {
  height: 2px;
  background: #f21610;
}

.testimonial-progress-step:focus-visible,
.testimonial-arrow:focus-visible,
.testimonial-autoplay-toggle:focus-visible {
  outline: 2px solid #f21610;
  outline-offset: 2px;
}

.testimonials-navigation {
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
}

.testimonial-arrow,
.testimonial-autoplay-toggle {
  min-width: 64px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: 600 9px/1 var(--font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.testimonial-arrow:hover,
.testimonial-autoplay-toggle:hover,
.testimonial-autoplay-toggle[aria-pressed="true"] {
  color: #f21610;
}

.testimonial-count {
  min-width: 58px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

@media (max-width: 768px) {
  .testimonials-header {
    padding-bottom: 18px;
  }

  .testimonials-viewport {
    min-height: 0;
  }

  .testimonial-slide {
    gap: 36px;
    padding: 40px 0 128px;
  }

  .testimonial-slide blockquote {
    margin-inline: 0;
    text-align: left;
    font-size: clamp(1.7rem, 7vw, 2.15rem);
    line-height: 1.18;
    text-wrap: pretty;
  }

  .testimonial-signature {
    align-items: flex-start;
  }

  .testimonial-signature img {
    width: clamp(124px, 34vw, 168px);
  }

  .testimonial-attribution {
    padding-top: 4px;
  }

  .testimonials-controls {
    left: 0;
    right: 0;
    bottom: 24px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .testimonials-progress {
    width: 100%;
    max-width: none;
  }

  .testimonials-navigation {
    grid-template-columns: auto auto 1fr auto;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .testimonial-slide {
    padding-top: 36px;
  }

  .testimonial-slide blockquote {
    font-size: clamp(1.7rem, 7.4vw, 2.1rem);
  }

  .testimonial-signature {
    display: grid;
    grid-template-columns: minmax(112px, 38vw) 1fr;
    gap: 16px;
  }

  .testimonial-signature img {
    width: 100%;
  }

  .testimonial-attribution strong,
  .testimonial-attribution span {
    font-size: 9px;
  }
}

/* ── Quote ── */
.quote-section {
  padding: clamp(80px, 12vw, 160px) clamp(20px, 8vw, 120px);
  text-align: center;
  background: var(--bg);
}

.big-quote {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(6px, 0.7vw, 12px);
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.045em;
  max-width: 1100px;
  margin: 0 auto;
  color: #f21610;
}

.big-quote::before {
  content: '';
  width: clamp(62px, 7vw, 112px);
  height: 2px;
  margin-bottom: clamp(22px, 3vw, 38px);
  background: linear-gradient(90deg, transparent, #f21610 24%, #f21610 76%, transparent);
}

.big-quote-line {
  display: block;
  max-width: 100%;
  text-wrap: balance;
}

.big-quote-design {
  font-size: clamp(2.4rem, 5.4vw, 5.6rem);
}

.big-quote-passion {
  position: relative;
  padding-inline: 0.08em;
  font-size: clamp(2.25rem, 5vw, 5.2rem);
  font-style: italic;
}

.big-quote-passion::after {
  content: '';
  position: absolute;
  left: 15%;
  bottom: -0.22em;
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 22, 16, 0.7), transparent);
}

@media (max-width: 480px) {
  .quote-section {
    padding-block: 88px;
  }

  .big-quote {
    gap: 8px;
    line-height: 1;
  }

  .big-quote::before {
    margin-bottom: 22px;
  }

  .big-quote-design,
  .big-quote-passion {
    font-size: clamp(1.85rem, 8.5vw, 2.5rem);
  }
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
}

.contact-item {
  margin-bottom: 36px;
}

.contact-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 6px;
  display: block;
}

.contact-val {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 500;
  transition: opacity 0.3s;
  display: block;
}

.contact-val:hover { opacity: 0.6; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 24px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.input-group {
  position: relative;
}

.input-group input,
.input-group textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 18px 0 12px;
  background: none;
  border: none;
  border-bottom: 1.5px solid var(--border);
  color: var(--fg);
  outline: none;
  resize: none;
  transition: border-color 0.3s;
  cursor: none;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: var(--fg);
}

.input-group label {
  position: absolute;
  top: 18px;
  left: 0;
  font-size: 14px;
  color: var(--fg-muted);
  pointer-events: none;
  transition: all 0.3s var(--ease-out);
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
  top: -2px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: flex-start;
  padding: 18px 40px;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.4s var(--ease-out);
}

.submit-btn:hover {
  background: #333;
  transform: scale(1.04);
}

/* ── Footer ── */
.main-footer {
  padding: 48px clamp(20px, 6vw, 80px);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  height: 16px;
  margin-bottom: 10px;
}

.footer-left p {
  font-size: 12px;
  color: var(--fg-muted);
}

.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease-out);
}

.back-to-top:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

/* ── Reveal Animations ── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-text {
  overflow: hidden;
}

.reveal-text > span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.8s var(--ease-out);
}

.reveal-text.revealed > span {
  transform: translateY(0);
}

/* ── Selected Clients Marquee ── */
.clients-section {
  padding: 120px clamp(20px, 4vw, 80px) 60px;
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden;
}

.clients-marquee-container {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
  overflow: hidden;
  width: 100%;
  position: relative;
}

/* Linear infinite scrolling track */
.clients-marquee-track {
  display: flex;
  width: max-content;
  gap: 80px;
  animation: clients-scroll 25s linear infinite;
}

/* Pause animation on hover or touch/click focus */
.clients-marquee-container:hover .clients-marquee-track,
.clients-marquee-container:active .clients-marquee-track {
  animation-play-state: paused;
}

.client-name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-secondary);
  white-space: nowrap;
  transition: color 0.3s var(--ease-out);
  cursor: pointer;
}

.client-name:hover {
  color: var(--fg);
}

@keyframes clients-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* Scroll exactly half to create seamless loop */
  }
}

}

/* ── Products Section & Collage ── */
.products-section {
  padding-bottom: 120px;
}

.products-collage {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 80px);
  aspect-ratio: 5/2;
  transition: grid-template-columns 0.65s var(--ease-out), grid-template-rows 0.65s var(--ease-out);
}

.product-card-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f0efed;
  transition: opacity 0.65s var(--ease-out), filter 0.65s var(--ease-out);
  cursor: pointer;
  border: 1px solid var(--border);
  height: 100%;
  width: 100%;
}

/* Column Stretching */
.products-collage:has(.product-card-item:nth-child(1):hover),
.products-collage:has(.product-card-item:nth-child(6):hover) {
  grid-template-columns: 1.48fr 0.88fr 0.88fr 0.88fr 0.88fr;
}

.products-collage:has(.product-card-item:nth-child(2):hover),
.products-collage:has(.product-card-item:nth-child(7):hover) {
  grid-template-columns: 0.88fr 1.48fr 0.88fr 0.88fr 0.88fr;
}

.products-collage:has(.product-card-item:nth-child(3):hover),
.products-collage:has(.product-card-item:nth-child(8):hover) {
  grid-template-columns: 0.88fr 0.88fr 1.48fr 0.88fr 0.88fr;
}

.products-collage:has(.product-card-item:nth-child(4):hover),
.products-collage:has(.product-card-item:nth-child(9):hover) {
  grid-template-columns: 0.88fr 0.88fr 0.88fr 1.48fr 0.88fr;
}

.products-collage:has(.product-card-item:nth-child(5):hover),
.products-collage:has(.product-card-item:nth-child(10):hover) {
  grid-template-columns: 0.88fr 0.88fr 0.88fr 0.88fr 1.48fr;
}

/* Row Stretching */
.products-collage:has(.product-card-item:nth-child(-n+5):hover) {
  grid-template-rows: 1.3fr 0.7fr;
}

.products-collage:has(.product-card-item:nth-child(n+6):hover) {
  grid-template-rows: 0.7fr 1.3fr;
}

/* Image wrap is translucent by default (30% opacity) */
.product-img-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3; /* 30% translucent preview */
  transform: scale(1.0);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  z-index: 0;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,25,0.7) 0%, rgba(26,26,25,0.2) 60%, rgba(26,26,25,0) 100%);
  opacity: 0; /* Activated on hover to contrast white text */
  transition: opacity 0.65s var(--ease-out);
}

/* Glimpse default view has a soft translucent warm white background overlay for high readability */
.product-glimpse {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  background: rgba(250, 250, 249, 0.65); /* 65% translucent overlay */
  transition: background 0.65s var(--ease-out);
  z-index: 1;
}

/* Massive abbreviation */
.glimpse-abbr {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  color: var(--fg);
  line-height: 0.9;
  margin-bottom: 12px;
  transition: color 0.65s var(--ease-out);
}

.glimpse-name {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.06em;
  color: var(--fg); /* high contrast dark text */
  text-transform: uppercase;
  transition: color 0.65s var(--ease-out);
}

/* Hover collage interactions (scale other items down slightly) */
.products-collage:hover .product-card-item:not(:hover),
.products-collage:has(.product-card-item.touched) .product-card-item:not(.touched) {
  opacity: 0.45;
  filter: grayscale(0.2);
}

/* Hovered Card State */
.product-card-item:hover,
.product-card-item.touched {
  z-index: 5;
  box-shadow: 0 30px 60px rgba(26,26,25,0.12);
  border-color: transparent;
}

.product-card-item:hover .product-img-wrap,
.product-card-item.touched .product-img-wrap {
  opacity: 1; /* 100% full color reveal */
  transform: scale(1.04);
}

.product-card-item:hover .product-img-wrap::after,
.product-card-item.touched .product-img-wrap::after {
  opacity: 1;
}

.product-card-item:hover .product-glimpse,
.product-card-item.touched .product-glimpse {
  background: transparent;
}

.product-card-item:hover .glimpse-abbr,
.product-card-item.touched .glimpse-abbr {
  color: #ffffff;
}

.product-card-item:hover .glimpse-name,
.product-card-item.touched .glimpse-name {
  color: #ffffff;
}

/* Elegant visual helper when a card is touched/active on mobile */
.product-card-item::after,
.project-card::after {
  content: "TAP AGAIN FOR DETAILS";
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a19;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.35s var(--ease-out);
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-card-item.touched::after,
.project-card.touched::after {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .project-grid { 
    grid-template-columns: 1fr 1fr 1fr; 
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 3/2;
    max-width: 700px;
    margin: 0 auto;
    transition: grid-template-columns 0.65s var(--ease-out), grid-template-rows 0.65s var(--ease-out);
  }
  .project-card {
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
  }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 60px; }
  
  .products-collage {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    aspect-ratio: 4/3;
    transition: grid-template-columns 0.65s var(--ease-out), grid-template-rows 0.65s var(--ease-out);
  }
  .product-card-item {
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
  }

  /* Column stretching for 4 columns on tablet */
  .products-collage:has(.product-card-item:nth-child(4n+1):hover),
  .products-collage:has(.product-card-item:nth-child(4n+1).touched) {
    grid-template-columns: 1.45fr 0.85fr 0.85fr 0.85fr;
  }
  .products-collage:has(.product-card-item:nth-child(4n+2):hover),
  .products-collage:has(.product-card-item:nth-child(4n+2).touched) {
    grid-template-columns: 0.85fr 1.45fr 0.85fr 0.85fr;
  }
  .products-collage:has(.product-card-item:nth-child(4n+3):hover),
  .products-collage:has(.product-card-item:nth-child(4n+3).touched) {
    grid-template-columns: 0.85fr 0.85fr 1.45fr 0.85fr;
  }
  .products-collage:has(.product-card-item:nth-child(4n+4):hover),
  .products-collage:has(.product-card-item:nth-child(4n+4).touched) {
    grid-template-columns: 0.85fr 0.85fr 0.85fr 1.45fr;
  }

  /* Row stretching for 3 rows on tablet */
  .products-collage:has(.product-card-item:nth-child(-n+4):hover),
  .products-collage:has(.product-card-item:nth-child(-n+4).touched) {
    grid-template-rows: 1.3fr 0.85fr 0.85fr;
  }
  .products-collage:has(.product-card-item:nth-child(n+5):nth-child(-n+8):hover),
  .products-collage:has(.product-card-item:nth-child(n+5):nth-child(-n+8).touched) {
    grid-template-rows: 0.85fr 1.3fr 0.85fr;
  }
  .products-collage:has(.product-card-item:nth-child(n+9):hover),
  .products-collage:has(.product-card-item:nth-child(n+9).touched) {
    grid-template-rows: 0.85fr 0.85fr 1.3fr;
  }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .hero-heading { font-size: clamp(2.4rem, 10vw, 4rem); }
  .services-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-scroll-indicator { display: none; }
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }

  /* Scale down inner card padding and text for tablet screens */
  .product-glimpse {
    padding: 20px;
  }
  .glimpse-abbr {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 6px;
  }
  .glimpse-name {
    font-size: 11px;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    aspect-ratio: 2/3;
    max-width: 480px;
    transition: grid-template-columns 0.65s var(--ease-out), grid-template-rows 0.65s var(--ease-out);
  }

  /* 2-column project grid resizers for mobile */
  .project-grid:has(.project-card:nth-child(2n+1):hover),
  .project-grid:has(.project-card:nth-child(2n+1).touched) {
    grid-template-columns: 1.35fr 0.65fr;
  }
  .project-grid:has(.project-card:nth-child(2n+2):hover),
  .project-grid:has(.project-card:nth-child(2n+2).touched) {
    grid-template-columns: 0.65fr 1.35fr;
  }
  
  /* 3-row project grid row resizers */
  .project-grid:has(.project-card:nth-child(-n+2):hover),
  .project-grid:has(.project-card:nth-child(-n+2).touched) {
    grid-template-rows: 1.3fr 0.85fr 0.85fr;
  }
  .project-grid:has(.project-card:nth-child(n+3):nth-child(-n+4):hover),
  .project-grid:has(.project-card:nth-child(n+3):nth-child(-n+4).touched) {
    grid-template-rows: 0.85fr 1.3fr 0.85fr;
  }
  .project-grid:has(.project-card:nth-child(n+5):hover),
  .project-grid:has(.project-card:nth-child(n+5).touched) {
    grid-template-rows: 0.85fr 0.85fr 1.3fr;
  }

  .products-collage {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr 1fr;
    aspect-ratio: 3/4;
    transition: grid-template-columns 0.65s var(--ease-out), grid-template-rows 0.65s var(--ease-out);
  }

  /* Column stretching for 3 columns on mobile (another 20% larger active card) */
  .products-collage:has(.product-card-item:nth-child(3n+1):hover),
  .products-collage:has(.product-card-item:nth-child(3n+1).touched) {
    grid-template-columns: 1.9fr 0.55fr 0.55fr;
  }
  .products-collage:has(.product-card-item:nth-child(3n+2):hover),
  .products-collage:has(.product-card-item:nth-child(3n+2).touched) {
    grid-template-columns: 0.55fr 1.9fr 0.55fr;
  }
  .products-collage:has(.product-card-item:nth-child(3n+3):hover),
  .products-collage:has(.product-card-item:nth-child(3n+3).touched) {
    grid-template-columns: 0.55fr 0.55fr 1.9fr;
  }

  /* Row stretching for 4 rows on mobile (another 20% larger active row) */
  .products-collage:has(.product-card-item:nth-child(-n+3):hover),
  .products-collage:has(.product-card-item:nth-child(-n+3).touched) {
    grid-template-rows: 1.8fr 0.73fr 0.73fr 0.73fr;
  }
  .products-collage:has(.product-card-item:nth-child(n+4):nth-child(-n+6):hover),
  .products-collage:has(.product-card-item:nth-child(n+4):nth-child(-n+6).touched) {
    grid-template-rows: 0.73fr 1.8fr 0.73fr 0.73fr;
  }
  .products-collage:has(.product-card-item:nth-child(n+7):nth-child(-n+9):hover),
  .products-collage:has(.product-card-item:nth-child(n+7):nth-child(-n+9).touched) {
    grid-template-rows: 0.73fr 0.73fr 1.8fr 0.73fr;
  }
  .products-collage:has(.product-card-item:nth-child(n+10):hover),
  .products-collage:has(.product-card-item:nth-child(n+10).touched) {
    grid-template-rows: 0.73fr 0.73fr 0.73fr 1.8fr;
  }

  .hscroll-track {
    padding: 0 24px;
  }

  .section-heading {
    font-size: clamp(1.8rem, 6vw, 3rem);
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 20px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 40px 16px;
  }
  .stats-strip { grid-template-columns: 1fr; }
  /* Let .project-grid and .products-collage maintain their grid layout. 
     Increase max-width to fill the screen width elegantly without leaving huge blank sides. */
  .project-grid {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  .products-collage {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  /* Adjust inner card typography & padding for squares on mobile */
  .product-glimpse {
    padding: 12px !important;
  }
  .glimpse-abbr {
    font-size: 1.8rem !important;
    margin-bottom: 4px !important;
  }
  .glimpse-name {
    font-size: 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }
}

@media (hover: none), (pointer: coarse) {
  .project-card,
  .product-card-item {
    touch-action: manipulation;
    transition: transform 140ms ease, opacity 0.65s var(--ease-out), filter 0.65s var(--ease-out);
  }

  .project-grid:hover .project-card:not(:hover),
  .project-grid:has(.project-card.touched) .project-card:not(.touched),
  .products-collage:hover .product-card-item:not(:hover),
  .products-collage:has(.product-card-item.touched) .product-card-item:not(.touched) {
    opacity: 1;
    filter: none;
  }

  .project-card:hover,
  .project-card.touched,
  .product-card-item:hover,
  .product-card-item.touched {
    border-color: var(--border);
    box-shadow: none;
  }

  .project-card:hover .card-img-wrap,
  .project-card.touched .card-img-wrap,
  .product-card-item:hover .product-img-wrap,
  .product-card-item.touched .product-img-wrap {
    opacity: 0.3;
    transform: none;
  }

  .project-card:hover .card-img-wrap::after,
  .project-card.touched .card-img-wrap::after,
  .product-card-item:hover .product-img-wrap::after,
  .product-card-item.touched .product-img-wrap::after {
    opacity: 0;
  }

  .project-card:hover .product-glimpse,
  .project-card.touched .product-glimpse,
  .product-card-item:hover .product-glimpse,
  .product-card-item.touched .product-glimpse {
    background: rgba(250, 250, 249, 0.65);
  }

  .project-card:hover .glimpse-abbr,
  .project-card:hover .glimpse-name,
  .project-card.touched .glimpse-abbr,
  .project-card.touched .glimpse-name,
  .product-card-item:hover .glimpse-abbr,
  .product-card-item:hover .glimpse-name,
  .product-card-item.touched .glimpse-abbr,
  .product-card-item.touched .glimpse-name {
    color: var(--fg);
  }

  .project-card:active,
  .product-card-item:active {
    transform: scale(0.975);
  }

  .project-card::after,
  .product-card-item::after {
    display: none;
  }

}

/* ── Project Modal ── */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s var(--ease-out);
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 249, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-content-wrapper {
  position: absolute;
  top: 0; right: 0;
  width: min(760px, 100%);
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.03);
  transform: translateX(100%);
  transition: transform 0.6s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.project-modal.active .modal-content-wrapper {
  transform: translateX(0);
}

.modal-close-btn {
  position: absolute;
  top: 24px; left: -140px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  transition: all 0.3s var(--ease-out);
  z-index: 2;
}

.modal-close-btn:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.modal-close-btn svg {
  transition: transform 0.3s var(--ease-out);
}

.modal-close-btn:hover svg {
  transform: rotate(90deg);
}

.modal-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 48px;
  scrollbar-width: none;
}

.modal-scroll-container::-webkit-scrollbar {
  display: none;
}

.modal-hero-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}

.modal-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 180ms ease;
}

.modal-gallery {
  margin-bottom: 40px;
}

.modal-gallery-nav {
  position: absolute;
  top: 50%;
  min-width: 52px;
  height: 52px;
  padding: 0 12px;
  border: 1px solid rgba(26, 26, 25, 0.12);
  border-radius: 999px;
  background: rgba(250, 250, 249, 0.92);
  color: var(--fg);
  font: 600 10px/1 var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateY(-50%);
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.modal-gallery-prev {
  left: 16px;
}

.modal-gallery-next {
  right: 16px;
}

.modal-gallery-nav:hover,
.modal-gallery-nav:focus-visible {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.modal-gallery-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 112px;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.modal-gallery.is-single .modal-gallery-strip,
.modal-gallery.is-single .modal-gallery-meta,
.modal-gallery.is-single .modal-gallery-nav {
  display: none;
}

.modal-gallery-strip::-webkit-scrollbar {
  display: none;
}

.modal-gallery-thumb {
  min-width: 0;
  padding: 0 0 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  opacity: 0.58;
  transition: opacity 180ms ease, border-color 180ms ease;
}

.modal-gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 8px;
  object-fit: cover;
}

.modal-gallery-thumb:hover,
.modal-gallery-thumb:focus-visible,
.modal-gallery-thumb.is-active {
  border-color: #1d5fc3;
  opacity: 1;
}

.modal-gallery-thumb:focus-visible {
  outline: 2px solid #1d5fc3;
  outline-offset: 3px;
}

.modal-gallery-meta {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-block;
  margin-bottom: 12px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 24px;
}

.modal-title em {
  font-style: italic;
}

.modal-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-secondary);
  margin-bottom: 40px;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 40px;
}

.modal-story h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.modal-story p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg-secondary);
}

.modal-info-right {
  border-left: 1px solid var(--border);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-val {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}

/* Modal responsive */
@media (max-width: 1024px) {
  .modal-close-btn {
    left: auto;
    right: 24px;
    top: 24px;
  }
  .modal-scroll-container {
    padding: 96px 24px 48px;
  }
}

@media (max-width: 768px) {
  .modal-gallery-nav {
    top: auto;
    bottom: 12px;
    min-width: 58px;
    height: 36px;
  }
  .modal-gallery-strip {
    grid-auto-columns: 84px;
  }
  .modal-info-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .modal-info-right {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 32px;
  }
}
