/*
  onlyutils landing page styles.
  Design tokens live at the top as CSS custom properties so the whole page's
  color/type/spacing system is visible and adjustable in one place.
*/

:root {
  /* ---- Surfaces: near-black scale, each step slightly lighter ---- */
  --bg: #08080b;
  --surface: #101016;
  --surface-raised: #17171f;
  --border: #232330;
  --border-strong: #322f45;

  /* ---- Text ---- */
  --text-primary: #f4f4f7;
  --text-secondary: #a5a5b6;
  --text-tertiary: #74748a;

  /* ---- The one saturated accent (electric violet-blue) plus its tints ---- */
  --accent: #7c5cff;
  --accent-strong: #9c86ff;
  --accent-dim: #5c46b8;
  --accent-glow: rgba(124, 92, 255, 0.35);
  --accent-wash: rgba(124, 92, 255, 0.1);

  /* Used sparingly: a single status green for "this is switched on" */
  --success: #34d399;
  --success-border: rgba(52, 211, 153, 0.35);
  --success-wash: rgba(52, 211, 153, 0.08);

  /* ---- Type: system stacks standing in for Inter / JetBrains Mono
     (no webfonts vendored, so we lean on each OS's closest match) ---- */
  --font-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* ---- Shape & rhythm ---- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shell-width: 1180px;
}

/* ---------- Reset & base ---------- */
* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Visible, high-contrast focus ring everywhere — never remove focus outlines */
:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Respect users who've asked for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip-to-content link: hidden until a keyboard user tabs to it */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0a0a0f;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* Centered content column reused by every section */
.shell {
  max-width: var(--shell-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Type scale ---------- */
h1, h2, h3 {
  font-family: var(--font-ui);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  margin: 0 0 1rem;
}

/* Small uppercase label used above section headings — a consistent
   structural device, not decoration: it always names the section's role. */
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 0.75rem;
}

.section-sub {
  max-width: 640px;
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
}
.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-ghost:hover {
  border-color: var(--accent);
}

.btn-lg {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

/* Small caption riding under a CTA label, e.g. "Portal — coming soon" */
.btn-note {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: 0;
}
.btn-primary .btn-note {
  color: var(--bg);
}

/* Status pill used on badges (env tag, roadmap tag) */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
}
.pill-env {
  color: var(--text-secondary);
}
.pill-roadmap {
  color: var(--accent-strong);
  border-color: var(--accent-dim);
  background: var(--accent-wash);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 8, 11, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
}
.logo-mark {
  color: var(--accent);
  flex-shrink: 0;
}
.logo-word {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.primary-nav a:hover {
  color: var(--text-primary);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Nav links + docs button hide on narrow screens to keep the header from wrapping */
@media (max-width: 760px) {
  .primary-nav,
  .header-cta .btn-ghost {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 4.5rem 0 5rem;
  /* A quiet accent glow behind the demo column — the only place gradients appear */
  background: radial-gradient(60% 50% at 82% 20%, var(--accent-wash), transparent 70%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.hero-sub {
  font-size: 1.1rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ---------- Signature moment: credential card + terminal ---------- */
.hero-demo {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.credential-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 30px 60px -30px var(--accent-glow);
}

.credential-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.credential-card-top h2 {
  font-size: 1rem;
  margin: 0;
}

.credential-fields {
  margin: 0 0 0.75rem;
  display: grid;
  gap: 0.9rem;
}
.credential-field {
  display: grid;
  gap: 0.25rem;
}
.credential-field dt {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.credential-field dd {
  margin: 0;
}
.credential-field code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  display: inline-block;
  color: var(--text-primary);
}

.secret-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.secret-value {
  letter-spacing: 0.08em;
}

.reveal-btn {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.reveal-btn:hover {
  border-color: var(--accent);
}
.reveal-btn[disabled] {
  cursor: default;
  color: var(--text-tertiary);
  border-color: var(--border);
}

.credential-hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 1.1rem;
}

.credential-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
}
.service-chip-on {
  color: var(--success);
  border-color: var(--success-border);
  background: var(--success-wash);
}
.service-chip-ghost {
  color: var(--text-tertiary);
  border-style: dashed;
}

/* ---------- Code / terminal blocks ---------- */
.code-block {
  background: #0a0a10;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.code-block-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: inline-flex;
  gap: 0.35rem;
}
.terminal-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  display: block;
}

.code-block-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  flex: 1;
}

.copy-btn {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}
.copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.code-block pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.c-comment {
  color: var(--text-tertiary);
}
.c-out {
  color: var(--accent-strong);
}
.c-key {
  color: var(--accent-strong);
}
.c-str {
  color: var(--success);
}

/* ---------- Service toggle section ---------- */
.services-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.toggle-grid {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 960px) {
  .toggle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .toggle-grid {
    grid-template-columns: 1fr;
  }
}

.toggle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.toggle-card p {
  font-size: 0.9rem;
  margin: 0;
}

.toggle-card-ghost {
  border-style: dashed;
  opacity: 0.7;
}

.toggle-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.toggle-card-name {
  font-weight: 650;
}

/* A small track-and-dot switch, drawn in CSS, no image needed */
.toggle-switch {
  --track-w: 34px;
  --track-h: 18px;
  width: var(--track-w);
  height: var(--track-h);
  border-radius: 999px;
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  position: relative;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.toggle-switch.is-on {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.toggle-switch.is-on::after {
  left: calc(var(--track-w) - 14px);
  background: #f4f4f7;
}

/* ---------- Flow / how-it-works ---------- */
.flow-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.flow-steps {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

@media (max-width: 760px) {
  .flow-steps {
    grid-template-columns: 1fr;
  }
}

.flow-steps li {
  border-left: 1px solid var(--border-strong);
  padding-left: 1.25rem;
}

/* These numbers label a real, order-dependent sequence (you cannot exchange
   a token before creating a client), so they carry information rather than
   decorate — see the writeup for why this differs from a generic 01/02/03. */
.flow-step-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-strong);
  margin-bottom: 0.5rem;
}

.flow-steps p {
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- MCP coming-soon section ---------- */
.mcp-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.mcp-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: center;
  border: 1px dashed var(--accent-dim);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  background: var(--accent-wash);
}

@media (max-width: 900px) {
  .mcp-inner {
    grid-template-columns: 1fr;
  }
}

.mcp-copy h2 {
  margin-top: 0.9rem;
}

.mcp-demo pre {
  font-size: 0.82rem;
}

/* ---------- Final CTA ---------- */
.cta-section {
  padding: 5.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-inner {
  max-width: 620px;
}
.cta-actions {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-brand p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}
.footer-inner nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.footer-inner nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.footer-inner nav a:hover {
  color: var(--text-primary);
}
.footer-copyright {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}
