/* TTCC visual system — the Tritanium "forge": black steel, worked gold, embers. Tokens mirror
   thetritaniumcorp.com (ink/steel/gold) and consult.aiworld.institute (amber/teal status). */
:root {
  --ink: #050505; --ink-2: #0b0b0d; --ink-3: #121214; --ink-4: #1a1a1d;
  --steel: #d1d1d1; --steel-2: #b5b5b5; --dim: #8a8a8f; --mute: #5d5d63;
  --gold: #facc15; --gold-2: #ffe066; --gold-deep: #a8820a; --amber: #ff8a1f; --teal: #6fcab8; --danger: #ff5b4a;
  --line: rgba(209, 209, 209, .12); --line-gold: rgba(250, 204, 21, .28);
  --display: "Michroma", system-ui, sans-serif; --body: "Manrope", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 16px; --r-sm: 10px; --ease: cubic-bezier(.2, .8, .2, 1); --ease-out: cubic-bezier(.16, 1, .3, 1);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ink); color: var(--steel); font: 500 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { min-height: 100dvh; overflow-x: hidden; }
::selection { background: var(--gold); color: var(--ink); }
a { color: var(--gold); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- atmosphere layers ---------- */
.atmos { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.atmos--heat { background:
  radial-gradient(120% 60% at 50% 115%, rgba(255, 138, 31, .16), transparent 60%),
  radial-gradient(60% 40% at 50% 108%, rgba(250, 204, 21, .14), transparent 70%),
  radial-gradient(80% 60% at 50% -20%, rgba(209, 209, 209, .05), transparent 70%); }
.atmos--grain { opacity: .07; mix-blend-mode: overlay; animation: grain 1.2s steps(6) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes grain { 0%,100% { transform: translate(0,0) } 20% { transform: translate(-4%,3%) } 40% { transform: translate(3%,-5%) } 60% { transform: translate(-6%,-2%) } 80% { transform: translate(5%,4%) } }
.atmos--light { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(250, 204, 21, .07), transparent 60%); transition: background .2s; }
canvas.embers { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
main, .layer { position: relative; z-index: 1; }

/* ---------- type ---------- */
.display { font-family: var(--display); font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: #f1efe8; }
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
h1, h2, h3 { margin: 0; }

/* ---------- plates (panels) ---------- */
.plate { position: relative; background: linear-gradient(160deg, rgba(26, 26, 29, .92), rgba(11, 11, 13, .94));
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 24px 60px -30px rgba(0, 0, 0, .9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.plate--notch { clip-path: polygon(0 14px, 14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); border-radius: 0; }
.rivets::before, .rivets::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--mute); top: 10px; box-shadow: 0 0 0 1px #000; }
.rivets::before { left: 10px; } .rivets::after { right: 10px; }

/* ---------- buttons ---------- */
.btn { --bg: var(--gold); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px;
  padding: 0 22px; border: 0; border-radius: 12px; background: var(--bg); color: #0a0904; font: 700 13px/1 var(--display); letter-spacing: .12em;
  text-transform: uppercase; cursor: pointer; overflow: hidden; isolation: isolate; transition: transform .25s var(--ease), box-shadow .25s, filter .25s;
  box-shadow: 0 10px 30px -12px rgba(250, 204, 21, .55), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn:hover::after, .btn:focus-visible::after { transform: translateX(120%); }
.btn:active { transform: scale(.97); }
.btn:disabled { filter: grayscale(.8) brightness(.6); cursor: not-allowed; }
.btn--ghost { --bg: transparent; color: var(--steel); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.btn--danger { --bg: var(--danger); color: #fff; box-shadow: 0 10px 30px -14px rgba(255, 91, 74, .6); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 11px; border-radius: 10px; }
.btn--block { width: 100%; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
  color: var(--steel); cursor: pointer; transition: border-color .2s, color .2s, background .2s, transform .2s var(--ease); }
.iconbtn:hover { border-color: var(--line-gold); color: var(--gold); }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 22px; height: 22px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field > span { font: 500 10.5px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.input { width: 100%; min-height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(5, 5, 5, .6); color: #f2f0ea;
  font-size: 16px; /* 16px stops iOS zooming into the field */ outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(250, 204, 21, .12); }
.input--code { font: 600 22px/1 var(--mono); letter-spacing: .32em; text-align: center; text-transform: uppercase; }
textarea.input { min-height: 100px; padding: 12px 16px; resize: vertical; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5, 5, 5, .5); }
.seg button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); font: 600 12px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--gold); color: #0a0904; }
.check { display: flex; gap: 12px; align-items: center; padding: 12px 0; cursor: pointer; }
.check input { appearance: none; width: 46px; height: 26px; border-radius: 20px; background: var(--ink-4); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background .25s; flex: none; }
.check input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--steel-2); transition: transform .3s var(--ease), background .3s; }
.check input:checked { background: rgba(250, 204, 21, .25); border-color: var(--gold); }
.check input:checked::after { transform: translateX(20px); background: var(--gold); }
.err { color: var(--danger); font-size: 13px; min-height: 1.3em; margin: 4px 0 10px; }

/* ---------- toasts / modal ---------- */
.toasts { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 12px; background: rgba(18, 18, 20, .96); border: 1px solid var(--line-gold); color: #f1efe8; font-size: 14px;
  box-shadow: 0 20px 50px -20px #000; animation: toastIn .45s var(--ease-out) both; pointer-events: auto; }
.toast--bad { border-color: rgba(255, 91, 74, .5); }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
.scrim { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; background: rgba(0, 0, 0, .62); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); animation: fade .3s both; }
@media (min-width: 700px) { .scrim { place-items: center; } }
.sheet { width: min(100%, 520px); max-height: 92dvh; overflow: auto; padding: 22px 22px calc(22px + var(--safe-b)); border-radius: 22px 22px 0 0; animation: sheetIn .5s var(--ease-out) both; }
@media (min-width: 700px) { .sheet { border-radius: 22px; } }
.sheet h3 { font: 400 15px/1.3 var(--display); letter-spacing: .14em; text-transform: uppercase; color: #f1efe8; margin-bottom: 14px; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- right-click guard modal ---------- */
.guard { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .25s both; }
.guard__box { position: relative; padding: 26px 34px 24px; text-align: center; border-radius: 14px; background: linear-gradient(160deg, #141416, #070708);
  border: 1px solid var(--line-gold); box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), 0 30px 80px -20px rgba(250, 204, 21, .25); animation: sheetIn .45s var(--ease-out) both; }
.guard__box p { margin: 0; font: 400 13px/1.4 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.guard__x { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; border: 0; background: none; color: var(--dim); font-size: 20px; cursor: pointer; }
.guard__x:hover { color: var(--gold); }
.guard__bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--gold); animation: guardBar 6s linear forwards; }
@keyframes guardBar { from { width: 100%; } to { width: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* Small status tags: shared by the app and /commsadmn. */
.badge { display: inline-block; height: 18px; padding: 0 6px; border-radius: 6px; font: 600 9px/18px var(--mono); letter-spacing: .1em; text-transform: uppercase; background: rgba(5, 5, 5, .7); border: 1px solid var(--line); color: var(--steel-2); }
.badge--staff { color: var(--teal); border-color: rgba(111, 202, 184, .45); }
.badge--host, .badge--ai { color: var(--gold); border-color: var(--line-gold); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line); font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.chip--gold { border-color: var(--line-gold); color: var(--gold); }
.chip--warn { border-color: rgba(255, 138, 31, .5); color: var(--amber); }
.chip--red { border-color: rgba(255, 91, 74, .55); color: var(--danger); }
.chip--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); animation: led 2s infinite; }
@keyframes led { 50% { opacity: .35; } }
/* Icons inside text buttons: fixed size, never stretched by the button (the page-all bell rendered 100 px). */

/* wrapped labels (long Spanish strings on phones) need real line spacing; single-line buttons are unaffected */
.btn > span { line-height: 1.3; text-wrap: balance; padding: 6px 0; }
.btn svg { flex: none; width: 18px; height: 18px; }
.btn--sm svg { width: 16px; height: 16px; }
@media (max-width: 420px) { .seg button { font-size: 11px; letter-spacing: .05em; padding: 0 6px; } }

/* The single recording notice: small print, sentence case. Shown once per person as they first come in: invite name
   step, sign-up form, or (staff-created accounts) the first-time set-password screen. Nowhere else. */
.legal { margin: 14px 0 0; font: 400 11px/1.5 var(--body); letter-spacing: .01em; color: var(--dim); text-align: left; }
