/* ==========================================================================
   LLPrism · AI-Native Independent Sites & Global Edge Showroom (v1)
   Zero external fonts · Native SVG fiber animations · Light & Dark · 360-1920px
   ========================================================================== */

:root {
  color-scheme: dark light;
  --bg: #080b10;
  --bg-2: #0f141d;
  --bg-3: #161d2a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.065);
  --ink: #f3f6fa;
  --ink-2: #a5b0c0;
  --ink-3: #727f91;
  --line: rgba(243, 246, 250, 0.11);
  --line-strong: rgba(243, 246, 250, 0.24);
  --amber: #e99262;
  --amber-soft: rgba(233, 146, 98, 0.14);
  --mint: #67d8ad;
  --mint-soft: rgba(103, 216, 173, 0.14);
  --cyan: #6cc4f5;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --max: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f5;
  --bg-2: #ffffff;
  --bg-3: #eceee9;
  --surface: #ffffff;
  --surface-hover: #f2f4f0;
  --ink: #10141b;
  --ink-2: #485260;
  --ink-3: #737e8e;
  --line: rgba(16, 20, 27, 0.1);
  --line-strong: rgba(16, 20, 27, 0.22);
  --amber: #c65a28;
  --amber-soft: rgba(198, 90, 40, 0.1);
  --mint: #147054;
  --mint-soft: rgba(20, 112, 84, 0.1);
  --cyan: #186fa8;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.68 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
  background: linear-gradient(135deg, var(--amber), var(--mint));
  -webkit-mask: url("assets/prism-mark.svg") center/contain no-repeat;
  mask: url("assets/prism-mark.svg") center/contain no-repeat;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--mint);
  letter-spacing: 0.06em;
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav a { text-decoration: none; transition: color 0.16s ease; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.icon-btn:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-hover); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { opacity: 0.9; }
.btn-ghost { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.menu-btn { display: none; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 14px var(--gutter) 18px;
}
.mobile-nav.is-open { display: grid; gap: 6px; }
.mobile-nav a {
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
}
.mobile-nav a:last-child { border-bottom: none; }

/* ---------- Hero + Animated Edge Stage ---------- */
.hero {
  position: relative;
  padding: clamp(50px, 7vw, 94px) 0 clamp(56px, 7vw, 96px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -12% -10% auto -10%;
  height: 560px;
  background:
    radial-gradient(ellipse 60% 55% at 72% 24%, rgba(233, 146, 98, 0.14), transparent 64%),
    radial-gradient(ellipse 48% 45% at 22% 18%, rgba(103, 216, 173, 0.1), transparent 62%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 15%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 15%, transparent 78%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(28px, 4.5vw, 56px);
  align-items: center;
}
.hero-grid > * { min-width: 0; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 0 0 22px;
}
.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px var(--mint-soft), 0 0 12px var(--mint);
  animation: pulse 2.6s ease-in-out infinite;
  flex: none;
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.032em;
  font-weight: 800;
}
.hero h1 span {
  background: linear-gradient(95deg, var(--amber) 0%, #f2b487 48%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  margin: 0 0 28px;
  font-size: clamp(15.5px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 44ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Animated Edge Network Hub Stage */
.edge-stage {
  position: relative;
  aspect-ratio: 580 / 430;
  border-radius: 22px;
  border: 1px solid rgba(243, 246, 250, 0.13);
  background:
    radial-gradient(ellipse 65% 60% at 50% 48%, rgba(233, 146, 98, 0.15), transparent 64%),
    radial-gradient(ellipse 46% 42% at 78% 76%, rgba(103, 216, 173, 0.13), transparent 62%),
    #0a0e15;
  box-shadow: 0 32px 84px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f3f6fa;
  overflow: hidden;
  isolation: isolate;
}
.edge-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.2;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 86%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 35%, transparent 86%);
}
.edge-scan {
  position: absolute;
  inset: -40% 0 auto 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, rgba(103, 216, 173, 0.07), rgba(233, 146, 98, 0.05), transparent);
  animation: sweep 7.5s ease-in-out infinite;
  pointer-events: none;
}
.stage-top, .stage-bottom {
  position: absolute;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #8c98a9;
  z-index: 4;
}
.stage-top { top: 16px; }
.stage-top b { color: #67d8ad; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.stage-bottom { bottom: 14px; }
.stage-bottom span strong { color: #eef3f8; font-weight: 600; }

.edge-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fiber-base { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.3; fill: none; }
.fiber-pulse {
  stroke: #e99262;
  stroke-width: 2.3;
  stroke-dasharray: 16 230;
  stroke-linecap: round;
  fill: none;
  filter: drop-shadow(0 0 6px rgba(233, 146, 98, 0.85));
  animation: flow 5.4s linear infinite;
}
.fiber-pulse.mint {
  stroke: #67d8ad;
  filter: drop-shadow(0 0 6px rgba(103, 216, 173, 0.85));
  animation-duration: 4.8s;
  animation-delay: -1.6s;
}
.fiber-pulse.cyan {
  stroke: #6cc4f5;
  filter: drop-shadow(0 0 6px rgba(108, 196, 245, 0.85));
  animation-duration: 5.8s;
  animation-delay: -3.2s;
}

.edge-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 98px;
  height: 98px;
  display: grid;
  place-items: center;
  z-index: 3;
}
.orbit {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1px solid rgba(233, 146, 98, 0.34);
  animation: spin 28s linear infinite;
}
.orbit::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #e99262;
  box-shadow: 0 0 10px #e99262;
}
.orbit.outer {
  inset: -38px;
  border-style: dashed;
  border-color: rgba(103, 216, 173, 0.26);
  animation-direction: reverse;
  animation-duration: 46s;
}
.orbit.outer::after {
  top: auto;
  bottom: -3px;
  background: #67d8ad;
  box-shadow: 0 0 10px #67d8ad;
}
.core-box {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(28, 36, 50, 0.96), rgba(11, 15, 22, 0.98));
  border: 1px solid rgba(233, 146, 98, 0.48);
  box-shadow: 0 0 40px rgba(233, 146, 98, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  animation: float 5s ease-in-out infinite;
}
.core-box .brand-mark { width: 34px; height: 34px; }

.hub-node {
  position: absolute;
  z-index: 4;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(15, 20, 29, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36);
  color: #f3f6fa;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.hub-node:hover { transform: translateY(calc(-50% - 2px)); border-color: rgba(233, 146, 98, 0.6); }
.hub-node.is-mint:hover { border-color: rgba(103, 216, 173, 0.6); }
.hub-node.is-cyan:hover { border-color: rgba(108, 196, 245, 0.6); }
.hub-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: rgba(233, 146, 98, 0.16);
  color: #e99262;
  flex: none;
}
.hub-node.is-mint .hub-ico { background: rgba(103, 216, 173, 0.16); color: #67d8ad; }
.hub-node.is-cyan .hub-ico { background: rgba(108, 196, 245, 0.16); color: #6cc4f5; }
.hub-node b { display: block; font-size: 12.5px; line-height: 1.25; white-space: nowrap; }
.hub-node div span { display: block; font-family: var(--font-mono); font-size: 10.5px; color: #8c98a9; margin-top: 2px; white-space: nowrap; }

.hn-1 { left: 4%; top: 26%; }
.hn-2 { left: 4%; top: 72%; }
.hn-3 { right: 4%; top: 26%; }
.hn-4 { right: 4%; top: 72%; }

/* ---------- Sections ---------- */
.section { padding: clamp(58px, 7.5vw, 98px) 0; border-top: 1px solid var(--line); }
.sec-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px 28px;
  margin-bottom: clamp(28px, 3.6vw, 42px);
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.sec-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }

/* Showroom 3-Card Grid */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.cards-3 > *, .cards-4 > *, .ops-shell > *, .brief-grid > * { min-width: 0; }
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-2);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
}
.badge.mint { background: var(--mint-soft); color: var(--mint); }
.badge.cyan { background: rgba(108, 196, 245, 0.14); color: var(--cyan); }
.card h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.card p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 4px; }
.pills span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.card-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* 4-Step Launch Pipeline */
.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.step-card {
  padding: 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 10px;
  display: block;
}
.step-card h3 { margin: 0 0 8px; font-size: 16.5px; }
.step-card p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* Interactive AI Operations Console */
.ops-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 0.64fr);
  gap: 18px;
  align-items: stretch;
}
.ops-tabs { display: grid; gap: 10px; }
.ops-tab {
  text-align: left;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  transition: all 0.16s ease;
}
.ops-tab:hover { border-color: var(--line-strong); }
.ops-tab[aria-selected="true"] {
  border-color: var(--amber);
  background: var(--amber-soft);
}
.ops-tab strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
.ops-tab span { display: block; font-size: 12.5px; color: var(--ink-2); }

.ops-terminal {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(243, 246, 250, 0.13);
  background: #0b0f16;
  color: #edf2f8;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.term-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8c98a9;
}
.term-body {
  margin: 0;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #dbe4f0;
  flex: 1;
}
.term-foot {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: #8c98a9;
}
.term-foot b { color: #67d8ad; }

/* Contact / Local Brief Builder */
.brief-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.contact-box, .brief-form {
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-2);
  display: grid;
  gap: 16px;
}
.contact-box h3 { margin: 0; font-size: 22px; }
.contact-row {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.contact-row:last-of-type { border-bottom: none; padding-bottom: 0; }
.contact-row small { display: block; font-size: 12px; color: var(--ink-3); }
.contact-row strong { font-family: var(--font-mono); font-size: 15px; overflow-wrap: anywhere; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 14px;
}
.field textarea { min-height: 78px; resize: vertical; }
.field-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.status-msg { margin: 0; font-size: 12.5px; color: var(--mint); min-height: 1.2em; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  font-size: 13px;
  color: var(--ink-3);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-decoration: none; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }

/* Demo Banner (for /demo/) */
.demo-ribbon {
  background: linear-gradient(90deg, rgba(233, 146, 98, 0.16), rgba(103, 216, 173, 0.16));
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 13px;
}
.demo-ribbon-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 14px;
}
.spec-table th, .spec-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.spec-table th { background: var(--bg-3); color: var(--ink-2); font-weight: 600; }
.spec-table tr:last-child td { border-bottom: none; }

/* Offscreen pause */
html[data-paused="true"] .edge-stage * { animation-play-state: paused !important; }

@keyframes flow { to { stroke-dashoffset: -492; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-4px); } }
@keyframes pulse { 50% { opacity: 0.55; transform: scale(0.92); } }
@keyframes sweep {
  0% { transform: translateY(-20%); opacity: 0; }
  30% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateY(340%); opacity: 0; }
}

@media (max-width: 980px) {
  .hero-grid, .cards-3, .ops-shell, .brief-grid { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .nav, .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  .cards-4, .field-2 { grid-template-columns: 1fr; }
  .edge-stage { aspect-ratio: 360 / 320; }
  .hub-node { padding: 6px 8px; gap: 6px; border-radius: 9px; }
  .hub-ico { width: 22px; height: 22px; font-size: 10px; border-radius: 6px; }
  .hub-node b { font-size: 11px; }
  .hub-node div span { display: none; }
  .core-box { width: 52px; height: 52px; border-radius: 14px; }
  .core-box .brand-mark { width: 24px; height: 24px; }
  .orbit { inset: -9px; }
  .orbit.outer { inset: -22px; }
  .stage-top, .stage-bottom { font-size: 10.5px; left: 14px; right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
