/*
 * Sípszó – „Rólam” aloldal (Polyák Adrián). A közös tokeneket és elemeket a styles.css adja;
 * itt csak az oldal saját elemei vannak. Mozgás: beúszó hero, parallaxos fotók (rolam.js),
 * görgetésre rajzolódó idővonal, egy kártyába összeálló teendők, sportág-futószalag.
 * Csökkentett mozgásnál minden a végállapotában jelenik meg.
 */

/* ---------------------------------------------------------------- hero */

.r-hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 72px;
}
@media (min-width: 1024px) {
  .r-hero {
    padding: 72px 0 112px;
  }
}
@media (max-width: 899px) {
  .r-court {
    display: none;
  }
}
.r-hero-grid {
  position: relative;
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .r-hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 64px;
  }
}
.r-hero-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.r-hero-text .t-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.r-name {
  display: flex;
  flex-direction: column;
  font-size: clamp(64px, 13vw, 150px);
  line-height: 0.84;
  font-weight: 900;
  font-stretch: 65%;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.r-name .hl {
  padding-right: 0.06em;
}
.r-role {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.25;
}
.r-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 460px;
  margin-top: 6px;
}
.r-facts div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.r-facts dd {
  margin: 0;
}
.r-facts dt {
  font-size: clamp(18px, 4.6vw, 22px);
  font-weight: 600;
  color: var(--text);
}
.r-facts dd {
  font-size: 13px;
  color: var(--text-2);
}

/* Belépő mozgás: a hero elemei egymás után (betöltéskor, nem görgetésre). */
.js .r-in {
  opacity: 0;
  translate: 0 26px;
  animation: r-up 0.8s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 0.09s + 0.1s);
}
@keyframes r-up {
  to {
    opacity: 1;
    translate: none;
  }
}

/* Portré: döntött narancs kártya mögötte, a kép felülről „lehúzódó” maszkkal jelenik meg. */
.r-portrait {
  position: relative;
  margin: 0 auto;
  width: min(100%, 440px);
}
.r-portrait-card {
  position: absolute;
  inset: 6% -5% -4% 8%;
  border-radius: var(--r-2xl);
  background: var(--accent);
  rotate: 4deg;
}
.r-portrait-img {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-2xl);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.r-portrait-img img,
.r-photo-img img {
  display: block;
  width: 100%;
  height: 112%;
  object-fit: cover;
  translate: 0 var(--py, 0px);
  will-change: translate;
}
.js .r-portrait-img {
  clip-path: inset(0 0 100% 0 round var(--r-2xl));
  animation: r-wipe 1.1s var(--ease) 0.25s forwards;
}
@keyframes r-wipe {
  to {
    clip-path: inset(0 0 0 0 round var(--r-2xl));
  }
}
.r-chip {
  position: absolute;
  left: -12px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--brand-tinta);
  color: var(--brand-parketta);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.r-chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: r-pulse 1.8s ease-in-out infinite;
}
@keyframes r-pulse {
  50% {
    box-shadow: 0 0 0 6px var(--accent-soft);
  }
}

/* ---------------------------------------------------------------- idővonal */

.r-timeline {
  --progress: 0;
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 34px;
  list-style: none;
}
/* Az alapvonal és a görgetéssel kitöltődő narancs vonal (rolam.js állítja a --progress értéket). */
.r-timeline::before,
.r-timeline::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--line);
}
.r-timeline::after {
  background: var(--accent);
  transform-origin: top;
  scale: 1 var(--progress);
}
.r-step {
  position: relative;
  display: grid;
  gap: 6px 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
}
.r-step::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 26px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: var(--line-strong);
  z-index: 1;
  transition: background 0.4s, scale 0.4s var(--ease);
}
.r-step.in::before {
  background: var(--accent);
  scale: 1.15;
}
@media (min-width: 768px) {
  .r-step {
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: baseline;
  }
}
.r-year {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.r-step h3 {
  font-size: 22px;
  font-weight: 800;
  font-stretch: 85%;
}
.r-step p {
  margin-top: 4px;
  color: var(--text-2);
  line-height: 1.5;
}
.r-step-accent {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}
.r-step-accent .r-year,
.r-step-accent p {
  color: var(--on-accent);
}

/* ---------------------------------------------------------------- miért */

.r-why,
.r-goal {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .r-why {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 72px;
  }
  .r-goal {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 72px;
  }
}
.r-photo {
  position: relative;
  margin: 0 auto;
  width: min(100%, 420px);
}
.r-photo-img {
  overflow: hidden;
  border-radius: var(--r-2xl);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
  rotate: -2deg;
}
.r-photo-run .r-photo-img {
  rotate: 2deg;
}
.r-why-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.r-quote {
  margin: 0;
  padding: 22px 24px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
  background: var(--surface);
}
.r-quote p {
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 800;
  font-stretch: 85%;
  line-height: 1.3;
}

/* ---------------------------------------------------------------- cél */

.r-goal-text {
  display: flex;
  flex-direction: column;
}
.r-stages {
  display: grid;
  gap: 12px;
}
.r-stage {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.r-stage:hover {
  transform: translateX(6px);
  border-color: var(--accent);
}
.r-stage-no {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.r-stage h3 {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 800;
  font-stretch: 85%;
}
.r-stage p {
  margin-top: 4px;
  color: var(--text-2);
  line-height: 1.5;
}

/* A záró gomb ugyanaz, mint a kosárlabda oldalon. */
.btn-dark-outline {
  border: 2px solid var(--brand-tinta);
  background: transparent;
  color: var(--brand-tinta);
}
.btn-dark-outline:hover {
  background: rgba(18, 22, 31, 0.08);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------------- görgetési csík */

.r-progress {
  position: fixed;
  left: 0;
  top: var(--header-h);
  z-index: 40;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform-origin: left;
  scale: var(--p, 0) 1;
  pointer-events: none;
}

/* ---------------------------------------------------------------- pálya: idővonal + ragadós fotó */

.r-career {
  display: grid;
  gap: 40px;
}
@media (min-width: 960px) {
  .r-career {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 64px;
    align-items: start;
  }
  .r-career-photo {
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }
}
.r-career-photo .r-chip {
  left: auto;
  right: -10px;
}

/* ---------------------------------------------------------------- teendők a kosárba */

.r-hoopset {
  position: relative;
  height: 440px;
  margin: 8px 0 28px;
}
.r-hoop {
  position: absolute;
  left: 50%;
  top: 0;
  width: 220px;
  translate: -50% 0;
}
.r-hoop-board {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 3;
}
.r-hoop-square {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 3;
}
.r-hoop-rim {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
}
.r-net {
  fill: none;
  stroke: var(--text-2);
  stroke-width: 2;
  stroke-linejoin: round;
  transform-origin: 110px 112px;
}
/* Minden kosárnál meglendül a háló, és felvillan a gyűrű (a JS indítja újra). */
.r-net.swish {
  animation: r-swish 0.45s var(--ease);
}
@keyframes r-swish {
  40% {
    scale: 0.9 1.18;
  }
}
.r-hoop.villan .r-hoop-rim {
  animation: r-rim 0.45s ease;
}
@keyframes r-rim {
  40% {
    stroke: var(--text);
  }
}
.r-score {
  position: absolute;
  right: 0;
  top: 12px;
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: var(--brand-tinta);
  color: var(--accent);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}
.r-score small {
  font-size: 15px;
  color: #a3aab8;
}
.r-score.pop {
  animation: r-pop 0.35s var(--ease);
}
@keyframes r-pop {
  40% {
    scale: 1.18;
  }
}
/* Egy dobás: a külső elem vízszintesen egyenletesen, a belső függőlegesen ívben (túllő, majd beesik). */
.r-shot {
  position: absolute;
  translate: -50% -50%;
  transition: translate 0.85s linear;
  transition-delay: calc(var(--i) * 0.16s);
}
.r-shot b {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px 8px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: translate 0.85s cubic-bezier(0.3, 1.9, 0.6, 1), scale 0.85s ease-in, opacity 0.2s ease;
  transition-delay: calc(var(--i) * 0.16s), calc(var(--i) * 0.16s), calc(var(--i) * 0.16s + 0.75s);
  animation: r-float 3.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -0.7s);
}
.r-shot b::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    linear-gradient(var(--brand-tinta), var(--brand-tinta)) 50% 0 / 1.5px 100% no-repeat,
    linear-gradient(var(--brand-tinta), var(--brand-tinta)) 0 50% / 100% 1.5px no-repeat,
    var(--accent);
}
@keyframes r-float {
  to {
    margin-top: -7px;
  }
}
.r-hoopset.gyujt .r-shot {
  translate: calc(-50% + var(--dx, 0px)) -50%;
}
.r-hoopset.gyujt .r-shot b {
  translate: 0 var(--dy, 0px);
  scale: 0.35;
  opacity: 0;
  animation: none;
}
.r-pile-app {
  position: absolute;
  left: 50%;
  bottom: 6px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px 18px 18px;
  border-radius: var(--r-2xl);
  background: var(--brand-tinta);
  color: var(--brand-parketta);
  font-size: 32px;
  font-weight: 850;
  font-stretch: 80%;
  line-height: 1;
  white-space: nowrap;
  translate: -50% 0;
  scale: 0.3;
  opacity: 0;
  box-shadow: var(--shadow);
  transition: scale 0.6s cubic-bezier(0.3, 1.8, 0.5, 1), opacity 0.3s;
}
.r-pile-app svg {
  width: 64px;
  height: 64px;
}
.r-pile-app span {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.r-pile-app small {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.r-hoopset.kesz .r-pile-app {
  scale: 1;
  opacity: 1;
}

/* ---------------------------------------------------------------- betűpörgetős sportágtábla */

.r-board {
  margin-top: 88px;
  padding: 22px clamp(16px, 3vw, 32px) 24px;
  border-radius: var(--r-2xl);
  background: #0b0e14;
  color: #f2ebdd;
  box-shadow: var(--shadow), inset 0 0 0 1px #262d3c;
}
.r-board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #262d3c;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a3aab8;
}
.r-board-clock {
  color: var(--accent);
  animation: r-blink 1.6s steps(2) infinite;
}
@keyframes r-blink {
  50% {
    opacity: 0.35;
  }
}
.r-board-rows {
  display: grid;
  gap: 6px;
  margin: 16px 0 18px;
  list-style: none;
}
.r-board-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
}
.r-flap {
  display: inline-flex;
  gap: 3px;
  font-size: clamp(15px, 2.2vw, 22px);
  font-weight: 600;
  letter-spacing: 0;
}
.r-flap-state {
  color: #a3aab8;
}
.r-board-row.on .r-flap {
  color: var(--accent);
}
/* Egy betű „lapja”: sötét cella középvonallal; pörgéskor átfordul. */
.r-cell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 1.55em;
  border-radius: 4px;
  background: linear-gradient(#1b2130 50%, #161b26 50%);
}
.r-cell::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: #0b0e14;
}
.r-cell.ures {
  background: transparent;
}
.r-cell.ures::after {
  display: none;
}
.r-cell.forog {
  animation: r-flip 0.09s linear;
}
@keyframes r-flip {
  50% {
    transform: perspective(200px) rotateX(-70deg);
  }
}
.r-board-foot {
  color: #a3aab8;
  font-size: 15px;
  line-height: 1.5;
}
.r-board-foot a {
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 599px) {
  .r-cell {
    width: 1em;
    height: 1.4em;
  }
  .r-flap {
    gap: 2px;
    font-size: 13px;
  }
}

/* ---------------------------------------------------------------- hero: a főoldaléval egyező háttér */

.r-hero .hero-bg {
  z-index: 0;
}
.r-hero-grid {
  z-index: 1;
}
/* A név sorai úgy csapódnak be, mint a főoldal címe (a line-in a motion.css-ben van). */
.js .r-name .r-line {
  opacity: 1;
  translate: none;
  animation: line-in 0.85s var(--ease) both;
  animation-delay: calc(0.1s + var(--i, 0) * 0.09s);
}

/* ---------------------------------------------------------------- csökkentett mozgás */

@media (prefers-reduced-motion: reduce) {
  .js .r-in {
    opacity: 1;
    translate: none;
    animation: none;
  }
  .js .r-portrait-img {
    clip-path: none;
    animation: none;
  }
  .r-timeline {
    --progress: 1;
  }
  .r-chip-dot,
  .r-court *,
  .r-board-clock,
  .r-letter,
  .r-band-speed {
    animation: none;
  }
  .r-court * {
    stroke-dashoffset: 0;
  }
  .r-letter {
    opacity: 1;
    translate: none;
  }
  .r-band-img img {
    scale: 1;
  }
  .r-portrait-img img,
  .r-photo-img img {
    translate: none;
  }
}

/* A betűkre bontott sor egy sorban marad. */
.r-name .r-line {
  display: block;
  white-space: nowrap;
}
