/* TKNQ site chrome — brand tokens, base, top nav, buttons, form fields, the
   contact dialog and the page footer. Shared by index.html (Home),
   products.html and pricing.html (ADR-142). Page sections live in their own
   files: coming-soon.css, pricing.css. Dark only, like the brand. */

:root {
  --bg: #0A0A0A;
  --surface: #141414;
  --surface-2: #1b1b1b;
  --red: #E21E26;          /* TKNQ brand red */
  --red-hover: #ff2b3a;
  --red-press: #b5141b;
  --red-tint: rgba(226, 30, 38, 0.12);
  --line: #232323;
  --line-2: #2f2f2f;
  --frame: #262626;
  --text: #FFFFFF;
  --text-2: #c9c9c9;
  --muted: #9a9a9a;
  --muted-2: #8f8f8f;
  --muted-3: #7d7d7d;
  --muted-4: #5f5f5f;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --display: 'Saira', sans-serif;
  --body: 'Barlow', sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1200px;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  font-family: var(--body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-hover); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--red);
  color: var(--text);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.skip-link:focus { top: 12px; color: var(--text); }

/* ---------- Top nav ---------- */

.site-nav {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--line);
}
.site-nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.site-nav-brand { margin-right: auto; display: block; line-height: 0; }
.site-nav-brand img { height: 22px; width: auto; }

.site-nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 26px;
  list-style: none;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0 5px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-nav-link:hover { color: var(--text); border-bottom-color: var(--line-2); }
.site-nav-link[aria-current='page'] { border-bottom-color: var(--red); }
.site-nav-link svg { transition: transform 0.15s; }
.site-nav-link[aria-expanded='true'] svg { transform: rotate(180deg); }

.site-nav-login {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 7px 14px;
}
.site-nav-login:hover { border-color: var(--text); background: rgba(255, 255, 255, 0.06); }

.nav-menu { position: relative; }
.nav-menu-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 12px;
  z-index: 40;
}
.nav-menu-panel[hidden] { display: none; }
.nav-menu-list {
  width: 270px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  list-style: none;
}
.nav-menu-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  color: var(--text);
}
.nav-menu-item:hover,
.nav-menu-item:focus-visible { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.nav-menu-item[aria-current='page'] .nav-menu-title { color: var(--red); }
.nav-menu-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-menu-desc { font-size: 14px; line-height: 18px; color: var(--muted); }

@media (max-width: 560px) {
  .site-nav-inner { padding-top: 16px; padding-bottom: 14px; }
  .site-nav-links { width: 100%; justify-content: space-between; gap: 6px 12px; }
  .site-nav-link { font-size: 12px; letter-spacing: 0.08em; }
  .site-nav-inner { position: relative; }
  .nav-menu { position: static; }
  .nav-menu-panel { left: var(--gutter); right: var(--gutter); transform: none; }
  .nav-menu-list { width: auto; max-width: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--red); color: var(--text); }
.btn-primary:hover { background: var(--red-hover); color: var(--text); }
.btn-primary:active { background: var(--red-press); }
.btn-secondary { border-color: rgba(255, 255, 255, 0.4); color: var(--text); }
.btn-secondary:hover { border-color: var(--text); background: rgba(255, 255, 255, 0.06); color: var(--text); }
.btn-ghost { color: var(--text-2); padding-inline: 10px; }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.btn-block { width: 100%; }

/* ---------- Form fields ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; color: var(--muted); }
.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--text);
  font: inherit;
  font-size: 16px;   /* below 16px iOS Safari zooms the page on focus */
}
.input::placeholder { color: #858585; }
.input:hover { border-color: #444; }
.input:focus-visible { outline: none; border-color: var(--red); }
textarea.input { min-height: 84px; resize: vertical; }

/* ---------- Contact dialog ---------- */

.contact-dialog {
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.contact-dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.contact-body { display: flex; flex-direction: column; gap: 16px; padding: 28px clamp(20px, 5vw, 32px); }
.contact-body[hidden],
.contact-intro[hidden] { display: none; }
.contact-kicker {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.contact-title {
  margin-top: 8px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.15;
  text-transform: uppercase;
}
.contact-intro { color: var(--text-2); font-size: 15px; line-height: 1.55; }
.contact-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.contact-note { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.contact-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.contact-error { color: #ff8a8f; font-size: 14px; }
.contact-error:empty { display: none; }
.contact-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Page footer ---------- */

.site-footer {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px var(--gutter) 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  color: var(--muted-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.site-footer a,
.site-footer button {
  color: var(--muted-3);
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.site-footer a:hover,
.site-footer button:hover { color: var(--muted); }

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