/* ============================================================
   thomas-elliott-frozen.css
   Phase 0: Approved visual patterns extracted from concept-board.css
   Harness CSS removed. Variant CSS preserved with spec tokens applied.
   Token values (--te-*) are declared in tokens.css (generated by build.py).
   ============================================================ */

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

@keyframes teSheenSweep {
  0%, 18% { background-position: 15% 50%; }
  50%      { background-position: 85% 50%; }
  100%     { background-position: 15% 50%; }
}

@keyframes teAmbientDriftA {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d(2%, 1%, 0) scale(1.05); }
  100% { transform: translate3d(-2%, -1%, 0) scale(1); }
}

@keyframes teAmbientDriftB {
  0%   { transform: translate3d(2%, 1%, 0) scale(1.02); }
  50%  { transform: translate3d(-2%, -1%, 0) scale(1.07); }
  100% { transform: translate3d(2%, 1%, 0) scale(1.02); }
}

@keyframes heroGalleryZoom {
  0%  { opacity: 0; transform: scale(1.08); }
  6%  { opacity: 1; }
  32% { opacity: 1; transform: scale(1.2); }
  38% { opacity: 0; transform: scale(1.22); }
  100% { opacity: 0; transform: scale(1.22); }
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--te-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.te-dark {
  background-color: var(--te-lamp);
  color: var(--te-lamp-ink);
}

.te-light {
  background-color: var(--te-paper);
  color: var(--te-ink);
}

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

a {
  color: inherit;
}

.te-ambient {
  display: none;
}

.te-ambient::before,
.te-ambient::after {
  content: "";
  position: absolute;
  inset: -100vh -100vw;
  will-change: transform;
}

.te-ambient::before {
  background: radial-gradient(
    circle 75vmax at 50% 50%,
    color-mix(in srgb, var(--te-green) 8%, transparent) 0%,
    color-mix(in srgb, var(--te-green) 5%, transparent) 38%,
    color-mix(in srgb, var(--te-green) 1%, transparent) 78%,
    transparent 100%
  );
  animation: teAmbientDriftA 120s linear infinite;
}

.te-ambient::after {
  background: radial-gradient(
    circle 65vmax at 50% 50%,
    color-mix(in srgb, var(--te-gold) 8%, transparent) 0%,
    color-mix(in srgb, var(--te-gold) 4%, transparent) 42%,
    color-mix(in srgb, var(--te-gold) 1%, transparent) 82%,
    transparent 100%
  );
  animation: teAmbientDriftB 90s linear infinite;
}

/* --- Concept kicker (used as section/piece labels within pages) --- */
.concept-kicker {
  margin: 0 0 0.85rem;
  font-family: var(--te-ui);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--te-gold);
  font-weight: 700;
}

.te-dark .concept-kicker {
  color: var(--te-gold);
}

.te-light .concept-kicker {
  color: var(--te-lamp);
}

/* --- Sheen text effect --- */
.te-sheen {
  position: relative;
  display: inline-block;
  color: currentColor;
}

.te-sheen::after {
  content: attr(data-sheen);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 0%,
    transparent 47%,
    color-mix(in srgb, var(--te-gold) 62%, currentColor) 50%,
    transparent 53%,
    transparent 100%
  );
  background-size: 420% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  opacity: 0.32;
  animation: teSheenSweep 14s ease-in-out infinite;
}

.te-flourish-title {
  position: relative;
  display: inline-block;
}

.te-flourish-title::after {
  content: "";
  display: block;
  width: min(280px, 70%);
  height: 1px;
  margin-top: 0.75rem;
  background: linear-gradient(90deg, transparent, var(--te-gold), transparent);
}

/* --- Frame navigation (embedded nav in hero/page) --- */
.frame-nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem clamp(1.2rem, 3vw, 2.4rem);
  font-family: var(--te-ui);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.frame-logo {
  width: min(200px, 38vw);
  flex: 0 0 auto;
}

.frame-logo img {
  width: 100%;
  height: auto;
}

.frame-logo .logo-ink {
  display: none;
}

.frame-links {
  display: flex;
  gap: 1rem;
}

.frame-links a,
.frame-links span {
  text-decoration: none;
  opacity: 0.72;
  text-shadow: 0 1px 4px rgba(6, 65, 38, 0.8);
}

.frame-links a:hover {
  opacity: 1;
}

/* --- Hero cinema (home hero) --- */
.hero-cinema {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero-gallery--compact {
  min-height: 480px;
}

.hero-cinema > .hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-cinema::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 65, 38, 0.68), transparent 58%),
    linear-gradient(0deg, rgba(6, 65, 38, 0.52), transparent 46%);
}

/* --- Hero gallery (rotating) --- */
.hero-gallery {
  isolation: isolate;
}

.hero-gallery__stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-gallery__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: scale(1.08);
  animation: heroGalleryZoom 15s ease-in-out infinite;
}

.hero-gallery__image--two {
  animation-delay: 5s;
}

.hero-gallery__image--three {
  animation-delay: 10s;
}

.hero-gallery__copy {
  max-width: 560px;
}

.hero-gallery__copy .frame-title {
  max-width: 6.4ch;
}

.hero-gallery {
  min-height: 68vh;
}

.hero-gallery::after {
  background:
    linear-gradient(90deg, rgba(6, 65, 38, 0.84) 0%, rgba(6, 65, 38, 0.78) 28%, rgba(6, 65, 38, 0.48) 46%, transparent 66%),
    linear-gradient(0deg, rgba(6, 65, 38, 0.44), transparent 48%);
}

/* --- Gallery section (home, below fold) --- */
.gallery-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

/* --- Zoom on view --- */
[data-te-zoom-on-view] img {
  transform: scale(1.01);
  transform-origin: center center;
  transition: transform 2600ms cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
}

[data-te-zoom-on-view].te-zoom-active img {
  transform: scale(1.085);
}

/* --- Frame copy (hero overlay) --- */
.frame-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding: clamp(2rem, 6vw, 4rem);
}

.frame-title {
  margin: 0;
  font-family: var(--te-display);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 350;
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.frame-sub {
  margin: 1rem 0 0;
  max-width: 30rem;
  color: color-mix(in srgb, currentColor 78%, transparent);
}

.frame-cta {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.78rem 1.2rem;
  border: 1px solid currentColor;
  font-family: var(--te-ui);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.soft-button {
  background: var(--te-gold);
  color: var(--te-ink);
  border-color: var(--te-gold);
}

/* --- Split composition (catalog featured, inquiry, process) --- */
.split-composition {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.split-copy {
  padding: clamp(2rem, 6vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-media {
  margin: clamp(0.8rem, 1.8vw, 1.35rem);
  overflow: hidden;
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* --- Collection scroll (catalog) --- */
.collection-scroll {
  display: grid;
  grid-template-columns: 1fr;
}

.collection-row {
  min-height: 360px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-top: 1px solid var(--te-line-dark);
}

.curated-scroll .collection-row {
  min-height: 300px;
}

.curated-scroll .plate {
  min-height: 240px;
  margin: clamp(0.9rem, 2vw, 1.4rem);
}

.curated-scroll .frame-title {
  font-size: clamp(2.1rem, 4vw, 3.8rem);
}

.collection-row:nth-child(even) .collection-copy {
  order: 2;
}

.collection-copy {
  padding: clamp(1.5rem, 4vw, 3rem);
}

/* --- Plate (image holder in catalog rows) --- */
.plate {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.gallery-item--ruby-floral img {
  transform: scale(1.08);
  transform-origin: center center;
  object-position: center 44%;
}

/* --- Item detail (pendant study) --- */
.detail-concept {
  overflow: hidden;
}

.detail-screen {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
}

.detail-concept.paper .detail-screen {
  grid-template-columns: minmax(340px, 0.75fr) minmax(0, 1.25fr);
}

.detail-image {
  min-height: 720px;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.detail-copy {
  padding: clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-specs {
  display: grid;
  gap: 0.6rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--te-ui);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.detail-specs li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding-top: 0.6rem;
  border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

.detail-tagline {
  margin-top: 1.6rem;
  padding-left: 1rem;
  border-left: 1px solid var(--te-gold);
  color: color-mix(in srgb, currentColor 76%, transparent);
}

/* --- Piece-specific focal point overrides --- */
.detail-piece--ruby-emerald-ring .detail-image img {
  object-position: center 65%;
}

/* --- Story grid (process craft sections) --- */
.story-grid {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.story-copy {
  padding: clamp(2rem, 6vw, 4rem);
  align-self: center;
}

.story-image {
  overflow: hidden;
  min-height: 360px;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* --- Steps (process, inquiry) --- */
.steps {
  padding: clamp(2rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-content: center;
}

.step {
  min-height: 190px;
  border: 1px solid var(--te-line-dark);
  padding: 1.4rem;
}

.steps--single {
  grid-template-columns: 1fr;
  align-content: center;
}

/* --- Lateral detail (process W5) --- */
.lateral-detail {
  min-height: 620px;
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr);
}

.lateral-detail__copy {
  padding: clamp(1.5rem, 3vw, 2.2rem) clamp(2rem, 5vw, 4rem) clamp(0.7rem, 1.4vw, 1rem);
  max-width: 760px;
}

.lateral-detail__copy .frame-title {
  max-width: 18ch;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.lateral-detail__image {
  position: relative;
  margin: 0 clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem);
  overflow: hidden;
  min-height: 360px;
  aspect-ratio: 16 / 8;
  border: 1px solid var(--te-line-dark);
}

.lateral-detail__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.lateral-detail__image figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
}

/* --- Detail annotations (W4, W5) --- */
.detail-annotations {
  display: grid;
  gap: 0;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(31, 27, 23, 0.12);
}

.detail-annotations li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 56px;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid rgba(31, 27, 23, 0.12);
}

.detail-annotations li:first-child {
  border-top: 0;
}

.detail-annotations span {
  font-family: var(--te-ui);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--te-gold);
}

.detail-annotations strong {
  font-family: var(--te-body);
  font-size: 0.98rem;
  font-weight: 400;
  color: currentColor;
}

.detail-annotations--dark {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: var(--te-line-dark);
}

.detail-annotations--dark li {
  display: block;
  min-height: 0;
  border-top: 0;
  border-left: 1px solid var(--te-line-dark);
}

.detail-annotations--dark li:first-child {
  border-left: 0;
}

.detail-annotations--dark strong {
  display: block;
  margin-top: 0.3rem;
  color: var(--te-lamp-ink);
}

.work-annotation-study .split-composition {
  min-height: 560px;
}

.work-annotation-study .split-copy {
  padding-block: clamp(1.8rem, 4vw, 3rem);
}

/* --- Letter panel --- */
.letter-panel {
  max-width: 660px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) 2rem;
}

.letter-panel p {
  font-size: 1.2rem;
}

/* --- Asset gap placeholder --- */
.asset-gap {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 2rem;
  border: 1px dashed currentColor;
  color: color-mix(in srgb, currentColor 64%, transparent);
  text-align: center;
  font-family: var(--te-ui);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* --- Heading treatments (Left rule, Arc phase, Eyebrow rule) --- */
.te-h2-arc .p1 {
  font-variation-settings: "opsz" 96, "wght" 760, "SOFT" 16, "WONK" 1;
  color: var(--te-gold);
}

.te-h2-arc .p2 {
  font-variation-settings: "opsz" 96, "wght" 540, "SOFT" 48, "WONK" 1;
  color: color-mix(in srgb, currentColor 82%, var(--te-gold));
}

.te-h2-arc .p3 {
  font-style: italic;
  font-variation-settings: "opsz" 96, "wght" 360, "SOFT" 100, "WONK" 0;
  color: color-mix(in srgb, currentColor 72%, transparent);
}

.te-h2-eyebrow::after {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  margin-left: 0.6rem;
  vertical-align: middle;
  background: color-mix(in srgb, currentColor 44%, transparent);
}

.te-h2-left-rule {
  padding-left: 1rem;
  border-left: 2px solid var(--te-gold);
}

/* --- Inquiry form --- */
.inquiry-section {
  width: var(--te-read);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.inquiry-form {
  margin-top: 2rem;
  display: grid;
  gap: 1.2rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field label {
  font-family: var(--te-ui);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--te-lamp-soft);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: transparent;
  border: 1px solid var(--te-line-dark);
  color: var(--te-lamp-ink);
  font-family: var(--te-body);
  font-size: 1rem;
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-field select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: transparent;
  border: 1px solid var(--te-line-dark);
  color: var(--te-lamp-ink);
  font-family: var(--te-body);
  font-size: 1rem;
  cursor: pointer;
  appearance: none;
}

.calendly-link {
  display: inline-block;
  margin-top: 1.4rem;
}

/* --- Site header (sticky) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--te-line-dark);
  background: color-mix(in srgb, var(--te-lamp) 92%, transparent);
  backdrop-filter: blur(14px) saturate(115%);
}

.site-header--light {
  background: color-mix(in srgb, var(--te-paper) 92%, transparent);
  border-bottom-color: var(--te-line);
}

.site-header__inner {
  width: var(--te-wide);
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-wordmark {
  width: min(200px, 40vw);
  flex: 0 0 auto;
  text-decoration: none;
}

.site-wordmark img {
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--te-ui);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  opacity: 0.72;
  text-shadow: 0 1px 4px rgba(6, 65, 38, 0.8);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  opacity: 1;
}

.site-nav a:focus-visible,
.frame-links a:focus-visible {
  outline: 2px solid var(--te-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Home sticky header (fixed, revealed on scroll past hero) --- */
.site-header--home {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.site-header--home.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.home-cta-copy {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

/* --- Mobile nav toggle --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex: 0 0 auto;
  color: inherit;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
}

@media (max-width: 768px) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding-bottom: 0.75rem;
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 0.6rem 0;
    border-top: 1px solid var(--te-line-dark);
    text-shadow: none;
  }

  .site-header--light.nav-open .site-nav a {
    border-top-color: var(--te-line);
  }

  .frame-links {
    display: none;
  }
}

/* --- Site footer --- */
.site-footer {
  width: var(--te-wide);
  margin: 0 auto;
  padding: 2rem 0;
  border-top: 1px solid var(--te-line-dark);
  font-family: var(--te-ui);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--te-lamp-soft);
}

.site-footer--light {
  border-top-color: var(--te-line);
  color: var(--te-ink-soft);
}

.site-footer__contact,
.site-footer__copy {
  margin: 0;
  line-height: 1.8;
}

.site-footer__contact a {
  color: inherit;
  text-decoration: none;
}

.site-footer__contact a:hover {
  opacity: 0.72;
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .split-composition,
  .story-grid,
  .collection-row,
  .detail-screen,
  .detail-concept.paper .detail-screen {
    grid-template-columns: 1fr;
  }

  .detail-image {
    min-height: unset;
    aspect-ratio: 16 / 9;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .te-sheen::after {
    animation: none !important;
    content: none;
  }

  .te-ambient::before,
  .te-ambient::after {
    animation: none !important;
  }

  [data-te-zoom-on-view] img {
    transform: none !important;
    transition: none !important;
  }

  .hero-gallery__image {
    animation: none !important;
    opacity: 0;
    transform: none !important;
  }

  .hero-gallery__image--one {
    opacity: 1;
  }

  .strip-slot__image--primary,
  .strip-slot__image--alt {
    animation: none !important;
  }

  .strip-slot__image--primary { opacity: 1; }
  .strip-slot__image--alt     { opacity: 0; }
}

/* ============================================================
   CATALOG STRIP
   Rotating thumbnail strip at top of catalog page.
   5 portrait slots, each cycles between 2 images via fade.
   ============================================================ */

@keyframes stripFadePrimary {
  0%, 40%  { opacity: 1; }
  50%, 90% { opacity: 0; }
  100%     { opacity: 1; }
}

@keyframes stripFadeAlt {
  0%, 40%  { opacity: 0; }
  50%, 90% { opacity: 1; }
  100%     { opacity: 0; }
}

.catalog-strip {
  width: 100%;
  padding: clamp(1.2rem, 2.5vw, 2rem) 0 0;
  overflow: hidden;
}

.catalog-strip__inner {
  display: flex;
  gap: clamp(0.5rem, 1.2vw, 1rem);
  width: var(--te-wide);
  margin: 0 auto;
}

.strip-slot {
  flex: 1;
  aspect-ratio: 4 / 5;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--te-line-dark);
}

.strip-slot__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.strip-slot__image--primary {
  opacity: 1;
  animation: stripFadePrimary 8s ease-in-out infinite;
}

.strip-slot__image--alt {
  opacity: 0;
  animation: stripFadeAlt 8s ease-in-out infinite;
}

.strip-slot:nth-child(2) .strip-slot__image--primary { animation-delay: 0.8s; }
.strip-slot:nth-child(2) .strip-slot__image--alt     { animation-delay: 0.8s; }
.strip-slot:nth-child(3) .strip-slot__image--primary { animation-delay: 1.6s; }
.strip-slot:nth-child(3) .strip-slot__image--alt     { animation-delay: 1.6s; }
.strip-slot:nth-child(4) .strip-slot__image--primary { animation-delay: 2.4s; }
.strip-slot:nth-child(4) .strip-slot__image--alt     { animation-delay: 2.4s; }
.strip-slot:nth-child(5) .strip-slot__image--primary { animation-delay: 3.2s; }
.strip-slot:nth-child(5) .strip-slot__image--alt     { animation-delay: 3.2s; }

@media (max-width: 600px) {
  .catalog-strip__inner {
    gap: 0.35rem;
  }
  .strip-slot {
    aspect-ratio: 3 / 4;
  }
}

/* Skip navigation link — WCAG SC 2.4.1 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--te-gold);
  color: var(--te-lamp);
  z-index: 9999;
  text-decoration: none;
  font-family: var(--te-ui, sans-serif);
  font-size: 0.875rem;
}

/* Detail gallery grid — moved from item-detail template (F2 fix) */
.detail-gallery { background: var(--te-paper); }
.detail-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
}
.detail-gallery__item {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.detail-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Catalog scroll plate: aspect-ratio prevents CLS on lazy images */
.catalog-scroll .plate {
  aspect-ratio: 4 / 5;
  min-height: 0;
}
@media (max-width: 600px) {
  .detail-gallery__grid { grid-template-columns: 1fr; }
}

/* Inquiry form status message */
.inquiry-status {
  min-height: 1.4em;
  font-family: var(--te-ui, sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--te-lamp-ink) 80%, transparent);
}
.inquiry-status:empty { display: none; }

/* ============================================================
   MOBILE DISPLAY — Changes 1–4 (2026-05-17)
   All rules scoped to mobile breakpoints. Desktop untouched.
   EC-reviewed: blockers resolved before implementation.
   ============================================================ */

/* --- Change 2: Image-first card stack (≤860px) --- */
@media (max-width: 860px) {
  /* Remove fixed min-height so cards size to content */
  .collection-row {
    min-height: auto;
  }

  /* Image floats to top of stack regardless of DOM or desktop reversal */
  .plate,
  .split-media {
    order: -1;
  }

  /* story-grid divider (collection-row already has border-top in base) */
  .story-grid {
    border-top: 1px solid var(--te-line-dark);
    padding-top: 2rem;
  }

  /* Breathing room below copy block in each card */
  .collection-copy,
  .split-copy,
  .story-copy {
    padding-bottom: 2rem;
  }

  /* Clear plate min-height so images size to content, not forced 360px */
  .plate {
    min-height: auto;
  }
}

/* --- Change 1: Catalog filmstrip horizontal scroll (≤768px) --- */
/* --- Change 3: Section 2 gallery stack (≤768px)             --- */
/* --- Change 4: Home hero stack (≤768px)                     --- */
@media (max-width: 768px) {

  /* Issue 1 fix — lateral-detail: break 2:1 aspect-ratio that causes 346px overflow */
  .lateral-detail__image {
    aspect-ratio: 4 / 3;
    min-height: auto;
  }

  /* Change 1 — filmstrip: swipeable horizontal row */
  .catalog-strip {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .catalog-strip__inner {
    flex-wrap: nowrap;
    width: max-content;
    margin: 0;
    padding: 0 1.25rem;
  }

  .strip-slot {
    flex: 0 0 96px;
  }

  /* Change 3 — Section 2 gallery: static image-first stack */
  .hero-gallery--compact {
    display: block;
    min-height: auto;
  }

  /* Unblock the absolutely-positioned stack so image-one flows (EC blocker 2) */
  .hero-gallery--compact .hero-gallery__stack {
    position: static;
    overflow: visible;
  }

  /* First image: full-width portrait block */
  .hero-gallery--compact .hero-gallery__image--one {
    position: static;
    width: 100%;
    aspect-ratio: 4 / 5;
    height: auto; /* clears base height: 100% (EC non-blocking 3) */
    object-fit: cover;
    object-position: center center;
    opacity: 1;
    transform: none;
    animation: none;
  }

  /* Hide images 2 and 3 — no rotation on mobile */
  .hero-gallery--compact .hero-gallery__image--two,
  .hero-gallery--compact .hero-gallery__image--three {
    display: none;
  }

  /* Suppress the gradient overlay */
  .hero-gallery--compact::after {
    display: none;
  }

  /* Copy flows below the image */
  .hero-gallery--compact .hero-gallery__copy {
    position: static;
    padding: 2rem 1.25rem;
    max-width: 100%;
  }

  .hero-gallery--compact .frame-title {
    max-width: 100%;
  }

  /* Change 4 — Home hero section 1: image above, copy below */
  .hero .hero-cinema {
    display: block;
    min-height: auto;
  }

  /* Hero image: static portrait block, pendant centred */
  .hero .hero-bg-img {
    position: static;
    width: 100%;
    aspect-ratio: 4 / 5;
    height: auto; /* clears base height: 100% (EC non-blocking 3) */
    object-fit: cover;
    object-position: center center;
  }

  /* Suppress gradient overlay */
  .hero .hero-cinema::after {
    display: none;
  }

  /* Hero inline nav hidden — fixed site-header--home handles mobile nav */
  .hero .frame-nav {
    display: none;
  }

  /* Copy flows below the image, concrete horizontal padding (EC blocker 1) */
  .hero .frame-copy {
    position: static;
    padding: 2rem 1.25rem;
    max-width: 100%;
  }
}
