/* PetCinematics 2.0 -- Dark Immersive Design System */
/* Inspired by landonorris.com: full-viewport, scroll-driven, massive type */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

:root {
  --bg-dark: #141719;
  --bg-warm: #1c1f23;
  --bg-card: #1a1d21;
  --text-primary: #f4f0ea;
  --text-muted: rgba(244, 240, 234, 0.60);
  --text-dim: rgba(244, 240, 234, 0.45);
  --accent: #c9a96e;
  --accent-hover: #d4b87a;
  --accent-glow: rgba(201, 169, 110, 0.15);
  --surface-light: #f4f0ea;
  --surface-dark-text: #141719;
  --error: #c44;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', 'Helvetica Neue', sans-serif;

  --h-hero: clamp(3.5rem, 10vw, 8rem);
  --h-display: clamp(2.8rem, 7vw, 6rem);
  --h-section: clamp(2rem, 5vw, 4rem);
  --h-sub: clamp(1.3rem, 2.5vw, 1.8rem);
  --body: clamp(0.9rem, 1.1vw, 1.05rem);
  --small: clamp(0.75rem, 0.9vw, 0.85rem);
  --label: clamp(0.6rem, 0.75vw, 0.7rem);

  --space-xs: clamp(0.4rem, 0.8vw, 0.6rem);
  --space-sm: clamp(0.75rem, 1.5vw, 1.25rem);
  --space-md: clamp(1.5rem, 3vw, 2.5rem);
  --space-lg: clamp(2.5rem, 5vw, 4rem);
  --space-xl: clamp(4rem, 8vw, 6rem);

  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  /* New additions (additive, opt-in via Pass 2) */
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* === Pass 1: NEW DESIGN TOKENS (additive, no overrides) === */

  /* Surface tokens (alternative to ad-hoc rgba) */
  --surface-1: rgba(244, 240, 234, 0.03);
  --surface-2: rgba(244, 240, 234, 0.06);
  --border-1:  rgba(244, 240, 234, 0.08);
  --border-2:  rgba(244, 240, 234, 0.15);

  /* Border-radius scale (replaces 9 ad-hoc values) */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-pill: 999px;

  /* Border-width scale */
  --bw-hairline: 1px;
  --bw-default:  1.5px;

  /* Duration scale (replaces 20+ ad-hoc values) */
  --dur-instant:   100ms;
  --dur-quick:     200ms;
  --dur-base:      300ms;
  --dur-slow:      500ms;
  --dur-cinematic: 800ms;

  /* Z-index scale (replaces magic numbers) */
  --z-base:    1;
  --z-content: 2;
  --z-overlay: 10;
  --z-nav:     100;
  --z-modal:   1000;
  --z-popup:   1100;
  --z-toast:   2000;

  /* Additional surfaces/borders surfaced by 2026-04-21 audit */
  --surface-0: rgba(244, 240, 234, 0.02);
  --border-soft: rgba(244, 240, 234, 0.10);
  --border-strong: rgba(244, 240, 234, 0.20);
  --accent-glow-soft: rgba(201, 169, 110, 0.03);
  --accent-glow-strong: rgba(201, 169, 110, 0.25);
  --bw-focus: 2px;

  /* Error surface */
  --error-bg: #7a1f1f;
  --error-text: #ffffff;

  /* Aliases consumed by css/cart.css (keeps cart.css decoupled from renames) */
  --gold:            var(--accent);
  --gold-soft:       var(--accent-glow);
  --gold-rgb:        201, 169, 110;
  --bg-base:         var(--bg-dark);
  --text-secondary:  var(--text-muted);
  --text-mute:       var(--text-dim);
  --mono:            ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Accessibility: skip-to-content link, hidden until focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-toast);
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--surface-dark-text);
  font-family: var(--sans);
  font-size: var(--small);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Visually hidden (for labels that must stay in DOM for screen readers) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Static fallback inside JS-rendered cart targets */
.cart-empty {
  padding: var(--space-md) 0;
  color: var(--text-muted);
  font-family: var(--serif);
  font-style: italic;
  text-align: center;
}

/* Cursor glow (desktop only, attached by main.js) */
.pc-cursor-glow {
  position: fixed;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow-soft), transparent 70%);
  pointer-events: none;
  z-index: var(--z-popup);
  transform: translate(-50%, -50%);
  transition: opacity var(--dur-base) var(--ease-out-strong);
  opacity: 0;
  will-change: left, top;
}

/* Commission form validation flash (attached by commission.js) */
.commission-flash {
  outline: var(--bw-focus) solid var(--accent);
  outline-offset: 6px;
  border-radius: var(--radius-sm);
}

/* Config error banner (attached by config.js when meta config is missing) */
.pc-error-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--error-bg);
  color: var(--error-text);
  padding: 0.5rem 1rem;
  font-family: monospace;
  font-size: 0.75rem;
  z-index: var(--z-toast);
  text-align: center;
}

/* Cart checkout button spacing */
.cart-checkout-btn {
  margin-top: var(--space-md);
}

html {
  font-size: 16px;
}

/* Smooth scroll only for anchor clicks, not programmatic */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--sans);
  font-size: var(--body);
  color: var(--text-primary);
  background: var(--bg-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg-dark); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: var(--radius-pill); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--accent);
}

.label {
  font-family: var(--sans);
  font-size: var(--label);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  padding: 1.5rem clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--dur-base) var(--ease-smooth), padding var(--dur-base) var(--ease-smooth);
}

.nav--scrolled {
  background: rgba(20, 23, 25, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.nav__logo {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__social {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: 0.4rem;
}

.nav__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--dur-quick), background var(--dur-quick), transform var(--dur-quick);
}

.nav__social a:hover {
  color: var(--accent);
  background: rgba(201,169,110,0.08);
  transform: translateY(-1px);
}

.nav__social svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 640px) {
  .nav__social { display: none; }
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: var(--label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 1.6rem;
  background: var(--accent);
  color: var(--bg-dark);
  border-radius: var(--radius-sm);
  transition: background var(--dur-quick) var(--ease-smooth),
              transform var(--dur-quick) var(--ease-smooth),
              box-shadow var(--dur-quick) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.nav__cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.nav__hamburger {
  width: 32px;
  height: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  padding: 0;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-primary);
  transition: transform var(--dur-base) var(--ease-cinematic),
              opacity var(--dur-base) var(--ease-cinematic);
  transform-origin: center;
}

.nav__hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* Full-screen menu overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-cinematic);
}

.menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.menu-overlay__link {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--text-primary);
  opacity: 0.6;
  transition: opacity var(--dur-base), transform var(--dur-base);
}

.menu-overlay__link:hover {
  opacity: 1;
  transform: translateX(8px);
}

/* --- Sections --- */
.section {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) clamp(1.5rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.section--half {
  min-height: 60vh;
}

.section--auto {
  min-height: auto;
  padding: var(--space-lg) clamp(1.5rem, 4vw, 3rem);
}

.section--warm { background: var(--bg-warm); }
.section--light {
  background: var(--surface-light);
  color: var(--surface-dark-text);
}
.section--light .label { color: rgba(26, 22, 20, 0.4); }
.section--light h2 em { color: var(--accent); }

.section__inner {
  width: 100%;
  max-width: 1200px;
  text-align: center;
}

.section__inner--left { text-align: left; }
.section__inner--wide { max-width: 1400px; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: var(--small);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--dur-quick) var(--ease-smooth),
              color var(--dur-quick) var(--ease-smooth),
              transform var(--dur-quick) var(--ease-smooth),
              box-shadow var(--dur-quick) var(--ease-smooth),
              border-color var(--dur-quick) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.btn--gold {
  background: var(--accent);
  color: var(--bg-dark);
}

.btn--gold:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn--gold:active {
  transform: scale(0.97);
  transition: transform var(--dur-instant) ease-out;
}

.btn--outline {
  border: var(--bw-hairline) solid var(--border-strong);
  color: var(--text-primary);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--outline:active {
  transform: scale(0.97);
  transition: transform var(--dur-instant) ease-out;
}

.btn--ghost {
  color: var(--text-muted);
  padding: 0.5rem 0;
  letter-spacing: 0.08em;
  position: relative;
}

.btn--ghost::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--text-primary);
  transition: width var(--dur-base) var(--ease-smooth);
}

.btn--ghost:hover { color: var(--text-primary); }
.btn--ghost:hover::after { width: 100%; }

/* --- Divider --- */
.divider {
  width: 48px; height: 1px;
  background: var(--text-dim);
  margin: var(--space-sm) auto;
}

.divider--gold { background: var(--accent); }

/* --- Hero --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--bg-dark);
}

/* Grain texture overlay */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: var(--z-content);
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero__label {
  opacity: 0;
  animation: fadeUp var(--dur-cinematic) var(--ease-cinematic) 0.3s forwards;
}

.hero__title {
  font-size: var(--h-hero);
  font-weight: 300;
  line-height: 1.05;
  margin: var(--space-sm) 0;
}

/* Split word animation */
.split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%) rotateX(-80deg);
  transform-origin: top center;
  animation: splitReveal var(--dur-cinematic) var(--ease-cinematic) forwards;
}

.split-word:nth-child(1) { animation-delay: 0.5s; }
.split-word:nth-child(2) { animation-delay: 0.6s; }
.split-word:nth-child(4) { animation-delay: 0.75s; }
.split-word:nth-child(5) { animation-delay: 0.85s; }
.split-word:nth-child(6) { animation-delay: 0.95s; }

@keyframes splitReveal {
  0% { opacity: 0; transform: translateY(100%) rotateX(-80deg); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

.hero__sub {
  font-size: var(--body);
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto var(--space-md);
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp var(--dur-cinematic) var(--ease-cinematic) 0.8s forwards;
}

.hero__cta {
  opacity: 0;
  animation: fadeUp var(--dur-cinematic) var(--ease-cinematic) 1s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
  font-size: var(--label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp var(--dur-cinematic) var(--ease-cinematic) 1.4s forwards;
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: var(--text-dim);
  animation: scrollLine 2.5s var(--ease-smooth) infinite;
}

/* Organic SVG decorations */
.hero__decoration {
  position: absolute;
  z-index: var(--z-base);
  opacity: 0.04;
  pointer-events: none;
}

/* --- Collection Showcase (full-viewport per collection) --- */
.collection-showcase {
  min-height: 75vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* collection-showcase replaced by col-section in homepage */

/* Gradient fade on left so text reads over art */
.collection-showcase::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg-dark) 0%, var(--bg-dark) 35%, rgba(20,23,25,0.7) 50%, rgba(20,23,25,0.2) 70%, transparent 85%);
  z-index: var(--z-base);
  pointer-events: none;
}

.collection-showcase__content {
  position: relative;
  z-index: var(--z-content);
  padding: var(--space-lg) clamp(1.5rem, 4vw, 3rem);
  max-width: 500px;
}

@media (max-width: 768px) {
  .collection-showcase__bg {
    right: 50%;
    transform: translate(50%, -50%);
    height: 40%;
    top: auto;
    bottom: 15%;
    transform: translate(50%, 0);
  }
  .collection-showcase::after {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark) 35%, rgba(20,23,25,0.4) 55%, transparent 75%);
  }
  .collection-showcase__content {
    max-width: 100%;
    padding-bottom: 45%;
  }
}

.collection-showcase__name {
  font-size: var(--h-display);
  font-weight: 300;
  margin-bottom: var(--space-xs);
}

.collection-showcase__desc {
  font-size: var(--body);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  line-height: 1.8;
}

.collection-showcase__link {
  font-family: var(--sans);
  font-size: var(--small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap var(--dur-base) var(--ease-smooth);
}

.collection-showcase__link:hover { gap: 0.8rem; }

/* --- Horizontal Gallery --- */
.gallery-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-md) clamp(1.5rem, 4vw, 3rem);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-scroll::-webkit-scrollbar { display: none; }

.gallery-scroll__item {
  flex: 0 0 clamp(260px, 30vw, 380px);
  aspect-ratio: 3/4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  scroll-snap-align: center;
  background: var(--bg-card);
}

.gallery-scroll__item-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(26,22,20,0.85), transparent);
}

.gallery-scroll__item-name {
  font-family: var(--serif);
  font-size: 1.1rem;
}

.gallery-scroll__item-style {
  font-size: var(--label);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

/* --- Memorial --- */
.memorial {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.memorial::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}

.memorial__content {
  position: relative;
  z-index: var(--z-content);
  text-align: center;
  max-width: 580px;
  padding: 2rem;
}

.memorial__title {
  font-size: var(--h-section);
  font-weight: 300;
  margin-bottom: var(--space-sm);
}

.memorial__text {
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: var(--space-md);
}

/* --- Products --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 800px;
  margin: var(--space-md) auto 0;
}

@media (max-width: 600px) {
  .products-grid { grid-template-columns: 1fr; }
}

.product-tile {
  background: var(--bg-card);
  border: var(--bw-hairline) solid var(--border-1);
  border-radius: var(--radius-md);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-quick) var(--ease-smooth),
              transform var(--dur-quick) var(--ease-smooth),
              box-shadow var(--dur-quick) var(--ease-smooth);
}

.product-tile:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.product-tile.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 30px var(--accent-glow);
}

.product-tile__icon { margin-bottom: 0.75rem; color: var(--text-muted); }

.product-tile__name {
  font-family: var(--serif);
  font-size: var(--h-sub);
  margin-bottom: 0.25rem;
}

.product-tile__price {
  font-size: var(--small);
  color: var(--accent);
  font-weight: 500;
}

/* --- Testimonial --- */
.testimonial {
  font-family: var(--serif);
  font-size: var(--h-section);
  font-style: italic;
  font-weight: 300;
  line-height: 1.4;
  max-width: 800px;
  text-align: center;
  color: var(--text-primary);
}

.testimonial__author {
  font-family: var(--sans);
  font-size: var(--small);
  font-style: normal;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* --- FAQ --- */
.faq-item { border-bottom: var(--bw-hairline) solid var(--border-1); }

.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.5rem 0;
  font-family: var(--serif);
  font-size: var(--h-sub);
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  transition: color var(--dur-quick);
}

.faq-item__q:hover { color: var(--accent); }

.faq-item__icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-cinematic);
  color: var(--text-muted);
}

.faq-item.open .faq-item__icon { transform: rotate(45deg); }

.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows var(--dur-base) var(--ease-out-strong);
}

.faq-item__a > .faq-item__a-inner {
  min-height: 0; /* required for grid auto-height to collapse */
}

.faq-item.open .faq-item__a { grid-template-rows: 1fr; }

.faq-item__a-inner {
  padding-bottom: 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: var(--small);
}

/* --- Footer --- */
.footer {
  padding: var(--space-md) clamp(1.5rem, 4vw, 3rem) var(--space-sm);
  border-top: var(--bw-hairline) solid var(--border-1);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__inner { grid-template-columns: 1fr; } }

.footer__brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.footer__text { font-size: var(--small); color: var(--text-muted); max-width: 280px; line-height: 1.7; }

.footer__heading {
  font-family: var(--sans);
  font-size: var(--label);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer__links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }

.footer__link {
  font-size: var(--small);
  color: var(--text-muted);
  transition: color var(--dur-quick);
}

.footer__link:hover { color: var(--text-primary); }

.footer__bottom {
  max-width: 1200px;
  margin: var(--space-md) auto 0;
  padding-top: var(--space-sm);
  border-top: var(--bw-hairline) solid var(--border-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--label);
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0.08;
  transform: translateY(30px);
  transition: opacity var(--dur-cinematic) var(--ease-cinematic), transform var(--dur-cinematic) var(--ease-cinematic);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- Commission Page --- */
.commission-step {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) clamp(1.5rem, 4vw, 3rem);
}

.commission-step__title {
  font-family: var(--serif);
  font-size: var(--h-section);
  font-weight: 300;
  margin-bottom: var(--space-xs);
}

.commission-step__desc {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  max-width: 480px;
  text-align: center;
}

/* Progress */
.progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-lg);
  max-width: 500px;
  width: 100%;
  position: relative;
}

.progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  z-index: var(--z-base);
}

.progress__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--text-dim);
  background: var(--bg-dark);
  transition: border-color var(--dur-quick) var(--ease-smooth),
              background var(--dur-quick) var(--ease-smooth),
              box-shadow var(--dur-quick) var(--ease-smooth);
}

.progress__step--active .progress__dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.progress__step--done .progress__dot {
  border-color: var(--accent);
  background: var(--accent);
}

.progress__name {
  font-size: var(--label);
  color: var(--text-dim);
  margin-top: 0.4rem;
  white-space: nowrap;
}

.progress__step--active .progress__name { color: var(--text-primary); }

.progress__line {
  position: absolute;
  top: 5px;
  left: 10%; right: 10%;
  height: 1px;
  background: var(--text-dim);
}

.progress__line-fill {
  height: 100%;
  background: var(--accent);
  transition: width var(--dur-slow) var(--ease-cinematic);
}

/* Upload zone */
.upload-zone {
  border: var(--bw-default) dashed var(--border-2);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-quick) var(--ease-smooth),
              background var(--dur-quick) var(--ease-smooth);
  max-width: 500px;
  width: 100%;
  background: var(--surface-0);
}

.upload-zone:hover, .upload-zone--active {
  border-color: var(--accent);
  background: rgba(201,169,110,0.03);
}

/* Style selector (large cards, one per row on mobile) */
.style-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  max-width: 700px;
  width: 100%;
}

.style-card {
  background: var(--bg-card);
  border: var(--bw-default) solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-quick) var(--ease-smooth),
              transform var(--dur-quick) var(--ease-smooth),
              box-shadow var(--dur-quick) var(--ease-smooth);
}

.style-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.style-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.style-card__name {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin-top: 0.75rem;
}

.style-card__price {
  font-size: var(--small);
  color: var(--accent);
  margin-top: 0.25rem;
}

/* Form inputs */
.input {
  width: 100%;
  max-width: 400px;
  padding: 0.875rem 1.25rem;
  font-family: var(--sans);
  font-size: var(--body);
  border: var(--bw-default) solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--dur-quick);
}

.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.input::placeholder { color: var(--text-dim); }

/* About page split */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: 1100px;
  width: 100%;
}

@media (max-width: 768px) { .about-split { grid-template-columns: 1fr; } }

.about-split__visual {
  aspect-ratio: 4/5;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Organic decorations */
.organic-line {
  position: absolute;
  pointer-events: none;
  opacity: 0.04;
  z-index: 0;
}

/* ============================================
   LOADING INTRO
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--dur-slow) var(--ease-cinematic), visibility var(--dur-slow);
}

.loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none;
}

.loader__inner {
  text-align: center;
}

.loader__logo {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--text-primary);
  opacity: 0;
  animation: fadeUp var(--dur-cinematic) var(--ease-cinematic) 0.2s forwards;
}

.loader__line {
  width: 120px;
  height: 1px;
  background: rgba(244,240,234,0.1);
  margin: 1.5rem auto 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.loader__line-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  animation: loaderFill 1.1s var(--ease-cinematic) 0.2s forwards;
}

@keyframes loaderFill {
  0% { width: 0; }
  100% { width: 100%; }
}

/* ============================================
   CLIP-PATH IMAGE REVEALS
   ============================================ */
.clip-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--dur-cinematic) var(--ease-cinematic);
}

.clip-reveal.visible {
  clip-path: inset(0 0% 0 0);
}

.clip-reveal-circle {
  clip-path: circle(0% at 50% 50%);
  transition: clip-path var(--dur-cinematic) var(--ease-cinematic);
}

.clip-reveal-circle.visible {
  clip-path: circle(75% at 50% 50%);
}

/* Gallery items clip reveal on scroll */
.gallery-scroll__item img {
  clip-path: inset(0 0 0 0);
  transition: clip-path var(--dur-cinematic) var(--ease-cinematic), transform var(--dur-slow) var(--ease-smooth);
}

.gallery-scroll__item:hover img {
  transform: scale(1.06);
}

/* ============================================
   MAGNETIC BUTTON EFFECT
   ============================================ */
.btn--magnetic {
  transition: transform var(--dur-base) var(--ease-smooth);
}

/* ============================================
   SCROLL COUNTER
   ============================================ */
.counter {
  font-family: var(--serif);
  font-size: var(--h-display);
  font-weight: 300;
  color: var(--accent);
  display: inline-block;
}

.counter__suffix {
  font-size: 0.5em;
  vertical-align: super;
  color: var(--text-muted);
  margin-left: 0.15em;
}

/* ============================================
   VISUAL EFFECTS & ANIMATION LAYER
   ============================================ */

/* Grain texture on all dark sections */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

/* Gold shimmer on primary buttons */
.btn--gold::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--dur-slow) var(--ease-smooth);
}

.btn--gold:hover::before {
  left: 140%;
}

/* Collection showcase hover/parallax depth */
.collection-showcase__bg {
  transition: opacity var(--dur-cinematic) var(--ease-smooth), transform 8s linear;
}

.collection-showcase:hover .collection-showcase__bg {
  opacity: 0.25;
  transform: scale(1.03);
}

.collection-showcase__content {
  transition: transform var(--dur-slow) var(--ease-cinematic);
}

.collection-showcase:hover .collection-showcase__content {
  transform: translateX(12px);
}

/* Collection explore link arrow animation */
.collection-showcase__link svg {
  transition: transform var(--dur-base) var(--ease-smooth);
}

.collection-showcase__link:hover svg {
  transform: translateX(4px);
}

/* Gallery items hover */
.gallery-scroll__item {
  transition: transform var(--dur-slow) var(--ease-cinematic), box-shadow var(--dur-slow) var(--ease-smooth);
}

.gallery-scroll__item:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.gallery-scroll__item-overlay {
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-smooth);
}

.gallery-scroll__item:hover .gallery-scroll__item-overlay {
  opacity: 1;
}

/* Memorial gold glow pulse */
.memorial::before {
  animation: glowPulse 4s var(--ease-smooth) infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* Testimonial subtle float */
.testimonial {
  animation: floatText 6s var(--ease-smooth) infinite;
}

@keyframes floatText {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Scroll reveal stagger variants */
.reveal-up { opacity: 0.08; transform: translateY(50px); transition: opacity var(--dur-cinematic) var(--ease-cinematic), transform var(--dur-cinematic) var(--ease-cinematic); }
.reveal-up.visible { opacity: 1; transform: translateY(0); }

.reveal-scale { opacity: 0.08; transform: scale(0.92); transition: opacity var(--dur-cinematic) var(--ease-cinematic), transform var(--dur-cinematic) var(--ease-cinematic); }
.reveal-scale.visible { opacity: 1; transform: scale(1); }

.reveal-left { opacity: 0.08; transform: translateX(-40px); transition: opacity var(--dur-cinematic) var(--ease-cinematic), transform var(--dur-cinematic) var(--ease-cinematic); }
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0.08; transform: translateX(40px); transition: opacity var(--dur-cinematic) var(--ease-cinematic), transform var(--dur-cinematic) var(--ease-cinematic); }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s !important; }
.stagger-2 { transition-delay: 0.2s !important; }
.stagger-3 { transition-delay: 0.3s !important; }
.stagger-4 { transition-delay: 0.4s !important; }

/* Nav hamburger hover */
.nav__hamburger:hover span {
  background: var(--accent);
}

/* Nav CTA shimmer */
.nav__cta::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left var(--dur-slow) var(--ease-smooth);
}

.nav__cta:hover::before {
  left: 150%;
}

/* Menu overlay link stagger */
.menu-overlay.open .menu-overlay__link {
  animation: fadeUp var(--dur-slow) var(--ease-cinematic) forwards;
  opacity: 0;
}

.menu-overlay.open .menu-overlay__link:nth-child(1) { animation-delay: 0.05s; }
.menu-overlay.open .menu-overlay__link:nth-child(2) { animation-delay: 0.1s; }
.menu-overlay.open .menu-overlay__link:nth-child(3) { animation-delay: 0.15s; }
.menu-overlay.open .menu-overlay__link:nth-child(4) { animation-delay: 0.2s; }
.menu-overlay.open .menu-overlay__link:nth-child(5) { animation-delay: 0.25s; }

/* Hero title word-by-word glow on idle */
.hero__title em {
  text-shadow: 0 0 40px rgba(201, 169, 110, 0.15);
  animation: goldGlow 3s var(--ease-smooth) infinite;
}

@keyframes goldGlow {
  0%, 100% { text-shadow: 0 0 30px rgba(201, 169, 110, 0.1); }
  50% { text-shadow: 0 0 60px rgba(201, 169, 110, 0.25), 0 0 120px rgba(201, 169, 110, 0.08); }
}

/* Scroll indicator bounce */
.hero__scroll {
  animation: fadeUp var(--dur-cinematic) var(--ease-cinematic) 1.4s forwards, bounce 2s var(--ease-smooth) 2.5s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* Footer links underline hover */
.footer__link {
  position: relative;
}

.footer__link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--dur-base) var(--ease-smooth);
}

.footer__link:hover::after {
  width: 100%;
}

/* FAQ answer opacity layered on grid expand for smoother feel */
.faq-item__a-inner {
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out-strong);
}

.faq-item.open .faq-item__a-inner {
  opacity: 1;
}

/* Process step numbers glow on hover */
.section--warm [style*="font-size:clamp(2.5rem"] {
  transition: color var(--dur-base), text-shadow var(--dur-base);
}

.section--warm div:hover > [style*="font-size:clamp(2.5rem"] {
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

/* Product tile hover glow */
.product-tile:hover .product-tile__icon {
  color: var(--accent);
  transition: color var(--dur-base);
}

/* Style card hover */
.style-card:hover svg {
  transform: scale(1.1);
  transition: transform var(--dur-base) var(--ease-spring);
}

/* Upload zone pulse when empty */
.upload-zone {
  animation: uploadPulse 3s var(--ease-smooth) infinite;
}

.upload-zone:hover {
  animation: none;
}

@keyframes uploadPulse {
  0%, 100% { border-color: rgba(244,240,234,0.1); }
  50% { border-color: rgba(201,169,110,0.25); }
}

/* Smooth page transitions feel */
section, .section, .collection-showcase, .memorial {
  will-change: transform;
}

/* Mobile responsive process grid */
@media (max-width: 768px) {
  .section--warm [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 480px) {
  .section--warm [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr !important;
  }
}

/* === Section overlap transitions === */
.statement + .section { margin-top: -30px; }
.photo-strip + .memorial { margin-top: -20px; }

/* === Collection image clip-path start state === */
.col-section__img {
  clip-path: inset(0 0 100% 0);
}

.col-section__content {
  opacity: 0;
  transform: translateX(-40px);
}

/* === Photo strip images start hidden === */
.photo-strip__item img {
  clip-path: inset(100% 0 0 0);
}

/* === Smooth section color transitions via alternating warm/dark === */
.col-section:nth-child(odd) {
  background: var(--bg-dark);
}

.col-section:nth-child(even) {
  background: var(--bg-warm);
}

/* === Scroll progress bar color === */
/* (element created by JS, styled inline, but ensure it's on top) */

/* ==========================================================
   PASS 2 POLISH: :active press feedback + :focus-visible
   Universal additions for consistent interaction feel
   ========================================================== */

/* Press feedback (every primary CTA) */
.btn--gold:active,
.btn--outline:active,
.cta-btn:active,
.pg-select-btn:active,
.nav__cta:active {
  transform: scale(0.97);
  transition: transform var(--dur-instant) ease-out;
}

/* Card press feedback (subtle - smaller scale) */
.collection-card:active,
.product-card:active,
.style-card:active,
.product-tile:active,
.option-card:active,
.pg-thumb:active,
.pg-swatch:active,
.pg-size-btn:active {
  transform: scale(0.99);
  transition: transform var(--dur-instant) ease-out;
}

/* Focus-visible rings (keyboard navigation) */
.btn--gold:focus-visible,
.btn--outline:focus-visible,
.btn--ghost:focus-visible,
.cta-btn:focus-visible,
.pg-select-btn:focus-visible,
.nav__cta:focus-visible,
.nav__hamburger:focus-visible,
.pg-close:focus-visible,
.sg-close:focus-visible,
.faq-item__q:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.collection-card:focus-visible,
.product-card:focus-visible,
.style-card:focus-visible,
.product-tile:focus-visible,
.option-card:focus-visible,
.pg-thumb:focus-visible,
.pg-swatch:focus-visible,
.pg-size-btn:focus-visible,
.menu-overlay__link:focus-visible,
.col-section__link:focus-visible,
.footer__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Inputs */
.input:focus-visible,
.text-input:focus-visible,
.pg-device-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Disabled cursor */
.cta-btn:disabled,
.pg-select-btn:disabled,
.btn:disabled {
  cursor: not-allowed;
}

/* Hover-gate scale transforms and bg changes (skip on touch devices) */
@media (hover: none) or (pointer: coarse) {
  .btn--gold:hover,
  .btn--outline:hover,
  .cta-btn:hover,
  .pg-select-btn:hover,
  .nav__cta:hover,
  .nav__social a:hover,
  .collection-card:hover,
  .product-card:hover,
  .style-card:hover,
  .product-tile:hover,
  .pg-thumb:hover,
  .pg-swatch:hover,
  .gallery-scroll__item:hover {
    transform: none;
  }
  .nav__social a:hover {
    background: none;
  }
}

/* Reduced motion: respect user preference site-wide */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
