/* ═══════════════════════════════════════════════════════════════
   NYX DESIGN SYSTEM v5.0 — Ephemeris
   Nyx is the Greek primordial goddess of Night. This identity is
   the moment night turns to day: a predawn violet-white paper,
   deep-indigo ink (the residue of night, not black), a luminous
   iris accent, and a single Venus-gold highlight — the morning
   star. Code lives in night panels. Display type is a literary
   serif (Fraunces): Nyx is a name from myth, and the serif earns
   that register while the mono keeps the technical voice.
   Same token names + selectors as before → /learn + /by-example
   inherit automatically.
   ═══════════════════════════════════════════════════════════════ */

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

/* ─── Color Tokens ─── */
:root {
    /* Syntax palette (starlight — lives on the night code panels) */
    --nyx-violet:     #c2c2c2;
    --nyx-blue:       #a8a8a8;
    --nyx-green:      #d6d6d6;
    --nyx-amber:      #ededed;
    --nyx-pink:       #b8b8b8;
    --nyx-gray:       #757575;
    --nyx-gray-light: #929292;

    /* Surfaces — predawn */
    --bg-main:     #f6f6f6;   /* papel gris neutro (prueba B/N 2026-08-01) */
    --bg-surface:  #ededed;
    --bg-code:     #0d0d0d;   /* night */
    --bg-nav:      rgba(246, 246, 246, 0.86);
    --bg-terminal: #0a0a0a;

    /* Text — deep indigo ink */
    --text-primary:   #111111;
    --text-secondary: #454545;
    --text-dim:       #878787;

    /* Borders — hairlines */
    --border:       rgba(0, 0, 0, 0.11);
    --border-hover: rgba(0, 0, 0, 0.24);

    /* Accent — luminous iris */
    --accent:       #000000;
    --accent-hover: #3d3d3d;

    /* Venus — the morning star. Used with extreme restraint. */
    --venus:        #5c5c5c;   /* text-safe gold on paper */
    --venus-bright: #9e9e9e;   /* graphic dot */

    /* Typography */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Base ─── */
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* a whisper of night at the top of the sky */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(64% 32% at 50% -10%, rgba(87, 51, 223, 0.07), transparent 72%),
        radial-gradient(20% 16% at 82% 4%, rgba(212, 165, 58, 0.05), transparent 70%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* ─── Nav ─── */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 0.75rem 2rem;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo .greek {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0.02em;
    transform: translateY(-1px);
}
.nav-logo .product { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 400; color: var(--accent); }

.nav-right { display: flex; gap: 0.25rem; align-items: center; }
.nav-right a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: color 150ms ease, background 150ms ease;
}
.nav-right a:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.nav-lang { font-size: 0.8rem; color: var(--text-dim); padding: 0 4px; font-family: var(--font-mono); }
.nav-lang a { color: var(--text-dim); padding: 4px 6px; }
.nav-lang a.active { color: var(--accent); font-weight: 600; }

/* ─── Buttons ─── */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 150ms ease;
    border: none;
    cursor: pointer;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}
/* .nav-right a (0,1,1) le gana a .btn-accent (0,1,0) y pintaba el texto del
   botón con --text-secondary — ilegible sobre el fondo del botón (bug
   preexistente que el morado disimulaba; cazado en la prueba B/N). */
.nav-right a.btn-accent { color: #fff; }
.nav-right a.btn-accent:hover { color: #fff; }
.btn-accent:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }

.btn-outline {
    border: 1px solid var(--border-hover);
    color: var(--text-primary);
    background: transparent;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* ─── Sections ─── */
section {
    padding: 4.5rem 2rem;
    max-width: 940px;
    margin: 0 auto;
    overflow-x: hidden;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.section-label::before {
    content: "";
    width: 1.6rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.55;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.12;
    margin-bottom: 0.6rem;
    text-wrap: balance;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.02rem;
    max-width: 620px;
    line-height: 1.7;
}

/* ─── Hero ─── */
.hero {
    padding-top: 9rem;
    padding-bottom: 2rem;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.14em;
    margin-bottom: 1.6rem;
}
.hero-label .glyph { color: var(--venus); }

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 1.3rem;
    text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }

.hero .subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    line-height: 1.62;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; align-items: center; }
.hero-buttons .inline-cmd {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 9px 14px;
}
.hero-buttons .inline-cmd .op { color: var(--text-dim); }

/* ─── Ephemeris line — the signature ─── */
.ephemeris {
    position: relative;
    max-width: 940px;
    margin: 3rem auto 0;
    height: 34px;
}
.ephemeris .rule {
    position: absolute; left: 0; right: 0; top: 50%;
    height: 1px; background: var(--border);
}
.ephemeris .ticks {
    position: absolute; left: 0; right: 0; top: 50%;
    height: 7px; transform: translateY(-50%);
    background-image: repeating-linear-gradient(90deg,
        var(--border) 0, var(--border) 1px, transparent 1px, transparent 26px);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ephemeris .star {
    position: absolute; top: 50%; left: 62%;
    transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.ephemeris .star .dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--venus-bright);
    box-shadow: 0 0 0 4px rgba(212, 165, 58, 0.18), 0 0 14px 2px rgba(212, 165, 58, 0.45);
    animation: nyx-twinkle 4s ease-in-out infinite;
}
.ephemeris .star .label {
    font-family: var(--font-mono); font-size: 0.72rem; color: var(--venus);
    letter-spacing: 0.04em; white-space: nowrap;
}
@keyframes nyx-twinkle {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 4px rgba(212,165,58,0.18), 0 0 14px 2px rgba(212,165,58,0.45); }
    50%      { opacity: 0.78; box-shadow: 0 0 0 3px rgba(212,165,58,0.12), 0 0 8px 1px rgba(212,165,58,0.3); }
}
@media (prefers-reduced-motion: reduce) { .ephemeris .star .dot { animation: none; } }

/* ─── Cards ─── */
.card-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.card:hover { border-color: var(--border-hover); box-shadow: 0 8px 30px -20px rgba(0, 0, 0, 0.4); transform: translateY(-2px); }
.card a { text-decoration: none; }

.card-title {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.card-stat {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* ─── Code Blocks (night, on the predawn page) ─── */
pre {
    background: var(--bg-code);
    border: 1px solid rgba(150, 160, 220, 0.14);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.75;
    color: #cccccc;
    tab-size: 4;
    max-width: 100%;
    box-shadow: 0 24px 60px -34px rgba(12, 10, 26, 0.55);
}

code {
    font-family: var(--font-mono);
    font-size: 0.85em;
}
:not(pre) > code {
    background: rgba(87, 51, 223, 0.08);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.08em 0.38em;
    color: var(--accent);
}

/* Syntax highlighting — esquema monocromo (prueba B/N 2026-08-01).
   Sin matiz, la paleta es luminancia + peso + estilo: keywords blanco bold
   (anclas de lectura), strings/comentarios en itálica, escala tonal amplia
   entre medio. Base del código: ~#dcdcdc. */
.kw  { color: #ffffff; font-weight: 700; }
.fn  { color: #ececec; }
.str { color: #c4c4c4; font-style: italic; }
.num { color: #dedede; }
.ty  { color: #f2f2f2; }
.cm  { color: #6e6e6e; font-style: italic; }
.op  { color: #949494; }

/* ─── Terminal ─── */
.terminal {
    background: var(--bg-terminal);
    border: 1px solid rgba(150, 160, 220, 0.14);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
    box-shadow: 0 24px 60px -34px rgba(12, 10, 26, 0.55);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: rgba(150, 160, 220, 0.06);
    border-bottom: 1px solid rgba(150, 160, 220, 0.12);
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333333;
}
.terminal-dot.red    { background: #404040; }
.terminal-dot.yellow { background: #404040; }
.terminal-dot.green  { background: var(--venus-bright); }

.terminal pre {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 1rem 1.4rem 1.4rem;
    color: #dcdcdc;
}

/* Terminal syntax */
.prompt  { color: #ffffff; font-weight: 700; }
.cmd     { color: #ffffff; }
.result  { color: #dedede; }
.comment { color: #6e6e6e; font-style: italic; }

/* ─── Terminal Typing Animation ─── */
@keyframes nyx-fadein {
    from { opacity: 0; transform: translateY(3px); }
    to   { opacity: 1; transform: translateY(0); }
}
.t-line { opacity: 0; animation: nyx-fadein 0.25s ease forwards; }
.t-line:nth-child(1) { animation-delay: 0.2s; }
.t-line:nth-child(2) { animation-delay: 0.7s; }
.t-line:nth-child(3) { animation-delay: 1.1s; }
.t-line:nth-child(4) { animation-delay: 1.5s; }
.t-line:nth-child(5) { animation-delay: 2.0s; }
.t-line:nth-child(6) { animation-delay: 2.5s; }
.t-line:nth-child(7) { animation-delay: 3.0s; }
.t-line:nth-child(8) { animation-delay: 3.5s; }
.t-line:nth-child(9) { animation-delay: 4.0s; }
@media (prefers-reduced-motion: reduce) { .t-line { opacity: 1; animation: none; } }

/* ─── Tabs ─── */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: -1px;
}
.tab {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 150ms ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Pricing Table ─── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }
.price-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; padding: 2rem 1.5rem; text-align: center; }
.price-card.featured { border-color: var(--accent); }
.price-name { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.price-amount { font-family: var(--font-mono); font-size: 2.5rem; font-weight: 300; margin-bottom: 0.3rem; }
.price-period { color: var(--text-dim); font-size: 0.8rem; margin-bottom: 1.5rem; }
.price-features { list-style: none; text-align: left; font-size: 0.85rem; color: var(--text-secondary); }
.price-features li { padding: 0.3rem 0; }
.price-features li::before { content: "\2713"; color: #111111; margin-right: 0.5rem; font-weight: 700; }

/* ─── Bench Bars ─── */
.bench-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.8rem; }
.bench-name { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); width: 120px; flex-shrink: 0; }
.bench-bar-wrap { flex: 1; height: 22px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 3px; overflow: hidden; position: relative; }
.bench-bar { height: 100%; background: var(--text-primary); border-radius: 3px; transition: width 600ms ease; }
.bench-bar.c-bar { background: var(--nyx-gray); }
.bench-value { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); width: 84px; text-align: right; flex-shrink: 0; }

/* ─── Footer ─── */
footer { border-top: 1px solid var(--border); padding: 3rem 2rem 2rem; max-width: 940px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.6rem; color: var(--text-primary); }
.footer-col a { display: block; color: var(--text-dim); font-size: 0.85rem; padding: 0.15rem 0; transition: color 150ms ease; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom { text-align: center; color: var(--text-dim); font-size: 0.8rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-family: var(--font-mono); }

/* ─── Get Started Components ─── */
.gs-install { display: flex; align-items: center; gap: 0.75rem; background: var(--bg-code); border: 1px solid rgba(150, 160, 220, 0.14); border-radius: 10px; padding: 0.875rem 1.25rem; margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.875rem; box-shadow: 0 24px 60px -34px rgba(12, 10, 26, 0.55); }
.gs-install code { flex: 1; color: #dcdcdc; }
.btn-copy { background: none; border: 1px solid rgba(180, 180, 180, 0.3); border-radius: 4px; color: #a3a3a3; font-family: var(--font-mono); font-size: 0.75rem; padding: 0.25rem 0.6rem; cursor: pointer; transition: border-color 150ms ease, color 150ms ease; flex-shrink: 0; }
.btn-copy:hover { border-color: var(--venus-bright); color: var(--venus-bright); }
.gs-note { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.5rem; font-family: var(--font-mono); }
.gs-subsection { margin-top: 2.5rem; }
.gs-subsection-label { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.gs-steps { display: flex; flex-direction: column; gap: 2rem; margin-top: 1.25rem; }
.gs-step-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.example-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: border-color 150ms ease; cursor: pointer; }
.example-card:hover { border-color: var(--border-hover); }
.example-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; user-select: none; }
.example-title { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.example-desc { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.2rem; }
.example-chevron { color: var(--text-dim); font-size: 0.65rem; transition: transform 200ms ease; flex-shrink: 0; }
.example-card.open .example-chevron { transform: rotate(180deg); }
.example-code { display: none; border-top: 1px solid var(--border); }
.example-card.open .example-code { display: block; }
.example-code pre { border-radius: 0; border: none; margin: 0; box-shadow: none; }
.gs-learn { margin-top: 2rem; display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.gs-learn-note { font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.75rem; }

/* ─── Landing: hero code + pillars ─── */
.codewrap { margin-top: 1.5rem; }
.codewrap .cap { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); margin-bottom: 0.55rem; letter-spacing: 0.02em; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2.4rem; }
.pillar { border-top: 1px solid var(--border); padding-top: 1.1rem; }
.pillar .k { font-family: var(--font-mono); font-size: 0.72rem; color: var(--venus); letter-spacing: 0.1em; text-transform: uppercase; }
.pillar h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; margin: 0.5rem 0; }
.pillar p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.65; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .card-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    nav { padding: 0.6rem 1rem; }
    .nav-logo { font-size: 1.25rem; }
    .nav-right { gap: 0; }
    .nav-right a.hide-mobile { display: none; }

    .hero { padding-top: 7rem; padding-bottom: 1.5rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero .subtitle { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .btn, .hero-buttons .inline-cmd { width: 100%; text-align: center; }
    .ephemeris .star { left: 50%; }

    section { padding: 3rem 1.2rem; }
    .section-title { font-size: 1.7rem; }

    .pillars { grid-template-columns: 1fr; gap: 1.4rem; }
    .card-grid.cols-2, .card-grid.cols-3, .card-grid.cols-4, .card-grid.cols-5 { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    pre { font-size: 0.75rem; padding: 1rem; }
    .terminal pre { font-size: 0.75rem; padding: 0.8rem 1rem; }
    .bench-name { width: 80px; font-size: 0.7rem; }
}
@media (max-width: 375px) {
    .hero h1 { font-size: 2.1rem; }
    .nav-logo { font-size: 1.15rem; }
    .footer-grid { grid-template-columns: 1fr; }
}
