/* Trit website: shared tokens, header, footer, policy, contact and 404 styles.
   Colour values are the Trit CIS tokens (Config/design-tokens.json, Sources/TritDesign/TritTokens.swift).
   The site is dark only (owner decision, 2026-10-06): one token set, color-scheme dark.
   Home-only motion lives in home.css. */
:root {
  color-scheme: dark;
  --canvas: #0E1116;
  --surface: #161A21;
  --surface-raised: #1D222B;
  --surface-sunken: #0A0D11;
  --separator: #2A303B;
  --text-primary: #E7EAF0;
  --text-secondary: #A3ABB9;
  --text-tertiary: #7F889A;
  --accent: #7D97FF;
  --on-accent: #0B1230;
  --accent-subtle: #1B2447;
  --success: #4CC38A;
  --warning: #E8B04B;
  --danger: #FF7A7F;
  --diff-added: #12301F;
  --diff-added-emphasis: #1E5134;
  --diff-removed: #3A1518;
  --diff-hunk: #1A1F27;
  --lane-1: #7D97FF;
  --lane-2: #F28C4A;
  --lane-3: #3CC6B5;
  --lane-4: #E77CC4;
  --lane-5: #B7C94A;
  --keyword: #C59BF2;
  --glass: rgba(29, 34, 43, .72);
  --glass-edge: rgba(231, 234, 240, .14);
  --glass-highlight: rgba(255, 255, 255, .10);
  --shadow: 0 24px 60px rgba(2, 6, 18, .55);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 72px);
  --radius-control: 8px;
  --radius-container: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
/* Owner decision: no text selection or highlight anywhere on the site. Clicks, links, buttons and
   keyboard focus rings are unaffected; images and SVG cannot be dragged or long-pressed. */
html, body { -webkit-user-select: none; user-select: none; }
img, svg, picture { -webkit-touch-callout: none; -webkit-user-drag: none; }
a, button, summary, [role="button"] { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--text-primary);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* Header: brand only, like every page of the site. */
.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 10px var(--gutter);
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: inherit;
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -.01em;
  text-decoration: none;
}
.site-header__brand img { flex: none; width: 28px; height: 28px; border-radius: 7px; }
.site-header[tabindex="-1"]:focus { outline: none; }

/* Footer: copyright plus contact and policy links, 44px touch targets. */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 28px;
  padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--separator);
  color: var(--text-secondary);
  font-size: 13px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; margin-left: auto; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-footer a:hover { color: var(--text-primary); }
.site-footer a[aria-current="page"] { color: var(--text-primary); }

/* App Store badge: Apple's unaltered artwork, shown disabled until the app is live.
   Height stays at or above Apple's 40px on-screen minimum with a quarter-height clear space. */
.store {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.store__badge {
  display: block;
  margin: 0;
  padding: 10px;
  margin-left: -10px;
  border: 0;
  background: none;
  cursor: not-allowed;
}
.store__badge img { width: auto; height: 48px; opacity: .55; }
.store__status {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

/* Policy pages */
.policy-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.policy { flex: 1; width: 100%; padding: 40px var(--gutter) 120px; overflow-wrap: anywhere; }
.policy article { max-width: 68ch; margin: 0 auto; }
.policy h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; }
.policy__meta { margin: 16px 0 40px; color: var(--text-secondary); font-size: 15px; }
.policy h2 {
  margin: 48px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--separator);
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.policy p, .policy li { color: var(--text-primary); font-size: 16px; line-height: 1.7; }
.policy p { margin: 0 0 14px; }
.policy ul { margin: 0 0 16px; padding-left: 1.3em; }
.policy li { margin-bottom: 8px; }
.policy code { font: 15px/1 var(--mono); }
.policy article a { color: var(--accent); text-underline-offset: 3px; }
.policy article a:hover { text-decoration-thickness: 2px; }

/* Contact page: main fills the space between the header and the footer (body is a min-100svh flex
   column, so a short page pins the footer to the viewport bottom), and the content rows are centred
   in it with equal padding above and below. As a flex item main never shrinks below its content, so
   taller content scrolls normally instead of overlapping the header or footer. */
.contact {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(32px, 7vw, 120px);
  align-items: start;
  align-content: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px var(--gutter);
}
.contact h1 { margin: 0; font-size: clamp(40px, 6vw, 76px); line-height: 1.02; letter-spacing: -.04em; font-weight: 700; }
.contact__lead { max-width: 30em; margin: 24px 0 0; color: var(--text-secondary); font-size: 19px; }
.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  margin-top: 36px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  font-size: 17px;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.contact__mail:hover { transform: translateY(-1px); }
.contact__mail:active { transform: scale(.98); }
.contact__checklist { padding-top: 8px; border-top: 1px solid var(--separator); }
.contact__checklist h2 { margin: 18px 0 12px; font-size: 19px; letter-spacing: -.01em; }
.contact__checklist ul { margin: 0; padding-left: 1.2em; color: var(--text-secondary); }
.contact__checklist li { margin-bottom: 10px; }
.contact__checklist p { margin: 20px 0 0; color: var(--text-secondary); font-size: 15px; }
.contact__checklist strong { color: var(--text-primary); }

/* 404 */
.not-found { flex: 1; display: grid; place-content: center; justify-items: center; gap: 20px; padding: 48px var(--gutter); text-align: center; }
.not-found h1 { margin: 0; max-width: 14ch; font-size: clamp(34px, 6vw, 56px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; text-wrap: balance; }
.not-found p { margin: 0; color: var(--text-secondary); }
.not-found a.not-found__home { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; text-underline-offset: 4px; }

@media (max-width: 760px) {
  /* Phones: at least 32px side inset (the gutter is 16-19.5px there), close to the hero copy's
     smallest phone margin (29.6px at 320px); from 640px up 5vw is already 32px or more. */
  .contact { grid-template-columns: 1fr; padding-block: 32px; padding-inline: max(32px, var(--gutter)); }
  .contact__lead { font-size: 17px; }
  .contact__mail { width: 100%; justify-content: center; }
  .site-footer { flex-direction: column; justify-content: center; text-align: center; padding-top: 12px; }
  .site-footer nav { margin-left: 0; justify-content: center; gap: 0 clamp(14px, 6vw, 28px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

