/* ============================================================
   System: Arise — Landing Page Styles
   Dark, gamified "Solo Leveling" aesthetic.
   Palette pulled from the actual app icon (electric blue + neon purple).
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Backgrounds */
  --bg:          #04040A;   /* page base (matches app icon bottom) */
  --bg-2:        #09090F;   /* card / section base */
  --bg-3:        #0F1424;   /* raised surfaces */
  --line:        rgba(56, 189, 248, 0.14); /* hairline borders */

  /* Accents */
  --blue:        #38BDF8;   /* primary electric blue */
  --blue-deep:   #0EA5E9;
  --blue-soft:   #7DD3FC;
  --purple:      #A78BFA;   /* neon purple */
  --gold:        #FCD34D;   /* gamified gold (rank S / highlights) */

  /* Text */
  --text:        #E6EDF6;
  --text-dim:    #9AA7BD;
  --text-faint:  #5C6880;

  /* Effects */
  --glow-blue:   0 0 24px rgba(56, 189, 248, 0.45);
  --glow-purple: 0 0 24px rgba(167, 139, 250, 0.40);
  --radius:      16px;
  --radius-sm:   10px;
  --maxw:        1140px;
  --ease:        cubic-bezier(.22, 1, .36, 1);

  --font-display: 'Orbitron', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.grad-text {
  background: linear-gradient(100deg, var(--blue-soft), var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.accent { color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-display);
  font-weight: 700; font-size: .9rem; letter-spacing: .04em;
  padding: .85em 1.6em; border-radius: 999px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn--sm { padding: .55em 1.1em; font-size: .8rem; }
.btn--lg { padding: 1em 2em; font-size: 1rem; }

.btn--primary {
  background: linear-gradient(100deg, var(--blue-deep), var(--blue));
  color: #02060d;
  box-shadow: var(--glow-blue);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 34px rgba(56, 189, 248, 0.7);
}

.btn--ghost {
  background: rgba(56, 189, 248, 0.06);
  border-color: var(--blue);
  color: var(--blue);
}
.btn--ghost:hover {
  transform: translateY(-3px);
  background: rgba(56, 189, 248, 0.14);
  box-shadow: var(--glow-blue);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
/* .is-scrolled is toggled by JS once the user scrolls past the hero top */
.nav.is-scrolled {
  background: rgba(4, 4, 10, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__logo  { width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(56,189,248,.5)); }
.nav__brand-text { font-family: var(--font-display); font-weight: 900; letter-spacing: .08em; font-size: 1rem; }

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  font-size: .92rem; color: var(--text-dim);
  transition: color .2s; position: relative;
}
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--blue); transition: width .25s var(--ease);
}
.nav__links a:not(.btn):hover::after { width: 100%; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 26px; height: 2px; background: var(--text); transition: transform .3s, opacity .3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 0 80px;
  overflow: hidden;
}

/* --- Animated background layers --- */
.hero__bg { position: absolute; inset: 0; z-index: 0; }

.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 54px 54px;
  /* fade the grid out toward the edges */
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: .5;
}

.hero__glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.hero__glow--blue {
  width: 520px; height: 520px; top: -120px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(14,165,233,.55), transparent 70%);
  animation: floatGlow 9s ease-in-out infinite alternate;
}
.hero__glow--purple {
  width: 420px; height: 420px; bottom: -80px; right: 8%;
  background: radial-gradient(circle, rgba(167,139,250,.4), transparent 70%);
  animation: floatGlow 11s ease-in-out infinite alternate-reverse;
}
@keyframes floatGlow {
  from { transform: translate(-50%, 0) scale(1); }
  to   { transform: translate(-50%, 30px) scale(1.12); }
}

/* pulsing "gate" ring behind the logo */
.hero__portal {
  position: absolute; top: 38%; left: 50%;
  width: 360px; height: 360px; transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(56,189,248,.3);
  box-shadow: inset 0 0 60px rgba(56,189,248,.25), 0 0 60px rgba(56,189,248,.15);
  animation: pulse 4.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: .55; }
  50%      { transform: translate(-50%, -50%) scale(1.12); opacity: .9; }
}

.hero__content { position: relative; z-index: 2; max-width: 860px; }
.hero__logo {
  width: 130px; height: 130px; margin: 0 auto 24px;
  filter: drop-shadow(0 0 26px rgba(56,189,248,.55));
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-10px);} }

.hero__eyebrow {
  font-family: var(--font-display); font-size: .8rem; letter-spacing: .35em;
  color: var(--blue); margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.05;
  letter-spacing: -.01em; margin-bottom: 22px;
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.18rem); color: var(--text-dim);
  max-width: 640px; margin: 0 auto 36px;
}
.hero__subtitle strong { color: var(--text); }

.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }

/* Rank ladder E..S */
.hero__ranks { display: inline-flex; gap: 10px; }
.rank {
  width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), color .25s;
}
.rank:hover { transform: translateY(-6px); }
.rank--e { color: #8b97ab; }
.rank--d { color: #6ee7b7; }
.rank--c { color: var(--blue-soft); }
.rank--b { color: var(--blue); }
.rank--a { color: var(--purple); box-shadow: var(--glow-purple); }
.rank--s { color: var(--gold); box-shadow: 0 0 22px rgba(252,211,77,.5); border-color: rgba(252,211,77,.4); }

/* scroll indicator */
.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 42px; border: 2px solid var(--text-faint); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; border-radius: 2px;
  background: var(--blue); transform: translateX(-50%);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 0%{ opacity:0; top:8px;} 40%{opacity:1;} 80%{opacity:0; top:24px;} 100%{opacity:0;} }

/* ============================================================
   STAT STRIP
   ============================================================ */
.stats { border-block: 1px solid var(--line); background: var(--bg-2); }
.stats__row {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 12px; padding: 26px 24px;
}
.stat { text-align: center; }
.stat__abbr {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 1.5rem; color: var(--blue);
}
.stat__name { font-size: .8rem; color: var(--text-faint); letter-spacing: .05em; }

/* ============================================================
   GENERIC SECTION
   ============================================================ */
.section { padding: 100px 0; position: relative; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section__eyebrow {
  font-family: var(--font-display); font-size: .78rem; letter-spacing: .3em;
  color: var(--purple); margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin-bottom: 16px;
}
.section__lead { color: var(--text-dim); font-size: 1.05rem; }

/* ============================================================
   TEASERS
   ============================================================ */
.teasers { background:
  radial-gradient(ellipse 80% 50% at 50% 0%, rgba(167,139,250,.08), transparent 60%),
  var(--bg); }

.video-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.video-card { display: flex; flex-direction: column; gap: 14px; }

/* premium glowing video container */
.video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  border: 1px solid rgba(56,189,248,.35);
  box-shadow: 0 0 0 1px rgba(56,189,248,.1), 0 18px 50px rgba(0,0,0,.55),
              0 0 40px rgba(56,189,248,.12);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  background: #000;
}
.video-frame:hover {
  transform: translateY(-6px);
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(56,189,248,.3), 0 24px 60px rgba(0,0,0,.6),
              0 0 60px rgba(56,189,248,.35);
}
.video-frame:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.video-thumb { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .3s, transform .5s var(--ease); }
.video-frame:hover .video-thumb { opacity: 1; transform: scale(1.05); }

/* play button */
.video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 74px; height: 74px; border-radius: 50%;
  background: rgba(4,4,10,.55); border: 2px solid var(--blue);
  box-shadow: var(--glow-blue); transition: transform .25s var(--ease), background .25s;
}
.video-play::after {
  content: ''; position: absolute; top: 50%; left: 54%; transform: translate(-50%,-50%);
  border-style: solid; border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent var(--blue);
}
.video-frame:hover .video-play { transform: translate(-50%,-50%) scale(1.12); background: rgba(56,189,248,.18); }

/* injected iframe fills the frame */
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text); }
.teasers__cta { text-align: center; margin-top: 48px; }

/* ============================================================
   FEATURES GRID
   ============================================================ */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}
.feat-card {
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
/* sweeping highlight line at the top of each card on hover */
.feat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--purple), transparent);
  transform: scaleX(0); transition: transform .4s var(--ease);
}
.feat-card:hover {
  transform: translateY(-8px);
  border-color: rgba(56,189,248,.4);
  box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 40px rgba(56,189,248,.12);
}
.feat-card:hover::before { transform: scaleX(1); }
.feat-card__icon {
  width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.7rem;
  border-radius: 14px; margin-bottom: 18px;
  background: rgba(56,189,248,.08); border: 1px solid var(--line);
}
.feat-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 10px; }
.feat-card p  { color: var(--text-dim); font-size: .96rem; }

/* ============================================================
   GUIDE / ACCORDION
   ============================================================ */
.guide { background: var(--bg-2); }
.accordion { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.acc-item {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-3); overflow: hidden; transition: border-color .3s;
}
.acc-item.is-open { border-color: rgba(56,189,248,.4); box-shadow: 0 0 30px rgba(56,189,248,.1); }
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 18px;
  padding: 22px 24px; background: none; border: 0; cursor: pointer;
  color: var(--text); text-align: left; font-family: var(--font-body);
}
.acc-num { font-family: var(--font-display); font-weight: 700; color: var(--blue); font-size: 1.05rem; }
.acc-title { flex: 1; font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; }
.acc-chevron { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.acc-chevron::before, .acc-chevron::after {
  content: ''; position: absolute; top: 50%; left: 50%; background: var(--blue);
  transition: transform .3s var(--ease);
}
.acc-chevron::before { width: 14px; height: 2px; transform: translate(-50%,-50%); }
.acc-chevron::after  { width: 2px; height: 14px; transform: translate(-50%,-50%); }
.acc-item.is-open .acc-chevron::after { transform: translate(-50%,-50%) scaleY(0); }
.acc-body {
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease), padding .4s var(--ease);
  padding: 0 24px;
}
.acc-body p { color: var(--text-dim); padding-bottom: 22px; }
.acc-item.is-open .acc-body { max-height: 240px; }

/* ============================================================
   ABOUT / CREATED BY
   ============================================================ */
.about { background:
  radial-gradient(ellipse 60% 50% at 80% 50%, rgba(167,139,250,.08), transparent 60%),
  var(--bg); }
.about__inner { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: center; }

.about__photo {
  position: relative; aspect-ratio: 1; border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(56,189,248,.35);
  box-shadow: 0 0 50px rgba(56,189,248,.18);
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--bg-3), var(--bg));
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__photo-fallback {
  position: absolute; font-family: var(--font-display); font-weight: 700;
  letter-spacing: .2em; color: var(--text-faint); text-align: center; font-size: 1.1rem;
}
/* hide the fallback label once a real photo loads */
.about__photo:not(.about__photo--empty) .about__photo-fallback { display: none; }

.about__text > p { color: var(--text-dim); margin-bottom: 16px; }
.about__text strong { color: var(--text); }
.about__text .section__title { margin: 8px 0 20px; }

.about__socials { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.social-link {
  display: inline-flex; align-items: center; gap: 9px;
  padding: .7em 1.2em; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  color: var(--text-dim); font-size: .9rem; font-weight: 500;
  transition: transform .25s var(--ease), color .25s, border-color .25s, box-shadow .25s;
}
.social-link:hover {
  transform: translateY(-3px); color: var(--blue);
  border-color: var(--blue); box-shadow: var(--glow-blue);
}

/* ============================================================
   DOWNLOAD CTA BAND
   ============================================================ */
.cta-band {
  padding: 90px 0; text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(14,165,233,.16), transparent 60%),
    var(--bg-2);
  border-block: 1px solid var(--line);
}
.cta-band__title { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 14px; }
.cta-band__lead { color: var(--text-dim); font-size: 1.1rem; margin-bottom: 32px; }
.cta-band__buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg); padding: 56px 0 28px; border-top: 1px solid var(--line); }
.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 30px; flex-wrap: wrap; padding-bottom: 34px; border-bottom: 1px solid var(--line);
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__logo { width: 46px; height: 46px; filter: drop-shadow(0 0 10px rgba(56,189,248,.4)); }
.footer__name { font-family: var(--font-display); font-weight: 900; letter-spacing: .08em; }
.footer__tag { color: var(--text-faint); font-size: .85rem; }

.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a { color: var(--text-dim); font-size: .92rem; transition: color .2s; }
.footer__links a:hover { color: var(--blue); }

.footer__socials { display: flex; gap: 14px; }
.footer__socials a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); color: var(--text-dim);
  transition: transform .25s var(--ease), color .25s, border-color .25s, box-shadow .25s;
}
.footer__socials a:hover { transform: translateY(-3px); color: var(--blue); border-color: var(--blue); box-shadow: var(--glow-blue); }

.footer__bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 24px; color: var(--text-faint); font-size: .85rem;
}

/* ============================================================
   SCROLL REVEAL (driven by IntersectionObserver in main.js)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  /* Mobile nav: slide-down panel */
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: rgba(4,4,10,.96); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .nav__links.is-open { max-height: 360px; }
  .nav__links a { padding: 16px 24px; border-top: 1px solid var(--line); }
  .nav__links a.btn { margin: 14px 24px; justify-content: center; }

  .stats__row { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .about__inner { grid-template-columns: 1fr; gap: 36px; }
  .about__photo { max-width: 280px; margin: 0 auto; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .section { padding: 72px 0; }
  .stats__row { grid-template-columns: repeat(2, 1fr); }
  .hero__ranks { flex-wrap: wrap; justify-content: center; }
  .btn--lg { width: 100%; justify-content: center; }
  .hero__cta, .cta-band__buttons { width: 100%; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
