/* ============================================================
   KINGNESS COFFEE — HOMEPAGE
   Section-specific styles. Reuses tokens, base, components.
   ============================================================ */

/* ============================================================
   HERO — horizontal-scroll-on-vertical-scroll
   Outer section is N × 100vh tall. Inside, a sticky pin holds the
   panels (each 100vw) and translates them horizontally based on
   vertical scroll progress. RTL handled by JS sign-flip.
   ============================================================ */

.hero-pin {
  position: relative;
  block-size: 320vh;             /* 1 × 100vh viewing + 2 × 110vh transitions */
  background: var(--color-bg);
  margin-block-end: 0;
}
.hero-pin__sticky {
  position: sticky;
  inset-block-start: 0;
  block-size: 100vh;
  inline-size: 100%;
  overflow: hidden;
}
.hero-pin__track {
  display: flex;
  flex-direction: row;
  block-size: 100%;
  inline-size: 300vw;            /* 3 panels × 100vw */
  will-change: transform;
  transition: transform 50ms linear; /* tiny smoothing */
}
.hero-pin__panel {
  flex: 0 0 100vw;
  block-size: 100%;
  position: relative;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + var(--space-2xl)) clamp(var(--space-lg), 6vw, var(--space-4xl)) var(--space-3xl);
}

/* Stacked fallback — mobile (<=768px) or reduced-motion preference.
   Panels stack vertically; horizontal scroll mechanic is disabled. */
.hero-pin.hscroll--stacked { block-size: auto; }
.hero-pin.hscroll--stacked .hero-pin__sticky { position: relative; block-size: auto; overflow: visible; }
.hero-pin.hscroll--stacked .hero-pin__track {
  display: block;
  inline-size: 100%;
  transform: none !important;
  transition: none;
}
.hero-pin.hscroll--stacked .hero-pin__panel {
  flex: none;
  inline-size: 100%;
  min-block-size: 100vh;
}
/* On stacked mode, the rotating circle floats over panel 1 only */
.hero-pin.hscroll--stacked .hero-pin__circle {
  position: absolute;
  inset-block-start: calc(var(--nav-height) + var(--space-md));
  inset-inline-end: var(--space-md);
  inline-size: 100px;
}
/* Page indicator + scroll cue don't make sense in stacked mode */
.hero-pin.hscroll--stacked .hero-pin__progress,
.hero-pin.hscroll--stacked .hero-pin__scroll-cue { display: none; }

/* ---------- PANEL 1 — editorial intro ---------- */
.hero-pin__panel--intro {
  background: var(--color-bg);
  color: var(--color-text);
}
.hero-pin__intro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}
.hero-pin__intro-eyebrow::before {
  content: '';
  display: inline-block;
  inline-size: 32px;
  block-size: 1px;
  background: var(--color-accent);
}
.hero-pin__display {
  font-family: var(--font-display);
  font-weight: var(--weight-extralight);
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-block: var(--space-lg) var(--space-lg);
  max-inline-size: 12ch;
}
.hero-pin__display em {
  font-style: italic;
  font-family: 'Playfair Display', 'Inter', serif;
  font-weight: 300;
  color: var(--color-accent);
}

/* Intro content wrapper — left column, vertically centered */
.hero-pin__intro-content {
  max-inline-size: clamp(420px, 52vw, 680px);
  position: relative;
  z-index: 2;
}
.hero-pin__intro-lede {
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-inline-size: 52ch;
  margin-block-end: var(--space-xl);
}
.hero-pin__intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}
.hero-pin__intro-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.5rem 0.95rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.hero-pin__intro-meta-tag::before {
  content: "";
  inline-size: 5px;
  block-size: 5px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Decorative coffee-cup illustration — bottom-right corner of panel 1,
   tucked beneath the spinning text circle. */
.hero-pin__intro-illu {
  position: absolute;
  inset-block-end: clamp(var(--space-3xl), 9vh, var(--space-4xl));
  inset-inline-end: clamp(var(--space-md), 5vw, var(--space-4xl));
  inline-size: clamp(180px, 17vw, 260px);
  color: var(--color-text);
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
}
.hero-pin__intro-illu svg { inline-size: 100%; block-size: auto; }

/* Steam wisps — staggered fade gives the illusion of rising vapor */
.hero-pin__intro-illu-steam path {
  stroke: var(--color-accent);
  opacity: 0.4;
  animation: steam-fade 3.6s ease-in-out infinite;
}
.hero-pin__intro-illu-steam path:nth-child(2) { animation-delay: -1.2s; }
.hero-pin__intro-illu-steam path:nth-child(3) { animation-delay: -2.4s; }
@keyframes steam-fade {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 0.85; }
}

/* On narrower widths the illustration crowds the text — hide it. */
@media (max-width: 1100px) {
  .hero-pin__intro-illu { display: none; }
  .hero-pin__intro-content { max-inline-size: 100%; }
}
/* In stacked (mobile) mode the panel becomes 100% wide & vertical;
   hide illustration since text + circle already fill the panel. */
.hero-pin.hscroll--stacked .hero-pin__intro-illu { display: none; }

/* Scroll cue — shifts to "swipe →" semantically since scroll triggers horizontal */
.hero-pin__scroll-cue {
  position: absolute;
  inset-block-end: var(--space-2xl);
  inset-inline-start: clamp(var(--space-lg), 6vw, var(--space-4xl));
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.hero-pin__scroll-line {
  display: inline-block;
  inline-size: 56px;
  block-size: 1px;
  background: var(--color-text-faint);
  position: relative;
  overflow: hidden;
}
.hero-pin__scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  transform: translateX(-100%);
  animation: scroll-cue 2.4s var(--ease-in-out) infinite;
}
[dir="rtl"] .hero-pin__scroll-line::after { animation-direction: reverse; }
@keyframes scroll-cue {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ---------- PANEL 2 — cinematic video ---------- */
.hero-pin__panel--cinema {
  background: var(--color-text);
  color: #FFFBF5;
  padding: 0;
  overflow: hidden;
}
.hero-pin__video {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-pin__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(31, 20, 16, 0.35) 0%, rgba(31, 20, 16, 0.7) 100%);
  z-index: 1;
}
.hero-pin__cinema-content {
  position: relative;
  z-index: 2;
  inline-size: 100%;
  block-size: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-2xl)) clamp(var(--space-lg), 6vw, var(--space-4xl));
}
.hero-pin__cinema-eyebrow {
  color: var(--color-accent-soft);
  margin-block-end: var(--space-lg);
}
.hero-pin__cinema-quote {
  font-family: var(--font-display);
  font-weight: var(--weight-extralight);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.18;
  max-inline-size: 28ch;
  letter-spacing: -0.005em;
  color: rgba(255, 251, 245, 0.96);
}

/* ---------- PANEL 3 — statement / stats ---------- */
.hero-pin__panel--stats {
  background: var(--color-bg);
  color: var(--color-text);
  flex-direction: column;
  justify-content: center;
}
.hero-pin__stats-head {
  max-inline-size: 38ch;
  margin-block-end: var(--space-3xl);
}
.hero-pin__stats-eyebrow { color: var(--color-accent); }
.hero-pin__stats-tagline {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-block: var(--space-md) 0;
}
.hero-pin__stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3xl);
  inline-size: 100%;
  max-inline-size: 880px;
  position: relative;
  padding-block-start: var(--space-xl);
  border-block-start: 1px solid var(--color-border);
}
@media (max-width: 720px) {
  .hero-pin__stats-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
}
.hero-pin__stat-value {
  font-family: var(--font-display);
  font-weight: var(--weight-extralight);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--color-text);
}
.hero-pin__stat-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-block-start: var(--space-xs);
}

/* ---------- ROTATING CIRCULAR TEXT decoration ---------- */
.hero-pin__circle {
  position: absolute;
  inset-block-start: 18vh;
  inset-inline-end: clamp(var(--space-md), 4vw, var(--space-3xl));
  inline-size: clamp(140px, 16vw, 200px);
  aspect-ratio: 1;
  z-index: 5;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.hero-pin__circle svg {
  inline-size: 100%;
  block-size: 100%;
  animation: spin 28s linear infinite;
}
.hero-pin__circle text {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--color-text);
  transition: fill 400ms var(--ease-out);
}
.hero-pin__circle__center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  transition: color 400ms var(--ease-out);
}
.hero-pin__circle__center .icon {
  inline-size: 28%;
  block-size: 28%;
}
.hero-pin__circle__emblem {
  display: block;
  block-size: 50%;
  aspect-ratio: 155 / 222;
  background-color: var(--color-text);
  -webkit-mask: url('/assets/logo-emblem-black.png') no-repeat center / contain;
          mask: url('/assets/logo-emblem-black.png') no-repeat center / contain;
  transition: background-color 400ms var(--ease-out);
}
.hero-pin__circle--on-dark .hero-pin__circle__emblem {
  background-color: rgba(255, 251, 245, 0.85);
}
[dir="rtl"] .hero-pin__circle svg { animation-direction: reverse; }
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* When the active panel is dark (cinema), swap to light fill */
.hero-pin__circle--on-dark text { fill: rgba(255, 251, 245, 0.85); }
.hero-pin__circle--on-dark .hero-pin__circle__center { color: var(--color-accent-soft); }

/* ---------- Pagination indicator (subtle) ---------- */
.hero-pin__progress {
  position: absolute;
  inset-block-end: var(--space-2xl);
  inset-inline-end: clamp(var(--space-lg), 6vw, var(--space-4xl));
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-faint);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-variant-numeric: tabular-nums;
}
.hero-pin__progress strong { color: var(--color-text); font-weight: var(--weight-medium); }

/* ============================================================
   SPLIT (image + text, alternating)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-2xl), 6vw, var(--space-4xl));
  align-items: center;
}
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; gap: var(--space-2xl); }
}

.split--reverse > :first-child { order: 2; }
@media (max-width: 800px) {
  .split--reverse > :first-child { order: 0; }
}

.split__media {
  position: relative;
  aspect-ratio: 5 / 6;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-alt);
}
.split__media img {
  inline-size: 100%; block-size: 100%;
  object-fit: cover;
}

.split__caption {
  position: absolute;
  inset-block-end: var(--space-md);
  inset-inline-start: var(--space-md);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: #FFFBF5;
  background: rgba(31, 20, 16, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.4em 0.75em;
  border-radius: var(--radius-pill);
}

.split__copy { max-inline-size: 48ch; }
.split__title {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-block: var(--space-md) var(--space-lg);
}
.split__body {
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-block-end: var(--space-lg);
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding-block: var(--space-4xl);
  background: var(--color-surface-alt);
}
.services__head { text-align: center; margin-block-end: var(--space-3xl); }
.services__head .lede { margin-inline: auto; }
/* ====== Service stack — three-card deck ====== */
.service-stack {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: var(--space-xl);
  row-gap: var(--space-xl);
  align-items: center;
  outline: none;
}
.service-stack:focus-visible { box-shadow: var(--shadow-focus); border-radius: var(--radius-xl); }

.service-stack__nav {
  grid-row: 1;
  inline-size: 56px;
  block-size: 56px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow:
    0 1px 2px rgba(31, 20, 16, 0.04),
    0 6px 18px rgba(31, 20, 16, 0.06);
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  z-index: 5;
}
.service-stack__nav:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
  transform: scale(1.06);
  box-shadow: 0 1px 2px rgba(31, 20, 16, 0.08), 0 12px 28px rgba(92, 35, 9, 0.25);
}
.service-stack__nav:active { transform: scale(0.98); }
.service-stack__nav .icon { inline-size: 22px; block-size: 22px; }
.service-stack__nav--prev { grid-column: 1; }
.service-stack__nav--next { grid-column: 3; }
/* Arrow direction: chevron-right is "→" by default; flip prev in LTR,
   and flip next in RTL (RTL also swaps the buttons' grid columns). */
.service-stack__nav--prev .icon { transform: scaleX(-1); }
html[dir="rtl"] .service-stack__nav--prev .icon { transform: scaleX(1); }
html[dir="rtl"] .service-stack__nav--next .icon { transform: scaleX(-1); }

.service-stack__viewport {
  position: relative;
  grid-row: 1;
  grid-column: 2;
  block-size: clamp(460px, 60vh, 540px);
}

.service-stack__dots {
  grid-row: 2;
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}
.service-stack__dot {
  inline-size: 9px;
  block-size: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-border-strong);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              inline-size var(--duration-base) var(--ease-out),
              border-radius var(--duration-base) var(--ease-out);
}
.service-stack__dot:hover { background: var(--color-text-muted); }
.service-stack__dot[aria-current="true"] {
  background: var(--color-accent);
  inline-size: 28px;
  border-radius: var(--radius-pill);
}

/* ====== Card itself ====== */
.service-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: clip;
  box-shadow:
    0 1px 2px rgba(31, 20, 16, 0.05),
    0 24px 64px rgba(31, 20, 16, 0.14);
  transition: transform 650ms var(--ease-out),
              opacity 650ms var(--ease-out),
              box-shadow 650ms var(--ease-out);
  will-change: transform, opacity;
  transform-origin: 50% 0;
}

/* Stack offsets — front card → active, others recede behind */
.service-card[data-offset="0"] {
  transform: translateY(0) scale(1);
  opacity: 1;
  z-index: 3;
}
.service-card[data-offset="1"] {
  transform: translateY(28px) scale(0.96);
  opacity: 0.5;
  z-index: 2;
  pointer-events: none;
  box-shadow:
    0 1px 2px rgba(31, 20, 16, 0.04),
    0 14px 36px rgba(31, 20, 16, 0.08);
}
.service-card[data-offset="2"] {
  transform: translateY(56px) scale(0.92);
  opacity: 0.22;
  z-index: 1;
  pointer-events: none;
  box-shadow:
    0 1px 2px rgba(31, 20, 16, 0.03),
    0 8px 20px rgba(31, 20, 16, 0.06);
}
.service-card[data-offset="3"],
.service-card[data-offset="4"] {
  transform: translateY(80px) scale(0.88);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- Media side ---- */
.service-card__media {
  position: relative;
  overflow: hidden;
}
.service-card__media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 10s var(--ease-out);
}
.service-card[data-offset="0"] .service-card__media img { transform: scale(1.08); }

.service-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(31, 20, 16, 0) 55%, rgba(31, 20, 16, 0.4) 100%),
    linear-gradient(to right, rgba(31, 20, 16, 0.18) 0%, rgba(31, 20, 16, 0) 35%);
  pointer-events: none;
}

.service-card__index {
  position: absolute;
  inset-block-start: var(--space-lg);
  inset-inline-start: var(--space-lg);
  font-family: var(--font-display);
  font-weight: var(--weight-extralight);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--color-bg);
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  z-index: 2;
}

.service-card__pill {
  position: absolute;
  inset-block-end: var(--space-lg);
  inset-inline-start: var(--space-lg);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  background: rgba(255, 251, 245, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text);
  z-index: 2;
  box-shadow: 0 4px 14px rgba(31, 20, 16, 0.12);
}
.service-card__pill .icon {
  inline-size: 14px;
  block-size: 14px;
  color: var(--color-accent);
}

/* ---- Body side ---- */
.service-card__body {
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
  position: relative;
  background: var(--color-surface);
}

/* Decorative vertical accent rule at the start edge */
.service-card__body::before {
  content: "";
  position: absolute;
  inset-block-start: var(--space-2xl);
  inset-inline-start: 0;
  inline-size: 3px;
  block-size: 72px;
  background: linear-gradient(180deg, var(--color-accent), transparent);
  border-start-end-radius: 2px;
  border-end-end-radius: 2px;
}

/* Decorative dot grid ornament in the end-bottom corner */
.service-card__body::after {
  content: "";
  position: absolute;
  inset-block-end: var(--space-xl);
  inset-inline-end: var(--space-xl);
  inline-size: 72px;
  block-size: 72px;
  background-image: radial-gradient(circle, var(--color-accent-soft) 1.5px, transparent 1.5px);
  background-size: 12px 12px;
  opacity: 0.7;
  pointer-events: none;
}

.service-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
}
.service-card__dot {
  display: inline-block;
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.service-card__title {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--color-text);
}

.service-card__desc {
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  font-size: var(--text-md);
  max-inline-size: 50ch;
}

.service-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  padding-block: var(--space-md);
  border-block-start: 1px solid var(--color-border);
  border-block-end: 1px solid var(--color-border);
}
.service-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.service-card__meta-item .icon {
  inline-size: 16px;
  block-size: 16px;
  color: var(--color-accent);
}

.service-card__cta {
  align-self: flex-start;
  margin-block-start: var(--space-xs);
}

/* Variant: use the same card aesthetic but in a normal grid (services page).
   Cancels the absolute-stacked positioning that makes sense only inside the
   .service-stack__viewport on the homepage. */
.service-card--listing {
  position: relative;
  inset: auto;
  transform: none !important;
  opacity: 1 !important;
  z-index: auto;
  pointer-events: auto;
}
.service-card--listing .service-card__media img { transform: scale(1.02); }
.service-card--listing:hover .service-card__media img { transform: scale(1.06); }

.service-list {
  display: grid;
  gap: var(--space-xl);
}

/* ====== Mobile / narrow viewports ====== */
@media (max-width: 900px) {
  .service-stack {
    grid-template-columns: auto 1fr auto;
    column-gap: var(--space-sm);
  }
  .service-stack__viewport {
    grid-row: 1;
    grid-column: 1 / -1;
    block-size: clamp(560px, 84vh, 680px);
  }
  .service-stack__nav--prev { grid-row: 2; grid-column: 1; }
  .service-stack__nav--next { grid-row: 2; grid-column: 3; }
  .service-stack__dots {
    grid-row: 2;
    grid-column: 2;
    align-self: center;
  }
  .service-card {
    grid-template-columns: 1fr;
    grid-template-rows: 240px 1fr;
  }
  .service-card__body { padding: var(--space-xl); gap: var(--space-sm); }
  .service-card__body::after { display: none; }
  .service-card__title { font-size: clamp(1.4rem, 5.5vw, 1.85rem); }
}

/* ============================================================
   FEATURED PRODUCTS / JOURNAL — shared head
   ============================================================ */
.featured__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-xl);
  margin-block-end: var(--space-2xl);
  flex-wrap: wrap;
}
.featured__heading { max-inline-size: 50ch; }
.featured__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 1100px) { .featured__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .featured__grid { grid-template-columns: 1fr; } }

.journal { padding-block: var(--space-4xl); }
.journal__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}
@media (max-width: 900px) { .journal__grid { grid-template-columns: 1fr; } }

/* CTA strip — moved to components.css so all pages can use it consistently. */

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-head { margin-block-end: var(--space-2xl); }
.section-head .eyebrow { display: inline-block; margin-block-end: var(--space-md); }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-inline-size: 18ch;
}

/* ============================================================
   REVEAL HOOK (used with IntersectionObserver)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.reveal[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 100ms; }
.reveal[data-delay="2"] { transition-delay: 200ms; }
.reveal[data-delay="3"] { transition-delay: 300ms; }
.reveal[data-delay="4"] { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   MOBILE / SMALL VIEWPORT POLISH
   The .hscroll--stacked class (added by JS for viewport <=768px or
   reduced-motion) handles the layout switch. These rules tune
   typography and spacing for the stacked vertical experience.
   ============================================================ */
@media (max-width: 768px) {
  .hero-pin__panel {
    padding-block-start: calc(var(--nav-height) + var(--space-2xl));
    padding-inline: var(--space-lg);
    padding-block-end: var(--space-3xl);
  }
  .hero-pin__display { letter-spacing: -0.015em; }
  .hero-pin__cinema-content { padding-inline: var(--space-lg); }
  .hero-pin__stats-grid { gap: var(--space-xl); padding-block-start: var(--space-lg); }

  /* Tighten section vertical rhythm on phones */
  .section { padding-block: var(--space-3xl); }
  .services { padding-block: var(--space-3xl); }
  .journal { padding-block: var(--space-3xl); }

}

/* Very small phones — extra trim */
@media (max-width: 480px) {
  .featured__head { gap: var(--space-md); }
  .featured__head .btn { inline-size: 100%; }
  .hero-pin__stat-value { font-size: clamp(1.75rem, 7vw, 2.25rem); }
}

/* ============================================================
   BEAN STORY — scroll-driven scene
   Section is tall (200vh-ish). A sticky stage in the middle holds
   the bean-shaped mask; rails on either side carry parallax chips.
   ============================================================ */
.bean-story {
  position: relative;
  padding-block-start: var(--space-3xl);
  padding-block-end: var(--space-lg);
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(92, 35, 9, 0.05) 0%, transparent 70%),
    var(--color-bg);
  overflow: clip;
}

.bean-story__head {
  text-align: center;
  margin-block-end: var(--space-2xl);
  position: relative;
  z-index: 3;
}

.bean-story__inner {
  position: relative;
  block-size: 180vh;
  display: grid;
  grid-template-columns: 1fr clamp(320px, 38vw, 540px) 1fr;
  column-gap: var(--space-xl);
  padding-inline: clamp(var(--space-lg), 5vw, var(--space-3xl));
}

.bean-story__rail {
  grid-row: 1;
  position: relative;
  block-size: 100%;
}
.bean-story__rail--start { grid-column: 1; }
.bean-story__rail--end   { grid-column: 3; }

.bean-story__chip {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: var(--y, 50vh);
  inline-size: 100%;
  max-inline-size: 360px;
  will-change: transform;
  z-index: 2;
}
/* Left rail — text right-aligned, decorative bar after label */
.bean-story__rail--start .bean-story__chip {
  text-align: end;
  margin-inline-start: auto;
  inset-inline-start: auto;
  inset-inline-end: 0;
}
/* In RTL, .--start sits at the right of the viewport; flip alignment so
   the chip's text reads "into" the bean from that side. */
html[dir="rtl"] .bean-story__rail--start .bean-story__chip { text-align: start; }
html[dir="rtl"] .bean-story__rail--end   .bean-story__chip { text-align: end; }

.bean-story__chip-num {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--weight-extralight);
  font-size: clamp(2.75rem, 4vw, 3.75rem);
  color: var(--color-accent);
  opacity: 0.4;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-block-end: var(--space-sm);
}

.bean-story__chip-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: var(--weight-medium);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
}
.bean-story__chip-label::before {
  content: "";
  inline-size: 28px;
  block-size: 1px;
  background: var(--color-accent);
}
.bean-story__rail--start .bean-story__chip-label { flex-direction: row-reverse; }
html[dir="rtl"] .bean-story__rail--start .bean-story__chip-label { flex-direction: row; }
html[dir="rtl"] .bean-story__rail--end   .bean-story__chip-label { flex-direction: row-reverse; }

.bean-story__chip-title {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  font-size: clamp(1.35rem, 2vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin-block: var(--space-xs) var(--space-sm);
  color: var(--color-text);
}

.bean-story__chip-body {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-inline-size: 32ch;
  margin-inline-start: auto;
}
.bean-story__rail--end .bean-story__chip-body { margin-inline-start: 0; }

/* ---- Sticky stage holding the bean ---- */
.bean-story__stage {
  grid-row: 1;
  grid-column: 2;
  position: sticky;
  inset-block-start: 0;
  block-size: 100vh;
  align-self: start;
  display: grid;
  place-items: center;
  z-index: 1;
}

.bean-story__halo {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 80%;
  aspect-ratio: 1.3 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(92, 35, 9, 0.18) 0%, transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.bean-story__bean {
  position: relative;
  inline-size: clamp(280px, 38vw, 540px);
  aspect-ratio: 1.3 / 1;
  clip-path: url(#kingness-bean-clip);
  background: var(--color-text);
  will-change: transform;
  transition: filter var(--duration-deliberate) var(--ease-out);
  filter: drop-shadow(0 30px 60px rgba(31, 20, 16, 0.25));
}

/* Wrapper that takes the breath/zoom transform — keeps all stacked
   step images in lockstep with the bean's motion. */
.bean-story__bean-stack {
  position: absolute;
  inset: 0;
  will-change: transform;
}
/* All step images stack on top of each other inside the bean clip-path.
   Only the .is-active one is visible; switches via opacity for a
   smooth cross-fade as scroll moves between chips. */
.bean-story__bean-img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
}
.bean-story__bean-img.is-active { opacity: 1; }

.bean-story__groove {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* ====== Static fallback (mobile / reduced-motion) ====== */
.bean-story--static .bean-story__bean,
.bean-story--static .bean-story__bean-img,
.bean-story--static .bean-story__chip {
  transform: none !important;
}

@media (max-width: 900px) {
  .bean-story { padding-block: var(--space-3xl); }
  .bean-story__inner {
    grid-template-columns: 1fr;
    block-size: auto;
    gap: var(--space-2xl);
    padding-inline: var(--space-lg);
  }
  .bean-story__rail {
    grid-column: 1;
    grid-row: auto;
    position: static;
    block-size: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
  }
  .bean-story__chip {
    position: static;
    inset-block-start: auto;
    inset-inline-start: auto;
    inset-inline-end: auto;
    inline-size: 100%;
    max-inline-size: 100%;
    margin-inline: 0;
    text-align: start !important;
  }
  .bean-story__chip-body { max-inline-size: 100%; margin-inline-start: 0; }
  .bean-story__rail--start .bean-story__chip-label,
  .bean-story__rail--end .bean-story__chip-label { flex-direction: row; }
  .bean-story__stage {
    grid-column: 1;
    grid-row: auto;
    position: static;
    block-size: auto;
    margin-inline: auto;
    padding-block: var(--space-xl);
  }
  .bean-story__bean { inline-size: clamp(260px, 70vw, 440px); }
}
