/* ==========================================================================
   Crowley's Instruments showcase — page-local styles
   Loaded after the shared site stylesheet. Every class is ci- prefixed so it
   cannot leak into other portfolio pages.
   ========================================================================== */

.ci-body {
  background: #ffffff;
  color: var(--text-primary);
}

.ci-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.ci-hero {
  padding: 9.5rem 0 3rem;
  background: #f4f7fb;
  border-bottom: 1px solid var(--glass-border);
}

.ci-kicker {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0d6f63;
  margin-bottom: 0.8rem;
}

.ci-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--navy);
  margin-bottom: 1rem;
}

.ci-sub {
  color: var(--text-secondary);
  font-size: 1.06rem;
  line-height: 1.7;
  max-width: 62ch;
}

.ci-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1.5rem;
}

.ci-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--gradient-accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.ci-btn:hover,
.ci-btn:focus {
  color: #ffffff;
  box-shadow: 0 8px 22px var(--accent-glow);
}

.ci-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--glass-border);
}

.ci-btn-ghost:hover,
.ci-btn-ghost:focus {
  border-color: var(--accent);
  color: var(--accent);
}

.ci-body a {
  text-decoration: none;
}

.ci-badges {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ci-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}

.ci-badge i {
  color: #0d6f63;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.ci-sec {
  padding: 4.5rem 0;
}

.ci-sec-alt {
  background: #f7f9fc;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.ci-h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 0.9rem;
}

.ci-lede {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.72;
  max-width: 68ch;
}

.ci-note {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Live demo stage
   -------------------------------------------------------------------------- */

.ci-stage {
  background: #0a0a0c;
  border: 1px solid rgba(15, 27, 45, 0.6);
  border-radius: var(--radius);
  overflow: hidden;
}

.ci-stage-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #b9c2cf;
  font-size: 0.85rem;
}

.ci-stage-bar .ci-mono {
  color: #7fd8db;
  letter-spacing: 0.04em;
}

.ci-stage-bar a {
  color: #eeeae3;
  border-bottom: 1px solid rgba(238, 234, 227, 0.4);
}

.ci-stage-bar a:hover,
.ci-stage-bar a:focus {
  color: #ffffff;
  border-color: #ffffff;
}

.ci-stage iframe {
  display: block;
  width: 100%;
  height: min(78vh, 760px);
  min-height: 560px;
  border: 0;
  background: #0a0a0c;
}

/* --------------------------------------------------------------------------
   Instrument list
   -------------------------------------------------------------------------- */

.ci-instruments {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.ci-instrument {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.ci-instrument h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.ci-instrument p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.ci-instrument code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: #0d6f63;
}

/* --------------------------------------------------------------------------
   Technique / data / code blocks
   -------------------------------------------------------------------------- */

.ci-steps {
  counter-reset: ci-step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.ci-steps li {
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.ci-steps li::before {
  counter-increment: ci-step;
  content: counter(ci-step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  color: var(--navy);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
}

.ci-code {
  background: #0f1b2d;
  color: #e6edf6;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  margin: 1.25rem 0;
}

.ci-code .ci-comment {
  color: #8fa3bd;
}

.ci-shot {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0a0c;
}

.ci-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.ci-shot-mobile {
  max-width: 300px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.ci-footer {
  background: var(--navy);
  color: #c7d2e0;
  padding: 1.75rem 0;
}

.ci-footer a {
  color: #ffffff;
}

.ci-footer a:hover,
.ci-footer a:focus {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .ci-hero {
    padding: 7.5rem 0 2.5rem;
  }

  .ci-sec {
    padding: 3.25rem 0;
  }

  .ci-stage iframe {
    height: 640px;
    min-height: 0;
  }
}
