/* =========================================================
   TenSum / Beneviat Games — stylesheet
   Design language: dark math-lab. The site is built around
   the game's own mechanic — an equation resolving itself —
   rather than generic "premium SaaS" glassmorphism.
   ========================================================= */

:root{
  /* ---- palette (derived from the game's own brand) ---- */
  --bg:            #050810;
  --bg-soft:       #0a0f1e;
  --panel:         #0d1326;
  --panel-line:    rgba(148, 174, 255, 0.12);
  --ink:           #eef2ff;
  --ink-dim:       #8b96b8;
  --ink-faint:     #545e7d;
  --cyan:          #37c4ff;
  --cyan-dim:      #1c7aa8;
  --blue:          #3d7bff;

  /* tile colors — pulled straight from the app icon */
  --tile-blue:     #2f8cff;
  --tile-purple:   #8a5cff;
  --tile-orange:   #ff9a2e;
  --tile-green:    #5fd15a;
  --tile-pink:     #ff5f9e;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;

  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --ease: cubic-bezier(.22,.9,.32,1);
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

*{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
button{ font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul{ list-style: none; }

:focus-visible{
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden{
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.visually-hidden:focus{
  position: fixed; left: 16px; top: 16px;
  width: auto; height: auto; z-index: 100;
  background: var(--ink); color: #04060f;
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
}

.container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------------------------------------------------
   Ambient background — soft drifting glow, not a busy scene
--------------------------------------------------------- */
.ambient{
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 18% -8%, rgba(61,123,255,.16), transparent 60%),
    radial-gradient(900px 600px at 88% 18%, rgba(55,196,255,.10), transparent 55%),
    var(--bg);
}
.ambient::before{
  content:"";
  position:absolute; inset:0;
  background-image: radial-gradient(rgba(148,174,255,.08) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 40%, transparent 100%);
}

/* ---------------------------------------------------------
   Nav
--------------------------------------------------------- */
.nav{
  position: sticky; top: 0; z-index: 50;
  display:flex; align-items:center; justify-content: space-between;
  padding: 18px 28px;
  backdrop-filter: blur(14px);
  background: rgba(5,8,16,.6);
  border-bottom: 1px solid var(--panel-line);
}
.nav__brand{
  display:flex; align-items:center; gap:10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .01em;
}
.nav__brand img{ width: 30px; height: 30px; border-radius: 8px; }
.nav__links{ display:flex; gap: 30px; }
.nav__links a{
  font-size: 14px; color: var(--ink-dim); font-weight: 500;
  transition: color .2s var(--ease);
}
.nav__links a:hover{ color: var(--ink); }
.nav__cta{
  background: var(--ink); color: #060911;
  padding: 9px 18px; border-radius: 100px;
  font-weight: 700; font-size: 13.5px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.nav__cta:hover{ transform: translateY(-1px); box-shadow: 0 8px 24px rgba(238,242,255,.18); }
.nav__menu-btn{ display:none; }

/* ---------------------------------------------------------
   Hero — the equation IS the hero
--------------------------------------------------------- */
.hero{
  padding: 96px 0 70px;
  position: relative;
}
.hero__grid{
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(55,196,255,.28);
  background: rgba(55,196,255,.06);
  padding: 6px 12px; border-radius: 100px;
  margin-bottom: 26px;
}
.eyebrow::before{
  content:""; width:6px; height:6px; border-radius:50%;
  background: var(--tile-green);
  box-shadow: 0 0 8px var(--tile-green);
}

.hero__title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}
.hero__title em{
  font-style: normal;
  background: linear-gradient(100deg, var(--cyan), var(--blue) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero__lede{
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero__actions{ display:flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }

.btn{
  display:inline-flex; align-items:center; gap: 10px;
  padding: 14px 24px;
  border-radius: 100px;
  font-weight: 700; font-size: 15px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn--primary{
  background: linear-gradient(100deg, var(--cyan), var(--blue));
  color: #04060f;
}
.btn--primary:hover{ transform: translateY(-2px); box-shadow: 0 12px 32px rgba(55,196,255,.28); }
.btn--ghost{
  border: 1px solid var(--panel-line);
  color: var(--ink);
  background: rgba(255,255,255,.02);
}
.btn--ghost:hover{ border-color: rgba(148,174,255,.4); background: rgba(255,255,255,.05); }
.btn svg{ width: 18px; height: 18px; }

.hero__stats{ display:flex; gap: 34px; }
.stat{ }
.stat__value{
  font-family: var(--font-mono);
  font-weight: 700; font-size: 22px;
  color: var(--ink);
}
.stat__label{ font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }

/* ---- live equation visual ---- */
.equation-stage{
  position: relative;
  display:flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 34px;
  padding: 50px 20px;
}
.equation-row{
  display:flex; align-items:center; gap: 16px;
}
.tile{
  width: 68px; height: 68px;
  border-radius: 18px;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono);
  font-weight: 700; font-size: 26px;
  color: #04060f;
  box-shadow: 0 10px 26px -8px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.25);
  opacity: 0;
  transform: translateY(14px) scale(.92);
  animation: tile-in .6s var(--ease) forwards;
}
.tile--blue{ background: linear-gradient(160deg, #55a4ff, var(--tile-blue)); }
.tile--purple{ background: linear-gradient(160deg, #a985ff, var(--tile-purple)); }
.tile--target{
  width: 84px; height: 84px; border-radius: 22px;
  background: var(--bg-soft);
  color: var(--cyan);
  border: 2px solid rgba(55,196,255,.5);
  box-shadow: 0 0 30px -4px rgba(55,196,255,.45);
  font-size: 30px;
}
.op{
  font-family: var(--font-mono); font-size: 26px; color: var(--ink-faint); font-weight: 600;
  opacity: 0; animation: fade-in .5s var(--ease) forwards;
}
.tile:nth-child(1){ animation-delay: .1s; }
.op:nth-child(2){ animation-delay: .35s; }
.tile:nth-child(3){ animation-delay: .45s; }
.op:nth-child(4){ animation-delay: .7s; }
.tile:nth-child(5){ animation-delay: .8s; }

.equation-caption{
  font-family: var(--font-mono);
  font-size: 13px; color: var(--ink-faint);
  letter-spacing: .04em;
  opacity: 0; animation: fade-in .6s var(--ease) forwards; animation-delay: 1.1s;
}

.phone-frame{
  position: relative;
  width: min(280px, 68vw);
  aspect-ratio: 9/18.5;
  border-radius: 40px;
  border: 6px solid #131a30;
  background: #04060f;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(148,174,255,.08);
  overflow: hidden;
}
.phone-frame img{ width:100%; height:100%; object-fit: cover; }

@keyframes tile-in{ to{ opacity:1; transform: translateY(0) scale(1); } }
@keyframes fade-in{ to{ opacity:1; } }

/* ---------------------------------------------------------
   Section shell
--------------------------------------------------------- */
.section{ padding: 100px 0; position: relative; }
.section--tight{ padding: 70px 0; }
.section-head{ max-width: 640px; margin-bottom: 56px; }
.section-kicker{
  font-family: var(--font-mono);
  font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.section-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.section-title span{ color: var(--cyan); }
.section-lede{ color: var(--ink-dim); font-size: 16.5px; margin-top: 16px; }

.reveal{
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------
   About / how it works
--------------------------------------------------------- */
.rules{
  display:grid; grid-template-columns: repeat(3,1fr); gap: 18px;
}
.rule-card{
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
}
.rule-card__index{
  font-family: var(--font-mono);
  font-size: 13px; color: var(--ink-faint); margin-bottom: 18px;
}
.rule-card__num{
  display:inline-flex; align-items:center; justify-content:center;
  width: 46px; height: 46px; border-radius: 13px;
  font-family: var(--font-mono); font-weight: 700; font-size: 19px;
  margin-bottom: 18px;
}
.rule-card:nth-child(1) .rule-card__num{ background: rgba(47,140,255,.14); color: var(--tile-blue); }
.rule-card:nth-child(2) .rule-card__num{ background: rgba(138,92,255,.14); color: var(--tile-purple); }
.rule-card:nth-child(3) .rule-card__num{ background: rgba(255,154,46,.14); color: var(--tile-orange); }
.rule-card h3{ font-family: var(--font-display); font-size: 18px; margin-bottom: 10px; }
.rule-card p{ color: var(--ink-dim); font-size: 14.5px; }

/* ---------------------------------------------------------
   Feature grid
--------------------------------------------------------- */
.features{
  display:grid; grid-template-columns: repeat(4,1fr); gap: 1px;
  background: var(--panel-line);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feature{
  background: var(--panel);
  padding: 32px 26px;
  transition: background .25s var(--ease);
}
.feature:hover{ background: #10162c; }
.feature__dot{
  width: 9px; height: 9px; border-radius: 50%;
  margin-bottom: 20px;
}
.feature:nth-child(1) .feature__dot{ background: var(--tile-blue); box-shadow: 0 0 10px var(--tile-blue); }
.feature:nth-child(2) .feature__dot{ background: var(--tile-purple); box-shadow: 0 0 10px var(--tile-purple); }
.feature:nth-child(3) .feature__dot{ background: var(--tile-orange); box-shadow: 0 0 10px var(--tile-orange); }
.feature:nth-child(4) .feature__dot{ background: var(--tile-green); box-shadow: 0 0 10px var(--tile-green); }
.feature:nth-child(5) .feature__dot{ background: var(--tile-pink); box-shadow: 0 0 10px var(--tile-pink); }
.feature:nth-child(6) .feature__dot{ background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.feature:nth-child(7) .feature__dot{ background: var(--tile-blue); box-shadow: 0 0 10px var(--tile-blue); }
.feature:nth-child(8) .feature__dot{ background: var(--tile-purple); box-shadow: 0 0 10px var(--tile-purple); }
.feature h3{ font-family: var(--font-display); font-size: 16.5px; margin-bottom: 8px; }
.feature p{ font-size: 13.5px; color: var(--ink-dim); }

@media (max-width: 900px){
  .features{ grid-template-columns: repeat(2,1fr); }
}

/* ---------------------------------------------------------
   Screenshots — horizontal scroll strip
--------------------------------------------------------- */
.strip{
  display:flex; gap: 20px;
  overflow-x: auto;
  padding: 6px 0 26px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.strip::-webkit-scrollbar{ height: 6px; }
.strip::-webkit-scrollbar-thumb{ background: var(--panel-line); border-radius: 10px; }
.strip__item{
  flex: 0 0 auto;
  width: 210px;
  scroll-snap-align: start;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.strip__item:hover{ transform: translateY(-6px); border-color: rgba(55,196,255,.4); }
.strip__item img{ width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------
   Studio / roadmap
--------------------------------------------------------- */
.split{
  display:grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: start;
}
.studio-copy p{ color: var(--ink-dim); font-size: 16px; margin-bottom: 18px; }
.studio-copy p:last-child{ margin-bottom: 0; }
.studio-copy strong{ color: var(--ink); font-weight: 600; }

.timeline{ position: relative; padding-left: 28px; }
.timeline::before{
  content:""; position:absolute; left: 5px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(var(--panel-line), transparent);
}
.tl-item{ position: relative; padding-bottom: 34px; }
.tl-item:last-child{ padding-bottom: 0; }
.tl-item::before{
  content:""; position:absolute; left: -28px; top: 4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--ink-faint);
}
.tl-item--done::before{ border-color: var(--tile-green); background: var(--tile-green); box-shadow: 0 0 10px var(--tile-green); }
.tl-item--now::before{ border-color: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.tl-status{
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 6px;
}
.tl-item--done .tl-status{ color: var(--tile-green); }
.tl-item--now .tl-status{ color: var(--cyan); }
.tl-item h4{ font-family: var(--font-display); font-size: 17px; margin-bottom: 6px; }
.tl-item p{ font-size: 14px; color: var(--ink-dim); }

/* ---------------------------------------------------------
   CTA band
--------------------------------------------------------- */
.cta-band{
  border-radius: 28px;
  padding: 64px 48px;
  text-align:center;
  background:
    radial-gradient(600px 300px at 50% -20%, rgba(55,196,255,.16), transparent 70%),
    var(--panel);
  border: 1px solid var(--panel-line);
}
.cta-band h2{
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3.4vw, 38px);
  margin-bottom: 16px;
}
.cta-band p{ color: var(--ink-dim); margin-bottom: 32px; }

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.footer{
  border-top: 1px solid var(--panel-line);
  padding: 50px 0 34px;
}
.footer__top{
  display:flex; justify-content: space-between; align-items:flex-start;
  flex-wrap: wrap; gap: 30px;
  margin-bottom: 40px;
}
.footer__brand{ display:flex; align-items:center; gap:10px; font-family: var(--font-display); font-weight:700; }
.footer__brand img{ width:26px; height:26px; border-radius:7px; }
.footer__cols{ display:flex; gap: 60px; flex-wrap: wrap; }
.footer__col h5{
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 14px;
}
.footer__col a, .footer__col span{
  display:block; font-size: 14px; color: var(--ink-dim); margin-bottom: 10px;
  transition: color .2s;
}
.footer__col a:hover{ color: var(--ink); }
.footer__bottom{
  display:flex; justify-content:space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 26px; border-top: 1px solid var(--panel-line);
  font-size: 13px; color: var(--ink-faint);
}
.footer__bottom a{ color: var(--ink-faint); }
.footer__bottom a:hover{ color: var(--ink-dim); }

.back-to-top{
  position: fixed; right: 24px; bottom: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--panel-line);
  display:flex; align-items:center; justify-content:center;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 40;
}
.back-to-top.is-visible{ opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover{ border-color: rgba(55,196,255,.4); }
.back-to-top svg{ width: 18px; height: 18px; color: var(--ink); }

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 980px){
  .hero__grid{ grid-template-columns: 1fr; }
  .equation-stage{ order: -1; }
  .split{ grid-template-columns: 1fr; gap: 44px; }
  .rules{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .nav__links{ display:none; }
  .hero{ padding: 64px 0 50px; }
  .hero__stats{ gap: 22px; flex-wrap: wrap; }
  .features{ grid-template-columns: 1fr; }
  .footer__top{ flex-direction: column; }
  .section{ padding: 70px 0; }
}
