/* ============================================================
   Developer portal — alineado al sistema visual de +Simple
   Usa los tokens definidos en /style.css (v2): --primary,
   --text-primary, --text-secondary, --bg, --bg-soft, --border,
   --border-strong, --surface-2, --radius-md, --shadow-*, etc.
   Tipografía Inter + JetBrains Mono para código.
   ============================================================ */

:root {
    --dev-sidebar-width: 268px;
    --dev-content-max: 920px;
    --dev-code-bg: #0b1220;
    --dev-code-fg: #e2e8f0;
    --dev-code-border: rgba(148, 163, 184, 0.18);
    --dev-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --dev-method-get: #10b981;
    --dev-method-post: #3b82f6;
    --dev-method-put: #f59e0b;
    --dev-method-patch: #f59e0b;
    --dev-method-delete: #ef4444;
}

/* ============================================================
   Hero (más sobrio que el del landing — documentación)
   ============================================================ */
.dev-hero {
    position: relative;
    padding: 8rem 0 3.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.dev-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px circle at 10% -10%, rgba(37, 99, 235, 0.08), transparent 45%),
        radial-gradient(700px circle at 100% 0%, rgba(37, 99, 235, 0.05), transparent 45%);
    pointer-events: none;
}

.dev-hero-inner {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.dev-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--dev-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.dev-eyebrow::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.dev-hero h1 {
    font-size: clamp(2.25rem, 4.4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.dev-lead {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 720px;
    line-height: 1.55;
    margin: 0;
}

/* ============================================================
   Sub-nav (tabs entre API Reference / Guía / MCP)
   ============================================================ */
.dev-subnav {
    position: sticky;
    top: 72px;
    z-index: 10;
    background: var(--bg-glass, rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.dev-subnav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow-x: auto;
}

.dev-subnav a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.95rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.dev-subnav a:hover {
    color: var(--text-primary);
}

.dev-subnav a.is-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.dev-subnav .dev-tag {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--primary-50);
    color: var(--primary);
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--primary-100);
}

/* ============================================================
   Landing cards (developers/index.html)
   ============================================================ */
.dev-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 3rem 0 1.5rem;
}

.dev-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.85rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dev-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.dev-card[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.dev-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-50);
    color: var(--primary);
}

.dev-card-icon svg {
    width: 20px;
    height: 20px;
}

.dev-card h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.dev-card p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.94rem;
}

.dev-card-cta {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ============================================================
   Two-column shell (api-reference)
   ============================================================ */
.dev-shell-section {
    background: var(--bg);
    padding: 2.5rem 0 5rem;
}

.dev-shell {
    display: grid;
    grid-template-columns: var(--dev-sidebar-width) minmax(0, 1fr);
    gap: 3rem;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
    align-items: start;
}

@media (max-width: 960px) {
    .dev-shell {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.dev-sidebar {
    position: sticky;
    top: 132px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: 0.5rem;
    font-size: 0.9rem;
}

@media (max-width: 960px) {
    .dev-sidebar {
        position: static;
        max-height: none;
    }
}

.dev-sidebar h4 {
    margin: 1.75rem 0 0.5rem;
    font-family: var(--dev-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.dev-sidebar h4:first-child {
    margin-top: 0;
}

.dev-sidebar a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.3;
    transition: background 0.12s ease, color 0.12s ease;
}

.dev-sidebar a:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.dev-sidebar a.is-active {
    background: var(--primary-50);
    color: var(--primary);
    font-weight: 500;
}

/* ============================================================
   Method tags (GET, POST, etc.)
   ============================================================ */
.dev-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--dev-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    background: var(--surface-2);
    color: var(--text-primary);
    min-width: 52px;
    text-transform: uppercase;
}

.dev-method--get    { background: rgba(16, 185, 129, 0.12); color: var(--dev-method-get); }
.dev-method--post   { background: rgba(59, 130, 246, 0.12); color: var(--dev-method-post); }
.dev-method--put,
.dev-method--patch  { background: rgba(245, 158, 11, 0.14); color: var(--dev-method-put); }
.dev-method--delete { background: rgba(239, 68, 68, 0.12); color: var(--dev-method-delete); }

/* ============================================================
   Endpoint detail
   ============================================================ */
.dev-content {
    max-width: var(--dev-content-max);
}

.dev-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.dev-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2.5rem 0 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.dev-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--text-primary);
}

.dev-content p {
    color: var(--text-secondary);
    line-height: 1.65;
}

.dev-content a:not(.dev-card):not(.dev-card-cta) {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-100);
    transition: border-color 0.15s ease;
}

.dev-content a:not(.dev-card):not(.dev-card-cta):hover {
    border-bottom-color: var(--primary);
}

.dev-endpoint-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0 1.25rem;
    flex-wrap: wrap;
}

.dev-endpoint-path {
    font-family: var(--dev-mono);
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-all;
    padding: 0.3rem 0.6rem;
    background: var(--surface-2);
    border-radius: 6px;
}

.dev-summary {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0 0 1rem;
}

.dev-description {
    white-space: pre-line;
    line-height: 1.65;
    color: var(--text-secondary);
}

.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--dev-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary);
    border: 1px solid var(--primary-100);
}

.dev-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.92rem;
}

.dev-table th,
.dev-table td {
    text-align: left;
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.dev-table th {
    color: var(--text-secondary);
    font-family: var(--dev-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dev-table code {
    font-size: 0.85em;
    font-family: var(--dev-mono);
}

.dev-required {
    font-family: var(--dev-mono);
    font-size: 0.62rem;
    color: #ef4444;
    font-weight: 600;
    margin-left: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================================
   Code blocks (dark surface sobre light page)
   ============================================================ */
.dev-code-block {
    position: relative;
    margin: 1rem 0;
}

.dev-code {
    background: var(--dev-code-bg);
    color: var(--dev-code-fg);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    font-family: var(--dev-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    border: 1px solid var(--dev-code-border);
}

.dev-code-block .dev-copy {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    background: rgba(148, 163, 184, 0.12);
    color: var(--dev-code-fg);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    padding: 0.3rem 0.65rem;
    font-family: var(--dev-mono);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 0.15s ease;
}

.dev-code-block .dev-copy:hover {
    background: rgba(148, 163, 184, 0.22);
}

.dev-code-block .dev-copy.is-copied {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
}

.dev-content code {
    font-family: var(--dev-mono);
    background: var(--surface-2);
    padding: 0.12rem 0.4rem;
    border-radius: 5px;
    font-size: 0.86em;
    color: var(--text-primary);
}

/* ============================================================
   Quickstart steps (guia)
   ============================================================ */
.dev-step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 1.5rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

.dev-step:last-child {
    border-bottom: none;
}

.dev-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-family: var(--dev-mono);
    font-weight: 700;
    font-size: 1.05rem;
}

.dev-step h2 {
    margin: 0 0 0.5rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.dev-step p {
    margin: 0 0 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.dev-callout {
    background: var(--primary-50);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 0.95rem 1.2rem;
    margin: 1.25rem 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.dev-callout--warn {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
}

.dev-callout strong {
    color: var(--text-primary);
}

/* ============================================================
   Loader + estados auxiliares
   ============================================================ */
.dev-loading {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.dev-meta {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ============================================================
   MCP page hero variant
   ============================================================ */
.dev-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--dev-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
    margin-left: 0.6rem;
    vertical-align: middle;
}

/* ============================================================
   Syntax highlighting (Prism.js theme custom — matchea v2)
   Solo tokens: el bg/border/padding ya viene de .dev-code.
   ============================================================ */

pre[class*="language-"],
code[class*="language-"] {
    color: var(--dev-code-fg);
    font-family: var(--dev-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    background: transparent;
    text-shadow: none;
    tab-size: 2;
    hyphens: none;
}

.dev-code-block pre[class*="language-"] {
    background: var(--dev-code-bg);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    margin: 0;
    overflow-x: auto;
    border: 1px solid var(--dev-code-border);
}

.dev-code-block pre[class*="language-"] code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
}

/* Tokens */
.token.comment,
.token.prolog,
.token.cdata          { color: #64748b; font-style: italic; }
.token.punctuation    { color: #94a3b8; }
.token.namespace      { opacity: 0.7; }

.token.boolean,
.token.number,
.token.constant       { color: #fb923c; }

.token.string,
.token.char,
.token.attr-value,
.token.inserted       { color: #6ee7b7; }

.token.property,
.token.tag,
.token.symbol         { color: #f9a8d4; }

.token.selector,
.token.attr-name,
.token.builtin        { color: #93c5fd; }

.token.operator,
.token.entity,
.token.url            { color: #cbd5e1; }

.token.atrule,
.token.keyword,
.token.important      { color: #60a5fa; font-weight: 600; }

.token.function,
.token.class-name     { color: #c4b5fd; }

.token.regex,
.token.variable       { color: #fbbf24; }

.token.deleted        { color: #fca5a5; }

/* Bash-specific: comandos */
.language-bash .token.function { color: #60a5fa; }
.language-bash .token.parameter,
.language-bash .token.variable { color: #fbbf24; }

/* JSON */
.language-json .token.property { color: #93c5fd; }
.language-json .token.string   { color: #6ee7b7; }
.language-json .token.number,
.language-json .token.boolean,
.language-json .token.null     { color: #fb923c; }

/* JS / TS keywords aclaratoria */
.language-javascript .token.keyword,
.language-typescript .token.keyword { color: #f9a8d4; }
.language-javascript .token.function,
.language-typescript .token.function { color: #c4b5fd; }

/* Asegurar que el botón Copiar quede por encima */
.dev-code-block .dev-copy { z-index: 2; }

/* ====================================================================
   ▼▼▼ DEVELOPERS HERO — GRADIENT AURORA v2 (sub-marca "+Simple Developers")
   4-corner mesh: TL naranja · TR cyan · BL navy · BR violeta + view-transitions
   Bloque AISLADO. Para rollback rápido: borrar todo entre los marcadores
   ▲▲▲ DEVELOPERS HERO — GRADIENT AURORA v2 ▲▲▲
   ==================================================================== */

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 320ms;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.dev-hero {
    /* Base oscura neutra para que el blend de las 4 esquinas se vea limpio */
    background: #1a1d4a;
    color: #ffffff;
    border-bottom: none;
    overflow: hidden;
}

.dev-hero::before {
    /* Mesh de 4 esquinas con blobs grandes para que se mezclen en el centro
       (cada blob > 80% del contenedor → el solapamiento crea el blend) */
    content: '';
    position: absolute;
    inset: -200px;
    background:
        /* TL: naranja cálido */
        radial-gradient(ellipse 90% 85% at 0% 0%,      #f97316 0%, rgba(249, 115, 22, 0) 60%),
        /* TR: cyan brillante */
        radial-gradient(ellipse 90% 85% at 100% 0%,    #22d3ee 0%, rgba(34, 211, 238, 0) 60%),
        /* BL: navy profundo */
        radial-gradient(ellipse 95% 90% at 0% 100%,    #1e3a8a 0%, rgba(30, 58, 138, 0) 65%),
        /* BR: violeta */
        radial-gradient(ellipse 90% 85% at 100% 100%,  #7c3aed 0%, rgba(124, 58, 237, 0) 60%),
        /* Tinte central para que no quede "agujero" en el medio */
        radial-gradient(ellipse 60% 60% at 50% 55%,    rgba(168, 85, 247, 0.45), rgba(168, 85, 247, 0) 75%);
    filter: blur(90px);
    pointer-events: none;
    opacity: 0.95;
    z-index: 0;
    transform: translateZ(0);
}

.dev-hero::after {
    /* Mesh de puntos sutil con mask vertical para fundir con el contenido blanco abajo */
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 70%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 70%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.dev-hero-inner {
    position: relative;
    z-index: 2;
}

.dev-hero h1 {
    color: #ffffff;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.dev-hero .dev-lead {
    color: rgba(241, 245, 249, 0.92);
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.25);
}

.dev-hero .dev-eyebrow {
    color: #fcd34d;
}

.dev-hero .dev-eyebrow::before {
    background: #fcd34d;
    box-shadow: 0 0 14px rgba(252, 211, 77, 0.7);
}

.dev-hero #api-version {
    color: rgba(241, 245, 249, 0.75);
    font-weight: 400;
}

.dev-hero .dev-status-badge {
    background: rgba(252, 211, 77, 0.2);
    color: #fef3c7;
    border-color: rgba(252, 211, 77, 0.4);
}

/* El dev-subnav que va PEGADO debajo del hero queda con borde top sutil
   para suavizar la transición dark → light. */
.dev-hero + .dev-subnav {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ====================================================================
   ▲▲▲ DEVELOPERS HERO — GRADIENT AURORA v2 ▲▲▲
   ==================================================================== */
