/* Nexus marketing site styles: dark, elegant, responsive */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #0b1220;
  --muted: #475569; /* slate-600 */
  --border: rgba(0,0,0,0.10);
  --card: #ffffff;
  --accent1: #8015E8; /* violet from test design */
  --accent2: #00E8DA; /* teal from test design */
  --shadow: 0 10px 30px rgba(0,0,0,0.45);
  --header-h: 64px; /* updated at runtime by JS */
  --ease: cubic-bezier(.22,1,.36,1);
}
/* Headings use display serif like test design */
h1, h2, h3, .hero__title, .section__header h2 {
  font-family: 'Fraunces', ui-serif, Georgia, serif;
  font-weight: 700;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 80% -20%, rgba(128,21,232,0.06), transparent),
    radial-gradient(700px 500px at -10% 10%, rgba(0,232,218,0.06), transparent),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
.container { width: min(1120px, 92vw); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 16px; top: 16px; width: auto; height: auto; padding: 8px 12px; background: var(--surface); border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(140%) blur(10px); background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.70)); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.2px; }
.brand img { width: 28px; height: 28px; }
.brand.small img { width: 22px; height: 22px; }
.brand.small span { font-size: 14px; }

.nav-links { display: flex; gap: 10px; align-items: center; }
.nav-links a { color: var(--text); text-decoration: none; opacity: 0.85; padding: 8px 10px; border-radius: 10px; }
.nav-links a:hover { opacity: 1; }
.nav-links a.active { background: rgba(0,0,0,0.04); opacity: 1; }
.nav-links a.pill { background: linear-gradient(135deg, rgba(0,232,218,0.18), rgba(128,21,232,0.18)); border: 1px solid rgba(0,0,0,0.08); }

.nav-toggle { display: none; font-size: 20px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; }
@media (max-width: 760px) {
  .nav-links { position: absolute; right: 16px; top: 62px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; flex-direction: column; align-items: stretch; min-width: 220px; display: none; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 10px 14px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .15s var(--ease), filter .15s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.btn-primary { color: #0b1220; background: var(--accent2); border-color: rgba(255,255,255,0.18); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active { filter: brightness(0.97); transform: translateY(0); }
.btn-outline { color: var(--text); background: transparent; border-color: var(--border); }
.btn-light { color: var(--text); background: rgba(0,0,0,0.04); border-color: var(--border); }
.btn[aria-disabled="true"], .btn.disabled { opacity: 0.5; pointer-events: none; }

.link { color: var(--accent2); text-decoration: none; border-bottom: 1px dotted rgba(6,182,212,0.5); padding-bottom: 2px; }
.link:hover { color: var(--accent1); border-bottom-color: rgba(124,58,237,0.6); }

.chip { display: inline-block; border-radius: 999px; padding: 8px 12px; background: rgba(0,0,0,0.04); border: 1px solid var(--border); text-decoration: none; color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(0,0,0,0.00), rgba(0,0,0,0.02)); }
.bg-grid { position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(600px 400px at 50% 0%, black, transparent 70%); opacity: 0.5; pointer-events: none; z-index: 0; }
.bg-blob { position: absolute; width: 60vw; max-width: 900px; aspect-ratio: 1; left: 50%; transform: translateX(-50%); top: -20%; filter: blur(60px); background: radial-gradient(circle at 30% 30%, rgba(128,21,232,0.20), transparent 60%), radial-gradient(circle at 70% 60%, rgba(0,232,218,0.20), transparent 60%); pointer-events: none; animation: floaty 14s ease-in-out infinite alternate; }
.hero__inner { position: relative; z-index: 1; padding: 96px 0 72px; text-align: center; }
.eyebrow { display: inline-block; background: rgba(0,0,0,0.04); border: 1px solid var(--border); padding: 6px 10px; border-radius: 999px; font-weight: 600; letter-spacing: 0.2px; color: var(--muted); }
.hero__title { font-size: clamp(40px, 7vw, 72px); line-height: 1.04; margin: 18px 0 12px; letter-spacing: -0.02em; }
.hero__subtitle { margin: 0 auto 24px; color: var(--muted); max-width: 800px; }
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.hero__quick { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* View transitions (progressive enhancement) */
@supports (view-transition-name: demo) {
  :root { view-transition-name: page; }
}

/* Scroll-reveal animations */
[data-anim] { opacity: 0; transform: translateY(14px); filter: blur(6px); will-change: opacity, transform, filter; }
[data-anim].in { opacity: 1; transform: none; filter: none; transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease); }
[data-anim="fade"] { transform: none; }
[data-anim="left"] { transform: translateX(-18px); }
[data-anim="right"] { transform: translateX(18px); }
[data-anim-stagger] > [data-anim] { transition-delay: 0ms; will-change: opacity, transform, filter; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bg-blob { animation: none; }
  [data-anim] { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* Gradient text utility */
.text-gradient { background: linear-gradient(135deg, var(--accent2), var(--accent1)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Subtle float for hero blob */
@keyframes floaty { 0% { transform: translate(-50%, 0) scale(1); } 100% { transform: translate(-52%, -1.5%) scale(1.03); } }

/* Sections */
.section { padding: 64px 0; }
.section__header { text-align: center; margin-bottom: 28px; }
.section__header h2 { font-size: clamp(28px, 4.5vw, 44px); }
.section__header p { color: var(--muted); }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

.card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.card__badge { display: inline-block; font-size: 12px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 4px 8px; margin-bottom: 8px; }
.card__title { margin: 4px 0 8px; font-size: 22px; }
.card__body { color: var(--muted); }
.card__actions { margin-top: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.placeholder { position: relative; display: grid; place-items: center; min-height: 220px; background: #fafafa; border: 1px dashed var(--border); }
.placeholder__label { color: var(--muted); font-size: 14px; }

/* Feature layout */
.feature { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; align-items: center; }
.feature.reverse { grid-template-columns: 1fr 1.2fr; }
.feature__content p { color: var(--muted); }
@media (max-width: 980px) { .feature, .feature.reverse { grid-template-columns: 1fr; } }

/* Grids & lists */
.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.list { list-style: none; padding: 0; margin: 8px 0 0; }
.list li { padding-left: 18px; position: relative; color: var(--muted); }
.list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 2px; background: linear-gradient(135deg, var(--accent2), var(--accent1)); }

/* Forms */
.form { padding: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { color: var(--text); font-weight: 600; }
.field input, .field textarea { width: 100%; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 16px; }
.field input::placeholder, .field textarea::placeholder { color: #8b93aa; }
.form-hint { color: var(--muted); font-size: 14px; }

/* CTA */
.cta { padding: 64px 0 80px; border-top: 1px solid var(--border); background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.00)); }
.cta__inner { text-align: center; }
.cta__inner p { color: var(--muted); margin-top: -8px; }
.cta__actions { margin-top: 16px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #fafafa; }
.footer__inner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 16px; padding: 18px 0; }
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.copy { grid-column: 1 / -1; color: var(--muted); font-size: 14px; margin: 0; }

/* Page hero */
.page-hero { padding: 56px 0 10px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)); }
.lead { color: var(--muted); margin-top: -8px; }

/* Utilities */
.muted { color: var(--muted); }

/* Embedded demo frame */
.embed-frame {
  width: 100%;
  min-height: 72vh;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #0b1220;
  box-shadow: var(--shadow);
}

/* Full-page embeds (used on demo pages) */
.main-embed { padding: 0; }
.embed-full {
  display: block;
  width: 100%;
  height: calc(100vh - var(--header-h) - var(--banner-h, 0px));
  border: 0;
  background: #0b1220;
}

/* Compact embed for smaller, tasteful chat preview */
.embed-medium {
  display: block;
  margin: 0 auto;
  width: min(960px, 92vw);
  height: clamp(540px, 70vh, 860px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #0b1220;
  box-shadow: var(--shadow);
}
