/* AI Mastery Hub: shared tokens and components.
   Lighting: one monitor in a dark room. Cyan is the signal, ultraviolet is the rim light.
   Layout: 12-column feel, 1200px max, text held to about 62ch. */

:root {
  /* color */
  --void: #06050F;
  --night: #0E0B24;
  --night-2: #151133;
  --white: #FFFFFF;
  --haze: #B9B3D6;
  --cyan: #12E5FF;
  --uv: #7C3AFF;
  --lilac: #A98BFF;
  --frost: #F2F0FF;
  --ink-soft: #2A2440;
  --frost-label: #5B4E86;
  --line: rgba(255, 255, 255, .14);
  --line-strong: rgba(255, 255, 255, .26);
  --glow: 0 0 14px rgba(18, 229, 255, .45);
  --glow-uv: 0 0 18px rgba(124, 58, 255, .5);

  /* type */
  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --text: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.8vw, 7.5rem);

  /* space */
  --s1: .5rem; --s2: .75rem; --s3: 1rem; --s4: 1.5rem; --s5: 2rem; --s6: 3rem; --s7: 5rem; --s8: 10rem;
  --max: 1200px;
  --measure: 62ch;
  --r: 6px;

  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--void);
  color: var(--white);
  font: 400 var(--step-0)/1.65 var(--text);
  overflow-x: hidden;
}
/* 3% grain so large dark areas do not band */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body > * { position: relative; z-index: 1; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.1; text-wrap: balance; font-weight: 700; }
p { margin: 0; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--uv); color: var(--white); }
code, kbd { font-family: var(--mono); font-size: .9em; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--cyan); color: var(--void); padding: 10px 14px; z-index: 100; font-weight: 700; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }
.measure { max-width: var(--measure); }
.stack { display: grid; gap: var(--s4); }
.stack-sm { display: grid; gap: var(--s2); }
.section { padding-block: var(--s7); }
.section-lg { padding-block: clamp(4rem, 3rem + 6vw, var(--s8)); }
.rule { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, var(--uv), var(--cyan)); opacity: .75; }
.split { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); align-items: start; } }

/* ---------- type helpers ---------- */
.display { font-style: italic; text-transform: uppercase; font-size: var(--step-4); line-height: .92; letter-spacing: .01em; }
.h1 { font-size: var(--step-3); }
.h2 { font-size: var(--step-2); }
.h3 { font-size: var(--step-1); }
.lede { font-size: var(--step-1); color: var(--haze); max-width: 54ch; }
.muted { color: var(--haze); }
.label { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.label-lilac { color: var(--lilac); }
.watermark { font-family: var(--mono); font-weight: 500; color: rgba(255,255,255,.07); font-size: clamp(6rem, 18vw, 16rem); line-height: .8; position: absolute; right: -0.05em; top: -0.1em; pointer-events: none; user-select: none; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem; border-radius: var(--r);
  font: 700 1rem/1 var(--display); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  border: 1px solid var(--cyan); background: var(--cyan); color: var(--void);
  transition: box-shadow .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.btn:hover, .btn:focus-visible { box-shadow: var(--glow); color: var(--void); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--line-strong); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--cyan); color: var(--white); box-shadow: none; }
.btn-sm { min-height: 40px; padding: .5rem .9rem; font-size: .9rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--cyan); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */
#site-header { min-height: 68px; position: sticky; top: 0; z-index: 30; } /* reserves space before the shared header is injected, and keeps the menu above the page */
#site-header .site-header { position: relative; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(6, 5, 15, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--white); }
.brand-mark { display: grid; grid-template-columns: repeat(3, 6px); gap: 3px; }
.brand-mark i { width: 6px; height: 16px; border-radius: 1px; background: var(--night-2); border: 1px solid var(--line-strong); }
.brand-mark i:nth-child(1), .brand-mark i:nth-child(2) { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px rgba(18,229,255,.5); }
.brand-name { font: italic 700 1.05rem/1 var(--display); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.brand-name b { color: var(--cyan); font-weight: 700; }
/* The brand pill, matched to the tyekesmedia.com header (.mark): emblem + TYEKE'S MEDIA / AI MASTERY HUB */
.tm-pill { display: inline-flex; align-items: center; gap: 12px; padding: 6px 22px 6px 6px; border: 1px solid rgba(150,170,255,.22); border-radius: 100px; background: #000; color: #E9EEFF; text-decoration: none; transition: border-color .3s; }
a.tm-pill:hover, a.tm-pill:focus-visible { border-color: rgba(150,170,255,.45); color: #E9EEFF; }
.tm-pill img { display: block; width: 36px; height: 36px; object-fit: contain; }
.tm-pill b { display: block; white-space: nowrap; font-family: "Unbounded", "Arial Black", system-ui, sans-serif; font-weight: 800; font-size: .86rem; letter-spacing: .12em; line-height: 1.1; }
.tm-pill small { display: block; white-space: nowrap; font-family: "Geist Mono", ui-monospace, Consolas, monospace; font-weight: 600; font-size: .66rem; line-height: 1.25; letter-spacing: .26em; color: #FFFFFF; }
@media (max-width: 420px) { .tm-pill { padding-right: 14px; gap: 9px; } .tm-pill img { width: 32px; height: 32px; } .tm-pill b { font-size: .72rem; } .tm-pill small { font-size: .58rem; letter-spacing: .18em; } }

/* Tyeke's Media endorsement: the TM monogram and wordmark from the studio identity */
.tm-mark { width: 2.4em; height: 2.4em; flex: none; display: block; object-fit: contain; }
.tm-word { font: 800 .8em/1 "Unbounded", "Arial Black", system-ui, sans-serif; letter-spacing: .12em; color: #E9EEFF; white-space: nowrap; }
.tm-word b { color: inherit; font-weight: 800; }
.tm-word small { font-size: 1em; font-weight: 800; letter-spacing: .12em; }
.endorse { display: inline-flex; align-items: center; gap: .45rem; margin-right: auto; margin-left: .9rem; padding: .35rem .7rem .35rem .9rem; border-left: 1px solid var(--line-strong); text-decoration: none; font-size: .78rem; min-height: 44px; }
.endorse-by { font: 500 .7rem var(--mono); color: var(--haze); text-transform: uppercase; letter-spacing: .08em; }
.endorse:hover .tm-word, .endorse:focus-visible .tm-word { color: var(--cyan); }
@media (max-width: 1000px) { .endorse .tm-word { display: none; } }
@media (max-width: 420px) { .endorse { margin-left: .4rem; padding-left: .5rem; } .endorse-by { display: none; } }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { color: var(--haze); text-decoration: none; padding: .6rem .8rem; border-radius: var(--r); font-weight: 700; font-size: .95rem; }
.nav a:hover { color: var(--white); }
.nav a[aria-current="page"] { color: var(--white); box-shadow: inset 0 -2px 0 var(--cyan); border-radius: 0; }
.nav .btn { margin-left: .5rem; }
.nav a.btn { color: var(--void); padding: .5rem .9rem; }
.nav a.btn:hover, .nav a.btn:focus-visible { color: var(--void); }
.nav .btn-ghost { color: var(--white); }
.menu-btn { display: none; min-height: 44px; min-width: 44px; background: none; border: 1px solid var(--line-strong); color: var(--white); border-radius: var(--r); font: 700 .9rem var(--display); padding: 0 .8rem; }
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--void); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: .5rem 16px 1rem; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--cyan); padding-left: .75rem; }
  .nav .btn { margin: .75rem 0 0; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--s6) var(--s5); margin-top: var(--s7); }
.studio-band { display: grid; gap: 1rem 2rem; align-items: center; padding: var(--s4) 0 var(--s5); margin-bottom: var(--s5); border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .studio-band { grid-template-columns: auto minmax(0, 1fr) auto; } }
.studio-band p { color: var(--haze); max-width: 60ch; }
.studio-lockup { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-size: 1.35rem; }
.studio-lockup .tm-mark { width: 2.6em; height: 2.6em; }
.studio-lockup:hover .tm-word { color: var(--cyan); }
.site-footer .cols { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-footer h2 { font-size: .8rem; font-family: var(--mono); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--haze); margin-bottom: .75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.site-footer .fine { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--haze); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------- the signal motif ---------- */
.signal { display: grid; grid-template-columns: repeat(var(--cells, 30), minmax(0, 1fr)); gap: var(--gap, 4px); max-width: 100%; }
.signal i { display: block; aspect-ratio: 1 / var(--tall, 2.4); border-radius: 2px; background: var(--night); border: 1px solid var(--line); transition: background .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease); transition-delay: calc(var(--i, 0) * var(--stagger, 30ms)); }
.signal i.on { background: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow); }
.signal i.uv { background: var(--uv); border-color: var(--uv); box-shadow: var(--glow-uv); }
.signal-100 { --cells: 50; --gap: 3px; --tall: 2.2; --stagger: 12ms; }
@media (max-width: 600px) { .signal-100 { --cells: 25; } .signal { --gap: 2px; } }
.signal-cap { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--mono); font-size: .75rem; color: var(--haze); margin-top: .6rem; }

/* ---------- ruled rows (no card grids) ---------- */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; gap: .25rem 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
@media (min-width: 760px) { .row { grid-template-columns: 7rem minmax(0, 1fr) auto; } }
.row .k { font-family: var(--mono); color: var(--cyan); font-size: .85rem; }
.row h3 { font-size: 1.2rem; }
.row .v { color: var(--haze); }

/* ---------- panels ---------- */
.panel { background: var(--night); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); }
.panel-uv { box-shadow: -1px 0 0 var(--uv), -8px 0 24px -12px rgba(124,58,255,.6); }
.tag { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: 3px; font: 500 .72rem/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--haze); }
.tag-free { border-color: var(--cyan); color: var(--cyan); }
.tag-paid { background: var(--uv); border-color: var(--uv); color: var(--white); }
.tag-new { border-color: var(--lilac); color: var(--lilac); }

/* ---------- frost paper (long reading) ---------- */
.paper { background: var(--frost); color: var(--void); border-radius: var(--r); padding: clamp(1.25rem, 1rem + 2vw, 3rem); }
.paper .label { color: var(--frost-label); }
.paper p, .paper li { color: var(--ink-soft); }
.paper a { color: #6A2EE8; }
.paper h2, .paper h3 { color: var(--void); }
.paper .obj { border-left: 3px solid var(--uv); padding-left: 1rem; }
.paper ul { padding-left: 1.2rem; display: grid; gap: .5rem; margin: 0; }

/* ---------- forms ---------- */
.field { display: grid; gap: .4rem; }
.field label { font-weight: 700; font-size: .95rem; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: .7rem .9rem; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--void); color: var(--white); font: inherit; }
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px rgba(18,229,255,.25); }
.note { padding: .8rem 1rem; border-radius: var(--r); border: 1px solid var(--cyan); color: var(--white); background: rgba(18,229,255,.06); }
.note-uv { border-color: var(--lilac); background: rgba(124,58,255,.08); }
.check { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--cyan); flex: none; }

/* ---------- copy block ---------- */
.copyblock { position: relative; background: var(--void); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 1rem 1rem 1rem 1rem; font: 500 .9rem/1.6 var(--mono); color: var(--white); white-space: pre-wrap; overflow-wrap: anywhere; }
.copyblock .btn { position: absolute; top: .5rem; right: .5rem; }
.copyblock pre { margin: 0; font: inherit; white-space: pre-wrap; padding-right: 5.5rem; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(6,5,15,.8); }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 460px; background: var(--night); border: 1px solid var(--cyan); border-radius: var(--r); padding: var(--s5); display: grid; gap: var(--s3); box-shadow: var(--glow); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--white); color: var(--void); padding: .7rem 1rem; border-radius: var(--r); font-weight: 700; z-index: 60; max-width: calc(100vw - 32px); }
.toast[hidden] { display: none; }

/* ---------- demo banner ---------- */
.demo-bar { background: var(--uv); color: var(--white); font-size: .85rem; text-align: center; padding: .45rem 16px; }
.demo-bar a { color: var(--white); }

/* ---------- legal pages ---------- */
.legal { max-width: calc(var(--measure) + 64px); }
.legal h2 { margin-top: var(--s4); }
.legal ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; }
.legal p, .legal li { color: var(--haze); }
.legal strong { color: var(--white); }
.contact-email { color: var(--cyan); user-select: all; }
.fine-legal { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.fine-legal a { color: var(--haze); }
.fine-legal a:hover { color: var(--cyan); }

/* ---------- slide viewer (the lesson decks) ---------- */
.deck { display: grid; gap: .75rem; }
.deck-stage { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: #fff; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-strong);
  box-shadow: -1px 0 0 var(--uv), -14px 0 40px -18px rgba(124,58,255,.8), 0 0 60px -24px rgba(18,229,255,.35); outline: none; }
.deck-stage:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.deck-stage img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.deck-stage .hit { position: absolute; top: 0; bottom: 0; width: 30%; background: none; border: 0; cursor: pointer; }
.deck-stage .hit.prev { left: 0; cursor: w-resize; }
.deck-stage .hit.next { right: 0; cursor: e-resize; }
.deck-stage:fullscreen { border: 0; border-radius: 0; background: #000; }
.deck-stage:fullscreen img { background: #000; }
.deck-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.deck-bar .ctrls { display: flex; gap: .5rem; align-items: center; }
.deck-bar .count { font: 500 .85rem var(--mono); color: var(--haze); min-width: 4.5rem; text-align: center; }
.deck-btn { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); background: transparent; color: var(--white); font: 700 .9rem var(--display); cursor: pointer; padding: 0 .8rem; }
.deck-btn:hover { border-color: var(--cyan); }
.deck-btn[disabled] { opacity: .35; cursor: not-allowed; }
.deck-progress { height: 3px; background: var(--night-2); border-radius: 2px; overflow: hidden; }
.deck-progress i { display: block; height: 100%; background: var(--cyan); box-shadow: var(--glow); transition: width .25s var(--ease); }
.deck-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(96px, 1fr); gap: .5rem; overflow-x: auto; padding-bottom: .4rem; }
.deck-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; aspect-ratio: 16 / 9; overflow: hidden; opacity: .55; }
.deck-thumbs button[aria-current="true"] { border-color: var(--cyan); opacity: 1; }
.deck-thumbs button:hover { opacity: 1; }
.deck-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.viewtabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 99px; padding: 3px; gap: 3px; }
.viewtabs button { min-height: 40px; padding: .4rem 1rem; border-radius: 99px; border: 0; background: transparent; color: var(--haze); font: 700 .9rem var(--display); cursor: pointer; }
.viewtabs button[aria-selected="true"] { background: var(--cyan); color: var(--void); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
