/* ─────────────────────────────────────────────────────────────────────────────
   HOME PAGE — hero slideshow, ticker, category tiles, editorial split, band
   ───────────────────────────────────────────────────────────────────────────── */

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: min(100svh, 900px);
  background: var(--tint-active, #f0ece4);
  transition: background-color 1s var(--ease);
  overflow: clip;
  display: flex;
  flex-direction: column;
}

.hero__slides {
  position: relative;
  flex: 1;
  display: grid;
}

.hero__slide {
  grid-area: 1 / 1;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: calc(var(--header-h) + clamp(28px, 4vw, 64px)) var(--gut) clamp(96px, 11vh, 132px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.hero__slide[data-active='true'] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── photographic slides ──────────────────────────────────────────────
   A slide upgrades itself the moment a photograph is dropped into
   assets/img/hero/ and the file loads: the picture fills the frame, the
   cutout steps aside and the type turns white over a dark scrim. Until
   then the slide runs on the flat tint and the cutout. */

.hero__slide[data-photo='on'] { color: #fff; }
.hero__slide[data-photo='on'] .hero__art { display: none; }
.hero__slide[data-photo='on'] { grid-template-columns: minmax(0, 1fr); }
.hero__slide[data-photo='on'] .eyebrow { color: rgba(255, 255, 255, 0.72); }
.hero__slide[data-photo='on'] .lede { color: rgba(255, 255, 255, 0.86); }
.hero__slide[data-photo='on'] .btn { --btn-bg: #fff; --btn-fg: var(--ink); }
.hero__slide[data-photo='on'] .btn:hover { color: #fff; }
.hero__slide[data-photo='on'] .link-u {
  color: #fff;
  background-image: linear-gradient(#fff, #fff);
}

.hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__photo::before {
  content: '';
  position: absolute;
  inset: -2%;
  background-image: var(--photo);
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
}

/* The picture drifts while its slide is up. Slow enough to read as a camera
   move, not a zoom effect. */
.hero__slide[data-active='true'] .hero__photo::before {
  animation: kenburns 11s var(--ease) forwards;
}

@keyframes kenburns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.2%, -1.4%, 0); }
}

/* Dark on the left where the words sit, clear on the right. */
.hero__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 11, 8, 0.78) 0%, rgba(14, 11, 8, 0.52) 40%, rgba(14, 11, 8, 0.08) 74%, rgba(14, 11, 8, 0.3) 100%),
    linear-gradient(180deg, rgba(14, 11, 8, 0.5) 0%, rgba(14, 11, 8, 0) 32%);
}

.hero__slide[data-photo='on'] .hero__text { position: relative; z-index: 1; }

.hero:has(.hero__slide[data-active='true'][data-photo='on']) { background: #0e0b08; }

.hero:has(.hero__slide[data-active='true'][data-photo='on']) .hero__dot { background: rgba(255, 255, 255, 0.3); }
.hero:has(.hero__slide[data-active='true'][data-photo='on']) .hero__dot::after { background: #fff; }
.hero:has(.hero__slide[data-active='true'][data-photo='on']) .hero__arrows button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.hero:has(.hero__slide[data-active='true'][data-photo='on']) .hero__arrows button:hover {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.hero__text { max-width: 620px; }

.hero__title {
  margin: 16px 0 22px;
  font-size: clamp(44px, 6.4vw, 96px);
}

.hero__title em { font-size: 1.04em; }

/* Each line waits for its slide to become the active one, then slides up from
   behind its own mask. Re-armed in JS every time the slide changes. */
.hero__slide .mask > span { transform: translateY(110%); transition: transform 0.95s var(--ease); }
.hero__slide[data-active='true'] .mask > span { transform: none; }
.hero__slide .mask:nth-of-type(2) > span { transition-delay: 0.08s; }

.hero__lede { max-width: 46ch; }

.hero__cta {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero__slide .eyebrow,
.hero__lede,
.hero__cta {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.hero__slide[data-active='true'] .eyebrow { opacity: 1; transform: none; transition-delay: 0.05s; }
.hero__slide[data-active='true'] .hero__lede { opacity: 1; transform: none; transition-delay: 0.3s; }
.hero__slide[data-active='true'] .hero__cta { opacity: 1; transform: none; transition-delay: 0.4s; }

.hero__art {
  position: relative;
  height: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
}

.hero__art img {
  max-height: min(62svh, 620px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 50px 60px rgba(22, 18, 15, 0.24));
  transform: translateY(40px) scale(0.97);
  opacity: 0;
  transition: transform 1.1s var(--ease), opacity 0.8s var(--ease);
}

.hero__slide[data-active='true'] .hero__art img {
  transform: none;
  opacity: 1;
  transition-delay: 0.1s;
}

/* Control bar sits on the picture, so the photograph runs the full height
   of the hero instead of stopping above a black strip. */
.hero__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px 26px;
}

.hero__dots { display: flex; gap: 10px; flex: 1; max-width: 420px; }

.hero__dot {
  flex: 1;
  height: 3px;
  border: 0;
  padding: 0;
  background: rgba(22, 18, 15, 0.16);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

/* The fill is the timer: it runs the length of the slide's own dwell. */
.hero__dot::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.hero__dot[data-on='true']::after {
  animation: dotFill var(--dwell, 6.5s) linear forwards;
}

.hero[data-paused='true'] .hero__dot[data-on='true']::after { animation-play-state: paused; }

@keyframes dotFill {
  to { transform: scaleX(1); }
}

.hero__arrows { display: flex; gap: 8px; }

.hero__arrows button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(22, 18, 15, 0.18);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease);
}

.hero__arrows button::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}

[data-hero-prev]::before { transform: rotate(135deg) translate(-1px, -1px); }
[data-hero-next]::before { transform: rotate(-45deg) translate(-1px, -1px); }

.hero__arrows button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── ticker ───────────────────────────────────────────────────────────── */

.ticker {
  border-block: 1px solid var(--line);
  overflow: clip;
  padding-block: 16px;
}

.ticker__track {
  display: flex;
  gap: 26px;
  width: max-content;
  animation: ticker 38s linear infinite;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink-70);
  white-space: nowrap;
}

.ticker:hover .ticker__track { animation-play-state: paused; }

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ── category tiles ───────────────────────────────────────────────────── */

/* Nine departments, three by three. An even grid reads calmer than a
   feature-tile layout with holes in the last row. */
.cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 268px;
  padding: 24px;
  padding-right: 45%;
  border-radius: var(--r-md);
  background: var(--sand);
  overflow: hidden;
  transition: background var(--t-ui) var(--ease);
}

.cat:hover { background: var(--sand-deep); }

/* The cutout sits in the right half of the tile and never runs under the
   label — the tile's own right padding keeps the two apart. */
.cat img {
  position: absolute;
  right: 5%;
  top: 50%;
  translate: 0 -50%;
  max-height: 78%;
  max-width: 42%;
  width: auto;
  object-fit: contain;
  transition: transform 0.8s var(--ease);
  filter: drop-shadow(0 22px 26px rgba(22, 18, 15, 0.18));
}

.cat:hover img { transform: translateY(-8px) rotate(-2deg) scale(1.04); }

.cat__name {
  position: relative;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.cat__blurb { position: relative; font-size: 13px; color: var(--ink-50); margin-top: 4px; max-width: 22ch; }

.cat__go {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 15px;
  background: var(--paper);
  transform: scale(0.6);
  opacity: 0;
  transition: transform var(--t-ui) var(--ease), opacity var(--t-ui) var(--ease);
}

.cat:hover .cat__go { transform: none; opacity: 1; }

/* ── editorial split ──────────────────────────────────────────────────── */

.split__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 86px);
  align-items: center;
}

.split__art {
  background: var(--sand);
  border-radius: var(--r-lg);
  min-height: 520px;
  display: grid;
  place-items: center;
  padding: 44px;
}

.split__art img { max-height: 440px; width: auto; filter: drop-shadow(0 40px 46px rgba(22, 18, 15, 0.2)); }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 20px; }

.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }

.steps span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 3px;
}

.steps strong { font-size: 16px; font-weight: 600; }
.steps p { font-size: 14px; margin-top: 2px; }

.split__cta { display: flex; align-items: center; gap: 22px; margin-top: 34px; flex-wrap: wrap; }

/* ── closing band ─────────────────────────────────────────────────────── */

.band { background: var(--dark); color: #fff; padding-block: clamp(72px, 10vw, 148px); }

.band__inner { display: grid; gap: 38px; justify-items: start; }

.band__title { font-size: clamp(40px, 7vw, 108px); }
.band__title em { color: var(--accent); }

.band__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.band .btn--ghost { --btn-fg: #fff; border-color: rgba(255, 255, 255, 0.25); }

/* ── responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero { min-height: 86svh; }
  .hero__slide {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
    padding-top: 30px;
  }
  .hero__art { order: 2; min-height: 0; }

  /* Portrait screens get a top-down scrim instead of a left-right one. */
  .hero__photo::after {
    background:
      linear-gradient(180deg, rgba(14, 11, 8, 0.86) 0%, rgba(14, 11, 8, 0.5) 46%, rgba(14, 11, 8, 0.3) 70%, rgba(14, 11, 8, 0.72) 100%);
  }
  .hero__art img { max-height: 46svh; }
  .hero__title { font-size: clamp(38px, 8.2vw, 64px); }
  .split__grid { grid-template-columns: 1fr; }
  .split__art { min-height: 340px; padding: 28px; order: 2; }
  .split__art img { max-height: 300px; }
}

@media (max-width: 720px) {
  .hero__slide { padding-top: calc(var(--header-h) + 18px); padding-bottom: 86px; }
  .hero__title { margin: 12px 0 16px; }
  .hero__cta { gap: 16px; margin-top: 22px; }
  .hero__cta .btn { width: 100%; }
  .hero__art img { max-height: 38svh; }
  .hero__bar { padding-block: 16px 20px; }
  .hero__arrows { display: none; }
  .cats { grid-template-columns: 1fr; gap: 12px; }
  .cat { min-height: 190px; padding: 18px; padding-right: 44%; }
  .cat img { max-height: 72%; right: 4%; }
  .cat__blurb { max-width: 18ch; }
  .steps li { grid-template-columns: 34px 1fr; }
  .band__cta { width: 100%; }
  .band__cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .hero__dot[data-on='true']::after { animation: none; transform: scaleX(1); }
  .hero__slide .mask > span,
  .hero__art img,
  .hero__slide .eyebrow,
  .hero__lede,
  .hero__cta { transform: none; opacity: 1; }
}
