/* ai-micro-pay shop styles: grokzilla premium dark refresh (Oct 2026).
 * Presentation only. Class names are a contract: panda-parkour (PR #50) lands on
 * .skill-card,.card,.checkout-card,.btn,.badge,.nav a,.code-block,.hero h1,table and footer.
 * Its canvas sits at z-index 5 and its toggle at 6, so nothing here goes above z-index 4. */
:root {
  /* brand (unchanged) */
  --accent: #6ee7ff;
  --accent-2: #a78bfa;
  --success: #34d399;
  --warning: #fbbf24;
  /* surfaces */
  --bg: #07080f;
  --bg-2: #0b0d18;
  --surface: #11131f;
  --surface-2: #161a2a;
  --glass: rgba(17, 19, 31, 0.72);
  --border: #252a3d;
  --border-hi: rgba(110, 231, 255, 0.35);
  --hairline: rgba(255, 255, 255, 0.06);
  /* text */
  --text: #e8ecf7;
  --text-2: #c4cadc;
  --muted: #9aa3bf;
  /* shape + rhythm */
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  --shadow-hi: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 40px -18px rgba(110, 231, 255, 0.28);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* type scale (minor third, fluid) */
  --step-0: clamp(0.98rem, 0.95rem + 0.15vw, 1.05rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.3vw, 1.3rem);
  --step-2: clamp(1.38rem, 1.25rem + 0.6vw, 1.7rem);
  --step-3: clamp(1.7rem, 1.45rem + 1.1vw, 2.3rem);
  --step-4: clamp(2.2rem, 1.7rem + 2.4vw, 3.6rem);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--step-0);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(110, 231, 255, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(167, 139, 250, 0.09), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(110, 231, 255, 0.28); color: var(--text); }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: #a5f0ff; }
strong { color: var(--text); font-weight: 600; }

/* Keyboard focus: always visible, brand cyan, never removed. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.glow { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.glow-1 { width: 520px; height: 520px; background: #1e3a5f; top: -220px; left: -120px; opacity: 0.45; }
.glow-2 { width: 420px; height: 420px; background: #3b1f6e; bottom: -120px; right: -90px; opacity: 0.4; }

.header, main, footer { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  background: var(--glass);
  border-bottom: 1px solid var(--hairline);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
}
.header::after { /* gradient hairline: the grokzilla cyan-to-violet signature */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 255, 0.55), rgba(167, 139, 250, 0.55), transparent);
  pointer-events: none;
}
@media (min-width: 768px) { .header { position: sticky; top: 0; z-index: 4; } }

.logo { display: flex; align-items: center; gap: 0.7rem; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; white-space: nowrap; }
.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2.1rem; height: 2.1rem;
  font-size: 1.15rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.18), rgba(167, 139, 250, 0.22));
  border: 1px solid rgba(110, 231, 255, 0.25);
  box-shadow: 0 0 18px -6px rgba(110, 231, 255, 0.55);
}
.logo-text .dot { color: var(--accent); font-weight: 500; }

.nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); border-color: var(--hairline); }

/* ------------------------------------------------------------------ main */
main { max-width: 1160px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 4vw, 2.5rem) 5rem; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }
main > section { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
main > section > h2 { font-size: var(--step-2); margin-bottom: 0.9rem; }
main > section > ul, main > section > ol { padding-left: 1.25rem; color: var(--text-2); display: grid; gap: 0.7rem; max-width: 72ch; }
main > section > ul li::marker { color: var(--accent); }

.hero { margin-bottom: clamp(3rem, 6vw, 4.5rem); max-width: 860px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(110, 231, 255, 0.07);
  border: 1px solid rgba(110, 231, 255, 0.2);
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
  color: var(--text); /* fallback where background-clip:text is unsupported */
  background: linear-gradient(120deg, #ffffff 0%, var(--text) 35%, var(--accent) 75%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.subtitle { color: var(--text-2); max-width: 64ch; font-size: var(--step-1); line-height: 1.6; margin-bottom: 1.5rem; }
main code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--accent);
  background: rgba(110, 231, 255, 0.07);
  border: 1px solid rgba(110, 231, 255, 0.14);
  padding: 0.05em 0.4em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.status-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.badge-live { background: rgba(52, 211, 153, 0.1); color: var(--success); border-color: rgba(52, 211, 153, 0.3); }
.badge-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge-dev { background: rgba(251, 191, 36, 0.1); color: var(--warning); border-color: rgba(251, 191, 36, 0.3); }
.badge-muted { color: var(--text-2); }
.mono { font-family: var(--mono); }

/* ----------------------------------------------------------------- cards */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.skill-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 40%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: var(--shadow);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.skill-card::before { /* top-edge sheen on hover / keyboard focus */
  content: "";
  position: absolute;
  inset: 0 18% auto 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 255, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}
.skill-card:hover, .skill-card:focus-within { border-color: var(--border-hi); box-shadow: var(--shadow-hi); transform: translateY(-3px); }
.skill-card:hover::before, .skill-card:focus-within::before { opacity: 1; }

.skill-icon {
  display: inline-grid;
  place-items: center;
  width: 3rem; height: 3rem;
  font-size: 1.6rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.1), rgba(167, 139, 250, 0.14));
  border: 1px solid var(--hairline);
}
.skill-icon:empty { display: none; } /* no glyph in the data: hide the tile instead of showing an empty box */
.skill-card h2 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.015em; }
.skill-card p { color: var(--muted); font-size: 0.93rem; line-height: 1.6; flex: 1; }

.skill-meta { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.85rem; border-top: 1px solid var(--hairline); }
.price { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.price small { font-size: 0.75rem; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }
main code.endpoint, .endpoint {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-2);
  background: rgba(7, 8, 15, 0.7);
  border: 1px solid var(--hairline);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  word-break: break-all;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.2;
  padding: 0.68rem 1.1rem;
  min-height: 2.5rem;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--bg);
  box-shadow: 0 8px 24px -12px rgba(110, 231, 255, 0.6);
  transition: filter 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.btn:hover { color: var(--bg); filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 12px 28px -12px rgba(110, 231, 255, 0.75); }
.btn:active { transform: translateY(0); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn-stripe { background: linear-gradient(135deg, #5851e8 0%, #6f5ff0 100%); color: #ffffff; box-shadow: 0 8px 24px -12px rgba(99, 91, 255, 0.7); }
.btn-stripe:hover { color: #ffffff; }
.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--text-2); border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { color: var(--text); border-color: var(--border-hi); background: rgba(110, 231, 255, 0.06); filter: none; box-shadow: none; }

/* -------------------------------------------------------------- checkout */
.checkout-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.checkout-card {
  max-width: 640px;
  width: 100%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}
.checkout-card .btn { margin-top: 1.5rem; }

.output {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: rgba(7, 8, 15, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--text-2);
}

/* -------------------------------------------------------------- partners */
.partner-section { margin-bottom: 3.5rem; }
.partner-section h2 { margin-bottom: 0.75rem; font-size: var(--step-2); }
.partner-section > .subtitle { margin-bottom: 1.5rem; }
.partner-card { border-color: rgba(167, 139, 250, 0.25); }
.partner-provider { margin-bottom: 0.25rem !important; font-size: 0.72rem !important; color: var(--accent-2) !important; text-transform: none !important; letter-spacing: 0.02em !important; }

/* ----------------------------------------------------------- agent panel */
.agent-section {
  position: relative;
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(110, 231, 255, 0.08), transparent 70%),
    radial-gradient(500px 220px at 100% 100%, rgba(167, 139, 250, 0.1), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}
.agent-section h2 { margin-bottom: 0.75rem; font-size: var(--step-2); }
.agent-section p { color: var(--text-2); margin-bottom: 1.25rem; max-width: 72ch; }

.code-block {
  font-family: var(--mono);
  font-size: 0.8rem;
  background: rgba(7, 8, 15, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  color: var(--text-2);
  line-height: 1.85;
  overflow-x: auto;
}

/* ---------------------------------------------------------------- footer */
footer {
  text-align: center;
  padding: 2.5rem 2rem 3rem;
  color: var(--muted);
  font-size: 0.86rem;
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, transparent, rgba(7, 8, 15, 0.6));
}
footer a { color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(196, 202, 220, 0.3); transition: color 0.2s var(--ease); }
footer a:hover { color: var(--accent); text-decoration-color: currentColor; }

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

/* ---------------------------------------------------------------- applet */
.applet-body { min-height: 100vh; }
.applet-shell { max-width: 760px; margin: 0 auto; padding: 2.5rem clamp(1.25rem, 4vw, 2rem); }
.applet-header { margin-bottom: 1.75rem; }
.applet-header h1 { font-size: var(--step-3); margin-bottom: 0.5rem; }
.applet-header p { color: var(--text-2); }
.applet-grid { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.applet-grid label { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.9rem; font-weight: 600; }
.applet-grid input, .applet-grid select, .applet-grid textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  color: var(--text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.applet-grid input:focus, .applet-grid select:focus, .applet-grid textarea:focus { border-color: var(--border-hi); box-shadow: 0 0 0 3px rgba(110, 231, 255, 0.15); }
.applet-results h2 { margin-bottom: 0.75rem; font-size: var(--step-1); }

/* ------------------------------------------------------------ docs pages */
main.doc-page { max-width: 820px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2rem) 5rem; }
.doc-content { line-height: 1.75; }
.doc-content h1 { font-size: var(--step-3); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 1rem; }
.doc-content h2 { font-size: var(--step-2); margin: 2.5rem 0 0.85rem; padding-top: 1.5rem; border-top: 1px solid var(--hairline); color: var(--text); }
.doc-content h2::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.6rem; vertical-align: 0.15em; border-radius: 2px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.doc-content h3 { font-size: var(--step-1); margin: 1.5rem 0 0.5rem; }
.doc-content p, .doc-content li { color: var(--text-2); margin-bottom: 0.7rem; }
.doc-content ol, .doc-content ul { padding-left: 1.4rem; }
.doc-content li::marker { color: var(--accent); }
.doc-content pre {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.7;
  background: rgba(7, 8, 15, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
}
.doc-content pre code { background: none; border: 0; padding: 0; color: var(--text-2); overflow-wrap: normal; }

/* ---------------------------------------------------------------- tables */
.pricing-table, .doc-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0 2rem;
  font-size: 0.93rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.pricing-table th, .pricing-table td, .doc-content th, .doc-content td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.pricing-table thead th, .doc-content thead th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.pricing-table tbody tr:last-child td, .doc-content tbody tr:last-child td { border-bottom: 0; }
.pricing-table tbody tr, .doc-content tbody tr { transition: background-color 0.15s var(--ease); }
.pricing-table tbody tr:hover, .doc-content tbody tr:hover { background: rgba(110, 231, 255, 0.04); }
.pricing-table td:nth-child(3) { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pricing-table a, .doc-content td a { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(110, 231, 255, 0.35); }
.pricing-table a:hover, .doc-content td a:hover { color: var(--accent); text-decoration-color: currentColor; }
.pricing-table code, .doc-content td code { font-size: 0.8rem; background: none; border: 0; padding: 0; color: var(--muted); }
main section:has(> .pricing-table), .doc-content:has(table) { overflow-x: auto; }

/* ---------------------------------------------------------------- mobile */
@media (max-width: 640px) {
  .header { flex-direction: column; gap: 0.75rem; align-items: flex-start; }
  .nav { gap: 0.15rem; margin-left: -0.75rem; }
  .skill-card { padding: 1.3rem; }
  .pricing-table th, .pricing-table td { padding: 0.7rem 0.75rem; }
}

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .skill-card:hover, .skill-card:focus-within, .btn:hover, .btn:active { transform: none; }
}

/* ------------------------------------------------- forced colours / HCM */
@media (forced-colors: active) {
  .hero h1 { background: none; -webkit-text-fill-color: currentColor; color: CanvasText; }
  .btn { border-color: ButtonText; }
}
