/* ============================================================
   RELEASE 6.0 · hero, the six scenes and the plans
   (parts/r6-*.php, motion in app.js). The brand's own ink blue and
   gold (tokens.css). The motion is the phone's: it lies back in the
   hero and stands up as the page scrolls, then holds still while six
   scenes turn its screen and swing it left and right.
   ============================================================ */

.r6-hero,
.r6-devices,
.r6-study,
.r6-scenes,
.r6-plans {
  --r6-gold: #e3c47c;
  --r6-gold-deep: #c8a24d;
  --r6-ink: var(--td-bg-base, #101723);
  --r6-text: var(--td-text-primary, #f5f7fa);
  --r6-text-2: var(--td-text-secondary, #b8c4d4);
  --r6-text-3: var(--td-text-tertiary, #8896ab);
  --r6-hair: rgba(255, 255, 255, .08);
  --r6-serif: var(--td-font-reading, 'Literata', Georgia, serif);
  --r6-sans: var(--td-font-ui, 'Inter', system-ui, sans-serif);
  position: relative;
  background: var(--r6-ink);
  color: var(--r6-text);
  font-family: var(--r6-sans);
}

.r6-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.r6-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font: 700 12px/1 var(--r6-sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--r6-gold);
}

.r6-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--r6-gold); box-shadow: 0 0 14px 2px rgba(227, 196, 124, .7); }

/* ---------------- The device ----------------
   A thin black bezel with a lit metal edge; every screen sits in the
   same inset (.r6-screen), so the capture keeps its own proportions. */
.r6-device {
  --r6-bezel: 3.4%;
  position: relative;
  aspect-ratio: 1170 / 2532;
  border-radius: 14% / 6.5%;
  background: #05070b;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .22),
    inset 0 0 0 3px #1c212b,
    inset 0 0 0 4px rgba(255, 255, 255, .06),
    0 70px 120px -40px rgba(0, 0, 0, .85),
    0 30px 60px -30px rgba(227, 196, 124, .18);
}

.r6-device::after {
  /* the glass: a soft sheen across the screen */
  content: '';
  position: absolute;
  inset: var(--r6-bezel);
  border-radius: 11.5% / 5.3%;
  background: linear-gradient(118deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .02) 28%, transparent 40%);
  pointer-events: none;
}

.r6-screen {
  position: absolute;
  inset: var(--r6-bezel);
  overflow: hidden;
  border-radius: 11.5% / 5.3%;
  background: #000;
}

.r6-screen-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ---------------- Hero ---------------- */
.r6-hero {
  --r6-rise: 0;
  overflow: hidden;
  padding: 104px 0 0;
  text-align: center;
}

.r6-hero-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 1200px;
  height: 1200px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(227, 196, 124, .22), rgba(200, 162, 77, .06) 45%, transparent 70%);
  pointer-events: none;
}

.r6-hero-copy { position: relative; display: flex; flex-direction: column; align-items: center; }

.r6-hero-title {
  max-width: 13em;
  margin: 0;
  font: 500 clamp(48px, 7vw, 104px)/1 var(--r6-serif);
  letter-spacing: -.025em;
  text-wrap: balance;
}

.r6-hero-title em {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(180deg, #f3dc9e 10%, var(--r6-gold) 55%, var(--r6-gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .06em;
}

.r6-hero-lede {
  max-width: 36em;
  margin: 28px 0 36px;
  font: 400 19px/1.6 var(--r6-sans);
  color: var(--r6-text-2);
  text-wrap: balance;
}

.r6-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.r6-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px 11px 16px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  color: var(--r6-text);
  text-align: left;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease;
}

.r6-store svg { width: 24px; height: 24px; flex: none; }
.r6-store span { display: flex; flex-direction: column; font: 600 17px/1.1 var(--r6-sans); }
.r6-store small { font: 500 11px/1.2 var(--r6-sans); opacity: .7; }
.r6-store:hover { transform: translateY(-2px); border-color: rgba(227, 196, 124, .6); }

.r6-store-primary {
  border-color: transparent;
  background: linear-gradient(180deg, #ecd394, var(--r6-gold) 60%, var(--r6-gold-deep));
  color: #141a24;
  box-shadow: 0 10px 30px -10px rgba(227, 196, 124, .6);
}

.r6-store-primary:hover { border-color: transparent; }

.r6-free { margin: 22px 0 0; font: 400 14px/1.5 var(--r6-sans); color: var(--r6-text-3); }

/* The phone lies back and stands up as --r6-rise goes 0 → 1. */
.r6-hero-stage {
  position: relative;
  display: flex;
  justify-content: center;
  height: min(78vh, 760px);
  margin-top: 64px;
  perspective: 1600px;
  perspective-origin: 50% 0%;
}

.r6-device-hero {
  width: min(360px, 34vh);
  transform-origin: 50% 0%;
  transform:
    rotateX(calc((1 - var(--r6-rise)) * 32deg))
    scale(calc(.86 + var(--r6-rise) * .14))
    translateY(calc((1 - var(--r6-rise)) * 40px));
  will-change: transform;
}

.r6-hero-stage::after {
  /* the phone sinks into the page instead of ending on a hard edge */
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, var(--r6-ink) 85%);
  pointer-events: none;
}

/* ---------------- Devices · the 3D stage ---------------- */
.r6-devices {
  position: relative;
  height: 500vh;
  background: var(--r6-ink);
  color: var(--r6-text);
  font-family: var(--r6-sans);
}

.r6-devices-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }

.r6-devices-glow {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 1400px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(227, 196, 124, .18), rgba(200, 162, 77, .05) 50%, transparent 72%);
}

.r6-devices-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.r6-devices-copy {
  position: relative;
  z-index: 1;
  padding-top: 96px;
  text-align: center;
  pointer-events: none;
}

.r6-devices .r6-kicker { margin-bottom: 18px; }

.r6-acts { position: relative; height: 150px; margin: 0; padding: 0; list-style: none; }

.r6-act {
  position: absolute;
  inset: 0 0 auto;
  opacity: 0;
  transform: translateY(18px);
  filter: blur(6px);
  transition: opacity .6s ease, transform .8s cubic-bezier(.2, .8, .3, 1), filter .6s ease;
}

.r6-act.is-on { opacity: 1; transform: none; filter: none; }

.r6-act-tag { display: none; }

.r6-act-title {
  margin: 0;
  font: 500 clamp(32px, 4vw, 56px)/1.06 var(--r6-serif);
  letter-spacing: -.02em;
  text-wrap: balance;
}

.r6-act-body { max-width: 34em; margin: 14px auto 0; font: 400 17px/1.55 var(--r6-sans); color: var(--r6-text-2); }

@media (max-width: 900px) {
  .r6-devices-copy { padding-top: 80px; }
  .r6-act-title { font-size: 28px; }
  .r6-act-body { font-size: 15px; }
}

/* ---------------- Scenes ---------------- */
.r6-scenes {
  --r6-p: 0;
  height: calc(var(--r6-count, 6) * 100vh);
}

.r6-scenes-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.r6-scenes-glow {
  position: absolute;
  right: -10%;
  top: 50%;
  width: 1000px;
  height: 1000px;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(227, 196, 124, .16), transparent 70%);
  transition: right 1.2s cubic-bezier(.2, .8, .3, 1), opacity 1.2s ease;
}

.r6-scenes-pin[data-scene="1"] .r6-scenes-glow,
.r6-scenes-pin[data-scene="3"] .r6-scenes-glow,
.r6-scenes-pin[data-scene="5"] .r6-scenes-glow { right: 4%; }

.r6-scenes-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  height: 100%;
  gap: 48px;
}

.r6-captions { position: relative; height: 330px; margin: 0; padding: 0; list-style: none; }

.r6-caption {
  position: absolute;
  inset: 0 0 auto;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity .6s ease, transform .8s cubic-bezier(.2, .8, .3, 1), filter .6s ease;
  pointer-events: none;
}

.r6-caption.is-on { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.r6-caption.is-past { transform: translateY(-28px); }

.r6-caption-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font: 700 13px/1 var(--r6-sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--r6-gold);
}

.r6-caption-tag span { font: italic 400 15px/1 var(--r6-serif); letter-spacing: 0; color: var(--r6-text-3); }

.r6-caption-title {
  max-width: 11em;
  margin: 0;
  font: 500 clamp(36px, 4.4vw, 62px)/1.05 var(--r6-serif);
  letter-spacing: -.02em;
  text-wrap: balance;
}

.r6-caption-body { max-width: 28em; margin: 22px 0 0; font: 400 18px/1.6 var(--r6-sans); color: var(--r6-text-2); }

.r6-progress { display: flex; gap: 8px; margin-top: 34px; }
.r6-progress span { position: relative; width: 44px; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.r6-progress i { position: absolute; inset: 0; transform: scaleX(var(--fill, 0)); transform-origin: left; background: var(--r6-gold); }

.r6-scenes-stage {
  display: flex;
  justify-content: center;
  perspective: 1800px;
}

.r6-device-scenes {
  width: min(340px, 36vh);
  transform: rotateY(var(--r6-swing, -10deg)) rotateX(4deg);
  transition: transform 1.2s cubic-bezier(.2, .8, .3, 1);
}

.r6-scenes-pin[data-scene="1"] .r6-device-scenes,
.r6-scenes-pin[data-scene="3"] .r6-device-scenes,
.r6-scenes-pin[data-scene="5"] .r6-device-scenes { --r6-swing: 10deg; }

.r6-device-scenes .r6-screen {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .7s ease, transform 1.2s cubic-bezier(.2, .8, .3, 1);
}

.r6-device-scenes .r6-screen.is-on { opacity: 1; transform: none; }

/* ---------------- Study tools ---------------- */
.r6-study { padding: 150px 0 140px; overflow: hidden; }

.r6-study-head { max-width: 820px; margin: 0 auto 72px; text-align: center; }

.r6-study-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px;
  perspective: 1600px;
}

.r6-tool { text-align: center; }

.r6-tool-stage {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  perspective: 1400px;
}

.r6-device-tool {
  width: min(250px, 100%, calc(58vh * 1170 / 2532));
  transform:
    rotateY(calc(var(--side) * 22deg))
    translateY(calc(var(--edge) * 40px + 60px))
    scale(.94);
  opacity: 0;
  transition:
    transform 1.3s cubic-bezier(.2, .8, .3, 1) calc(var(--i) * 120ms),
    opacity .9s ease calc(var(--i) * 120ms);
}

.r6-study.is-in .r6-device-tool {
  transform: rotateY(calc(var(--side) * 8deg)) translateY(calc(var(--edge) * 28px));
  opacity: 1;
}

.r6-tool-tag {
  margin: 0 0 12px;
  font: 700 12px/1 var(--r6-sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--r6-gold);
}

.r6-tool-title { margin: 0; font: 500 28px/1.15 var(--r6-serif); letter-spacing: -.01em; text-wrap: balance; }
.r6-tool-body { max-width: 26em; margin: 14px auto 0; font: 400 16px/1.6 var(--r6-sans); color: var(--r6-text-2); }

@media (max-width: 900px) {
  .r6-study { padding: 100px 0; }
  .r6-study-row { grid-template-columns: 1fr; gap: 72px; }
  .r6-device-tool, .r6-study.is-in .r6-device-tool { width: min(250px, 66vw); transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .r6-device-tool { transition: none; transform: none; opacity: 1; }
}

/* ---------------- Plans ---------------- */
.r6-plans { padding: 140px 0 140px; border-top: 1px solid var(--r6-hair); }

.r6-plans .r6-kicker { margin-bottom: 18px; }

.r6-plans-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  margin: 0 auto 64px;
  text-align: center;
}

.r6-plans-tola {
  width: 104px;
  height: 104px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(227, 196, 124, .28), transparent);
  transform-origin: 50% 85%;
  animation: r6-dance 1.6s ease-in-out infinite;
}

.r6-h2 {
  margin: 0;
  font: 500 clamp(36px, 4.6vw, 60px)/1.06 var(--r6-serif);
  letter-spacing: -.02em;
  text-wrap: balance;
}

.r6-h2 em { font-style: italic; font-weight: 400; color: var(--r6-gold); }

.r6-plans-lede { margin: 20px 0 0; font: 400 17px/1.6 var(--r6-sans); color: var(--r6-text-2); }

.r6-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--r6-hair);
}

.r6-plan {
  padding: 40px 36px 8px;
  border-left: 1px solid var(--r6-hair);
}

.r6-plan:first-child { border-left: 0; padding-left: 4px; }

.r6-plan-name {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  font: 500 28px/1.1 var(--r6-serif);
}

.r6-plan-flag { font: 700 11px/1 var(--r6-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--r6-gold); }

.r6-plan-price { margin: 22px 0 6px; font: 500 44px/1 var(--r6-serif); font-variant-numeric: tabular-nums; }
.r6-plan-price span { font: 400 15px var(--r6-sans); color: var(--r6-text-3); }
.r6-plan.is-chosen .r6-plan-price { color: var(--r6-gold); }
.r6-plan-note { margin: 0 0 26px; font: 400 14px/1.5 var(--r6-sans); color: var(--r6-text-3); }

.r6-plan-items { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.r6-plan-items li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; font: 400 15.5px/1.45 var(--r6-sans); color: var(--r6-text-2); }
.r6-plan-items svg { width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--r6-text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.r6-plan.is-chosen .r6-plan-items svg { stroke: var(--r6-gold); }

.r6-plans-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 72px; }
.r6-plans-fine { flex-basis: 100%; margin: 8px 0 0; text-align: center; font: 400 13px var(--r6-sans); color: var(--r6-text-3); }

@keyframes r6-dance {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  25% { transform: translateY(-8px) rotate(0deg) scale(1.02); }
  50% { transform: translateY(0) rotate(5deg); }
  75% { transform: translateY(-8px) rotate(0deg) scale(1.02); }
}

/* ---------------- Less motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  .r6-device-hero { transform: none; }
  .r6-device-scenes { transform: none; transition: none; }
  .r6-caption, .r6-screen, .r6-scenes-glow { transition: none; }
  .r6-plans-tola { animation: none; }
}

/* ---------------- Tablet and phone ---------------- */
@media (max-width: 900px) {
  .r6-hero { padding-top: 72px; }
  .r6-hero-stage { height: 64vh; margin-top: 44px; }
  .r6-device-hero { width: min(280px, 34vh); }

  /* Still pinned, stacked: the caption above, the phone under it. */
  .r6-scenes-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-content: center;
    gap: 22px;
    padding-top: 84px;
    padding-bottom: 24px;
  }
  .r6-scenes-copy { text-align: center; }
  .r6-scenes .r6-kicker { margin-bottom: 14px; }
  .r6-captions { height: 168px; }
  .r6-caption-tag { justify-content: center; margin-bottom: 10px; }
  .r6-caption-title { max-width: none; font-size: 30px; }
  .r6-caption-body { margin: 10px auto 0; font-size: 15.5px; }
  .r6-progress { justify-content: center; margin-top: 12px; }
  .r6-progress span { width: 28px; }
  .r6-device-scenes { width: min(230px, 32vh); }
  .r6-scenes-glow { right: 50% !important; transform: translate(50%, -30%); }

  .r6-plans { padding: 100px 0; }
  .r6-plan-grid { grid-template-columns: 1fr; border-top: 0; }
  .r6-plan, .r6-plan:first-child { padding: 32px 4px; border-left: 0; border-top: 1px solid var(--r6-hair); }
}

@media (max-width: 600px) {
  /* Older pieces that ran past a phone's width. */
  .brand-meta, .mp-meta, .brand-name { display: none; }
  .r6-hero-lede { font-size: 17px; }
  .r6-store { flex: 1 1 140px; }
  .r6-store-web { display: none; }
}
