/* ============================================================
   NEXAL design system  ·  cyan/blue, light-grey default,
   time-of-day aware hero.  Used by index.html, tools.html, etc.
   Class prefix: nx-  (won't clash with shared-layout.css)
   ============================================================ */
:root {
    --nx-cyan: #0097a7;
    --nx-cyan-d: #007a87;
    --nx-cyan-dd: #005f6b;
    --nx-cyan-soft: rgba(0, 151, 167, 0.10);
    --nx-cyan-text: #0e7c8a;
    --nx-blue: #175fa5;

    --nx-ink: #0f172a;
    --nx-charcoal: #373a40;
    --nx-muted: #5f6b7a;
    --nx-faint: #94a3b8;

    --nx-bg: #f3f5f8;
    --nx-surface: #ffffff;
    --nx-surface-2: #f7f9fb;
    --nx-line: rgba(15, 23, 42, 0.08);
    --nx-line-2: rgba(15, 23, 42, 0.14);

    --nx-green: #1d9e75;
    --nx-amber: #ba7517;

    --nx-radius: 12px;
    --nx-radius-sm: 8px;
    --nx-radius-pill: 999px;
    --nx-shadow: 0 14px 40px rgba(15, 26, 43, 0.08);
    --nx-shadow-lg: 0 20px 50px rgba(15, 26, 43, 0.12);
    --nx-width: min(1180px, calc(100% - 40px));

    /* hero palette — overwritten at runtime by the time-of-day engine */
    --nx-hero-bg: #eef2f5;
    --nx-hero-text: #1a1c20;
    --nx-hero-sub: #5f5e5a;
}

* { box-sizing: border-box; }

/* page background lives on <html> so the ambient particle/mascot layer
   (fixed, z-index:-1) is visible behind transparent sections and text. */
html { background: var(--nx-bg); }

body.nx {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: transparent;
    color: var(--nx-charcoal);
    line-height: 1.6;
}

.nx-wrap { width: var(--nx-width); margin: 0 auto; }

h1, h2, h3 { font-family: 'Montserrat', sans-serif; color: var(--nx-ink); margin: 0; line-height: 1.2; }

a { color: inherit; }

/* ---------- section rhythm ---------- */
.nx-section { padding: 64px 0; }
.nx-section--tight { padding: 40px 0; }
.nx-eyebrow {
    display: inline-block; font-size: 0.72rem; letter-spacing: 2px;
    text-transform: uppercase; color: var(--nx-muted); margin-bottom: 12px;
}
.nx-h2 { font-size: 2rem; font-weight: 700; text-align: center; }
.nx-lead {
    font-size: 1.05rem; color: var(--nx-muted); text-align: center;
    max-width: 560px; margin: 12px auto 0;
}

/* ---------- buttons ---------- */
.nx-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px; border-radius: var(--nx-radius-sm);
    font-weight: 700; font-family: 'Montserrat', sans-serif; font-size: 0.95rem;
    text-decoration: none; cursor: pointer; border: none;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.nx-btn--primary { background: var(--nx-cyan); color: #fff; }
.nx-btn--primary:hover { background: var(--nx-cyan-d); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 151, 167, 0.28); }
.nx-btn--ghost { background: transparent; color: var(--nx-ink); border: 1px solid var(--nx-line-2); }
.nx-btn--ghost:hover { border-color: var(--nx-cyan); color: var(--nx-cyan-d); transform: translateY(-2px); }
.nx-btn--light { background: #fff; color: var(--nx-ink); }
.nx-btn--light:hover { transform: translateY(-2px); box-shadow: var(--nx-shadow); }

/* ---------- badge / pill ---------- */
.nx-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; color: var(--nx-cyan-text);
    background: var(--nx-cyan-soft); padding: 6px 14px; border-radius: var(--nx-radius-pill);
}
.nx-pill {
    cursor: pointer; font-size: 0.78rem; padding: 6px 14px;
    border-radius: var(--nx-radius-pill); border: 1px solid var(--nx-line-2);
    color: var(--nx-charcoal); background: transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* ---------- grid + cards ---------- */
.nx-grid { display: grid; gap: 16px; }
.nx-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.nx-grid--4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.nx-card {
    background: var(--nx-surface); border: 1px solid var(--nx-line);
    border-radius: var(--nx-radius); padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.nx-card:hover { transform: translateY(-4px); box-shadow: var(--nx-shadow); border-color: rgba(0, 151, 167, 0.25); }
.nx-card__icon { font-size: 26px; color: var(--nx-cyan); }
.nx-card h3 { font-size: 1.1rem; font-weight: 700; margin: 12px 0 6px; }
.nx-card p { margin: 0; font-size: 0.92rem; color: var(--nx-muted); }

/* metric / stat */
.nx-stat { background: var(--nx-surface-2); border-radius: var(--nx-radius); padding: 22px; text-align: center; }
.nx-stat__num { font-family: 'Montserrat', sans-serif; font-size: 1.9rem; font-weight: 800; color: var(--nx-cyan); }
.nx-stat__label { font-size: 0.85rem; color: var(--nx-muted); margin-top: 4px; }

/* ---------- HERO ---------- */
.nx-hero {
    position: relative; overflow: hidden;
    background: var(--nx-hero-bg);
    padding: 150px 0 70px; /* top clears the fixed global nav */
    transition: background 0.6s ease;
}
#nx-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nx-hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.nx-hero h1 { font-size: 3rem; font-weight: 800; color: var(--nx-hero-text); transition: color 0.6s ease; }
.nx-hero__sub { font-size: 1.1rem; color: var(--nx-hero-sub); margin: 16px 0 22px; max-width: 480px; transition: color 0.6s ease; }

/* AI prompt bar */
.nx-aibar {
    display: flex; align-items: center; gap: 8px; background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1); border-radius: var(--nx-radius);
    padding: 8px 8px 8px 16px; max-width: 480px; margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(15, 26, 43, 0.06);
}
.nx-aibar__text { flex: 1; font-size: 0.95rem; color: var(--nx-charcoal); white-space: nowrap; overflow: hidden; }
.nx-aibar__text .ph { color: var(--nx-faint); }
.nx-aibar__text .typed { color: var(--nx-cyan-text); }
.nx-cursor { color: var(--nx-cyan); animation: nx-blink 1s step-end infinite; }
@keyframes nx-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.nx-indrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.nx-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* live product preview */
.nx-preview { background: #fff; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 14px; overflow: hidden; box-shadow: var(--nx-shadow-lg); }
.nx-preview__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid rgba(0, 0, 0, 0.07); }
.nx-dot { width: 9px; height: 9px; border-radius: 50%; }
.nx-preview__body { padding: 14px; }
.nx-feed { display: flex; flex-direction: column; gap: 7px; min-height: 150px; }
.nx-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 11px; border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: var(--nx-radius-sm); background: #fafbfc;
    animation: nx-in 0.35s ease;
}
.nx-row span:first-child { font-size: 0.82rem; color: var(--nx-charcoal); }
.nx-row .ok { font-size: 0.7rem; color: var(--nx-green); }
@keyframes nx-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* theme chips */
.nx-themechips {
    position: relative; z-index: 1; margin-top: 22px;
    display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
    font-size: 0.78rem; padding: 5px; border-radius: var(--nx-radius-pill);
    border: 1px solid rgba(0, 0, 0, 0.1); background: rgba(255, 255, 255, 0.6);
}
.nx-themechips [data-theme-chip] { cursor: pointer; padding: 5px 11px; border-radius: var(--nx-radius-pill); color: var(--nx-muted); }

/* ---------- templates gallery ---------- */
.nx-tmpl { border: 1px solid var(--nx-line); border-radius: var(--nx-radius); overflow: hidden; background: #fff; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.nx-tmpl:hover { transform: translateY(-4px); box-shadow: var(--nx-shadow); }
.nx-tmpl__shot { height: 96px; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'Montserrat', sans-serif; letter-spacing: 1px; font-size: 0.95rem; }
.nx-tmpl__meta { padding: 12px 14px; }
.nx-tmpl__meta b { display: block; font-size: 0.9rem; color: var(--nx-ink); }
.nx-tmpl__meta small { color: var(--nx-faint); }

/* ---------- steps ---------- */
.nx-step { text-align: center; padding: 10px; }
.nx-step__num { width: 42px; height: 42px; border-radius: 50%; background: var(--nx-cyan-soft); color: var(--nx-cyan); display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 12px; font-family: 'Montserrat', sans-serif; }

/* ---------- integrations ---------- */
.nx-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 0.88rem; color: var(--nx-ink); border: 1px solid var(--nx-line); background: #fff; padding: 10px 16px; border-radius: var(--nx-radius-sm); }
.nx-chip i { color: var(--nx-cyan); }

/* ---------- testimonials ---------- */
.nx-quote { background: #fff; border: 1px solid var(--nx-line); border-radius: var(--nx-radius); padding: 24px; }
.nx-quote p { font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; color: var(--nx-ink); margin: 0 0 16px; }
.nx-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--nx-cyan-soft); color: var(--nx-cyan-text); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.85rem; }

/* ---------- pricing ---------- */
.nx-price { background: #fff; border: 1px solid var(--nx-line); border-radius: var(--nx-radius); padding: 26px; position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.nx-price:hover { transform: translateY(-4px); box-shadow: var(--nx-shadow); }
.nx-price--featured { border: 2px solid var(--nx-cyan); }
.nx-price__tag { position: absolute; top: -12px; left: 26px; font-size: 0.72rem; color: var(--nx-cyan-text); background: var(--nx-cyan-soft); padding: 4px 12px; border-radius: var(--nx-radius-pill); }
.nx-price__amt { font-family: 'Montserrat', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--nx-ink); margin: 10px 0 2px; }
.nx-price__amt small { font-size: 0.8rem; font-weight: 400; color: var(--nx-faint); }
.nx-price ul { list-style: none; padding: 0; margin: 14px 0 0; }
.nx-price li { font-size: 0.9rem; color: var(--nx-muted); padding: 5px 0; }
.nx-price li i { color: var(--nx-green); margin-right: 6px; }

/* ---------- faq ---------- */
.nx-faq { border: 1px solid var(--nx-line); border-radius: var(--nx-radius-sm); padding: 16px 18px; margin-bottom: 10px; background: #fff; }
.nx-faq b { display: block; font-size: 0.95rem; color: var(--nx-ink); margin-bottom: 4px; }
.nx-faq p { margin: 0; font-size: 0.9rem; color: var(--nx-muted); }

/* ---------- final cta band ---------- */
.nx-band { position: relative; overflow: hidden; border-radius: 18px; background: #0f1a2b; color: #fff; text-align: center; padding: 46px 24px; }
.nx-band h2 { color: #fff; font-size: 1.7rem; }
.nx-band p { color: #aab6c8; max-width: 420px; margin: 10px auto 20px; }
.nx-band .nx-btn--primary { background: #3ad0e0; color: #0f1a2b; }
.nx-band .nx-btn--primary:hover { background: #5bdcea; }

/* ---------- scroll reveal ---------- */
.nx-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.nx-reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
    .nx-hero__inner { grid-template-columns: 1fr; }
    .nx-hero h1 { font-size: 2.2rem; }
    .nx-hero { padding-top: 130px; }
    .nx-h2 { font-size: 1.6rem; }
}
