/* Capy site — custom visual primitives.
 *
 * Loaded via extra_css in mkdocs.yml. Anything visual that doesn't
 * belong in stock Markdown lives here: phone frames, browser frames,
 * terminal frames, audience cards, side-by-side comparison grids.
 *
 * Designed to look credible on the dark Material theme; falls back
 * gracefully on light.
 */

/* ─── Layout helpers ─────────────────────────────────────────────── */

.capy-hero {
  background:
    radial-gradient(900px circle at 80% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(700px circle at 0% 110%, rgba(34, 211, 238, 0.10), transparent 50%);
  border-radius: 16px;
  padding: 28px 36px 36px;
  margin: 16px 0 32px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.capy-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--md-accent-fg-color, #4dd2c0);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.18);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* Section heading with eyebrow + lead paragraph. */
.capy-section { margin: 56px 0 24px; }
.capy-section h2 {
  font-size: 30px !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px !important;
}
.capy-section .lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--md-default-fg-color--light, #b0b6c0);
  max-width: 720px;
  margin: 0 0 24px;
}

/* ─── Grid for big visual cards ─────────────────────────────────── */

.show-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 16px 0;
}
.show-card {
  background: var(--md-code-bg-color, #161b22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.show-card-head {
  padding: 14px 18px 0;
}
.show-card-eyebrow {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--md-accent-fg-color, #4dd2c0);
}
.show-card h3 {
  margin: 4px 0 2px !important;
  font-size: 18px !important;
  font-weight: 600;
}
.show-card p {
  margin: 4px 0 14px;
  color: var(--md-default-fg-color--light);
  font-size: 14px;
  line-height: 1.5;
}
.show-card .canvas {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(0,0,0,0.20), rgba(0,0,0,0));
  padding: 18px;
  display: grid;
  place-items: center;
  min-height: 220px;
}
.show-card .footer {
  padding: 10px 18px 14px;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0,0,0,0.15);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.show-card .footer code {
  background: rgba(0,0,0,0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* ─── iPhone-style phone frame ──────────────────────────────────── */

.phone-frame {
  width: 280px;
  height: 560px;
  background: #0a0a0a;
  border-radius: 36px;
  padding: 10px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
}
.phone-frame::before {
  /* notch */
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 22px;
  background: #0a0a0a;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 26px;
  background: white;
  display: block;
}
.phone-frame.android {
  border-radius: 18px;
}
.phone-frame.android::before { display: none; }
.phone-frame.android iframe {
  border-radius: 10px;
}

/* ─── Browser-window frame ─────────────────────────────────────── */

.browser-frame {
  width: 100%;
  max-width: 720px;
  background: #1f2329;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
}
.browser-frame .chrome {
  background: #2a2f36;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #8b949e;
}
.browser-frame .lights {
  display: inline-flex;
  gap: 6px;
}
.browser-frame .lights span {
  width: 12px; height: 12px; border-radius: 50%;
  display: inline-block;
}
.browser-frame .lights .r { background: #ff5f57; }
.browser-frame .lights .y { background: #ffbd2e; }
.browser-frame .lights .g { background: #28c940; }
.browser-frame .url {
  flex: 1; text-align: center;
  background: rgba(0,0,0,0.25);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.browser-frame iframe {
  display: block;
  width: 100%;
  height: 440px;
  border: 0;
  background: white;
}

/* ─── Terminal frame ──────────────────────────────────────────── */

.terminal-frame {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}
.terminal-frame .chrome {
  background: #161b22;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid #30363d;
}
.terminal-frame .chrome .title {
  flex: 1; text-align: center;
  font-family: ui-monospace, monospace;
  font-size: 12px; color: #8b949e;
}
.terminal-frame pre {
  margin: 0;
  padding: 18px 22px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #c9d1d9;
  background: transparent;
  white-space: pre-wrap;
}
.terminal-frame .ok { color: #3fb950; }
.terminal-frame .err { color: #f85149; }
.terminal-frame .warn { color: #d29922; }
.terminal-frame .muted { color: #8b949e; }
.terminal-frame .cursor::after {
  content: "▌";
  color: #58a6ff;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ─── File-tree column inside a card ─────────────────────────── */

.file-tree {
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #b0b6c0;
  background: #0d1117;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #30363d;
  overflow: auto;
}
.file-tree .dir { color: #58a6ff; }
.file-tree .file { color: #c9d1d9; }
.file-tree .gen { color: #3fb950; }
.file-tree .indent { color: #30363d; }

/* ─── Side-by-side framework cards ─────────────────────────── */

.fw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.fw-card {
  background: #161b22;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.fw-card .head {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
}
.fw-card .head .ext {
  float: right;
  color: var(--md-default-fg-color--light);
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.fw-card pre {
  margin: 0;
  padding: 12px 14px !important;
  font-size: 11.5px !important;
  line-height: 1.5;
  background: transparent !important;
  max-height: 300px;
  overflow: auto;
}
.fw-card.react .head { color: #61dafb; }
.fw-card.vue .head { color: #42b883; }
.fw-card.svelte .head { color: #ff3e00; }

/* ─── Audience cards ────────────────────────────────────────── */

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.audience-card {
  background: linear-gradient(160deg, rgba(99,102,241,0.06), transparent 50%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 20px 22px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.audience-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.4);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.08), transparent 50%);
}
.audience-card .role {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--md-accent-fg-color);
  margin-bottom: 8px;
}
.audience-card h4 {
  margin: 4px 0 8px !important;
  font-size: 17px !important;
  font-weight: 600;
}
.audience-card p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--md-default-fg-color--light);
}
.audience-card a {
  font-size: 13px;
  color: var(--md-accent-fg-color);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ─── Spec / vital-stats strip ──────────────────────────────── */

.vitals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 18px 0 22px;
}
.vital {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 14px 16px;
}
.vital .num {
  font-size: 26px;
  font-weight: 700;
  color: var(--md-accent-fg-color);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.vital .label {
  font-size: 12px;
  color: var(--md-default-fg-color--light);
  margin-top: 2px;
}

/* ─── Pull-quote ───────────────────────────────────────────── */

.pullquote {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--md-default-fg-color);
  border-left: 4px solid var(--md-accent-fg-color);
  padding: 6px 0 6px 20px;
  margin: 28px 0;
  max-width: 760px;
}
.pullquote .who { font-size: 13px; color: var(--md-default-fg-color--light); margin-top: 8px; font-weight: 400; }

/* ─── Two-column row (text | visual) ───────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  margin: 32px 0;
}
.split.flip { grid-template-columns: 1fr 1fr; }
.split .visual { display: flex; justify-content: center; }
@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; }
}

/* ─── Make stock Material content look a bit more premium ── */

.md-typeset h2 { letter-spacing: -0.01em; }
.md-typeset .grid.cards>ol>li,
.md-typeset .grid.cards>ul>li {
  border-radius: 12px;
}
