/* Rakuten on Stellar — distinct corporate + fintech layout (not Whiplash clone) */
:root {
  --red: #e60012;
  --red-dark: #b8000e;
  --navy: #0c1528;
  --navy-soft: #151f35;
  --cream: #f6f4f1;
  --cream-dark: #ebe7e1;
  --ink: #1c2436;
  --muted: #5c6578;
  --white: #ffffff;
  --gold: #c9a227;
  --shadow: 0 24px 60px rgba(12, 21, 40, 0.12);
  --radius: 20px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Syne", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

/* —— Preloader —— */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--navy);
  display: grid;
  place-items: center;
  color: var(--white);
}

.preloader-inner {
  text-align: center;
}

.preloader-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 18px;
  background: var(--red);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2rem;
  box-shadow: 0 12px 40px rgba(230, 0, 18, 0.45);
}

.preloader-bar {
  width: 160px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  margin: 16px auto 0;
  overflow: hidden;
}

.preloader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--red);
  border-radius: inherit;
}

/* —— Nav —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(12, 21, 40, 0.08);
  padding: 10px 0;
}

.site-header.is-scrolled .nav-link {
  color: var(--ink);
}

.site-header.is-scrolled .brand-name {
  color: var(--ink);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--red), var(--red-dark));
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(230, 0, 18, 0.35);
}

.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--white);
  transition: color 0.35s;
}

.brand-tag {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  font-family: var(--font);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px 24px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s;
}

.nav-link:hover {
  color: #fff;
}

.site-header.is-scrolled .nav-link:hover {
  color: var(--red);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 28px rgba(230, 0, 18, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 36px rgba(230, 0, 18, 0.45);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.site-header.is-scrolled .btn-outline {
  color: var(--ink);
  border-color: var(--ink);
}

.btn-dark {
  background: var(--navy);
  color: #fff;
}

.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--cream-dark);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 80px;
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(12, 21, 40, 0.92) 0%,
    rgba(12, 21, 40, 0.65) 45%,
    rgba(12, 21, 40, 0.35) 100%
  );
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: end;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 12px #4ade80;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .word {
  display: inline-block;
}

.hero-lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.65;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  position: relative;
  min-height: 380px;
}

.orbit-stage {
  position: relative;
  width: min(380px, 92vw);
  aspect-ratio: 1;
  margin: 0 auto;
  contain: layout style;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-rotator {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform: translateZ(0);
  pointer-events: none;
}

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 110px;
  margin: -55px 0 0 -55px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--red), #8b0010);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1.15;
  box-shadow: 0 0 0 12px rgba(230, 0, 18, 0.15), 0 20px 50px rgba(0, 0, 0, 0.4);
  z-index: 6;
  color: #fff;
  text-decoration: none;
  pointer-events: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.orbit-center:hover {
  box-shadow: 0 0 0 14px rgba(230, 0, 18, 0.22), 0 24px 56px rgba(0, 0, 0, 0.45);
}

.orbit-coin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 4;
  pointer-events: auto;
  text-decoration: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.orbit-coin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.orbit-coin span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  letter-spacing: 0.04em;
}

/* —— Stats —— */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  padding: 28px 0;
  margin-top: -1px;
  position: relative;
  z-index: 3;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--red);
  font-weight: 800;
}

.stat-item span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* —— Sections —— */
.section {
  padding: 72px 0;
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-cream {
  background: var(--cream);
}

#ecosystem {
  padding-top: 56px;
  padding-bottom: 56px;
}

#ecosystem .section-head {
  margin-bottom: 36px;
}

.conversion-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--cream-dark);
}

.conversion-copy .section-label {
  margin-top: 0;
}

.conversion-copy .section-title {
  margin-bottom: 12px;
}

.conversion-copy .section-desc {
  margin-bottom: 0;
}

.conversion-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.conversion-visual img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.section-dark .section-label {
  color: #ff6b6b;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  line-height: 1.1;
}

.section-desc {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

.section-dark .section-desc {
  color: rgba(255, 255, 255, 0.7);
}

/* —— Bento ecosystem —— */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 0;
}

.bento-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  background: var(--navy-soft);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.bento-card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.bento-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.bento-card:hover img {
  transform: scale(1.06);
}

.bento-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 21, 40, 0.92) 0%, transparent 55%);
}

.bento-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  z-index: 2;
  color: #fff;
}

.bento-content h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 1.25rem;
}

.bento-content p {
  margin: 0 0 10px;
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.45;
}

.bento-cta {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fecaca;
  opacity: 0.95;
}

/* —— Steps —— */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.step-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--cream-dark);
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(230, 0, 18, 0.1);
  color: var(--red);
  font-family: var(--display);
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.step-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* —— Dividend levels (native horizontal scroll, no pin overlap) —— */
.section-dividends {
  padding-bottom: 64px;
  overflow: hidden;
}

.dividends-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dividends-intro {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.tiers-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 4px 2px 12px;
  margin: 0 -4px;
  overscroll-behavior-x: contain;
}

.tiers-scroller::-webkit-scrollbar {
  height: 6px;
}

.tiers-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 99px;
}

.tiers-track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 4px 2px 8px;
}

.tier-card {
  flex: 0 0 min(280px, 82vw);
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 24px;
}

.tier-level {
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  opacity: 0.9;
}

.tier-card h3 {
  margin: 8px 0 12px;
  font-size: 1rem;
}

.tier-payouts {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
}

.tier-payouts strong {
  color: #fff;
  display: block;
  margin-bottom: 4px;
}

.tiers-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  text-align: center;
}

/* —— Dividends & conversion (flush under bento) —— */
.split-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.story-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.story-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.story-list li::before {
  content: "✓";
  color: var(--red);
  font-weight: 800;
}

/* —— Marquee —— */
.marquee-section {
  background: var(--red);
  color: #fff;
  padding: 18px 0;
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.marquee-track span {
  opacity: 0.95;
}

.marquee-track .sep {
  opacity: 0.4;
}

/* —— Checker —— */
.checker-panel {
  background: var(--white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--cream-dark);
}

.checker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.wallet-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.wallet-input-row input {
  flex: 1 1 260px;
  padding: 16px 18px;
  border: 2px solid var(--cream-dark);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.wallet-input-row input:focus {
  outline: none;
  border-color: var(--red);
}

#wallet-status {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
  min-height: 1.4em;
}

.checker-preview {
  background: var(--cream);
  border-radius: 16px;
  padding: 24px;
  min-height: 200px;
}

.checker-preview h4 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* —— Modal —— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 21, 40, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--white);
  border-radius: 24px;
  width: min(580px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
}

.modal-box h3 {
  margin: 0 0 16px;
  font-family: var(--display);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.result-table th,
.result-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--cream-dark);
  text-align: left;
}

.badge-yes {
  background: #dcfce7;
  color: #166534;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.badge-no {
  background: #fee2e2;
  color: #991b1b;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.pill {
  background: rgba(230, 0, 18, 0.08);
  color: var(--red-dark);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

/* —— Footer —— */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 32px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-grid a {
  color: #fff;
  text-decoration: none;
}

.footer-grid a:hover {
  color: #ff8a8a;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.addr-copy {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  word-break: break-all;
  background: rgba(255, 255, 255, 0.06);
  padding: 12px;
  border-radius: 10px;
  margin-top: 8px;
}

/* —— Responsive —— */
@media (max-width: 1024px) {
  .hero-grid,
  .split-story,
  .conversion-block,
  .checker-grid {
    grid-template-columns: 1fr;
  }

  .conversion-visual img {
    max-height: 240px;
  }

  .hero-visual {
    order: -1;
    min-height: 280px;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 56px 0;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: auto;
    padding: 100px 0 48px;
  }

  .hero-visual {
    min-height: 260px;
  }

  .orbit-stage {
    width: min(300px, 88vw);
  }

  .orbit-coin {
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
  }

  .orbit-center {
    width: 88px;
    height: 88px;
    margin: -44px 0 0 -44px;
    font-size: 0.75rem;
  }

  .stats-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .bento-card {
    min-height: 200px;
  }

  #ecosystem {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .conversion-block {
    margin-top: 0;
    padding-top: 10px;
    gap: 20px;
  }

  .conversion-visual {
    order: 2;
  }

  .nav-links .nav-link:not(.btn) {
    display: none;
  }

  .checker-panel {
    padding: 24px;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .dividends-layout {
    gap: 16px;
  }

  /* Disable heavy scroll animations on small screens */
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-rotator {
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
