/* Technology Cycle — Design Tokens */
:root {
  /* Brand */
  --brand-blue: #2662AE;
  --brand-cyan: #5BC5E3;
  --brand-mid: #6B8BC5;
  --brand-purple: #7B5DAD;
  --brand-electric: #3B82F6;
  --brand-success: #10B981;

  /* Gradient ref */
  --logo-gradient: linear-gradient(135deg, #5BC5E3 0%, #7FB8D4 22%, #6B8BC5 50%, #5A6DBB 78%, #7B5DAD 100%);
  --logo-gradient-soft: linear-gradient(135deg, rgba(91,197,227,0.6), rgba(123,93,173,0.6));

  /* Type */
  --font-display: 'Geist', 'Inter', -apple-system, system-ui, sans-serif;
  --font-body: 'Geist', 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Dark theme (default) */
:root, [data-theme="dark"] {
  --bg: #07090f;
  --bg-elevated: #0c1019;
  --bg-inset: #060810;
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #f5f7fb;
  --text-muted: rgba(245,247,251,0.62);
  --text-dim: rgba(245,247,251,0.42);
  --text-inverse: #07090f;
  --accent: #5BC5E3;
  --accent-2: #7B5DAD;
  --cta: #ffffff;
  --cta-ink: #07090f;
  --glow-cyan: rgba(91,197,227,0.22);
  --glow-purple: rgba(123,93,173,0.22);
  --grid-line: rgba(255,255,255,0.045);
}

[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-elevated: #ffffff;
  --bg-inset: #eef1f6;
  --surface: rgba(7,9,15,0.025);
  --surface-hover: rgba(7,9,15,0.05);
  --border: rgba(7,9,15,0.08);
  --border-strong: rgba(7,9,15,0.16);
  --text: #0b0e16;
  --text-muted: rgba(11,14,22,0.62);
  --text-dim: rgba(11,14,22,0.42);
  --text-inverse: #ffffff;
  --accent: #2662AE;
  --accent-2: #7B5DAD;
  --cta: #0b0e16;
  --cta-ink: #ffffff;
  --glow-cyan: rgba(91,197,227,0.18);
  --glow-purple: rgba(123,93,173,0.14);
  --grid-line: rgba(7,9,15,0.055);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 16px;
  transition: background 0.25s var(--ease-out), color 0.18s var(--ease-out);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
svg { display: block; }
img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: var(--text-inverse); }

/* Utility classes */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 960px; margin: 0 auto; padding: 0 32px; }

.mono { font-family: var(--font-mono); font-feature-settings: "ss01", "zero"; }
/* Accent emphasis — bold gradient fill (was thin serif italic, swapped per brand feedback) */
.serif, .accent-em {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.025em;
  background: var(--logo-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.02em;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.gradient-text {
  background: var(--logo-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 7.5vw, 108px); font-weight: 450; }
h2 { font-size: clamp(36px, 4.4vw, 64px); font-weight: 450; }
h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 500; letter-spacing: -0.02em; }
p  { text-wrap: pretty; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--cta); color: var(--cta-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-sm { padding: 10px 16px; font-size: 13px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease-out);
}
.card:hover { border-color: var(--border-strong); background: var(--surface-hover); }

/* Section */
section { position: relative; }
.section-pad { padding: 120px 0; }
.section-pad-sm { padding: 72px 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

/* Reveal animation — content visible by default; observer adds .in to trigger
   a subtle lift. If JS or IO fails, sections stay visible. */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
@media (prefers-reduced-motion: no-preference) {
  /* Only apply the hidden-then-reveal choreography when the script has marked
     the document as JS-enabled. The class is added by chrome.jsx on mount. */
  html[data-reveal-ready="1"] .reveal:not(.in) {
    opacity: 0;
    transform: translateY(18px);
  }
}
.reveal.in { opacity: 1; transform: none; }

/* Grid backdrop */
.grid-bg {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center center;
}

/* TC Logo mark — rendered inline via TCMark component.
   The SVG carries its own width/height attributes; no size override here. */
.tc-mark { display: inline-flex; flex: none; }

/* Tag / chip */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-success); box-shadow: 0 0 8px var(--brand-success); }

/* Dividers */
.rule { height: 1px; background: var(--border); width: 100%; }

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Label mono */
.label-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
