/* Ticker Tap connector: shared styles.
   Visual language follows the SOF site: near-black ground, white type,
   #888 muted text, #0066ff accent, #323232 hairlines, dot pattern. */

@font-face {
  font-family: 'Alliance No.2';
  src: url('/fonts/Alliance_No.2_Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-003F, U+0041-10FFFF;
}

:root {
  --color-background: #0e0e0e;
  --color-foreground: #ffffff;
  --color-muted: #888888;
  --color-body: rgba(255, 255, 255, 0.72);
  --color-accent: #0066ff;
  --color-accent-text: #4d94ff; /* accent tint with enough contrast on #0e0e0e */
  --color-border: #323232;
  --color-surface: #161616;
  --color-chip: #282828;
  --font-primary: 'Alliance No.2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 16px;
  --header-h: 46px;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 64px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 120px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
  padding-top: var(--header-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; }

h1, h2, h3 {
  font-weight: 400;
  letter-spacing: 0;
  margin: 0;
  color: var(--color-foreground);
}

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.4em; }

a {
  color: var(--color-foreground);
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.3s ease, color 0.3s ease;
}
a:hover { text-decoration-color: var(--color-foreground); }

:focus-visible {
  outline: 2px solid var(--color-accent-text);
  outline-offset: 3px;
  border-radius: 2px;
}

code, .mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 100;
  background: #fff;
  color: #0a0a0a;
  padding: 8px 14px;
  border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* Dot pattern, as in the reference app.css */
.dot-pattern {
  background-image: repeating-conic-gradient(var(--color-border) 0% 25%, transparent 0% 50%);
  background-size: 4px 4px;
  background-position: 0 0;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--header-h);
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}
.site-header::before,
.site-header::after {
  content: '';
  display: none;
  position: absolute;
  top: 0;
  height: 100%;
  width: 1px;
  background: var(--color-border);
  z-index: 10;
}
@media (min-width: 1024px) {
  .site-header::before,
  .site-header::after { display: block; }
  .site-header::before { left: var(--gutter); }
  .site-header::after { right: var(--gutter); }
}

.site-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
}
.nav-left, .nav-right { display: flex; align-items: stretch; height: 100%; }

.wordmark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 0 12px 0 0;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .wordmark { padding: 0 18px; border-right: 1px solid var(--color-border); }
}
.wordmark .name { font-size: 14px; text-transform: uppercase; }
.wordmark .label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 2px 6px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  font-size: 11px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-foreground);
  overflow: hidden;
}
@media (min-width: 1024px) {
  .nav-link { padding: 0 18px; border-left: 1px solid var(--color-border); }
}
.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--color-surface);
  background-image: repeating-conic-gradient(#232323 0% 25%, transparent 0% 50%);
  background-size: 4px 4px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.nav-link:hover::before,
.nav-link:focus-visible::before { opacity: 1; }
.nav-link span { position: relative; z-index: 1; }
.nav-link[aria-current='page'] span { border-bottom: 1px solid var(--color-foreground); }
.nav-link:focus-visible { outline-offset: -3px; }

@media (max-width: 420px) {
  .wordmark .label { display: none; }
  .nav-link { padding: 0 9px; }
}

/* ===== Layout ===== */
.page-pad { padding-left: var(--gutter); padding-right: var(--gutter); }
.container { max-width: 1314px; margin: 0 auto; }

.section {
  padding: 56px var(--gutter);
  border-top: 1px solid var(--color-border);
}
@media (min-width: 768px) { .section { padding-top: 80px; padding-bottom: 80px; } }

.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: 28px; margin-bottom: 8px; }
@media (min-width: 768px) { .section-head h2 { font-size: 32px; } }

.kicker {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  margin: 0;
}

.lead {
  font-size: 16px;
  color: var(--color-body);
  max-width: 640px;
}
.prose p, .prose li { color: var(--color-body); }
.prose { max-width: 720px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 64vh;
  padding: 80px var(--gutter) 56px;
  overflow: hidden;
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40%;
  background: linear-gradient(to top, var(--color-background), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero h1 {
  font-size: 32px;
  line-height: 1.15;
  max-width: 14em;
  margin-bottom: 20px;
}
@media (min-width: 768px) { .hero h1 { font-size: 52px; } }
.hero .lead { margin-bottom: 28px; }

.url-chip {
  display: inline-block;
  background: var(--color-chip);
  color: #fff;
  border-radius: 4px;
  padding: 6px 12px;
  word-break: break-all;
  user-select: all;
}

/* ===== Buttons ===== */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 28px;
  font-family: inherit;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.3s ease;
}
.btn:hover { border-color: #fff; }
.btn-primary { background: #fff; color: #0a0a0a; border-color: #fff; }
.btn-primary:hover { box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 40px rgba(255, 255, 255, 0.2); }

/* ===== Cards (as pricings / careers cards) ===== */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.6) 0%, rgba(14, 14, 14, 0.95) 100%);
  border: 1px solid #313131;
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.4s linear;
}
.card:hover { border-color: #fff; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--color-body); margin: 0; }
.card .index {
  display: block;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.chips { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--color-chip);
  border-radius: 4px;
  padding: 6px 12px;
  margin: 0;
}

/* ===== Steps ===== */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px 16px;
  padding: 22px 0;
  margin: 0;
  border-top: 1px solid var(--color-border);
  counter-increment: step;
}
.steps li:last-child { border-bottom: 1px solid var(--color-border); }
.steps li::before {
  content: '(' counter(step) ')';
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--color-muted);
  padding-top: 4px;
}
.steps h3 { font-size: 18px; margin-bottom: 4px; }
.steps p { margin: 0 0 6px; color: var(--color-body); font-size: 14px; }
.steps p:last-child { margin-bottom: 0; }

/* ===== Can / cannot lists ===== */
.col-title {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 16px;
}
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li {
  padding: 12px 0;
  margin: 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-body);
  font-size: 14px;
}
.plain-list li:last-child { border-bottom: 1px solid var(--color-border); }

.note {
  border-left: 2px solid var(--color-accent);
  padding: 4px 0 4px 16px;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

/* ===== FAQ ===== */
.faq details { border-top: 1px solid var(--color-border); }
.faq details:last-child { border-bottom: 1px solid var(--color-border); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 32px 20px 0;
  position: relative;
  font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  font-size: 20px;
  line-height: 1;
}
.faq details[open] summary::after { content: '\2212'; color: #fff; }
.faq details p { padding: 0 0 20px; margin: 0; max-width: 720px; color: var(--color-body); font-size: 14px; }

/* ===== Document pages (privacy, terms) ===== */
.doc-hero {
  padding: 64px var(--gutter) 40px;
}
.doc-hero h1 { font-size: 32px; margin-bottom: 8px; }
@media (min-width: 768px) { .doc-hero h1 { font-size: 40px; } }
.doc-meta {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 14px var(--gutter);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-muted);
}
.doc-body { padding: 48px var(--gutter) 72px; }
.doc-body section { margin-bottom: 44px; max-width: 720px; }
.doc-body h2 { font-size: 22px; margin-bottom: 14px; }
@media (min-width: 768px) { .doc-body h2 { font-size: 26px; } }
.doc-body p, .doc-body li { color: var(--color-body); font-size: 14px; line-height: 1.7; }
.doc-body li { margin-bottom: 0.6em; }

.toc {
  list-style: none;
  padding: 0;
  margin: 0 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toc li { margin: 0; }
.toc a {
  display: inline-block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--color-chip);
  border-radius: 4px;
  padding: 6px 12px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}
.toc a:hover { background: #fff; color: #0a0a0a; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-background);
  padding: 40px var(--gutter);
}
.footer-inner { display: flex; flex-direction: column; gap: 20px; align-items: center; text-align: center; }
.footer-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: center; }
.footer-links li { margin: 0; }
.footer-links a { font-size: 11px; text-transform: uppercase; }
.footer-legal {
  max-width: 720px;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}
.footer-copy { margin: 0; font-size: 12px; color: rgba(255, 255, 255, 0.6); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

[data-gap="b16"] { margin-bottom: 16px; }
[data-gap="b20"] { margin-bottom: 20px; }
[data-gap="b32"] { margin-bottom: 32px; }
[data-gap="t32"] { margin-top: 32px; }
