/* TechByRay Lab — shared styles. No external fonts or resources. */
:root {
  --bg-1: #031132;
  --bg-2: #0a3a8c;
  --card: rgba(8, 30, 78, .62);
  --card-solid: #0a2457;
  --border: rgba(120, 180, 255, .22);
  --border-strong: rgba(120, 180, 255, .45);
  --text: #eaf3ff;
  --muted: #9db8e0;
  --accent: #4fd6ff;
  --accent-ink: #02142f;
  --gold: #ffc94d;
  --ok: #4ee6a0;
  --danger: #ff7a8a;
  --radius: 14px;
  --maxw: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-1);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(79, 214, 255, .14), transparent 60%),
    linear-gradient(160deg, var(--bg-1) 0%, #06205a 45%, var(--bg-2) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #9be8ff; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: #1b1200; padding: 8px 14px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.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;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .container { padding: 0 24px; } }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(3, 17, 50, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.1rem;
  letter-spacing: .01em; white-space: nowrap;
}
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #2b7bff);
  color: var(--accent-ink); font-size: .8rem; font-weight: 900;
}
.logo span.lab { color: var(--accent); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav-links a:hover { background: rgba(120, 180, 255, .12); color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links .yt { color: var(--gold); }

.lang-toggle {
  display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden;
  margin-left: 6px; flex: none;
}
.lang-toggle button {
  background: transparent; color: var(--muted); border: 0; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 700; padding: 6px 10px; min-width: 40px;
}
.lang-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.menu-btn {
  display: none; margin-left: auto;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 7px 10px; cursor: pointer; font: inherit; font-weight: 700;
}
.menu-btn .bars { display: inline-block; width: 18px; vertical-align: middle; }
.menu-btn .bars i { display: block; height: 2px; background: currentColor; margin: 4px 0; border-radius: 2px; }

@media (max-width: 820px) {
  .header-inner { gap: 8px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; order: 3; margin-left: 0; }
  .lang-toggle { margin-left: auto; order: 2; }
  .nav { margin-left: 0; order: 4; }
  .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(3, 17, 50, .97); border-bottom: 1px solid var(--border);
    padding: 8px 16px 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
}
@media (max-width: 480px) {
  .menu-btn .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu-btn { padding: 9px 10px; }
  .logo { font-size: 1rem; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; font-size: .7rem; }
  .lang-toggle button { min-width: 36px; padding: 6px 8px; }
}

/* ---------- Generic sections ---------- */
main { display: block; }
.section { padding: 64px 0; }
.section + .section { padding-top: 24px; }
.section-head { max-width: 720px; margin-bottom: 28px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.kicker {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0, 8, 30, .25);
}
.muted { color: var(--muted); }
.gold { color: var(--gold); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
  min-height: 44px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #8de6ff; color: var(--accent-ink); }
.btn-ghost { background: rgba(120, 180, 255, .08); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: rgba(120, 180, 255, .18); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 122, 138, .5); }
.btn-danger:hover { background: rgba(255, 122, 138, .12); color: #ffb3bd; }
[hidden] { display: none !important; }
.hero-soon { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(79, 214, 255, .1); border: 1px solid rgba(79, 214, 255, .35); }
.btn-kofi { background: #ff5e5b; color: #fff; }
.btn-kofi:hover { background: #ff7c79; color: #fff; }
.btn-sm { padding: 6px 12px; min-height: 36px; font-size: .9rem; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; vertical-align: middle; white-space: nowrap;
  border: 1px solid currentColor;
}
.badge-soon { color: var(--gold); background: rgba(255, 201, 77, .1); }
.badge-ok { color: var(--ok); background: rgba(78, 230, 160, .1); }
.badge-bad { color: var(--danger); background: rgba(255, 122, 138, .1); }
.badge-neutral { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 32px; }
.hero-grid { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }
.hero h1 .lab { color: var(--accent); }
.hero .tagline { font-size: clamp(1.15rem, 2.6vw, 1.45rem); color: var(--gold); font-weight: 700; margin-bottom: .6em; }
.hero .lead { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 14px; }
.hero-note { font-size: .88rem; color: var(--muted); }
.hero-note strong { color: var(--text); }

.hero-art {
  position: relative; display: flex; justify-content: center; align-items: flex-end;
  min-height: 300px; border-radius: 20px;
  background:
    radial-gradient(closest-side at 50% 70%, rgba(79, 214, 255, .25), transparent),
    linear-gradient(180deg, rgba(8, 30, 78, .2), rgba(8, 30, 78, .7));
  border: 1px solid var(--border);
  overflow: hidden; padding-top: 16px;
}
.hero-art img { width: 48%; max-width: 250px; object-fit: contain; }
.hero-art img + img { margin-left: -6%; }

/* ---------- Hosts ---------- */
.host { display: flex; gap: 18px; align-items: flex-start; }
.host img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--border-strong); }
.host .role { color: var(--gold); font-weight: 700; font-size: .92rem; margin-bottom: .4em; }
@media (max-width: 420px) {
  .host { flex-direction: column; }
}

/* ---------- Features ---------- */
.feature h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feature .icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 1.15rem;
  background: rgba(79, 214, 255, .12); border: 1px solid var(--border);
}
.feature p { color: var(--muted); margin: 0; }
.feature-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.feature-head h3 { margin: 0; }

.shot { margin: 28px 0 0; }
.shot img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; }
.shot figcaption { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.shot figcaption strong { color: var(--gold); }

.bot-intro { border-left: 4px solid var(--gold); }

/* ---------- Videos ---------- */
.video-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.video-card { padding: 0; overflow: hidden; }
.video-card h3 { padding: 14px 18px 16px; margin: 0; font-size: 1rem; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #020b22; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-load {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; text-align: center; cursor: pointer;
  border: 0; color: var(--text); font: inherit;
  background:
    radial-gradient(closest-side, rgba(79, 214, 255, .18), transparent),
    linear-gradient(135deg, #04163d, #0a3a8c);
}
.video-load .play {
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 1.5rem;
  box-shadow: 0 6px 24px rgba(79, 214, 255, .35);
}
.video-load .play-label { font-weight: 700; }
.video-load .notice { font-size: .8rem; color: var(--muted); max-width: 40ch; }
.video-load:hover .play { background: #8de6ff; }

.empty {
  text-align: center; padding: 34px 22px;
  border-style: dashed;
}
.empty p { color: var(--muted); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { position: relative; padding-top: 52px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 18px; left: 22px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
  background: var(--accent); color: var(--accent-ink);
}
.step h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.step p { color: var(--muted); margin: 0; }
.step.is-soon::before { background: var(--gold); color: #1b1200; }

/* ---------- Disclaimer ---------- */
.disclaimer {
  border: 1px solid rgba(255, 201, 77, .5);
  background: linear-gradient(180deg, rgba(255, 201, 77, .08), rgba(8, 30, 78, .62));
}
.disclaimer h2 { color: var(--gold); font-size: clamp(1.3rem, 3vw, 1.7rem); }
.disclaimer ul { margin: 0; padding-left: 1.2em; }
.disclaimer li { margin-bottom: .55em; }
.disclaimer li strong { color: var(--text); }

/* ---------- Forms / account ---------- */
.narrow { max-width: 560px; margin: 0 auto; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 12px; background: rgba(3, 17, 50, .55); border: 1px solid var(--border); margin-bottom: 20px; }
.tabs [role="tab"] {
  flex: 1; padding: 10px; border-radius: 9px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-weight: 700;
}
.tabs [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { display: block; font-size: .85rem; color: var(--muted); margin-top: 5px; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: rgba(2, 12, 36, .75); color: var(--text);
  font: inherit; min-height: 46px;
}
input::placeholder { color: #6f8bb5; }
input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
input[aria-invalid="true"] { border-color: var(--danger); }
.check { display: flex; gap: 8px; align-items: center; font-size: .92rem; color: var(--muted); margin: -4px 0 16px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-note { font-size: .86rem; color: var(--muted); margin-top: 14px; }

.alert {
  border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-weight: 600;
  border: 1px solid;
}
.alert-error { color: #ffc2ca; background: rgba(255, 122, 138, .12); border-color: rgba(255, 122, 138, .5); }
.alert-ok { color: #b9f7da; background: rgba(78, 230, 160, .1); border-color: rgba(78, 230, 160, .45); }
.alert:empty { display: none; }

.overview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
dl.meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }

.license { margin-top: 16px; }
.license-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.license-key { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.02rem; font-weight: 700; overflow-wrap: anywhere; }
.device-list { list-style: none; padding: 0; margin: 10px 0 0; }
.device {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 10px; background: rgba(3, 17, 50, .5); border: 1px solid var(--border);
  margin-bottom: 8px;
}
.device-name { font-weight: 700; overflow-wrap: anywhere; }
.device-seen { font-size: .85rem; color: var(--muted); }

.loading { color: var(--muted); }

/* ---------- Legal pages ---------- */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal li { margin-bottom: .4em; }
.draft-banner {
  border: 2px dashed var(--gold); color: var(--gold); background: rgba(255, 201, 77, .08);
  border-radius: var(--radius); padding: 12px 16px; font-weight: 800; margin-bottom: 24px;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px; padding: 32px 0 40px;
  border-top: 1px solid var(--border); background: rgba(3, 17, 50, .55);
  font-size: .92rem; color: var(--muted);
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--text); }
.footer-disc { max-width: 62ch; margin: 18px 0 0; font-size: .85rem; }

noscript .alert { margin: 16px; }
