/* Tuff · TuffCheat.win. Warm "lofi" theme from the in-app palette, with motion. */

:root {
  --bg:       #14100d;
  --bg-2:     #1d1815;
  --card:     #221c18;
  --card-2:   #2a221d;
  --line:     #38302a;
  --line-2:   #4a3f37;
  --text:     #ece2d2;
  --dim:      #a1907f;
  --dim-2:    #7d6f62;
  --accent:   #d59a82;
  --accent-2: #e0b199;
  --accent-d: #a5654c;
  --glow:     rgba(213,154,130,.35);
  --radius: 16px;
  --maxw: 1120px;
  --ease: cubic-bezier(.16,.84,.44,1);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- animated aurora backdrop ---- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.aurora .a1 { width: 640px; height: 640px; top: -220px; left: 46%; background: #6b3f2e; animation: drift1 22s var(--ease) infinite alternate; }
.aurora .a2 { width: 520px; height: 520px; top: 12%; left: -160px; background: #4a2d3a; animation: drift2 26s var(--ease) infinite alternate; }
.aurora .a3 { width: 560px; height: 560px; top: 58%; right: -180px; background: #3a3320; animation: drift1 30s var(--ease) infinite alternate-reverse; }

@keyframes drift1 { to { transform: translate(-60px, 80px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(90px, -50px) scale(1.1); } }

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(20,16,13,.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(20,16,13,.85); }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: .3px; color: var(--text); }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  object-fit: cover; display: block;
  box-shadow: 0 4px 18px var(--glow);
}
.brand small { color: var(--dim); font-weight: 500; letter-spacing: 0; }
.nav .links { margin-left: auto; display: flex; gap: 26px; align-items: center; }
.nav .links a:not(.btn) { color: var(--dim); font-size: 14px; font-weight: 600; position: relative; }
.nav .links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s var(--ease);
}
.nav .links a:not(.btn):hover { color: var(--text); }
.nav .links a:not(.btn):hover::after { width: 100%; }

/* ---- buttons ---- */
.btn {
  --shine: transparent;
  display: inline-flex; align-items: center; gap: 8px; position: relative; overflow: hidden;
  padding: 12px 22px; border-radius: 11px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; transition: transform .18s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  transition: left .6s var(--ease);
}
.btn:hover::before { left: 130%; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-d));
  color: #180f0b; box-shadow: 0 8px 26px -8px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px var(--glow); color: #180f0b; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-2px); }
.btn-discord { background: #5865F2; color: #fff; box-shadow: 0 8px 26px -10px rgba(88,101,242,.7); }
.btn-discord:hover { background: #6b77f5; color: #fff; transform: translateY(-2px); }
.btn-lg { padding: 14px 28px; font-size: 15.5px; }

/* ---- hero ---- */
.hero { padding: 80px 0 70px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-copy .kicker {
  font-family: "Consolas", ui-monospace, monospace; font-size: 13.5px;
  color: var(--dim); letter-spacing: .3px; margin-bottom: 22px;
}
.hero-copy .kicker .slash { color: var(--accent); margin-right: 5px; }
.hero-copy h1 { font-size: clamp(40px, 6vw, 66px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -1.5px; }
.hero-copy h1 .grad {
  background: linear-gradient(120deg, var(--accent-2), #efc9a8 45%, var(--accent-d));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy p.lead { font-size: clamp(16px, 2vw, 19px); color: var(--dim); max-width: 520px; margin: 0 0 32px; }
.hero-copy .cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-copy .meta { margin-top: 26px; display: flex; gap: 22px; color: var(--dim-2); font-size: 13px; flex-wrap: wrap; }
.hero-copy .meta b { color: var(--text); }

/* on-load entrance (staggered). Only hidden when JS is active (.js on <html>),
   so if scripts/animation ever fail the content is still visible by default. */
.js .animate-in { opacity: 0; transform: translateY(22px); animation: fadeUp .8s var(--ease) forwards; }
.animate-in.d1 { animation-delay: .05s; }
.animate-in.d2 { animation-delay: .15s; }
.animate-in.d3 { animation-delay: .25s; }
.animate-in.d4 { animation-delay: .35s; }
.animate-in.d5 { animation-delay: .5s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ---- mock overlay panel (product visual) ---- */
.mock-wrap { perspective: 1400px; }
.mock {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 70px -24px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset;
  transform: rotateY(-9deg) rotateX(4deg); transform-style: preserve-3d;
  animation: floatMock 7s ease-in-out infinite;
}
@keyframes floatMock {
  0%,100% { transform: rotateY(-9deg) rotateX(4deg) translateY(0); }
  50%     { transform: rotateY(-6deg) rotateX(3deg) translateY(-12px); }
}
.mock .titlebar {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  background: rgba(0,0,0,.25); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--dim);
}
.mock .titlebar b { color: var(--text); font-weight: 600; }
.mock .titlebar .dots { margin-left: auto; display: flex; gap: 6px; }
.mock .titlebar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.mock .tabs { display: flex; gap: 4px; padding: 12px 12px 0; }
.mock .tabs span { font-size: 12px; padding: 6px 11px; border-radius: 7px 7px 0 0; color: var(--dim); }
.mock .tabs span.on { background: var(--bg-2); color: var(--accent-2); }
.mock .body { padding: 16px; display: grid; gap: 14px; }
.mock .label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim-2); }
.mock .slider { height: 8px; background: var(--bg); border-radius: 5px; position: relative; }
.mock .slider .fill { position: absolute; inset: 0 auto 0 0; width: 62%; background: linear-gradient(90deg, var(--accent-d), var(--accent)); border-radius: 5px; animation: slide 5s ease-in-out infinite; }
.mock .slider .grab { position: absolute; top: 50%; left: 62%; width: 15px; height: 15px; border-radius: 50%; background: var(--accent-2); transform: translate(-50%,-50%); box-shadow: 0 0 12px var(--glow); animation: slideGrab 5s ease-in-out infinite; }
@keyframes slide { 0%,100% { width: 46%; } 50% { width: 78%; } }
@keyframes slideGrab { 0%,100% { left: 46%; } 50% { left: 78%; } }
.mock .row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.mock .chk { width: 17px; height: 17px; border-radius: 5px; border: 1px solid var(--line-2); display: grid; place-items: center; color: #180f0b; }
.mock .chk.on { background: var(--accent); border-color: var(--accent); }
.mock .chk svg { width: 11px; height: 11px; display: block; }
.mock .code { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-family: "Consolas", ui-monospace, monospace; font-size: 12.5px; line-height: 1.7; color: #cbb98f; }
.mock .code .k { color: var(--accent-2); }
.mock .code .caret { display: inline-block; width: 7px; height: 14px; background: var(--accent); vertical-align: -2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- sections ---- */
section { padding: 66px 0; position: relative; }
section[id] { scroll-margin-top: 84px; }  /* keep anchor targets clear of the sticky nav */
.section-head { text-align: center; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 12px; letter-spacing: -.6px; }
.section-head p { color: var(--dim); margin: 0; max-width: 560px; margin-inline: auto; }
.eyebrow { color: var(--accent); font-size: 12.5px; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 700; }

/* ---- reveal on scroll (JS-gated: visible by default without JS) ---- */
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(30px); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---- features ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.grid .card:nth-child(2) { transition-delay: .06s; }
.grid .card:nth-child(3) { transition-delay: .12s; }
.grid .card:nth-child(4) { transition-delay: .06s; }
.grid .card:nth-child(5) { transition-delay: .12s; }
.grid .card:nth-child(6) { transition-delay: .18s; }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(130deg, transparent, var(--accent), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(0,0,0,.7); }
.card:hover::after { opacity: .7; }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(213,154,130,.1); border: 1px solid var(--line); margin-bottom: 16px;
  color: var(--accent-2);
  transition: transform .3s var(--ease);
}
.card .ico svg { width: 23px; height: 23px; display: block; }
.card:hover .ico { transform: scale(1.1) rotate(-6deg); }
.card h3 { margin: 0 0 8px; font-size: 18.5px; }
.card p { margin: 0; color: var(--dim); font-size: 14.5px; }

/* ---- scripting showcase ---- */
.showcase .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.showcase .copy h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 10px 0 14px; letter-spacing: -.5px; }
.showcase .copy p { color: var(--dim); margin: 0 0 22px; }
.showcase .copy ul { list-style: none; padding: 0; margin: 0 0 24px; }
.showcase .copy li { padding: 6px 0 6px 28px; position: relative; color: var(--text); font-size: 14.5px; }
.showcase .copy li::before { content: "›"; position: absolute; left: 4px; color: var(--accent); font-weight: 800; }
.code-window { background: #120e0b; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.code-window .bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.code-window .bar i { width: 11px; height: 11px; border-radius: 50%; }
.code-window .bar i:nth-child(1){ background:#e0665a; } .code-window .bar i:nth-child(2){ background:#e0b45a; } .code-window .bar i:nth-child(3){ background:#5ac07a; }
.code-window pre { margin: 0; padding: 18px 20px; overflow-x: auto; }

/* ---- pricing ---- */
.price-card {
  max-width: 540px; margin: 0 auto; background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; position: relative;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.8);
}
.price-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: 0;
  background: linear-gradient(140deg, var(--accent), transparent 40%, transparent 60%, var(--accent-d));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; animation: borderGlow 5s ease-in-out infinite;
}
@keyframes borderGlow { 50% { opacity: .5; } }
.price-card > * { position: relative; z-index: 1; }
.price-top { padding: 34px; text-align: center; border-bottom: 1px solid var(--line); }
.price-top .amount { font-size: 60px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.price-top .amount small { font-size: 20px; color: var(--dim); font-weight: 600; }
.price-top .sub { color: var(--dim); margin-top: 10px; }
.price-body { padding: 28px 34px 34px; }
.price-body ul { list-style: none; padding: 0; margin: 0 0 24px; }
.price-body li { padding: 8px 0 8px 30px; position: relative; font-size: 14.5px; }
.price-body li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 16px; height: 16px;
  background: no-repeat center/contain url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23d59a82" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>');
}
.crypto { border-top: 1px solid var(--line); padding-top: 22px; }
.crypto h4 { margin: 0 0 4px; font-size: 14px; }
.crypto .hint { color: var(--dim-2); font-size: 12px; margin: 0 0 14px; }
.crypto-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px; margin-bottom: 9px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px;
  transition: border-color .2s, transform .2s;
}
.crypto-row:hover { border-color: var(--line-2); transform: translateX(3px); }
.crypto-row .coin { font-weight: 700; min-width: 100px; }
.crypto-row .coin small { display: block; color: var(--dim-2); font-weight: 500; font-size: 11px; }
.crypto-row .crypto-amt { margin-left: auto; font-family: "Consolas", ui-monospace, monospace; font-size: 15px; color: var(--accent-2); min-width: 60px; text-align: right; }
.copy { background: transparent; border: 1px solid var(--line-2); color: var(--dim); border-radius: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer; transition: .2s; }
.copy:hover { border-color: var(--accent); color: var(--accent); }
.price-body .btn { width: 100%; justify-content: center; margin-top: 22px; }

/* ---- API page ---- */
.doc { padding-top: 44px; padding-bottom: 20px; }
.doc h2 { font-size: 27px; margin: 48px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.doc h3 { font-size: 18px; margin: 26px 0 10px; color: var(--accent-2); }
.doc p { color: var(--text); }
.doc .muted { color: var(--dim); }
.doc ul { color: var(--dim); }
.doc ul b, .doc p b { color: var(--text); }
.note { background: var(--bg-2); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 15px 18px; margin: 18px 0; color: var(--dim); font-size: 14.5px; }
.note b { color: var(--text); }
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--accent-2); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(213,154,130,.04); }
td code, p code, li code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-family: "Consolas", ui-monospace, monospace; font-size: 13px; color: var(--text); }
pre { background: #120e0b; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; overflow-x: auto; margin: 16px 0; }
pre code { font-family: "Consolas", ui-monospace, monospace; font-size: 13.5px; line-height: 1.75; color: #d8cdb9; }
.tok-c { color: #7d7166; } .tok-k { color: var(--accent-2); } .tok-f { color: #bcd3c1; } .tok-s { color: #d3b98a; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 44px; color: var(--dim-2); font-size: 13.5px; }
footer .wrap { display: flex; justify-content: center; align-items: center; gap: 30px; flex-wrap: wrap; }
footer a { color: var(--dim); font-weight: 500; }
footer a:hover { color: var(--accent); }

@media (max-width: 860px) {
  .hero .wrap, .showcase .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 54px; }
  .mock-wrap { max-width: 460px; margin: 0 auto; }
  .mock { transform: none; animation: floatMockFlat 7s ease-in-out infinite; }
  @keyframes floatMockFlat { 50% { transform: translateY(-10px); } }
}
@media (max-width: 560px) {
  .nav .links a:not(.btn) { display: none; }
  footer .wrap { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .animate-in { opacity: 1 !important; transform: none !important; }
  .mock { transform: none; }
}
