/* ── ClawShip Skills — Shared Stylesheet ──
   Tokens aligned with main site (index.html)
*/

:root {
  --bg: #08090c;
  --bg-elevated: #0f1117;
  --bg-card: #13151c;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #e8e9ed;
  --text-muted: #7a7d89;
  --text-dim: #4a4d58;
  --accent: #ff4d4d;
  --accent-glow: rgba(255,77,77,0.15);
  --accent-bright: #ff6b6b;
  --accent-2: #00e5cc;
  --green: #22c55e;
  --green-glow: rgba(34,197,94,0.12);
  --cyan: #00e5cc;
  --cyan-glow: rgba(0,229,204,0.12);
  --mono: 'JetBrains Mono', monospace;
  --radius: 0px;
}

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

html { overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Noise overlay (matches main site) ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}

/* ── Glow orbs via CSS (no extra HTML needed) ── */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,77,77,0.08), transparent 70%);
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Fixed nav (matches main site) ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8,9,12,0.7);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  will-change: transform;
  animation: fadeDown 0.4s ease-out;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Logo (matches main site) ── */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px rgba(249,115,22,0.2));
}

.logo-icon svg { width: 100%; height: 100%; }

.logo-text {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
  color: var(--text);
}

.logo-text span { color: var(--accent); }

/* Legacy brand class (backwards compat) */
.brand {
  font-weight: 700;
  letter-spacing: -0.3px;
  font-size: 18px;
}
.brand span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--border);
}

.nav-cta {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  box-shadow: 0 0 20px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: background 0.15s, box-shadow 0.15s;
}

.nav-cta:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  box-shadow: 0 0 30px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ── Hero ── */
.hero {
  padding: 120px 0 48px; /* account for fixed nav */
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-2);
  box-shadow: 0 0 10px rgba(0, 229, 204, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 229, 204, 0.5); }
  50% { box-shadow: 0 0 20px rgba(0, 229, 204, 0.8); }
}

h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 5.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -1.2px;
}

h1 em {
  color: var(--accent);
  font-style: normal;
}

p.lead {
  margin: 0;
  max-width: 680px;
  color: var(--text-muted);
  line-height: 1.75;
  font-size: clamp(14px, 2vw, 17px);
}

/* ── Trust chips row (hero) ── */
.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
}

.trust-chip .dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  box-shadow: 0 0 6px var(--green-glow);
}

/* ── Sections ── */
.section {
  padding: 32px 0 24px;
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.9vw, 34px);
  letter-spacing: -0.7px;
}

.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 16px;
}

/* ── Grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* ── Cards (solid bg, matches main site) ── */
.card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 24px;
  transition: border-color 0.15s;
}

.card:hover {
  border-color: var(--border-hover);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.4px;
}

/* ── Skill cards (on directory) ── */
.skill-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.skill-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.skill-card .skill-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.skill-card .skill-creator {
  font-size: 12px;
  color: var(--text-dim);
}

.skill-card .skill-benefit {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.skill-card .skill-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.skill-card .skill-views {
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Meta row + chips ── */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 11px;
  padding: 5px 10px;
}

.chip.good {
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
  background: rgba(34, 197, 94, 0.06);
}

.chip.warn {
  border-color: rgba(255, 77, 77, 0.35);
  color: #ffc2c2;
  background: rgba(255, 77, 77, 0.06);
}

.chip.views {
  border-color: rgba(0, 229, 204, 0.25);
  color: var(--accent-2);
  background: rgba(0, 229, 204, 0.04);
}

/* ── Copy text ── */
.copy {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ── Path links ── */
.paths {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.path-link {
  display: inline-block;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 12px;
  padding: 8px 12px;
  transition: border-color 0.15s;
}

.path-link:hover {
  border-color: var(--border-hover);
}

/* ── Actions + Buttons ── */
.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--mono);
  padding: 14px 28px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.btn:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.04);
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn.primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  box-shadow: 0 4px 30px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn.small {
  padding: 8px 16px;
  font-size: 12px;
}

/* ── Lists ── */
.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.list li {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.list li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-2);
  margin-right: 10px;
  vertical-align: middle;
}

/* ── Route block (deprecated) ── */
.route {
  margin-top: 18px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 12px;
  padding: 11px 12px;
  overflow-x: auto;
}

/* ── Install flow ── */
.install-section {
  padding: 32px 0;
}

.install-section h2 {
  margin-bottom: 8px;
}

.install-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  margin-top: 16px;
}

.install-tab {
  flex: 1;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.install-tab:last-child { border-right: none; }

.install-tab.active {
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 600;
}

.install-tab:hover:not(.active) {
  background: rgba(255,255,255,0.02);
}

.install-block {
  margin-top: -1px;
}

.code-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 18px 20px;
}

.code-block code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent-2);
  white-space: nowrap;
  overflow-x: auto;
}

.install-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.copy-btn {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  padding: 8px 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: background 0.15s;
}

.copy-btn:hover {
  background: var(--accent-bright);
}

.copy-btn.copied {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
}

/* ── Submit CTA box ── */
.submit-cta {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 40px;
  text-align: center;
  margin-top: 24px;
}

.submit-cta h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.submit-cta .copy {
  margin-bottom: 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Creators compact grid ── */
.creator-compact {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 20px;
  text-align: center;
  transition: border-color 0.15s;
}

.creator-compact:hover {
  border-color: var(--border-hover);
}

.creator-compact .creator-handle {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.creator-compact .creator-count {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── Subscribe form ── */
.subscribe-section {
  text-align: center;
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
}

.subscribe-section h2 {
  margin: 0 0 8px;
}

.subscribe-section .copy {
  margin: 0 0 16px;
}

.subscribe-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
}

.subscribe-form input {
  flex: 1;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.subscribe-form input:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(0, 229, 204, 0.15);
}

.subscribe-form button {
  cursor: pointer;
  font-family: var(--mono);
}

.subscribe-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

.subscribe-error {
  margin-top: 10px;
  color: var(--accent);
  font-size: 13px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Footer ── */
footer {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  padding: 22px 0 40px;
  color: var(--text-muted);
  font-size: 12px;
}

footer a {
  color: var(--text);
  transition: color 0.15s;
}

footer a:hover {
  color: var(--accent);
}

/* ── Submission form ── */
.submit-form {
  max-width: 560px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(0, 229, 204, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237a7d89' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.form-success {
  color: var(--accent-2);
  font-size: 14px;
  margin-top: 12px;
}

.form-error {
  color: var(--accent);
  font-size: 13px;
  margin-top: 10px;
}

/* ── Steps row (submit page) ── */
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  margin: 32px 0;
}

.step {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
}

.step:last-child { border-right: none; }

.step-num {
  font-size: 11px;
  color: var(--accent-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 920px) {
  .grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .steps-row { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: none; }
}

@media (max-width: 760px) {
  .topbar { position: static; }
  .topbar-inner { align-items: flex-start; flex-direction: column; padding: 12px 0; }
  .nav { flex-wrap: wrap; }
  .hero { padding: 32px 0 24px; }
  .actions .btn,
  .nav-cta { width: 100%; text-align: center; }
  .subscribe-form {
    flex-direction: column;
  }
  .subscribe-form input,
  .subscribe-form button {
    width: 100%;
  }
  .install-tabs {
    flex-direction: column;
  }
  .install-tab {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .install-tab:last-child { border-bottom: none; }
  .code-block {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .code-block code {
    font-size: 12px;
  }
  .logo-icon { width: 28px; height: 28px; }
  .logo-text { font-size: 16px; }
}
