/* ============================================================
   $MOG clone — design system, diambil dari site asli (mogpons.com)
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: display;
  src: url("assets/fonts/boba_mono.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: ghost;
  src: url("assets/fonts/ledlight.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}

/* ---------- Design tokens ---------- */
:root {
  --paper: #0b080b;
  --surface: #171116;
  --surface-soft: #21181e;
  --ink: #f8eee9;
  --muted: #bca9a2;
  --red: #c96d7f;
  --skin: #eea07d;
  --brow: #6f4434;
  --lip: #c96d7f;
  --eye: #82b9d6;
  --denim: #72879e;
  --amber: #f2a43b;

  --ember-amber: 219 255 97;
  --ember-green: 88 119 0;
  --ember-magenta: 197 255 0;
  --ember-purple: 142 184 0;
  --ember-red: 163 214 0;

  --gloss-rim: linear-gradient(140deg, rgb(142 184 0), rgb(197 255 0) 45%, rgb(88 119 0));
  --gloss-face: radial-gradient(circle at 50% 105%, rgb(88 119 0 / 85%) 8%, transparent 62%),
                radial-gradient(circle at 12% -10%, rgb(197 255 0 / 60%) 10%, transparent 58%),
                linear-gradient(150deg, #1b2803, #425b08 52%, #243800);

  --font-display: display;
  --font-ghost: ghost;

  /* intro reveal: black veil then lift (secs) */
  --veil-delay: 1.4s;
  --veil-dur: .6s;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display), monospace;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

main { position: relative; }

a { color: inherit; text-decoration: none; }

.font-display { font-family: var(--font-display), monospace; }

/* ---------- Text color utils (oklab fallback first) ---------- */
.text-ink { color: var(--ink); }
.text-ink\/45 { color: var(--ink); color: color-mix(in oklab, var(--ink) 45%, transparent); }
.text-ink\/70 { color: var(--ink); color: color-mix(in oklab, var(--ink) 70%, transparent); }
.text-ink\/75 { color: var(--ink); color: color-mix(in oklab, var(--ink) 75%, transparent); }
.text-skin { color: var(--skin); }
.text-skin\/60 { color: var(--skin); color: color-mix(in oklab, var(--skin) 60%, transparent); }
.text-skin\/70 { color: var(--skin); color: color-mix(in oklab, var(--skin) 70%, transparent); }
.text-balance { text-wrap: balance; }

/* ============================================================
   Scene layers (fixed, stacked)
   ============================================================ */
.scene-back, .scene-front {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
}
.scene-back { z-index: 0; }
.scene-front { z-index: 2; }

.scene-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

/* Ghost watermark (unreadable font) */
.scene-ghost {
  font-family: var(--font-ghost), monospace;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
  text-wrap: balance;
  color: #fff;
  mix-blend-mode: soft-light;
  opacity: 0;
  animation: ghost-in 2.4s ease 1.8s forwards;
  place-items: center;
  padding: 0 4vw;
  font-size: clamp(4rem, 22vw, 18rem);
  line-height: .9;
  display: grid;
  position: absolute;
  inset: 0;
}
@media (prefers-contrast: more) { .scene-ghost { display: none; } }

/* Foreground grab / veil */
.scene-grab {
  pointer-events: none;
  touch-action: pan-y;
  cursor: grab;
  position: absolute;
  inset: 0 0 0 50%;
}
.scene-veil {
  background: #000;
  animation: scene-veil-lift var(--veil-dur) var(--veil-delay) forwards;
  position: absolute;
  inset: 0;
}
@keyframes scene-veil-lift { to { opacity: 0; } }
@keyframes ghost-in { to { opacity: 0.13; } }

/* ============================================================
   Ember color washes
   ============================================================ */
.ember { background: #0a1002; position: absolute; inset: -20%; }
.ember span {
  mix-blend-mode: screen;
  will-change: transform;
  border-radius: 999px;
  position: absolute;
}
.ember-1 { background: radial-gradient(circle, rgb(var(--ember-purple) / 42%), transparent 66%); width: 62vw; height: 62vw; animation: 34s ease-in-out infinite alternate drift-a; top: 6%; left: -6%; }
.ember-2 { background: radial-gradient(circle, rgb(var(--ember-magenta) / 34%), transparent 68%); width: 68vw; height: 68vw; animation: 41s ease-in-out infinite alternate drift-b; bottom: 2%; right: -12%; }
.ember-3 { background: radial-gradient(circle, rgb(var(--ember-red) / 30%), transparent 62%); width: 40vw; height: 40vw; animation: 27s ease-in-out infinite alternate drift-c; top: 34%; left: 30%; }
.ember-4 { background: radial-gradient(circle, rgb(var(--ember-amber) / 32%), transparent 60%); width: 34vw; height: 34vw; animation: 23s ease-in-out infinite alternate drift-a; top: 70%; left: 60%; }
.ember-5 { background: radial-gradient(circle, rgb(var(--ember-green) / 40%), transparent 64%); width: 48vw; height: 48vw; animation: 46s ease-in-out infinite alternate drift-b; top: 20%; left: 70%; }
.ember-6 { background: radial-gradient(circle, rgb(var(--ember-purple) / 26%), transparent 66%); width: 30vw; height: 30vw; animation: 30s ease-in-out infinite alternate drift-c; top: 55%; left: 12%; }

@keyframes drift-a { to { transform: translate(14%, -10%) scale(1.18); } }
@keyframes drift-b { to { transform: translate(-16%, 8%) scale(1.12); } }
@keyframes drift-c { to { transform: translate(9%, 13%) scale(.88); } }

/* ============================================================
   Gloss (pill) button
   ============================================================ */
.gloss {
  cursor: pointer;
  text-shadow: none;
  background: var(--gloss-rim);
  border: 0;
  border-radius: 999px;
  padding: 1.5px;
  transition: box-shadow .3s, translate .3s;
  display: inline-block;
  position: relative;
  box-shadow: 0 4px 6px #00000080;
}
.gloss:hover { translate: 0 -1px; box-shadow: 0 6px 14px #0000008c; }
.gloss:active { translate: 0 1px; box-shadow: 0 0 #0000; }

.gloss-inner {
  border-radius: inherit;
  background: var(--gloss-face);
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.15rem;
  transition: inherit;
  display: flex;
  position: relative;
  overflow: hidden;
}
.gloss-inner::before {
  content: "";
  background: linear-gradient(-65deg, #0000 40%, #ffffff73 50%, #0000 70%) 0 0 / 200% 100% no-repeat;
  animation: 3s infinite gloss-sheen;
  position: absolute;
  inset: 0;
}
.gloss-inner::after {
  content: "";
  border-radius: inherit;
  transition: inherit;
  position: absolute;
  inset: 0;
  box-shadow: inset 0 2px 8px -2px #000000a6;
}
.gloss-dome {
  border-radius: inherit;
  background: radial-gradient(circle at 50% -270%, #fff 45%, #fff6 60%, #0000 60%);
  transition: inherit;
  position: absolute;
  inset: 0 -8em;
}
.gloss-text {
  z-index: 1;
  color: #000;
  white-space: nowrap;
  align-items: center;
  gap: .5rem;
  font-weight: 550;
  display: flex;
  position: relative;
}
@keyframes gloss-sheen {
  0% { opacity: 1; background-position: 130%; }
  to { opacity: 0; background-position: -166%; }
}

/* ============================================================
   Scroll beats (sections)
   ============================================================ */
.beat-section { height: 210svh; }
.beat-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
}

/* One-page mode: hero fills the whole viewport, no scroll */
.beat-section.onepage { height: 100svh; overflow: hidden; }
body.onepage footer { display: none; }
.onepage-foot {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  z-index: 5;
  text-align: center;
  padding: 0 1rem;
  font-size: .7rem;
  line-height: 1.5;
  color: var(--ink); color: color-mix(in oklab, var(--ink) 45%, transparent);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.beat-content {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  will-change: opacity, transform;
}

/* alignment variants (match original zigzag; mobile = centered) */
.beat-block { width: 100%; max-width: 36rem; margin-left: auto; margin-right: auto; text-align: center; }
@media (min-width: 768px) {
  .align-left   .beat-block { margin-right: auto; margin-left: 6%; text-align: left; }
  .align-right  .beat-block { margin-left: auto; margin-right: 6%; text-align: left; }
  .align-center .beat-block { margin-left: auto; margin-right: auto; text-align: center; }
}

/* Hero heading (used when no wordmark image) */
.hero-title {
  font-family: var(--font-display), monospace;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0;
}

/* Hero wordmark image (logo) — blended into dark bg */
.hero-wordmark {
  width: min(60vw, 20rem);
  height: auto;
  display: block;
  margin: 0 auto;
  -webkit-mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 95% 95% at 50% 50%, #000 58%, transparent 100%);
}
@media (min-width: 768px) { .hero-wordmark { margin: 0; width: min(30vw, 21rem); } }

/* Visually hidden but accessible (for SEO/screen readers) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Hero layout: centered single column (portrait + text) */
.hero-layout {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
  max-width: 34rem;
  margin-left: auto;
  margin-right: auto;
}
.hero-layout .beat-block { margin: 0 !important; text-align: center; }
.hero-visual { width: min(58vw, 16rem); flex-shrink: 0; }
.hero-visual-frame {
  display: block;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 1.5rem 4rem #0000006b;
  position: relative;
  background: #fff;
}
.hero-visual-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px #ffffff1f;
}
.hero-visual-frame img { display: block; width: 100%; height: auto; }

/* Section headings */
.beat-h2 {
  font-family: var(--font-display), monospace;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin: 0;
}

.beat-p {
  color: var(--ink); color: color-mix(in oklab, var(--ink) 75%, transparent);
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.625;
  text-wrap: balance;
}

/* Hero actions (buy/chart/x/community row) */
.hero-actions {
  margin-top: .5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
}
.hero-actions .gloss .gloss-text { font-size: .875rem; letter-spacing: -0.01em; }

/* CA copy pill */
.ca-pill { margin-top: 1rem; display: flex; justify-content: center; }
.ca-pill .gloss .gloss-text { font-size: .8rem; gap: .6rem; }
.ca-pill .mono { letter-spacing: .02em; }
.ca-copy { color: #000; font-weight: 700; text-transform: uppercase; }

/* ============================================================
   Tutorial steps
   ============================================================ */
.steps {
  margin-top: 8vh;
  width: 100%;
}
.steps-grid {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 64rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }

.surface {
  background: linear-gradient(145deg, #ffffff12, #ffffff05);
  border-radius: 1.5rem;
  box-shadow: 0 1.5rem 5rem #0000003d;
}
.step {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  text-align: left;
}
.step-thumb {
  position: relative;
  width: 5rem;
  height: 5rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff0d;
  display: grid;
  place-items: center;
}
.step-num { font-family: var(--font-display), monospace; font-size: 1.5rem; color: var(--skin); color: color-mix(in oklab, var(--skin) 60%, transparent); }
.step-title { font-family: var(--font-display), monospace; font-size: 1.125rem; letter-spacing: -0.01em; margin: 0; }
.step-title .step-ano { color: var(--skin); }
.step-body { color: var(--ink); color: color-mix(in oklab, var(--ink) 70%, transparent); margin-top: .25rem; font-size: .875rem; line-height: 1.5; }

/* ============================================================
   Anatomy
   ============================================================ */
.anatomy-section { height: 260svh; padding: 0 1.25rem; }
.anatomy-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.anatomy-copy { width: 100%; max-width: 36rem; }
@media (min-width: 1024px) { .anatomy-copy { margin-left: 6%; max-width: 24rem; } }
.anatomy-parts { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.anatomy-part { display: flex; gap: 1rem; }
.anatomy-thumb {
  position: relative;
  width: 5rem;
  height: 5rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff0d;
}
.anatomy-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.anatomy-title { font-family: var(--font-display), monospace; font-size: 1.125rem; letter-spacing: -0.01em; margin: 0; }
.anatomy-sub { color: var(--skin); color: color-mix(in oklab, var(--skin) 70%, transparent); font-size: .875rem; }
.anatomy-body { color: var(--ink); color: color-mix(in oklab, var(--ink) 70%, transparent); margin-top: .25rem; font-size: .875rem; line-height: 1.5; }

/* ============================================================
   Vault
   ============================================================ */
.vault-section { height: 200svh; padding: 0 1.25rem; }
.vault-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vault-stage { width: 100%; max-width: 64rem; }
.vault-stage .beat-h2 { text-align: center; }
.vault-lead { color: var(--ink); color: color-mix(in oklab, var(--ink) 75%, transparent); margin: .75rem auto 0 auto; max-width: 28rem; text-align: center; line-height: 1.5; text-wrap: balance; }

.vault { margin-top: 2rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; list-style: none; padding: 0; }
@media (min-width: 640px) { .vault { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.vault-card {
  background: var(--gloss-rim);
  border-radius: 1.1rem;
  padding: 1.5px;
  transition: box-shadow .3s, translate .3s;
  position: relative;
  box-shadow: 0 4px 6px #00000080;
}
.vault-card:hover { translate: 0 -2px; box-shadow: 0 8px 14px #0000008c; }
.vault-face {
  border-radius: inherit;
  background: var(--gloss-face);
  display: block;
  position: relative;
  overflow: hidden;
}
.vault-face img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.vault-face::after {
  content: "";
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% -270%, #ffffff8c 45%, #ffffff2e 60%, #0000 60%);
  height: 60%;
  position: absolute;
  inset: 0 -8em auto;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  padding: 2.5rem 1.25rem 3.5rem;
  position: relative;
  z-index: 3;
}
.foot-inner {
  margin-left: auto;
  margin-right: auto;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; color: var(--skin); font-size: .875rem; }
.foot-note { color: var(--ink); color: color-mix(in oklab, var(--ink) 45%, transparent); max-width: 32rem; font-size: .75rem; line-height: 1.5; margin: 0; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .ember span, .gloss-inner::before { animation: none !important; }
}

/* fade-in for main content after veil */
main, footer { opacity: 0; }
body.loaded main, body.loaded footer { opacity: 1; }
