/* Betterino subpages: the frame of the homepage (type, ground, nav, footer, buttons).
   Colours follow the Betterino theme picked on the homepage (assets/site.js). */
:root {
  --t-bg: #0b0012; --t-text: #f2f2f2; --t-accent: #9147ff; --t-on-accent: #ffffff; --t-sub: #5a5a5a;
  --t-hover: #160020; --t-chat: #100018; --t-input: #160020; --t-pop: #180024; --t-popborder: #2a0040;
  --t-tabbar: #0d0016; --t-tabtext: #64748b;
  --ink: #f2f2f2;
  --muted: #a3a3ad;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.1rem + 0.9vw, 2rem);
  --step-head: clamp(2.25rem, 1.3rem + 3.6vw, 4.5rem);
  --m: clamp(20px, 2.8vw, 40px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  --bg: color-mix(in oklab, var(--t-accent) 7%, #0e0e10);
  --bg-deep: color-mix(in oklab, var(--t-accent) 16%, #0b0b0d);
  --surface: color-mix(in oklab, var(--t-accent) 9%, #18181c);
  background: var(--bg); color: var(--ink);
  font-family: 'Clash Grotesk', ui-sans-serif, system-ui, sans-serif;
  font-size: var(--step-body); line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100svh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--t-accent); color: var(--t-on-accent); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* nav: a plain bar, wordmark, a few links, the actions of the page */
.site-nav { position: relative; z-index: 20; display: flex; align-items: center; gap: 28px; height: 68px; padding: 0 var(--m); background: var(--bg); }
.site-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; }
.site-brand svg { width: 22px; height: 22px; display: block; }
.site-brand small { color: var(--muted); font-size: var(--step-body); }
.site-links { display: flex; gap: 22px; list-style: none; margin-right: auto; font-size: var(--step-small); }
.site-links a { text-decoration: none; color: var(--muted); transition: color .18s; }
.site-links a:hover, .site-links a[aria-current="page"] { color: var(--ink); }
.site-actions { display: flex; align-items: center; gap: 12px; }

/* buttons: square, one fill */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border: 0; border-radius: 0; background: var(--ink); color: #111; font-weight: 500; font-size: var(--step-body); text-decoration: none; cursor: pointer; transition: background .18s, color .18s, transform .14s var(--ease-out); white-space: nowrap; }
.btn:hover { background: var(--t-accent); color: var(--t-on-accent); }
.btn:active { transform: scale(.97); }
.btn.sm { height: 40px; padding: 0 16px; font-size: var(--step-small); }
.btn.ghost { background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); }
.btn.ghost:hover { background: color-mix(in srgb, var(--ink) 16%, transparent); color: var(--ink); }
.btn.twitch { background: #9146ff; color: #fff; }
.btn.twitch:hover { background: #a56bff; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.link { background: none; border: 0; cursor: pointer; color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 5px; }
.link:hover { text-decoration-color: var(--ink); }

/* type */
.h-display { font-size: var(--step-head); font-weight: 500; line-height: .95; letter-spacing: -0.035em; text-wrap: balance; }
.h-section { font-size: var(--step-head); font-weight: 500; line-height: .95; letter-spacing: -0.03em; text-wrap: balance; }
.h-lead { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.lead { max-width: 46ch; text-wrap: pretty; }
.soft { color: var(--muted); }

/* the homepage split: page tone on the left, the theme's own ground on the right */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: min(78svh, 860px); }
.split > .split-l { background: var(--bg-deep); padding: 64px var(--m) var(--m); display: flex; flex-direction: column; justify-content: flex-end; gap: 28px; }
.split > .split-r { background: var(--t-bg); color: var(--t-text); display: grid; place-items: center; padding: 48px var(--m); position: relative; overflow: clip; }

/* sections */
.sec { padding: 160px var(--m) 0; }
.sec-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; align-items: end; margin-bottom: 40px; }
.sec-head > :first-child { grid-column: 1 / 7; }
.sec-head > :last-child:not(:first-child) { grid-column: 8 / 13; max-width: 42ch; }

/* two-ended rows */
.rows { list-style: none; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; }
.rows li > span:first-child { display: flex; gap: 12px; align-items: baseline; }
.rows li > span:first-child::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--t-accent); flex: none; transform: translateY(1px); }
.rows li > span:last-child { color: var(--muted); font-size: var(--step-small); white-space: nowrap; }

/* app-like surfaces (the app's own type and radii) */
.ui { font-family: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--t-text); }
.ui-card { background: var(--t-pop); border: 1px solid var(--t-popborder); border-radius: 16px; }
.ui-field { height: 48px; border-radius: 14px; padding: 0 14px; display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--t-bg) 70%, #000); border: 1px solid color-mix(in srgb, var(--t-text) 8%, transparent); color: var(--t-text); }
.ui-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--t-text); font-size: 16px; }
.ui-field:focus-within { border-color: color-mix(in srgb, var(--t-accent) 70%, transparent); }
.ui-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .3px; background: color-mix(in srgb, var(--t-text) 10%, transparent); color: color-mix(in srgb, var(--t-text) 75%, transparent); }
.ui-pill.accent { background: color-mix(in srgb, var(--t-accent) 26%, transparent); color: var(--t-text); }
.ui-pill.ok { background: rgba(52,211,153,.15); color: #34d399; }

/* toasts */
.toast-container { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--t-pop); border: 1px solid var(--t-popborder); color: var(--t-text); font: 500 15px 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif; box-shadow: 0 18px 40px -14px rgba(0,0,0,.6); animation: toast-in .3s var(--ease-out); } /* floats. taste-skill-ignore */
.toast-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.toast.success .toast-icon { background: rgba(52,211,153,.18); color: #34d399; }
.toast.error .toast-icon { background: rgba(255,107,107,.18); color: #ff6b6b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* footer: one quiet line */
.site-foot { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: baseline; padding: 96px var(--m) 28px; font-size: var(--step-small); color: var(--muted); }
.site-foot nav { display: flex; gap: 22px; }
.site-foot nav a { color: var(--ink); text-decoration: none; }
.site-foot nav a:hover { opacity: .65; }
.site-foot > :last-child { justify-self: end; }

@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-expo), transform .8s var(--ease-expo); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-rise].in { opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  .site-nav { gap: 16px; }
  .site-links { display: none; }
  .split { grid-template-columns: 1fr; min-height: 0; }
  .split > .split-l { padding: 48px 20px 40px; }
  .split > .split-r { order: -1; min-height: 52svh; padding: 32px 20px; }
  .sec { padding: 110px 20px 0; }
  .sec-head { display: block; }
  .sec-head > :first-child { margin-bottom: 16px; }
  .site-foot { display: flex; flex-direction: column; gap: 8px; padding: 64px 20px 24px; }
  .site-foot nav { flex-wrap: wrap; gap: 8px 16px; }
}
