/* style.css — Peter Albee Photography
   Palette derived from the source photography: deep ocean blue-teal,
   turquoise shallows, warm sand neutrals, coral/red accent from starfish & conch shots. */

:root {
  /* ---- Type scale (fluid clamp) ---- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.5rem, 0.5rem + 5vw, 5.5rem);

  /* ---- Spacing (4px system) ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.625rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1280px;
  --content-full: 100%;

  /* ---- Fonts ----
     Display: Fraunces (warm editorial serif, wide optical size range — feels
     like a premium nature-photography brand, not generic).
     Body: General Sans (clean, humane sans for long-form readability). */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'General Sans', 'Helvetica Neue', Arial, sans-serif;
}

/* ---- LIGHT MODE (default) ---- */
:root,
[data-theme='light'] {
  /* Surfaces — warm sand/paper neutrals */
  --color-bg: #f7f4ee;
  --color-surface: #fbf9f4;
  --color-surface-2: #fffefb;
  --color-surface-offset: #efe9dc;
  --color-surface-offset-2: #e6ddc9;
  --color-surface-dynamic: #ddd2b8;
  --color-divider: #ddd4c0;
  --color-border: #cbbfa2;

  /* Text — deep ink derived from deep-water blue */
  --color-text: #10262c;
  --color-text-muted: #4c6067;
  --color-text-faint: #93a3a6;
  --color-text-inverse: #f7f4ee;

  /* Primary accent — deep ocean teal (from turtle-water shots) */
  --color-primary: #0c5c66;
  --color-primary-hover: #094650;
  --color-primary-active: #073539;
  --color-primary-highlight: #cfe1e0;

  /* Secondary — turquoise shallows */
  --color-turquoise: #1fa8ac;
  --color-turquoise-hover: #158489;
  --color-turquoise-highlight: #d3ecec;

  /* Coral/red accent — from starfish & conch */
  --color-coral: #c8502f;
  --color-coral-hover: #a63f23;
  --color-coral-active: #832f1a;
  --color-coral-highlight: #f0d9cd;

  /* Warm sand gold — subtle secondary accent */
  --color-sand: #b98a4a;
  --color-sand-highlight: #ecdfc3;

  /* Semantic (kept minimal — mapped to palette) */
  --color-success: #3f7a4c;
  --color-success-highlight: #d7e6d3;
  --color-warning: #b98a4a;
  --color-warning-highlight: #ecdfc3;
  --color-error: #a6402a;
  --color-error-highlight: #ecd3cb;

  --shadow-sm: 0 1px 2px oklch(0.2 0.03 220 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.2 0.03 220 / 0.10);
  --shadow-lg: 0 16px 40px oklch(0.2 0.03 220 / 0.16);
}

/* ---- DARK MODE ---- */
[data-theme='dark'] {
  --color-bg: #0b1b1f;
  --color-surface: #0f2227;
  --color-surface-2: #12282e;
  --color-surface-offset: #143036;
  --color-surface-offset-2: #17383f;
  --color-surface-dynamic: #1c454d;
  --color-divider: #1c3a40;
  --color-border: #274b52;

  --color-text: #e7efe9;
  --color-text-muted: #9fb4b6;
  --color-text-faint: #63807f;
  --color-text-inverse: #0b1b1f;

  --color-primary: #4fb2ba;
  --color-primary-hover: #6fc6cc;
  --color-primary-active: #8fd5d9;
  --color-primary-highlight: #1c3f42;

  --color-turquoise: #3fd0d3;
  --color-turquoise-hover: #6adcdf;
  --color-turquoise-highlight: #163b3c;

  --color-coral: #e08160;
  --color-coral-hover: #ea9a7c;
  --color-coral-active: #f0b09a;
  --color-coral-highlight: #3a2620;

  --color-sand: #d3aa6c;
  --color-sand-highlight: #3a2f1c;

  --color-success: #7fbf8a;
  --color-success-highlight: #1e3323;
  --color-warning: #d3aa6c;
  --color-warning-highlight: #3a2f1c;
  --color-error: #e08160;
  --color-error-highlight: #3a2620;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0b1b1f;
    --color-surface: #0f2227;
    --color-surface-2: #12282e;
    --color-surface-offset: #143036;
    --color-surface-offset-2: #17383f;
    --color-surface-dynamic: #1c454d;
    --color-divider: #1c3a40;
    --color-border: #274b52;
    --color-text: #e7efe9;
    --color-text-muted: #9fb4b6;
    --color-text-faint: #63807f;
    --color-text-inverse: #0b1b1f;
    --color-primary: #4fb2ba;
    --color-primary-hover: #6fc6cc;
    --color-primary-active: #8fd5d9;
    --color-primary-highlight: #1c3f42;
    --color-turquoise: #3fd0d3;
    --color-turquoise-hover: #6adcdf;
    --color-turquoise-highlight: #163b3c;
    --color-coral: #e08160;
    --color-coral-hover: #ea9a7c;
    --color-coral-active: #f0b09a;
    --color-coral-highlight: #3a2620;
    --color-sand: #d3aa6c;
    --color-sand-highlight: #3a2f1c;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}

/* ================= LAYOUT PRIMITIVES ================= */

.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 4vw, var(--space-12));
}

.wrap--narrow {
  max-width: var(--content-default);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-16));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-coral);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--color-coral);
  display: inline-block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
}

.section-title {
  font-size: var(--text-2xl);
  color: var(--color-text);
}

.section-lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
  font-family: var(--font-body);
  font-weight: 400;
  max-width: 42rem;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

/* ================= HEADER ================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-header--hidden {
  transform: translateY(-100%);
}
.site-header--scrolled {
  box-shadow: var(--shadow-sm);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
}

.brand svg {
  width: 40px;
  height: 40px;
  color: var(--color-primary);
}

.brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.1;
}
.brand-tag {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-4), 2vw, var(--space-8));
}

.main-nav a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding-block: var(--space-1);
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--color-coral);
  transition: width var(--transition-interactive);
}
.main-nav a:hover::after,
.main-nav a[aria-current='page']::after {
  width: 100%;
}
.main-nav a[aria-current='page'] {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--color-text);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

/* ================= BUTTONS ================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  white-space: nowrap;
  min-height: 44px;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}

.btn--coral {
  background: var(--color-coral);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--coral:hover {
  background: var(--color-coral-hover);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
}

.btn--ghost {
  background: color-mix(in oklab, #fff 18%, transparent);
  border-color: color-mix(in oklab, #fff 45%, transparent);
  color: #fff;
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  background: color-mix(in oklab, #fff 30%, transparent);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  min-height: 36px;
}

/* ================= HERO ================= */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-slide.is-active {
  opacity: 1;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    oklch(0.15 0.03 220 / 0.35) 0%,
    oklch(0.15 0.03 220 / 0.28) 40%,
    oklch(0.12 0.03 220 / 0.75) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: clamp(var(--space-12), 8vw, var(--space-20));
  padding-bottom: var(--space-16);
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff;
  opacity: 0.92;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: #fff;
  opacity: 0.8;
}

.hero h1 {
  font-size: var(--text-hero);
  line-height: 1.02;
  max-width: 15ch;
  text-shadow: 0 2px 24px oklch(0.1 0.02 220 / 0.35);
}

.hero-sub {
  margin-top: var(--space-5);
  font-size: var(--text-base);
  max-width: 36rem;
  color: #fff;
  opacity: 0.94;
  font-family: var(--font-body);
}

.hero-cta {
  margin-top: var(--space-8);
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-dots {
  position: absolute;
  bottom: var(--space-8);
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: var(--space-2);
}
.hero-dot {
  width: 26px;
  height: 3px;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, #fff 40%, transparent);
  transition: background var(--transition-interactive);
}
.hero-dot.is-active {
  background: #fff;
}

/* ================= PAGE HERO (interior pages) ================= */

.page-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, oklch(0.15 0.03 220 / 0.25) 0%, oklch(0.1 0.03 220 / 0.78) 100%);
  z-index: 0;
}
.page-hero .wrap {
  position: relative;
  z-index: 1;
  padding-block: var(--space-16) var(--space-12);
}
.page-hero h1 {
  font-size: var(--text-2xl);
  max-width: 24ch;
}
.page-hero .section-lede {
  color: #fff;
  opacity: 0.92;
}

/* ================= CARDS / GRID ================= */

.grid {
  display: grid;
  gap: clamp(var(--space-5), 3vw, var(--space-8));
}
.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

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

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-surface-offset);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover .card-media img {
  transform: scale(1.06);
}

.card-body {
  padding: var(--space-5);
}
.card-body h3 {
  font-size: var(--text-lg);
}
.card-body p {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

/* ================= GALLERY ================= */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}
.filter-btn {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
}
.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.filter-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(var(--space-4), 2vw, var(--space-6));
}
@media (max-width: 900px) {
  .masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .masonry {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-surface-offset);
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  aspect-ratio: 4/5;
}
.gallery-item[data-tall] img {
  aspect-ratio: 3/4;
}
.gallery-item[data-wide] img {
  aspect-ratio: 16/10;
}
.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-4) var(--space-4) var(--space-3);
  background: linear-gradient(180deg, transparent, oklch(0.1 0.02 220 / 0.82) 78%);
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: all var(--transition-interactive);
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}
.gallery-caption strong {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
}
.gallery-caption span {
  font-size: var(--text-xs);
  opacity: 0.85;
}
.gallery-item[hidden] {
  display: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(0.08 0.01 220 / 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}
.lightbox.is-open {
  display: flex;
}
.lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.lightbox-caption {
  position: absolute;
  bottom: var(--space-10);
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: var(--text-sm);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, #fff 12%, transparent);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: color-mix(in oklab, #fff 22%, transparent);
}
.lightbox-close {
  top: var(--space-6);
  right: var(--space-6);
}
.lightbox-prev {
  left: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
}

/* ================= SPLIT SECTIONS ================= */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: center;
}
.split--reverse .split-media {
  order: 2;
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split--reverse .split-media {
    order: initial;
  }
}
.split-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  object-fit: cover;
}
.split-media {
  aspect-ratio: 4/3.2;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.split-media img {
  height: 100%;
}

.stat-row {
  display: flex;
  gap: clamp(var(--space-6), 4vw, var(--space-12));
  margin-top: var(--space-8);
  flex-wrap: wrap;
}
.stat {
  min-width: 100px;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary);
}
.stat span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ================= AMBIENT VIDEO PREVIEW ================= */

.video-preview-wrap {
  aspect-ratio: auto;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-preview-card {
  max-width: 320px;
  margin-inline: auto;
}
.video-preview {
  display: block;
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--color-primary-dark, #0c5c66);
}
.video-preview-caption {
  margin-top: var(--space-3);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 860px) {
  .video-preview-card {
    max-width: 240px;
  }
}

/* ================= CTA BAND ================= */

.cta-band {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  color: #fff;
  text-align: center;
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
}
.cta-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.cta-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, oklch(0.18 0.05 210 / 0.82), oklch(0.1 0.04 210 / 0.88));
  z-index: 0;
}
.cta-band-content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  margin-inline: auto;
}
.cta-band h2 {
  font-size: var(--text-2xl);
  color: #fff;
}
.cta-band p {
  color: #fff;
  opacity: 0.9;
  margin-top: var(--space-4);
  font-size: var(--text-base);
}
.cta-band .btn-row {
  margin-top: var(--space-8);
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ================= PRICING / PRINT CARDS ================= */

.print-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.print-media {
  aspect-ratio: 5/4;
  overflow: hidden;
}
.print-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.print-body {
  padding: var(--space-6);
}
.print-body h3 {
  font-size: var(--text-lg);
}
.print-body .species {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--space-1);
}
.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.size-chip {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.print-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-5);
  gap: var(--space-3);
}
.price-from {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 600;
}
.price-from span {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 400;
}

.framing-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-6);
  font-size: var(--text-sm);
}
.framing-table th,
.framing-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  text-align: left;
}
.framing-table th {
  color: var(--color-text-faint);
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ================= ROOM SHOWCASE ("See It In Your Space") ================= */

.room-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(var(--space-3), 1.6vw, var(--space-5));
}
@media (max-width: 900px) {
  .room-showcase {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 620px) {
  .room-showcase {
    grid-template-columns: repeat(2, 1fr);
  }
}
.room-showcase-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--color-surface-offset);
  box-shadow: var(--shadow-sm);
}
.room-showcase-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.room-showcase-item:hover img {
  transform: scale(1.05);
}
.room-showcase-item .gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-3) var(--space-3) var(--space-2);
  background: linear-gradient(180deg, transparent, oklch(0.1 0.02 220 / 0.85) 78%);
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: all var(--transition-interactive);
}
.room-showcase-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}
.room-showcase-item .gallery-caption strong {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
}

.visualizer-promo {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  background: var(--color-primary);
  box-shadow: var(--shadow-md);
}
@media (max-width: 780px) {
  .visualizer-promo {
    grid-template-columns: 1fr;
  }
}
.visualizer-promo-content {
  padding: clamp(var(--space-8), 5vw, var(--space-12));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.visualizer-promo-content .eyebrow {
  color: #fff;
}
.visualizer-promo-content .eyebrow::before {
  background: #fff;
}
.visualizer-promo-content h2 {
  color: #fff;
  font-size: var(--text-2xl);
}
.visualizer-promo-content p {
  color: color-mix(in oklab, #fff 88%, transparent);
  margin-top: var(--space-4);
  font-size: var(--text-base);
  max-width: 34rem;
}
.visualizer-promo-content .btn-row {
  margin-top: var(--space-8);
}
.visualizer-promo-media {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}
.visualizer-promo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================= FORMS ================= */

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.form-field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.form-field input,
.form-field textarea,
.form-field select {
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-base);
  color: var(--color-text);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--color-primary);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
@media (max-width: 620px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  box-shadow: var(--shadow-sm);
}

.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-4);
}

.form-success {
  display: none;
  background: var(--color-primary-highlight);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
}
.form-success.is-visible {
  display: block;
}

/* ================= JOURNAL ================= */

.post-card {
  display: flex;
  flex-direction: column;
}
.post-meta {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-4);
}
.post-meta .tag {
  color: var(--color-coral);
  font-weight: 600;
}

.prose {
  max-width: 68ch;
  margin-inline: auto;
}
.prose p {
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-5);
  line-height: 1.75;
  max-width: none;
}
.prose h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}
.prose h3 {
  font-size: var(--text-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.prose img {
  border-radius: var(--radius-lg);
  margin-block: var(--space-8);
  box-shadow: var(--shadow-md);
}
.prose blockquote {
  border-left: 3px solid var(--color-coral);
  padding-left: var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-block: var(--space-8);
  font-style: italic;
}
.prose ul,
.prose ol {
  margin-bottom: var(--space-5);
  padding-left: var(--space-6);
  color: var(--color-text);
}
.prose li {
  margin-bottom: var(--space-2);
  max-width: none;
}

.post-hero {
  aspect-ratio: 16/8;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: clamp(var(--space-8), 5vw, var(--space-12));
}
.post-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================= FOOTER ================= */

.site-footer {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding-block: clamp(var(--space-16), 6vw, var(--space-20)) var(--space-8);
}
[data-theme='dark'] .site-footer {
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-10);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid color-mix(in oklab, #fff 20%, transparent);
}
[data-theme='dark'] .footer-grid {
  border-bottom-color: var(--color-divider);
}
@media (max-width: 780px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand svg {
  width: 40px;
  height: 40px;
  color: #fff;
}
[data-theme='dark'] .footer-brand svg {
  color: var(--color-primary);
}
.footer-brand p {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: color-mix(in oklab, #fff 82%, transparent);
  max-width: 26rem;
}
[data-theme='dark'] .footer-brand p {
  color: var(--color-text-muted);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: color-mix(in oklab, #fff 70%, transparent);
  margin-bottom: var(--space-4);
  font-weight: 600;
}
[data-theme='dark'] .footer-col h4 {
  color: var(--color-text-faint);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a {
  font-size: var(--text-sm);
  color: #fff;
  opacity: 0.9;
}
[data-theme='dark'] .footer-col a {
  color: var(--color-text);
  opacity: 1;
}
.footer-col a:hover {
  opacity: 1;
  color: var(--color-coral-highlight);
}
[data-theme='dark'] .footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: color-mix(in oklab, #fff 70%, transparent);
}
[data-theme='dark'] .footer-bottom p {
  color: var(--color-text-faint);
}
.social-links {
  display: flex;
  gap: var(--space-4);
}
.social-links a {
  color: #fff;
  opacity: 0.9;
  display: inline-flex;
}
[data-theme='dark'] .social-links a {
  color: var(--color-text);
}
.social-links a:hover {
  opacity: 1;
  color: var(--color-coral-highlight);
}

/* ================= UTILITIES ================= */

.text-center {
  text-align: center;
}
.mx-auto {
  margin-inline: auto;
}
.mt-8 {
  margin-top: var(--space-8);
}
.mt-12 {
  margin-top: var(--space-12);
}
.bg-offset {
  background: var(--color-surface-offset);
}
.bg-surface {
  background: var(--color-surface);
}
.divider {
  height: 1px;
  background: var(--color-divider);
  border: none;
  margin-block: var(--space-16);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 300;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 780px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 76px);
    z-index: 150;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-8) var(--space-6);
    gap: var(--space-6);
    transform: translateX(100%);
    transition: transform var(--transition-interactive);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.is-open {
    transform: translateX(0);
  }
  .main-nav a {
    font-size: var(--text-lg);
  }
  .nav-toggle {
    display: inline-flex;
  }
}

/* ================= CART ICON (nav) ================= */

.cart-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--color-text);
}
.cart-icon-btn:hover {
  background: var(--color-surface-offset);
}
.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--color-coral);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  font-family: var(--font-body);
}
.cart-badge.is-hidden {
  display: none;
}

body.no-scroll {
  overflow: hidden;
}

/* ================= BUY MODAL ================= */

.buy-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: oklch(0.08 0.01 220 / 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.buy-modal.is-open {
  display: flex;
}
.buy-modal-panel {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(var(--space-6), 4vw, var(--space-8));
}
.buy-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
}
.buy-modal-close:hover {
  color: var(--color-text);
  background: var(--color-surface-offset-2);
}
.buy-modal-head {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding-right: var(--space-8);
}
.buy-modal-thumb {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-offset);
}
.buy-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.buy-modal-head h3 {
  font-size: var(--text-lg);
  line-height: 1.2;
}
.buy-modal-loc {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-1);
}

.buy-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-6);
}
.buy-option-chip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color var(--transition-interactive),
    background var(--transition-interactive);
}
.buy-option-chip:hover {
  border-color: var(--color-primary);
}
.buy-option-chip input {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.buy-option-chip:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
}
.buy-option-label {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}
.buy-option-price {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.buy-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-6);
}
.buy-qty-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.qty-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.qty-btn:hover {
  background: var(--color-surface-offset);
}
.qty-stepper input[type='number'] {
  width: 2.6rem;
  text-align: center;
  border: none;
  border-inline: 1px solid var(--color-border);
  background: transparent;
  font-size: var(--text-sm);
  height: 34px;
  -moz-appearance: textfield;
}
.qty-stepper input[type='number']::-webkit-outer-spin-button,
.qty-stepper input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-stepper--sm {
  transform: scale(0.92);
  transform-origin: left center;
}
.qty-stepper--sm .qty-btn {
  width: 28px;
  height: 28px;
}
.qty-stepper--sm span[data-cart-qty] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 28px;
  border-inline: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.buy-add-btn {
  width: 100%;
  margin-top: var(--space-6);
}
.buy-added-msg {
  display: none;
  text-align: center;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-success);
  font-weight: 600;
}
.buy-added-msg.is-visible {
  display: block;
}

/* Buy trigger buttons embedded in the gallery lightbox / print cards */
.lightbox-buy-btn {
  position: absolute;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 2;
}

/* ================= CART DRAWER ================= */

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
}
.cart-drawer.is-open {
  display: block;
}
.cart-drawer-scrim {
  position: absolute;
  inset: 0;
  background: oklch(0.08 0.01 220 / 0.5);
}
.cart-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.is-open .cart-drawer-panel {
  transform: translateX(0);
}
.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.cart-drawer-head h3 {
  font-size: var(--text-lg);
}
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5) var(--space-6);
}
.cart-drawer-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--color-divider);
}

.cart-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--space-3);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  align-items: flex-start;
}
.cart-line:first-child {
  padding-top: 0;
}
.cart-line:last-child {
  border-bottom: none;
}
.cart-line-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-offset);
}
.cart-line-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-line-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}
.cart-line-option {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: 2px;
}
.cart-line-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.cart-remove-btn {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: underline;
}
.cart-remove-btn:hover {
  color: var(--color-coral);
}
.cart-line-total {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  text-align: center;
  padding-block: var(--space-16);
  color: var(--color-text-muted);
}
.cart-empty svg {
  color: var(--color-text-faint);
}

.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.cart-checkout-btn {
  width: 100%;
}

/* ================= CART PAGE ================= */

.cart-page-list {
  display: flex;
  flex-direction: column;
}
.cart-page-line {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: var(--space-5);
  align-items: center;
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.cart-page-line:first-child {
  padding-top: 0;
}
.cart-page-line .cart-line-thumb {
  width: 72px;
  height: 72px;
}
.cart-page-line .cart-line-controls {
  margin-top: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
}
@media (max-width: 620px) {
  .cart-page-line {
    grid-template-columns: 56px 1fr;
    row-gap: var(--space-3);
  }
  .cart-page-line .cart-line-total {
    grid-column: 2;
    justify-self: start;
  }
  .cart-page-line .cart-line-controls {
    grid-column: 2;
  }
}

.cart-page-summary {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 2px solid var(--color-divider);
}
.cart-page-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}
.cart-page-summary-row span:last-child {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-primary);
}
.cart-page-count {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
}
.checkout-panel {
  margin-top: var(--space-8);
  text-align: center;
}
.checkout-panel .btn {
  width: 100%;
  max-width: 26rem;
}
.checkout-panel .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}
.checkout-panel .btn[disabled]:hover {
  background: var(--color-primary);
}
.checkout-caption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.cart-page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  text-align: center;
  padding-block: var(--space-24);
  color: var(--color-text-muted);
}
.cart-page-empty[hidden],
.cart-page-list[hidden],
.cart-page-summary[hidden] {
  display: none;
}
.cart-page-empty svg {
  color: var(--color-text-faint);
  width: 56px;
  height: 56px;
}

@media (max-width: 480px) {
  .cart-drawer-panel {
    width: 100vw;
  }
}

/* ================= WALL VISUALIZER ================= */

.viz-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(var(--space-6), 3vw, var(--space-10));
  align-items: start;
}
@media (max-width: 960px) {
  .viz-layout {
    grid-template-columns: 1fr;
  }
}

.viz-stage-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(var(--space-4), 2vw, var(--space-6));
}

.viz-stage-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: visible;
  touch-action: none;
  user-select: none;
}

.viz-stage-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-offset);
  background-image:
    linear-gradient(45deg, var(--color-surface-offset-2) 25%, transparent 25%),
    linear-gradient(-45deg, var(--color-surface-offset-2) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--color-surface-offset-2) 75%),
    linear-gradient(-45deg, transparent 75%, var(--color-surface-offset-2) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
}

.viz-stage-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.viz-empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  text-align: center;
  padding: var(--space-8);
  color: var(--color-text-muted);
}
.viz-empty-state svg {
  width: 44px;
  height: 44px;
  color: var(--color-text-faint);
}
.viz-empty-state.is-hidden {
  display: none;
}

.viz-overlay-frame {
  position: absolute;
  border: 2px solid transparent;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 10px 30px oklch(0.1 0.02 220 / 0.35);
}
.viz-overlay-frame.is-active {
  border-color: var(--color-coral);
}
.viz-overlay-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  box-shadow: 0 2px 10px oklch(0.1 0.02 220 / 0.25) inset;
}
.viz-overlay-frame:active {
  cursor: grabbing;
}
.viz-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: #fff;
  border: 2px solid var(--color-coral);
  box-shadow: var(--shadow-sm);
  touch-action: none;
}
.viz-handle--resize {
  right: -9px;
  bottom: -9px;
  cursor: nwse-resize;
}
.viz-handle--rotate {
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  cursor: grab;
  background: var(--color-primary);
  border-color: #fff;
}
.viz-overlay-frame:not(.is-active) .viz-handle {
  display: none;
}

.viz-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.viz-file-input {
  display: none;
}
.viz-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
  justify-content: space-between;
  align-items: center;
}

.viz-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(var(--space-5), 2.5vw, var(--space-6));
}
.viz-panel h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
}
.viz-panel + .viz-panel {
  margin-top: var(--space-5);
}

.viz-thumb-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  max-height: 320px;
  overflow-y: auto;
  padding-right: var(--space-1);
}
.viz-thumb {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--color-surface-offset);
}
.viz-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.viz-thumb.is-selected {
  border-color: var(--color-coral);
}
.viz-thumb:hover {
  border-color: var(--color-primary);
}

.viz-size-presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.viz-size-btn {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
}
.viz-size-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.viz-size-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.viz-slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.viz-slider-row input[type='range'] {
  flex: 1;
  accent-color: var(--color-primary);
}
.viz-slider-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  min-width: 3.5rem;
  text-align: right;
}

.viz-control-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
  display: block;
}

.viz-rotate-row {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.viz-rotate-row button {
  flex: 1;
}

.viz-note {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  background: var(--color-primary-highlight);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-8);
}
.viz-note svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  margin-top: 2px;
}
.viz-note p {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin: 0;
}

@media (max-width: 620px) {
  .viz-thumb-strip {
    grid-template-columns: repeat(4, 1fr);
    max-height: 220px;
  }
  .viz-stage-wrap {
    aspect-ratio: 1/1;
  }
}
