/* =====================================================================
   Etalier – rotating feature section (layout scaffold, no content yet)
   Uses the site's tokens (--bg, --text, --text-2, --muted, --border,
   --rail, --pad, --ease). Editorial, asymmetric: text left (~38 %),
   a large open stage right (~62 %), four dots underneath.
   ===================================================================== */
.frs {
  --frs-gap: clamp(32px, 3.2vw, 56px);
  --frs-dot: 10px;         /* inactive dot */
  --frs-dot-active: 64px;  /* active, elongated indicator */
  --frs-duration: 7s;      /* how long a slide stays before the next one */
  --frs-dot-off: #c4bfb6;
  --frs-dot-on: #121212;   /* the same near-black as the dark area below */
  --frs-ph: rgba(28, 28, 26, 0.055);   /* placeholder bars */
  --frs-bleed: 0px;        /* later: let a visual reach past its column */
  position: relative;
  margin: 0 var(--rail);
  padding: clamp(40px, 4vw, 64px) var(--pad) clamp(72px, 6.6vw, 112px);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.frs__inner { max-width: 1240px; margin: 0 auto; }

/* ---------- slides: stacked in one grid cell → stable height, no layout shift ---------- */
.frs__slides { display: grid; }
.frs__slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
  column-gap: var(--frs-gap);
  align-items: center;
  visibility: hidden;
  transition: visibility 0s linear 420ms;
}
.frs__slide.is-active { visibility: visible; transition: none; }
/* text and stage fade separately; the text arrives a touch later → calm, editorial handover */
.frs__text, .frs__visual { opacity: 0; transition: opacity 320ms var(--ease), transform 420ms var(--ease); }
.frs__text { transform: translateY(6px); }
.frs__slide.is-active .frs__text,
.frs__slide.is-active .frs__visual { opacity: 1; transform: none; transition: opacity 420ms var(--ease) 80ms, transform 420ms var(--ease) 80ms; }
/* a stage that hands an object over to the next slide stays opaque and fades its own content */
.frs__visual[data-handover] { opacity: 1 !important; transition: none !important; }

/* ---------- left: text column ---------- */
.frs__text { max-width: 440px; padding-bottom: 4%; }
.frs__kicker { margin: 0 0 20px; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0.01em; }
.frs__title {
  margin: 0;
  font-size: clamp(32px, 3.4vw, 50px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.frs__title .muted { color: var(--muted); }
.frs__desc { margin: 22px 0 0; font-size: 17px; line-height: 1.55; color: var(--text-2); text-wrap: pretty; }

/* placeholders: grey bars at the real line heights of kicker / title / description */
.frs-ph { display: block; border-radius: 3px; background: var(--frs-ph); }
.frs__kicker .frs-ph { width: 7.5em; height: 0.85em; }
.frs__title .frs-ph { height: 0.72em; margin: 0.18em 0 0.18em; }
.frs__desc .frs-ph { height: 0.72em; margin: 0.4em 0; }
.frs__title .frs-ph + .frs-ph { margin-top: 0.36em; }

/* ---------- right: the stage for later animations ---------- */
.frs__visual {
  position: relative;
  aspect-ratio: 16 / 11;
  margin-right: calc(var(--frs-bleed) * -1);
  /* no card, no frame, no glow: the page background stays; content brings its own surfaces */
}
/* scaffold only: four hairline corner marks show the usable area */
.frs__visual[data-empty]::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  --c: rgba(28, 28, 26, 0.16);
  background:
    linear-gradient(var(--c), var(--c)) left top / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1px 18px no-repeat;
}
.frs__visual-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 12px; font-weight: 500; letter-spacing: 0.02em; color: #b3b0a9;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---------- navigation: four dots, the active one elongated ---------- */
/* controls: the dots in a black capsule, a round black play/pause button next to it */
.frs__ctrl {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: clamp(32px, 3vw, 48px);
}
.frs__nav {
  --frs-dot-off: rgba(255, 255, 255, 0.32);
  --frs-dot-on: #fff;
  display: flex; align-items: center;
  height: 38px; padding: 0 9px; border-radius: 999px;
  background: #121212;
}
/* the dots keep their 44 px hit area, they just reach a little past the capsule */
.frs__nav .frs__dot { margin: -3px 0; }
.frs__play {
  position: relative;
  width: 38px; height: 38px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: #121212; color: #fff;
  transition: background-color 150ms var(--ease), transform 120ms var(--ease);
}
.frs__play:hover { background: #2a2a29; }
.frs__play:active { transform: scale(0.96); }
.frs__play:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.frs__play::after { content: ""; position: absolute; inset: -3px; }   /* 44 px hit area */
.frs__play svg { grid-area: 1 / 1; width: 15px; height: 15px; }
.frs__play-pause { stroke-width: 2.2; }
.frs__play-play { fill: currentColor; stroke: none; opacity: 0; }
.frs__play[aria-pressed="true"] .frs__play-pause { opacity: 0; }
.frs__play[aria-pressed="true"] .frs__play-play { opacity: 1; }
.frs__dot {
  display: inline-grid; place-items: center;
  height: 44px; padding: 0 8px;
  border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.frs__dot span {
  position: relative; overflow: hidden;
  display: block;
  width: var(--frs-dot); height: var(--frs-dot); border-radius: 999px;
  background: var(--frs-dot-off);
  transition: width 360ms var(--ease), background-color 240ms var(--ease);
}
.frs__dot:hover span { background: rgba(255, 255, 255, 0.55); }
/* active: the dot grows into a bar; a dark fill runs through it, then the next slide follows */
.frs__dot[aria-selected="true"] span { width: var(--frs-dot-active); background: var(--frs-dot-off); }
.frs__dot[aria-selected="true"] span::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--frs-dot-on);
  transform-origin: left; transform: scaleX(0);
  animation: frs-progress var(--frs-duration) linear 360ms forwards;
}
.frs.is-paused .frs__dot span::after { animation-play-state: paused; }
@keyframes frs-progress { to { transform: scaleX(1); } }
.frs__dot:focus-visible { outline: none; }
.frs__dot:focus-visible span { outline: 2px solid #a3adff; outline-offset: 4px; }
.frs__dot:active span { transform: scale(0.94); }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .frs__slide { grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); }
  .frs__visual { aspect-ratio: 4 / 3; }
}

/* ---------- stacked: text on top, stage, then dots ---------- */
@media (max-width: 899px) {
  .frs { padding-top: clamp(32px, 6vw, 48px); }
  .frs__slide { grid-template-columns: minmax(0, 1fr); row-gap: 40px; align-items: start; }
  .frs__text { max-width: 560px; padding-bottom: 0; }
  .frs__visual { aspect-ratio: 4 / 3; margin-right: 0; }
  .frs__ctrl { margin-top: 20px; }
}

/* ---------- phone ---------- */
@media (max-width: 560px) {
  .frs { padding-left: 20px; padding-right: 20px; }
  .frs__kicker { margin-bottom: 14px; }
  .frs__desc { font-size: 15.5px; margin-top: 16px; }
  .frs__slide { row-gap: 32px; }
  /* a taller stage: phones read top to bottom, not side by side */
  .frs__visual { aspect-ratio: 4 / 5; }
  /* larger hit area per dot (44 × 44), visual size unchanged */
  .frs__dot { padding: 0 12px; min-width: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .frs__slide, .frs__slide.is-active, .frs__text, .frs__dot span { transition: none !important; }
  .frs__text { transform: none; }
  /* no timer: the active bar is simply dark, slides change only by tapping */
  .frs__dot[aria-selected="true"] span::after { animation: none; transform: none; }
}

/* screen-reader only text (placeholders) */
.frs .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
