/* ============================================================
   Siridana Nebula Systems — design system
   Identity: the Nebula Apps.* innovation portfolio as structural signature.
   Palette: deep indigo base + a restrained dual-hue nebula glow.
   Type: Space Grotesk (display) / Inter (body) / Space Mono (data).
   ============================================================ */

:root {
  /* base */
  --void:    #090c18;
  --panel:   #0e1226;
  --panel-2: #141a33;
  --line:    rgba(168, 176, 224, 0.12);
  --line-2:  rgba(168, 176, 224, 0.22);

  /* text */
  --star:  #f3f4fc;
  --dim:   #9ca2cb;
  --faint: #6b7099;

  /* nebula accents (used as a soft blend, sparingly as solids) */
  --rose:   #ff7aa8;
  --violet: #8e86ff;
  --cyan:   #57e0d8;

  /* status */
  --live:    #6ee7a8;
  --pending: #ffcf6b;

  /* type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Inter", system-ui, sans-serif;
  --mono:    "Space Mono", ui-monospace, "SF Mono", monospace;

  /* layout */
  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 14px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--void);
  color: var(--star);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }

/* ---------- shared layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }

/* mono eyebrow — the recurring structural label */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: linear-gradient(90deg, var(--violet), transparent);
}

.h-sec { font-size: clamp(28px, 4.4vw, 44px); }
.lede { color: var(--dim); font-size: clamp(16px, 1.6vw, 18px); margin-top: 18px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--void) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand-name span { color: var(--dim); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em;
  color: var(--dim); padding: 8px 12px; border-radius: 8px; transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--star); background: var(--panel); }
.nav-cta {
  color: var(--star) !important;
  border: 1px solid var(--line-2);
  background: var(--panel) !important;
}
.nav-cta:hover { border-color: var(--violet); }
.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em;
  padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, border-color .18s, background .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--star); color: var(--void); font-weight: 700; }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--star); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--violet); background: var(--panel); }
.btn .arr { transition: transform .18s; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(64px, 9vw, 120px); overflow: hidden; }

/* the signature: ambient nebula */
.nebula {
  position: absolute; inset: -20% -10% auto -10%; height: 760px; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 60% at 28% 30%, color-mix(in srgb, var(--violet) 55%, transparent), transparent 70%),
    radial-gradient(40% 52% at 72% 42%, color-mix(in srgb, var(--rose) 42%, transparent), transparent 68%),
    radial-gradient(36% 46% at 56% 64%, color-mix(in srgb, var(--cyan) 30%, transparent), transparent 66%);
  filter: blur(40px) saturate(120%);
  opacity: 0.5;
  animation: drift 26s ease-in-out infinite alternate;
}
.nebula::after {
  /* faint star dust — single subtle layer, not a busy starfield */
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 65% 18%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 80% 55%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 42% 70%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 12% 60%, rgba(255,255,255,.3), transparent);
  filter: blur(.2px);
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}

.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero h1 {
  font-size: clamp(38px, 6.6vw, 72px);
  letter-spacing: -0.03em;
  margin-top: 22px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--rose), var(--violet) 55%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--dim); font-size: clamp(16px, 1.9vw, 20px); margin-top: 24px; max-width: 600px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* mono stat strip — derived from real portfolio facts */
.statline {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 48px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 60%, transparent);
  overflow: hidden;
}
.stat { padding: 18px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-k { font-family: var(--display); font-size: 26px; font-weight: 600; }
.stat-l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-top: 4px; }

/* ---------- apps grid ---------- */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.app-card {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 230px;
  transition: border-color .2s, transform .2s, background .2s;
  overflow: hidden;
}
.app-card::before {
  /* nebula edge glow on hover — the signature, echoed */
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .25s;
  background: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 55%);
}
.app-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.app-card:hover::before { opacity: 1; }
.app-card > * { position: relative; z-index: 1; }

.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.app-name { font-size: 21px; }
.pkg {
  font-family: var(--mono); font-size: 11.5px; color: var(--violet);
  letter-spacing: 0.01em; margin-top: 8px; word-break: break-all;
}
.app-desc { color: var(--dim); font-size: 14.5px; margin-top: 14px; flex: 1; }

.chip {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 999px; white-space: nowrap; flex: none;
  border: 1px solid var(--line-2);
}
.chip-live { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); }
.chip-dev  { color: var(--pending); border-color: color-mix(in srgb, var(--pending) 40%, transparent); }
.chip-soon { color: var(--dim); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag { font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: 0.06em; }
.tag::before { content: "#"; color: var(--violet); opacity: .6; }

.app-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.app-links a { font-family: var(--mono); font-size: 12px; color: var(--dim); transition: color .15s; }
.app-links a:hover { color: var(--star); }
.app-links a::after { content: " →"; color: var(--violet); }

/* ---------- feature columns (studio / services) ---------- */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.col-item { padding-top: 22px; border-top: 1px solid var(--line-2); }
.col-num { font-family: var(--mono); font-size: 12px; color: var(--violet); letter-spacing: 0.1em; }
.col-item h3 { font-size: 19px; margin-top: 14px; }
.col-item p { color: var(--dim); font-size: 14.5px; margin-top: 10px; }

/* ---------- policy grid ---------- */
.policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.policy-card {
  display: block; padding: 20px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color .18s, background .18s;
}
.policy-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.policy-card .pc-t { font-family: var(--display); font-weight: 500; font-size: 15px; }
.policy-card .pc-d { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-top: 6px; }

/* ---------- CTA band ---------- */
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.band .nebula { opacity: .32; height: 100%; inset: 0; }
.band-inner { position: relative; z-index: 1; text-align: center; padding-block: clamp(56px, 8vw, 92px); }
.band-inner h2 { font-size: clamp(26px, 4vw, 40px); }
.band-inner p { color: var(--dim); margin-top: 14px; }
.band-inner .hero-cta { justify-content: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 56px 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a, .footer-blurb { color: var(--dim); font-size: 13.5px; }
.footer-links a:hover { color: var(--star); }
.footer-blurb { max-width: 280px; margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
.footer-bottom p { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

/* ---------- content pages (policy / support / app detail) ---------- */
.page-hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(28px, 4vw, 44px); position: relative; overflow: hidden; }
.page-hero .nebula { height: 420px; opacity: .34; }
.page-hero-inner { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(30px, 5vw, 52px); margin-top: 18px; }
.page-hero .pkg { font-size: 13px; margin-top: 16px; }
.crumb { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.crumb a:hover { color: var(--star); }

.prose { max-width: 760px; padding-bottom: clamp(64px, 9vw, 110px); }
.prose h2 { font-size: 22px; margin-top: 40px; margin-bottom: 12px; }
.prose h3 { font-size: 17px; margin-top: 26px; margin-bottom: 8px; font-family: var(--display); font-weight: 500; }
.prose p { color: var(--dim); margin-bottom: 14px; }
.prose ul { color: var(--dim); margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--star); font-weight: 600; }
.updated { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-top: 8px; }

.callout {
  margin: 22px 0; padding: 18px 20px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--violet);
}
.callout p { color: var(--star); margin: 0; font-size: 14.5px; }

/* feature row for app pages */
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 8px; }
.feature { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.feature h3 { font-size: 16px; margin: 0 0 8px; font-family: var(--display); font-weight: 500; }
.feature p { color: var(--dim); font-size: 14px; margin: 0; }

/* support form */
.form-card { max-width: 560px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.field { margin-bottom: 18px; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--dim); display: block; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px; background: var(--void);
  border: 1px solid var(--line-2); color: var(--star); font-family: var(--body); font-size: 15px;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: transparent; }
.field textarea { min-height: 130px; resize: vertical; }

/* ---------- accessibility / motion ---------- */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--void); border-bottom: 1px solid var(--line);
  }
  .nav-links.open a { padding: 12px 0; width: 100%; }
  .nav-toggle {
    display: inline-flex; background: var(--panel); border: 1px solid var(--line-2);
    color: var(--star); border-radius: 9px; padding: 9px 11px; cursor: pointer;
    font-family: var(--mono); font-size: 12px;
  }
  .statline { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 1px solid var(--line); padding: 16px; }
  .stat-k { font-size: 19px; word-break: break-word; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; }
}
