/* ==========================================================================
   RYDOM SPORTS — homepage sections
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(560px, 82vh, 880px);
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media .ph {
  height: 100%;
  aspect-ratio: auto;
  animation: slowZoom 18s var(--ease) both;
}
.hero__media .ph__label { top: auto; bottom: 24px; left: auto; right: max(var(--gutter-x), env(safe-area-inset-right, 0px)); justify-items: end; text-align: right; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,11,11,0.92) 0%, rgba(11,11,11,0.6) 45%, rgba(11,11,11,0.1) 100%),
    linear-gradient(0deg, rgba(11,11,11,0.95) 0%, transparent 45%);
}
/* Oversized R mark from the logo, as a quiet watermark */
.hero__mark {
  position: absolute;
  right: -4vw;
  top: 50%;
  z-index: -1;
  width: min(54vw, 760px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0.07;
  background: url("../img/rydom-mark.png") center / contain no-repeat;
  filter: blur(1px);
  pointer-events: none;
}
.hero__inner {
  display: grid;
  gap: 28px;
  padding-block: 120px clamp(56px, 8vw, 104px);
}
.hero h1 {
  font-size: var(--fs-hero);
  font-stretch: 118%;
  font-weight: 900;
  max-width: 16ch;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero__lead { font-size: var(--fs-lead); color: #d6d6d8; max-width: 54ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* Load-in sequence */
.hero [data-in] { animation: rise 0.9s var(--ease) both; }
.hero [data-in="2"] { animation-delay: 0.12s; }
.hero [data-in="3"] { animation-delay: 0.24s; }
.hero [data-in="4"] { animation-delay: 0.36s; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes slowZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---------- Category ticker ---------- */
.ticker {
  background: var(--red);
  color: var(--white);
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid var(--red-deep);
}
.ticker__track {
  display: inline-flex;
  gap: 40px;
  padding-block: 16px;
  animation: ticker 40s linear infinite;
}
.ticker__track span {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ticker__track span::after { content: ""; width: 10px; height: 10px; background: var(--ink); transform: rotate(45deg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Category tiles ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--gap);
}
.cat-tile {
  position: relative;
  grid-column: span 2;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-3);
}
.cat-tile--lg { grid-column: span 3; }
.cat-tile .ph { --ar: 4 / 5; transition: transform 1s var(--ease); }
.cat-tile--lg .ph { --ar: 5 / 4; }
.cat-tile:hover .ph { transform: scale(1.05); }
.cat-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11,11,11,0.92) 0%, rgba(11,11,11,0.25) 50%, transparent 70%);
  pointer-events: none;
}
.cat-tile__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: clamp(20px, 2.6vw, 36px);
}
.cat-tile h3 { font-size: clamp(1.6rem, 2.6vw, 2.5rem); }
.cat-tile--lg h3 { font-size: clamp(1.9rem, 3.4vw, 3.25rem); }
/* Men / Women tiles: the audience big, the category small underneath */
.cat-tile__split { display: grid; gap: 0; }
.cat-tile__split span { font-size: clamp(2.6rem, 4.6vw, 4.5rem); line-height: 0.9; }
.cat-tile__split small {
  font-family: var(--font-label);
  font-size: clamp(1.19rem, 1.5vw, 1.44rem);
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: 0.22em;
  color: var(--red);
  line-height: 1;
  margin-top: -0.1em;
}
.cat-tile__items { color: #cfcfd2; font-size: 0.9375rem; max-width: 40ch; }
.cat-tile__go {
  justify-self: start;
  margin-top: 6px;
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.cat-tile__go::after {
  content: "→";
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  background: var(--red);
  border-radius: 50%;
  transition: transform var(--dur) var(--ease);
}
.cat-tile:hover .cat-tile__go::after { transform: translateX(6px); }
@media (max-width: 960px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-tile, .cat-tile--lg { grid-column: span 1; }
  .cat-tile--lg .ph { --ar: 4 / 5; }
  .cat-tile:last-child { grid-column: 1 / -1; }
  .cat-tile:last-child .ph { --ar: 16 / 9; }
}
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .cat-tile .ph, .cat-tile--lg .ph, .cat-tile:last-child .ph { --ar: 4 / 3; }
}

/* ---------- Featured products ---------- */
/* "Featured products" label big and red, heading below it smaller */
.section--light .section-head p.featured__eyebrow,
.section-head p.featured__eyebrow {
  color: var(--red);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.16em;
}
.featured__eyebrow::before { width: 40px; height: 3px; }
.section-head h2.featured__title { font-size: clamp(1.6rem, 3vw, 2.6rem); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--bone-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text-ink);
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.section--light .tab { border-color: #cfccc7; }
.tab:hover { border-color: var(--ink); }
.tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

.rail-wrap { position: relative; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * var(--gap)) / 4);
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > .pcard { scroll-snap-align: start; }
.rail > .pcard[hidden] { display: none; }
@media (max-width: 1100px) { .rail { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); } }
@media (max-width: 760px) { .rail { grid-auto-columns: 72%; } }

.rail-controls { display: flex; align-items: center; gap: 16px; margin-top: 32px; }
.rail-btn {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--text-ink);
  cursor: pointer;
  font-size: 1.25rem;
  transition: background 0.2s, color 0.2s;
}
.rail-btn:hover { background: var(--ink); color: var(--white); }
.rail-btn:disabled { opacity: 0.3; cursor: default; background: transparent; color: var(--text-ink); }
.rail-progress { flex: 1; height: 2px; background: #d3d0cb; position: relative; overflow: hidden; }
.rail-progress span { position: absolute; inset: 0 auto 0 0; width: 30%; background: var(--red); transition: transform 0.2s linear, width 0.2s; }
.featured__note { margin-top: 20px; font-size: var(--fs-small); color: var(--text-ink-dim); }

/* ---------- Campaign banner ---------- */
.banner { position: relative; overflow: hidden; isolation: isolate; }
.banner .ph { --ar: 21 / 9; min-height: 440px; }
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(0deg, rgba(11,11,11,0.85), rgba(11,11,11,0.1) 70%);
  pointer-events: none;
}
.banner__body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
}
.banner__body .container {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px 48px;
  padding-block: clamp(32px, 5vw, 72px);
}
.banner h2 { font-size: var(--fs-h2); font-stretch: 118%; max-width: 14ch; }
.banner h2 em { font-style: normal; color: var(--red); }

/* ---------- Instagram ---------- */
.section-head p.ig__eyebrow { color: var(--red); font-size: calc(var(--fs-label) * 1.25); }
.section-head h2.ig__title { font-size: calc(var(--fs-h2) * 0.75); }
.ig-icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.ig-icon .ig-icon__dot { fill: currentColor; stroke: none; }
.ig-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
@media (max-width: 760px) { .ig-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ig-tile {
  position: relative;
  display: block;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-3);
}
.ig-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.ig-tile:hover img, .ig-tile:focus-visible img { transform: scale(1.05); }
.ig-tile__hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 11, 11, 0.6);
  color: var(--white);
  font-family: var(--font-label);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.ig-tile:hover .ig-tile__hover, .ig-tile:focus-visible .ig-tile__hover { opacity: 1; }
.ig-tile__badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 8px;
  background: rgba(11, 11, 11, 0.75);
  color: var(--white);
  font-family: var(--font-label);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Phone refinements ---------- */
@media (max-width: 560px) {
  .cat-tile .ph, .cat-tile--lg .ph, .cat-tile:last-child .ph { --ar: 1 / 1; }
  .hero__media .ph__label { top: 16px; bottom: auto; }
  .hero__media .ph__spec { display: none; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: clamp(1.9rem, 9.4vw, 2.75rem); font-stretch: 100%; }
}
/* Keep the hero subject in frame on narrow screens */
.hero__media .ph--img img { object-position: 80% center; }

/* ---------- Hero carousel ---------- */
.hero { display: block; --hero-dur: 6s; }
.hero::before { content: none; }
.hero__mark { display: none; }
.hero__slides { display: grid; min-height: inherit; }
.hero__slide {
  grid-area: 1 / 1;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,11,11,0.92) 0%, rgba(11,11,11,0.6) 45%, rgba(11,11,11,0.1) 100%),
    linear-gradient(0deg, rgba(11,11,11,0.95) 0%, transparent 45%);
}
.hero__slide:not(.is-active) [data-in],
.hero__slide:not(.is-active) .hero__media .ph { animation: none; }
.hero__inner { padding-block: 120px clamp(110px, 11vw, 150px); }
.hero__title { font-size: var(--fs-hero); font-stretch: 118%; font-weight: 900; max-width: 16ch; }
.hero__media .ph__label { top: 20px; bottom: auto; }

.hero__controls {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(28px, 4vw, 48px);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hero__dots { display: flex; gap: 10px; }
.hero__dot {
  width: 64px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  align-items: center;
}
.hero__dot span { position: relative; display: block; height: 3px; background: rgba(255,255,255,0.28); overflow: hidden; }
.hero__dot span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
}
.hero__dot[aria-current="true"] span::after { transform: scaleX(1); }
.hero.is-playing .hero__dot[aria-current="true"] span::after { animation: heroFill var(--hero-dur) linear both; }
@keyframes heroFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero__arrows { display: flex; gap: 10px; }
.hero__arrow {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  background: rgba(11,11,11,0.35);
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.hero__arrow:hover { background: var(--red); border-color: var(--red); }
@media (max-width: 560px) {
  .hero__dot { width: 44px; }
  .hero__arrow { width: 42px; height: 42px; }
  .hero__title { font-size: clamp(1.9rem, 9.4vw, 2.75rem); font-stretch: 100%; }
}

/* Shoot banners: phone versions keep products in the top of the frame */
.ph--img picture { display: contents; }
@media (max-width: 640px) {
  .hero__media .ph--img img { object-position: center top; }
  .hero__slide::before {
    background: linear-gradient(0deg, rgba(11,11,11,0.97) 0%, rgba(11,11,11,0.85) 30%, rgba(11,11,11,0.2) 55%, transparent 70%);
  }
}
