/* ============================================================
   techtuate "Flow" shell - dark theme, silk backdrop, glass panels
   Shared by every page that has moved to the redesign.
   (Pages not yet migrated still use /assets/site.css.)
   Pair with /assets/backdrop.js on every page.
   ============================================================ */

/* ---------- fonts (self-hosted, latin subset, SIL OFL - see /assets/fonts/OFL.txt) ---------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/instrument-serif-latin-400-italic.woff2) format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/geist-latin-wght-normal.woff2) format('woff2');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/geist-mono-latin-wght-normal.woff2) format('woff2');
}

/* ---------- tokens ---------- */
:root {
  --bg: #06050a;
  --text: #f6f2ff;
  --body: #ece8f4;
  --text-2: #c9c2d8;
  --text-3: #aaa3ba;
  --muted: #8d879c;
  --faint: #6f6980;
  --accent: #ffd60a;
  --accent-hover: #fff1a8;
  --local: #8fe3c0;

  --glass: rgba(20,16,32,.55);
  --glass-card: rgba(22,18,34,.5);
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.12);
  --line-3: rgba(255,255,255,.16);

  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --f-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --pad-x: clamp(20px, 6vw, 96px);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img, svg { display: block; }
::selection { background: var(--accent); color: var(--bg); }
input, button, select, textarea { font: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted); }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.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;
}
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.accent { color: var(--accent); }

/* ---------- backdrop ---------- */
.tt-backdrop {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block;
  background: radial-gradient(120% 80% at 70% 20%, #2a1650 0%, #0d0818 50%, #06050a 100%);
}
.tt-vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(90% 70% at 50% 40%, rgba(6,5,10,0) 0%, rgba(6,5,10,.55) 100%);
}
.tt-page { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }
.tt-page > main { flex: 1; }

/* ---------- nav ---------- */
.tt-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(6,5,10,.72), rgba(6,5,10,0));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.tt-brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.tt-brand:hover { color: var(--text); }
.tt-dot {
  width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent); box-shadow: 0 0 18px 4px rgba(255,214,10,.55);
}
.tt-word {
  font-family: var(--f-display); font-size: 21px; font-weight: 700;
  letter-spacing: -0.03em; color: var(--text);
}
.tt-crumb {
  font-family: var(--f-serif); font-style: italic; font-size: 20px;
  color: var(--muted); margin-left: 2px; white-space: nowrap;
}
.tt-links { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 30px); font-size: 14.5px; }
.tt-links a { color: #bdb6cc; }
.tt-links a:hover { color: #fff; }
.tt-pill-search {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04);
  color: #bdb6cc; font-size: 14.5px; transition: border-color .2s;
}
.tt-pill-search:hover { border-color: rgba(255,214,10,.6); color: #fff; }
.tt-kbd {
  font-family: var(--f-mono); font-size: 11px; line-height: 1.4;
  color: var(--bg); background: var(--body); border-radius: 4px; padding: 1px 6px;
}
@media (max-width: 640px) {
  .tt-links .tt-hide-sm { display: none; }
  .tt-crumb { font-size: 17px; }
  .tt-kbd { display: none; }
}

/* ---------- shared type ---------- */
.eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 12px; margin: 0 0 20px;
}
.eyebrow .rule { width: 28px; height: 1px; background: var(--accent); flex: 0 0 auto; }
.panel-label {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; line-height: 1.2; font-weight: 500; white-space: nowrap;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s;
  background: none; color: var(--text); text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--bg); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); }
.btn-ghost { border-color: rgba(255,255,255,.2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-text { color: var(--text-2); padding-left: 14px; padding-right: 14px; }
.btn-text:hover { color: #fff; }
.btn-link {
  color: var(--text-2);
  text-decoration: underline; text-decoration-color: rgba(255,214,10,.5);
  text-underline-offset: 5px;
}
.btn-link:hover { color: #fff; }
.btn[disabled] { opacity: .5; cursor: default; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
  font-size: 13.5px; color: var(--text-2); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.chip:hover { border-color: rgba(255,214,10,.55); color: #fff; }

/* ---------- glass panels ---------- */
.glass {
  border-radius: 32px; padding: clamp(20px, 2.4vw, 32px);
  background: var(--glass); border: 1px solid rgba(255,255,255,.1);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
}

/* ---------- tool icon tile (tinted by --h1, set inline per tool) ---------- */
.ticon {
  position: relative; flex: 0 0 auto;
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.035);
  color: oklch(0.88 0.09 var(--h1, 48));
}
.ticon svg { width: 22px; height: 22px; }
.ticon.sm { width: 34px; height: 34px; border-radius: 11px; }
.ticon.sm svg { width: 18px; height: 18px; }
.ticon.xs { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.05); border: 0; }
.ticon.xs svg { width: 15px; height: 15px; }

/* ---------- FAQ accordion (details/summary so answers are real, visible HTML) ---------- */
.faq-item { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item h3 {
  margin: 0; font-family: var(--f-display); font-size: 21px; font-weight: 500;
  letter-spacing: -0.025em; line-height: 1.25; color: var(--text);
}
.faq-item summary::after { content: '+'; font-size: 22px; font-weight: 300; color: var(--accent); flex: 0 0 auto; line-height: 1; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p {
  margin: 12px 0 0; max-width: 560px; font-size: 15.5px; line-height: 1.65; color: var(--text-3);
  text-wrap: pretty;
}
@media (max-width: 640px) {
  .faq-item { padding: 15px 0; }
  .faq-item h3 { font-size: 17px; }
  .faq-item p { font-size: 14.5px; }
}

/* ---------- footer ---------- */
.tt-footer {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px;
  padding: 34px var(--pad-x) 40px;
  border-top: 1px solid var(--line); background: rgba(6,5,10,.9);
  font-size: 13.5px; color: var(--muted);
}
.tt-footer .tt-word { font-size: 15px; color: var(--body); }
.tt-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.tt-footer nav a { color: var(--muted); }
.tt-footer nav a:hover { color: #fff; }
.tt-footer nav a.coffee { color: var(--accent); }
.tt-footer nav a.coffee:hover { color: var(--accent-hover); }
.tt-footer .fine { flex-basis: 100%; font-size: 12px; color: var(--faint); margin: 0; max-width: 760px; line-height: 1.55; }

/* ---------- toast ---------- */
.tt-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 11px 20px; border-radius: 999px;
  background: var(--accent); color: var(--bg); font-weight: 600; font-size: 14.5px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.7);
  transition: opacity .25s, transform .25s;
}
.tt-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- keyframes ---------- */
@keyframes tt-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes tt-sweep {
  0% { transform: translateY(-10%); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(1000%); opacity: 0; }
}
@keyframes tt-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes tt-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
