/* ============================================================
   TRIDENT GLASS — canonical design framework for the Trident
   Studio fleet (tridentsocial.net).
   CANONICAL COPY: trident-social/design/trident-glass.css
   Product repos carry a verbatim copy; edit here, re-sync there.
   Spec + per-product accent map: design/DESIGN.md
   ============================================================
   Philosophy: professional minimalism on deep navy, with fast,
   responsive "liquid glass" surfaces — translucency, blur,
   specular light — and transform/opacity-only motion.
   Each product keeps its own identity via two accent variables:
     --tg-a1 / --tg-a2  (set on :root per product)
   Everything else is shared.
   ============================================================ */

:root {
  /* base palette (shared across the fleet) */
  --tg-bg: #070d16;
  --tg-bg2: #0b1422;
  --tg-ink: #e9f2fb;
  --tg-muted: #8fa5bc;
  --tg-line: rgba(148, 199, 255, .12);

  /* per-product accents — DEFAULT is the studio teal→cyan.
     Products override these two lines only (see DESIGN.md). */
  --tg-a1: #2dd4bf;
  --tg-a2: #38bdf8;

  /* derived */
  --tg-grad: linear-gradient(135deg, var(--tg-a1), var(--tg-a2));
  --tg-glow: color-mix(in srgb, var(--tg-a1) 22%, transparent);

  /* glass surfaces */
  --tg-glass: color-mix(in srgb, #0e1a2b 62%, transparent);
  --tg-glass-strong: color-mix(in srgb, #0e1a2b 82%, transparent);
  --tg-glass-edge: rgba(255, 255, 255, .08);
  --tg-specular: rgba(255, 255, 255, .13);

  /* type */
  --tg-display: 'Space Grotesk', 'Space Grotesk Fallback', ui-sans-serif, system-ui, sans-serif;
  --tg-body: 'Inter', 'Inter Fallback', ui-sans-serif, system-ui, sans-serif;

  /* geometry */
  --tg-r: 16px;
  --tg-r-lg: 22px;
  --tg-r-pill: 999px;

  /* motion — fast and springy; transform/opacity only */
  --tg-fast: 160ms;
  --tg-med: 320ms;
  --tg-ease: cubic-bezier(.33, 1, .48, 1);
  --tg-spring: cubic-bezier(.22, 1.2, .36, 1);
}

/* ---------- base ---------- */
.tg-body {
  margin: 0;
  color: var(--tg-ink);
  font-family: var(--tg-body);
  background:
    radial-gradient(1100px 520px at 12% -8%, color-mix(in srgb, var(--tg-a1) 9%, transparent), transparent 60%),
    radial-gradient(900px 520px at 95% 4%, color-mix(in srgb, var(--tg-a2) 8%, transparent), transparent 55%),
    linear-gradient(var(--tg-bg2), var(--tg-bg) 42%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ambient drifting glow blobs — GPU-cheap, transform-only.
   Add <div class="tg-ambient" aria-hidden="true"></div> once per page. */
.tg-ambient {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.tg-ambient::before, .tg-ambient::after {
  content: ""; position: absolute; width: 44vmax; height: 44vmax; border-radius: 50%;
  filter: blur(90px); opacity: .16; will-change: transform;
}
.tg-ambient::before {
  background: var(--tg-a1); top: -18vmax; left: -10vmax;
  animation: tg-drift-a 26s var(--tg-ease) infinite alternate;
}
.tg-ambient::after {
  background: var(--tg-a2); bottom: -20vmax; right: -12vmax;
  animation: tg-drift-b 32s var(--tg-ease) infinite alternate;
}
@keyframes tg-drift-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(9vmax, 7vmax, 0) scale(1.15); } }
@keyframes tg-drift-b { from { transform: translate3d(0,0,0) scale(1.1); } to { transform: translate3d(-8vmax, -6vmax, 0) scale(.95); } }

/* ---------- glass surfaces ---------- */
.tg-glass {
  background: var(--tg-glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--tg-glass-edge);
  box-shadow: inset 0 1px 0 var(--tg-specular), 0 8px 32px rgba(0, 0, 0, .35);
  border-radius: var(--tg-r);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tg-glass, .tg-nav { background: #0e1a2b; }
}

/* sticky glass navigation bar */
.tg-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--tg-bg) 66%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid var(--tg-line);
}
.tg-nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

/* brand lockup: product name + "TRIDENT STUDIO" kicker */
.tg-brand { font-family: var(--tg-display); font-weight: 700; font-size: 20px; letter-spacing: .02em; color: var(--tg-ink); text-decoration: none; }
.tg-brand small {
  display: block; font-family: var(--tg-body); font-weight: 500; font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--tg-muted);
}

/* ---------- cards ---------- */
.tg-card {
  position: relative; overflow: hidden;
  background: var(--tg-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--tg-glass-edge);
  box-shadow: inset 0 1px 0 var(--tg-specular), 0 6px 24px rgba(0, 0, 0, .3);
  border-radius: var(--tg-r);
  padding: 22px;
  color: var(--tg-ink); text-decoration: none;
  transition: transform var(--tg-fast) var(--tg-spring), border-color var(--tg-fast) var(--tg-ease), box-shadow var(--tg-fast) var(--tg-ease);
}
.tg-card:hover, .tg-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tg-a2) 45%, var(--tg-glass-edge));
  box-shadow: inset 0 1px 0 var(--tg-specular), 0 14px 40px rgba(0, 0, 0, .42), 0 0 0 1px var(--tg-glow);
}
/* specular sweep — a light band glides across on hover */
.tg-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .07) 50%, transparent 58%);
  transform: translateX(-120%); transition: transform var(--tg-med) var(--tg-ease);
}
.tg-card:hover::before { transform: translateX(120%); }

/* ---------- buttons ---------- */
.tg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--tg-display); font-weight: 600; font-size: 15px;
  padding: 11px 22px; border-radius: var(--tg-r-pill); cursor: pointer;
  text-decoration: none; border: 1px solid transparent; line-height: 1;
  transition: transform var(--tg-fast) var(--tg-spring), box-shadow var(--tg-fast) var(--tg-ease), border-color var(--tg-fast) var(--tg-ease), opacity var(--tg-fast) var(--tg-ease);
}
.tg-btn:active { transform: scale(.97); }
.tg-btn-primary { background: var(--tg-grad); color: #06121d; box-shadow: 0 4px 18px var(--tg-glow); }
.tg-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 26px var(--tg-glow); }
.tg-btn-ghost {
  background: color-mix(in srgb, #0e1a2b 55%, transparent); color: var(--tg-ink);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-color: var(--tg-glass-edge); box-shadow: inset 0 1px 0 var(--tg-specular);
}
.tg-btn-ghost:hover { border-color: color-mix(in srgb, var(--tg-a2) 45%, var(--tg-glass-edge)); transform: translateY(-1px); }

/* ---------- text helpers ---------- */
.tg-h1 { font-family: var(--tg-display); font-weight: 700; font-size: clamp(38px, 6vw, 60px); line-height: 1.06; letter-spacing: -.01em; margin: 0; }
.tg-h2 { font-family: var(--tg-display); font-weight: 700; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; margin: 0; }
.tg-kicker { font-family: var(--tg-display); font-weight: 600; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--tg-muted); }
.tg-grad-text { background: var(--tg-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tg-muted { color: var(--tg-muted); }

/* ---------- chips / badges ---------- */
.tg-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  padding: 5px 12px; border-radius: var(--tg-r-pill);
  color: var(--tg-ink);
  background: color-mix(in srgb, var(--tg-a1) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tg-a1) 32%, transparent);
}

/* ---------- forms ---------- */
.tg-input, .tg-select, .tg-textarea {
  width: 100%; box-sizing: border-box;
  font-family: var(--tg-body); font-size: 15px; color: var(--tg-ink);
  background: color-mix(in srgb, #0e1a2b 70%, transparent);
  border: 1px solid var(--tg-glass-edge); border-radius: 12px;
  padding: 11px 14px; outline: none;
  transition: border-color var(--tg-fast) var(--tg-ease), box-shadow var(--tg-fast) var(--tg-ease);
}
.tg-input:focus, .tg-select:focus, .tg-textarea:focus {
  border-color: color-mix(in srgb, var(--tg-a2) 55%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tg-a2) 18%, transparent);
}
.tg-input::placeholder, .tg-textarea::placeholder { color: color-mix(in srgb, var(--tg-muted) 75%, transparent); }
.tg-label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--tg-muted); margin: 0 0 6px; }

/* ---------- tables ---------- */
.tg-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tg-table th { font-family: var(--tg-display); font-weight: 600; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--tg-muted); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--tg-line); }
.tg-table td { padding: 12px 14px; border-bottom: 1px solid color-mix(in srgb, var(--tg-line) 55%, transparent); }
.tg-table tbody tr { transition: background var(--tg-fast) var(--tg-ease); }
.tg-table tbody tr:hover { background: color-mix(in srgb, var(--tg-a2) 5%, transparent); }

/* ---------- entrance motion ---------- */
@keyframes tg-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tg-fade { from { opacity: 0; } to { opacity: 1; } }
.tg-rise { animation: tg-rise .6s var(--tg-ease) both; }
.tg-rise-1 { animation: tg-rise .6s var(--tg-ease) .06s both; }
.tg-rise-2 { animation: tg-rise .6s var(--tg-ease) .12s both; }
.tg-rise-3 { animation: tg-rise .6s var(--tg-ease) .18s both; }

/* ---------- layout ---------- */
.tg-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.tg-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- footer ---------- */
.tg-footer { border-top: 1px solid var(--tg-line); margin-top: 72px; padding: 28px 0 40px; color: var(--tg-muted); font-size: 13.5px; }
.tg-footer a { color: var(--tg-muted); text-decoration: none; transition: color var(--tg-fast) var(--tg-ease); }
.tg-footer a:hover { color: var(--tg-ink); }

/* ---------- accessibility & performance ---------- */
:focus-visible { outline: 2px solid var(--tg-a2); outline-offset: 2px; }
/* Belt-and-braces: several products set `outline: none` on their own inputs.
   Restate the ring at higher specificity so form controls keep a visible focus
   indicator no matter what the product stylesheet does. */
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible, summary:focus-visible,
[tabindex]:focus-visible, [contenteditable]:focus-visible {
  outline: 2px solid var(--tg-a2); outline-offset: 2px;
}

/* Screen-reader-only text. Visible to assistive tech, invisible on screen.
   Use for the accessible name of an icon-only control, or a heading that the
   visual design carries typographically but not semantically. */
.tg-vh {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Skip-to-content link. First focusable element on the page; visually hidden
   until it takes keyboard focus, then it lands top-left over the nav.
   Markup: <a class="tg-skip" href="#main">Skip to content</a> immediately
   after <body>, with id="main" on the page's <main>. */
.tg-skip {
  position: absolute; left: 8px; top: 8px; z-index: 999;
  transform: translateY(-200%);
  background: var(--tg-grad); color: #06121d;
  font-family: var(--tg-display); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: var(--tg-r-pill); text-decoration: none;
  box-shadow: 0 4px 18px var(--tg-glow);
  transition: transform var(--tg-fast) var(--tg-ease);
}
.tg-skip:focus { transform: translateY(0); }
/* A <main> given tabindex="-1" so skip links and route changes can move focus
   into it — never show a focus ring for that programmatic focus. */
[tabindex="-1"]:focus { outline: none; }

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

/* ---------- mobile navigation ----------
   Below 720px the nav-link row had nowhere to go: it wrapped onto as many as
   seven lines and collided with the brand lockup, consuming 219px — 27% of a
   375x812 viewport — before any page content. Measured on the live site
   2026-08-23.

   These pages carry no navigation JS, so there is no hamburger to hang this
   off; the link row instead becomes a single horizontally scrollable line,
   which keeps every destination reachable without a script.

   Specificity here is deliberate. `.tg-nav-links` (0,1,0) is declared both in
   per-page <style> blocks and in work.css, either of which may come after this
   file; `.tg-nav .tg-nav-links` (0,2,0) wins regardless of source order. Do not
   simplify these selectors — the extra `.tg-nav` is load-bearing. */
@media (max-width: 720px) {
  .tg-nav .tg-nav-inner {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 16px;
  }
  .tg-nav .tg-brand { font-size: 17px; }
  .tg-nav .tg-brand small { font-size: 10px; letter-spacing: .14em; }

  /* links drop to their own full-width row beneath the brand, then scroll */
  .tg-nav .tg-nav-links {
    flex: 1 0 100%;
    flex-wrap: nowrap;
    gap: 18px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .tg-nav .tg-nav-links::-webkit-scrollbar { display: none; }
  .tg-nav .tg-nav-links > * { flex: 0 0 auto; }
  .tg-nav .tg-nav-links .tg-btn { padding: 7px 14px; font-size: 13px; }
}
