:root {
  --black: #050505;
  --ink: #0b0b0d;
  --white: #f3f2ed;
  --muted: #9b9b9f;
  --line: rgba(243, 242, 237, .2);
  --purple: #9945ff;
  --green: #14f195;
  --cyan: #00d8ff;
  --gradient: linear-gradient(110deg, var(--purple), var(--green) 58%, var(--cyan));
  --pad: clamp(1.25rem, 3vw, 3.25rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--white);
  background: var(--black);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}
button, a { font: inherit; }
a { color: inherit; }
button { color: inherit; }
::selection { background: var(--green); color: #000; }

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  height: 82px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .11em;
}
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; width: fit-content; }
.brand-mark, .final-mark { width: 30px; display: grid; gap: 3px; }
.brand-mark i, .final-mark i { height: 5px; background: var(--gradient); transform: skew(-24deg); }
.site-header nav { display: flex; gap: 2.2rem; }
.site-header nav a, .header-x { text-decoration: none; transition: color .2s ease; }
.site-header nav a:hover, .header-x:hover { color: var(--green); }
.header-x { justify-self: end; }

.hero {
  position: relative;
  min-height: 100svh;
  padding: clamp(8.5rem, 14vh, 11rem) var(--pad) 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .78fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-art {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, #050505 0%, rgba(5,5,5,.88) 38%, rgba(5,5,5,.52) 72%, #050505 100%),
    linear-gradient(0deg, #050505 0%, transparent 28%),
    url('assets/tiktaksol-hero.png') 87% 49% / min(74vw, 920px) auto no-repeat;
  opacity: .54;
  filter: saturate(.84) contrast(1.1);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 45vw;
  aspect-ratio: 1;
  left: -26vw;
  top: 21%;
  background: radial-gradient(circle, rgba(153,69,255,.14), transparent 64%);
}
.eyebrow, .section-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #c9c9c9;
  font-size: .75rem;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .18em;
}
.eyebrow span { color: var(--green); }
.hero h1 {
  margin: 1rem 0 1.25rem;
  font-size: clamp(3.9rem, 7.3vw, 8.8rem);
  line-height: .82;
  letter-spacing: -.07em;
  font-weight: 900;
  max-width: 970px;
}
.hero h1 em {
  display: inline-block;
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--white);
  filter: drop-shadow(0 0 12px rgba(20,241,149,.16));
}
.lede {
  max-width: 610px;
  color: #b9b9bc;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.65;
}
.lede strong { color: var(--white); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  padding: .9rem 1.2rem;
  border: 1px solid rgba(255,255,255,.38);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .09em;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { border: 0; color: #020202; background: var(--gradient); }
.button-primary:hover { box-shadow: 0 10px 35px rgba(20,241,149,.2); }
.button-ghost:hover { background: var(--white); color: #000; border-color: var(--white); }
.placeholder-note { margin: .7rem 0 0; color: #777; font-size: .72rem; letter-spacing: .06em; }

.game-shell {
  position: relative;
  align-self: center;
  justify-self: end;
  width: min(100%, 520px);
  padding: clamp(1rem, 2vw, 1.65rem);
  background: rgba(7,7,9,.84);
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.game-shell::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: linear-gradient(145deg, rgba(153,69,255,.55), transparent 22%, transparent 72%, rgba(20,241,149,.45));
}
.game-topline, .game-caption { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.game-topline { padding-bottom: 1rem; font-size: .72rem; font-weight: 900; letter-spacing: .13em; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: .5rem; box-shadow: 0 0 12px var(--green); }
.text-button { border: 0; padding: .3rem 0; background: none; color: #8d8d92; cursor: pointer; font-size: .7rem; font-weight: 800; letter-spacing: .1em; }
.text-button:hover { color: var(--white); }
.board-wrap { position: relative; aspect-ratio: 1; }
.board { display: grid; grid-template-columns: repeat(3, 1fr); height: 100%; }
.cell {
  position: relative;
  border: 0;
  border-right: 2px solid rgba(255,255,255,.78);
  border-bottom: 2px solid rgba(255,255,255,.78);
  background: rgba(0,0,0,.34);
  cursor: pointer;
  display: grid;
  place-items: center;
  min-width: 0;
}
.cell:nth-child(3n) { border-right: 0; }
.cell:nth-child(n+7) { border-bottom: 0; }
.cell:not(:disabled):hover { background: rgba(255,255,255,.07); }
.cell:not(:disabled):hover::after { content: "+"; color: #69696c; font-size: 2.2rem; font-weight: 200; }
.cell:disabled { cursor: default; }
.currency { font-size: clamp(2.4rem, 5vw, 4.5rem); font-weight: 500; animation: mark-in .32s ease both; }
.sol-mark { width: 48%; display: grid; gap: clamp(4px, .7vw, 8px); filter: drop-shadow(0 0 12px rgba(20,241,149,.38)); animation: sol-in .48s cubic-bezier(.17,.8,.2,1.2) both; }
.sol-mark i { display: block; height: clamp(8px, 1.2vw, 14px); background: var(--gradient); transform: skew(-24deg); }
.sol-mark i:nth-child(2) { background: linear-gradient(110deg, #d545ff, #21e6d2); }
@keyframes mark-in { from { opacity: 0; transform: scale(.72) rotate(-8deg); } }
@keyframes sol-in { from { opacity: 0; transform: scale(.4) rotate(-16deg); } }
.win-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; opacity: 0; filter: drop-shadow(0 0 7px var(--green)); }
.win-line line { stroke: url(#line-gradient); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 330; stroke-dashoffset: 330; }
.win-line.active { opacity: 1; }
.win-line.active line { animation: draw-line .62s .12s ease forwards; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
.game-caption { padding-top: 1rem; color: #77777d; font-size: .7rem; line-height: 1.4; }
.game-caption span:last-child { color: #b5b5b8; }
.scroll-cue { position: absolute; left: var(--pad); bottom: 1.5rem; color: #646468; font-size: .65rem; font-weight: 800; letter-spacing: .14em; }
.scroll-cue span { margin-left: .7rem; color: var(--white); }

.ticker { overflow: hidden; border-block: 1px solid var(--white); background: var(--white); color: #000; transform: rotate(-1.1deg) scale(1.02); }
.ticker-track { width: max-content; display: flex; align-items: center; gap: 2rem; padding: .85rem 0; font-size: clamp(.9rem, 1.5vw, 1.2rem); font-weight: 900; letter-spacing: .08em; animation: ticker 24s linear infinite; }
.ticker-track b { color: #6d10e8; }
@keyframes ticker { to { transform: translateX(-50%); } }

.story { padding: clamp(7rem, 13vw, 12rem) var(--pad) clamp(6rem, 10vw, 10rem); }
.section-label { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.story-heading { display: grid; grid-template-columns: 1.35fr .65fr; gap: 3rem; align-items: end; margin: 3rem 0 5rem; }
.story-heading h2, .contract h2 { margin: 0; font-size: clamp(3.1rem, 7vw, 7.5rem); line-height: .88; letter-spacing: -.065em; }
.story-heading p { margin: 0; max-width: 470px; color: #a2a2a7; font-size: clamp(1rem, 1.4vw, 1.25rem); line-height: 1.7; }
.story-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.story-grid li { min-height: 340px; padding: clamp(1.5rem, 3vw, 3rem); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.story-grid li:last-child { border-right: 0; }
.story-grid .step-number { color: #75757a; font-size: .75rem; font-weight: 800; letter-spacing: .1em; }
.story-grid h3 { margin: auto 0 1rem; font-size: clamp(1.5rem, 2.4vw, 2.5rem); letter-spacing: -.045em; }
.story-grid p { margin: 0; color: #95959a; line-height: 1.6; font-size: 1rem; }
.story-grid .accent-card { position: relative; overflow: hidden; background: linear-gradient(145deg, rgba(153,69,255,.11), rgba(20,241,149,.07)); }
.accent-card::after { content: ""; position: absolute; width: 90%; height: 2px; right: -25%; top: 33%; background: var(--gradient); transform: rotate(-34deg); box-shadow: 0 0 20px var(--green); }

.contract { padding: clamp(5rem, 10vw, 10rem) var(--pad); border-top: 1px solid var(--line); display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem, 8vw, 9rem); align-items: center; }
.contract-panel { border: 1px solid rgba(255,255,255,.34); background: #09090b; padding: clamp(1.2rem, 3vw, 2.2rem); }
.contract-label { color: #77777d; font-size: .7rem; font-weight: 900; letter-spacing: .13em; margin-bottom: .9rem; }
.ca-row { display: flex; align-items: stretch; }
.ca-row code { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); border-right: 0; padding: 1rem; color: var(--green); font-family: Consolas, monospace; font-size: clamp(.8rem, 1.1vw, 1rem); }
.ca-row button { min-width: 90px; border: 0; background: var(--white); color: #000; cursor: pointer; font-size: .72rem; font-weight: 900; letter-spacing: .1em; }
.ca-row button:hover { background: var(--green); }
.contract-panel p { margin: 1rem 0 0; color: #77777d; line-height: 1.5; font-size: .8rem; }

.final-cta { min-height: 70svh; padding: 7rem var(--pad); display: grid; place-items: center; text-align: center; border-top: 1px solid var(--line); background: radial-gradient(circle at 50% 54%, rgba(153,69,255,.13), transparent 38%); }
.final-mark { width: 75px; gap: 8px; }
.final-mark i { height: 12px; }
.final-cta p { margin: 2.5rem 0 0; font-size: clamp(2.4rem, 6vw, 6.5rem); font-weight: 900; line-height: .9; letter-spacing: -.06em; }
.final-cta p strong { color: transparent; -webkit-text-stroke: 1px var(--white); }
.final-cta .hero-actions { justify-content: center; }

footer { min-height: 80px; padding: 1rem var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); color: #717176; font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
footer a { text-decoration: none; color: var(--white); }
.toast { position: fixed; left: 50%; bottom: 2rem; z-index: 30; transform: translate(-50%, 120px); padding: .9rem 1.3rem; background: var(--green); color: #000; font-size: .75rem; font-weight: 900; letter-spacing: .12em; transition: transform .3s ease; }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 960px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 9rem; padding-bottom: 6rem; }
  .hero-art { background-size: 1120px auto; background-position: 75% 30%; opacity: .27; }
  .hero-copy { max-width: 760px; }
  .game-shell { justify-self: stretch; width: min(100%, 620px); margin: 0 auto; }
  .scroll-cue { display: none; }
  .story-heading, .contract { grid-template-columns: 1fr; }
  .story-heading p { max-width: 650px; }
}

@media (max-width: 700px) {
  .site-header { height: 68px; }
  .brand { font-size: .72rem; }
  .brand-mark { width: 25px; }
  .hero { padding-top: 7.5rem; }
  .hero h1 { font-size: clamp(3.25rem, 16vw, 5.4rem); }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .story-heading { margin-bottom: 3rem; }
  .story-grid { grid-template-columns: 1fr; }
  .story-grid li { min-height: 265px; border-right: 0; border-bottom: 1px solid var(--line); }
  .story-grid li:last-child { border-bottom: 0; }
  .game-caption span:last-child { display: none; }
  .contract { padding-inline: var(--pad); }
  .ca-row { display: grid; }
  .ca-row code { border-right: 1px solid var(--line); }
  .ca-row button { min-height: 50px; }
  footer { align-items: flex-start; flex-direction: column; padding-block: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
