/* =========================================================
   "Nasıl çalışır" sayfası: cihaz modeli
   ========================================================= */

/* Giriş şeridi (page-hero dalgası beyaza akar) */
.rx-lead {
  background: var(--paper);
  padding: 0 0 clamp(40px, 5vw, 72px);
}
.rx-lead-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  flex-wrap: wrap;
}
.rx-lead-text {
  max-width: 34rem;
  font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink);
}
.rx-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--sea-2);
}
.rx-cue span {
  position: relative;
  width: 22px;
  height: 36px;
  border: 2px solid currentColor;
  border-radius: 12px;
}
.rx-cue span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: currentColor;
  animation: rx-cue 1.6s var(--ease) infinite;
}
@keyframes rx-cue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* Sahne */
.rx {
  position: relative;
  background: var(--deep);
  color: #fff;
}
.rx-track { position: relative; height: 820vh; }
.rx-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding-top: var(--header-h);
  overflow: hidden;
  background:
    radial-gradient(70vmax 50vmax at 72% 40%, rgba(27, 116, 200, .22), rgba(27, 116, 200, 0) 70%),
    var(--deep);
}
.rx-grid {
  max-width: 1440px;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 3.5vw, 56px);
  align-items: stretch;
  padding-block: clamp(16px, 3vh, 32px);
}

.rx-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 3.4vh, 36px);
  min-width: 0;
}

/* adım rayı */
.rx-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.rx-rail::before {
  content: "";
  position: absolute;
  left: calc(100% / 14);
  right: calc(100% / 14);
  top: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--line-deep);
}
.rx-rail li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .5);
  text-align: center;
  white-space: nowrap;
  transition: color .3s;
}
.rx-rail li::before {
  content: "";
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--deep);
  border: 2px solid rgba(255, 255, 255, .35);
  transition: background-color .3s, border-color .3s, transform .3s var(--ease);
}
.rx-rail li.is-done { color: rgba(255, 255, 255, .75); }
.rx-rail li.is-done::before { background: var(--sea-l, #5AAEE8); border-color: #5AAEE8; }
.rx-rail li.is-active { color: #fff; }
.rx-rail li.is-active::before { background: var(--sun-2); border-color: var(--sun-2); transform: scale(1.25); }

/* sesli anlatım satırı */
.rx-voice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-height: 36px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility 0s linear .35s;
}
.rx-voice.is-on { opacity: 1; visibility: visible; transition: opacity .35s; }
.rx-mute {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.rx-mute:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .6); }
.rx-mute svg { width: 18px; height: 18px; }
.rx-mute .i-off,
.rx-mute[aria-pressed="true"] .i-on { display: none; }
.rx-mute[aria-pressed="true"] .i-off { display: block; }
.rx-voice-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .72);
}
.rx-voice-label[hidden] { display: none; }
.rx-voice.is-speaking .rx-voice-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun-2, #FF9E1B);
  animation: rx-pulse 1.6s ease-out infinite;
}
@keyframes rx-pulse {
  from { box-shadow: 0 0 0 0 rgba(255, 158, 27, .55); }
  to { box-shadow: 0 0 0 10px rgba(255, 158, 27, 0); }
}
.rx-unmute-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .5em 1.05em;
  border: 0;
  border-radius: 999px;
  background: var(--sun-2, #FF9E1B);
  color: var(--ink, #0C2A40);
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  animation: rx-chip 1.8s ease-out infinite;
}
.rx-unmute-chip[hidden] { display: none; }
.rx-unmute-chip:hover { background: #FFB443; }
.rx-unmute-chip svg { width: 16px; height: 16px; flex: none; }
@keyframes rx-chip {
  from { box-shadow: 0 0 0 0 rgba(255, 158, 27, .5); }
  to { box-shadow: 0 0 0 12px rgba(255, 158, 27, 0); }
}
.rx-mute:focus-visible,
.rx-unmute-chip:focus-visible { outline: 3px solid var(--sun-2, #FF9E1B); outline-offset: 3px; }

/* tur bitince: sade metin bağlantıları */
.rx-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 6px;
  animation: rx-fade-in .5s var(--ease) both;
}
.rx-end[hidden] { display: none; }
.rx-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .86);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .35);
  text-underline-offset: 4px;
  cursor: pointer;
}
.rx-link:hover { color: #fff; text-decoration-color: var(--sun-2, #FF9E1B); }
.rx-link svg { width: 16px; height: 16px; flex: none; }
.rx-link:focus-visible { outline: 3px solid var(--sun-2, #FF9E1B); outline-offset: 3px; border-radius: 4px; }
.rx-hint {
  margin: 6px 0 0;
  font-size: .8125rem;
  color: rgba(255, 255, 255, .66);
  animation: rx-fade-in .5s var(--ease) both;
}
.rx-hint[hidden] { display: none; }
@keyframes rx-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* altyazı */
.rx-cap {
  position: absolute;
  left: 50%;
  top: clamp(14px, 3.2%, 28px);
  z-index: 2;
  width: max-content;
  max-width: min(90%, 660px);
  padding: .62em 1.15em;
  border-radius: 16px;
  background: rgba(4, 22, 38, .8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 18px 40px -18px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translate(-50%, -10px);
  transition: opacity .35s, transform .35s var(--ease);
  pointer-events: none;
}
.rx-cap.is-on { opacity: 1; transform: translate(-50%, 0); }
.rx-cap-text {
  margin: 0;
  color: #fff;
  font-size: clamp(.95rem, .8rem + .45vw, 1.15rem);
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}
.rx-cap-text.is-swap { animation: rx-cap-in .4s var(--ease); }
@keyframes rx-cap-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rx-cap { transition: none; }
  .rx-cap-text.is-swap,
  .rx-unmute-chip,
  .rx-end,
  .rx-hint,
  .rx-voice.is-speaking .rx-voice-label::before { animation: none; }
}

/* aşama metni */
.rx-steps {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}
.rx-step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  pointer-events: none;
}
.rx-step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.rx-step h3 {
  font-size: clamp(2rem, 1.1rem + 2.6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  max-width: 13ch;
}
.rx-step p {
  margin-top: 14px;
  max-width: 28rem;
  font-size: clamp(1.0625rem, .98rem + .3vw, 1.25rem);
  line-height: 1.5;
  color: var(--on-deep);
}
.rx-step .rx-part {
  margin-top: 12px;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, .5);
}

/* göstergeler */
.rx-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  padding-top: clamp(16px, 2.6vh, 26px);
  border-top: 1px solid var(--line-deep);
}
.rx-meter { --v: 0; --bad: #8D6A3E; --good: #58C6F4; }
.rx-meter[data-m="chl"] { --bad: #B8C052; }
.rx-meter[data-m="lime"] { --bad: #C3CCD2; }
.rx-meter[data-m="taste"] { --bad: #7E8A93; --good: #FFD43B; }
.rx-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.rx-meter-name { font-size: .875rem; color: rgba(255, 255, 255, .68); }
.rx-meter-val {
  font-weight: 600;
  font-size: .9375rem;
  color: #fff;
  transition: color .3s;
}
.rx-meter[data-state="good"] .rx-meter-val { color: var(--good); }
.rx-meter-track {
  position: relative;
  height: 6px;
  margin-top: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bad), var(--good));
  opacity: .9;
}
.rx-meter-track::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--v) * 100%);
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 47, 78, .9), 0 2px 8px rgba(0, 0, 0, .35);
}
.rx-meter-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: .75rem;
  color: rgba(255, 255, 255, .45);
}
.rx-meter-note {
  display: block;
  margin-top: 4px;
  font-size: .75rem;
  color: rgba(255, 255, 255, .5);
  font-variant-numeric: tabular-nums;
}

/* model */
.rx-visual {
  position: relative;
  min-height: 0;
  border-radius: 28px;
  overflow: hidden;
  background: #0A2F4E;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.rx-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.rx-svg text,
.rx-frame-svg text { font-family: var(--font-body); }

/* Hareketsiz mod */
.rx-static { display: none; }
.rx.is-static .rx-track { display: none; }
.rx.is-static .rx-static {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  padding-block: clamp(64px, 8vw, 112px);
}
.rx-frame { margin: 0; }
.rx-frame-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  background: #0A2F4E;
}
.rx-frame figcaption { margin-top: 16px; }
.rx-frame figcaption h3 { font-size: 1.6rem; }
.rx-frame figcaption p { margin-top: 6px; color: var(--on-deep); }
.rx-frame figcaption .rx-part { font-size: var(--fs-sm); color: rgba(255, 255, 255, .5); }

/* Sonuç */
.rx-result {
  background: var(--paper);
  padding-block: var(--section-y);
}
.rx-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.rx-result h2 { font-size: var(--fs-h2); max-width: 12ch; }
.rx-result-lede { margin-top: 18px; color: var(--ink-2); max-width: 30rem; }
.rx-checks {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}
.rx-checks li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.rx-checks li:last-child { border-bottom: 1px solid var(--line); }
.rx-checks .ico { width: 22px; height: 22px; color: var(--sea); }
.rx-checks strong { font-weight: 600; }
.rx-checks span { color: var(--ink-2); font-size: .9375rem; }

.rx-glasses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}
.rx-glass {
  margin: 0;
  padding: clamp(20px, 3vw, 36px) clamp(16px, 2.4vw, 28px) clamp(20px, 2.6vw, 28px);
  border-radius: 28px;
  background: var(--sky);
  text-align: center;
}
.rx-glass.is-clean { background: var(--deep); color: #fff; }
.rx-glass svg { display: block; width: min(100%, 220px); height: auto; margin-inline: auto; }
.rx-glass figcaption { margin-top: 18px; }
.rx-glass figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.15;
}
.rx-glass figcaption span { display: block; margin-top: 6px; font-size: .9375rem; color: var(--ink-2); }
.rx-glass.is-clean figcaption span { color: var(--on-deep); }

/* CTA */
.rx-cta {
  background: var(--sky);
  padding-block: clamp(72px, 8vw, 120px);
}
.rx-cta-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 48px;
  flex-wrap: wrap;
}
.rx-cta h2 { font-size: var(--fs-h2); max-width: 14ch; }
.rx-cta p { margin-top: 16px; color: var(--ink-2); max-width: 30rem; }
.rx-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .rx-track { height: 760vh; }
  .rx-grid {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 14px;
    padding-block: 10px 14px;
  }
  .rx-visual { order: -1; border-radius: 20px; }
  .rx-copy { gap: 14px; justify-content: flex-start; }
  .rx-voice { min-height: 32px; }
  .rx-mute { width: 32px; height: 32px; }
  .rx-cap { top: 10px; max-width: 94%; padding: .5em .85em; border-radius: 12px; }
  .rx-cap-text { font-size: .875rem; }
  /* etiket satırı her zaman yer kaplar: aşama değişince sahne zıplamasın */
  .rx-rail li,
  .rx-rail li.is-done { font-size: .75rem; gap: 4px; color: transparent; }
  .rx-rail li.is-active { color: #fff; }
  /* tur sonu bağlantıları ve ipucu ses satırının içine biner: sahne küçülmesin */
  .rx-copy { position: relative; }
  .rx-end,
  .rx-hint {
    position: absolute;
    top: 0;
    left: 44px;
    right: 0;
    min-height: 32px;
    margin: 0;
    display: flex;
    align-items: center;
  }
  .rx-hint { left: 0; }
  .rx-end[hidden],
  .rx-hint[hidden] { display: none; }
  .rx-voice.is-done .rx-voice-label { display: none; }
  .rx-lab-z text { font-size: 12px; }
  .rx-rail li::before { width: 11px; height: 11px; }
  .rx-rail::before { top: 5px; }
  .rx-step h3 { font-size: clamp(1.55rem, 1.1rem + 2.2vw, 2rem); max-width: none; }
  .rx-step p { margin-top: 6px; font-size: .9375rem; }
  .rx-step .rx-part { display: none; }
  .rx-meters { gap: 10px 18px; padding-top: 12px; }
  .rx-meter-ends, .rx-meter-note { display: none; }
  .rx-meter-name { font-size: .75rem; }
  .rx-meter-val { font-size: .8125rem; }
  .rx-meter-track { margin-top: 6px; height: 5px; }
  .rx-meter-track::after { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; }
  .rx-result-grid { grid-template-columns: 1fr; }
  .rx.is-static .rx-static { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .rx-pin { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
/* kısa ekranlı telefonlar: göstergeler gizlenir, model büyük kalır */
@media (max-width: 900px) and (max-height: 760px) {
  .rx-meters { display: none; }
}
/* yatay telefon: model ve metin yan yana */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .rx-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 20px;
  }
  .rx-visual { order: 0; }
  .rx-copy { justify-content: center; gap: 10px; }
  .rx-step h3 { font-size: 1.35rem; }
  .rx-step p { font-size: .875rem; }
}
@media (max-width: 420px) {
  .rx-glasses { gap: 12px; }
  .rx-glass figcaption strong { font-size: 1.2rem; }
}
