/* Nave Silis: palette is "server room at night": navy ink, steel lines, one amber signal light.
   Products keep their own tint (from their real UIs) as a small accent only. */
:root {
  --ink: #0B1426;
  --ink-2: #101C34;
  --ink-3: #16243F;
  --line: #22314F;
  --text: #E8EDF7;
  --muted: #93A1BC;
  --signal: #F5B841;
  --signal-ink: #241A05;
  --ok: #4FD69C;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --he: "Rubik", system-ui, sans-serif;
  --r-lg: 22px;
  --r-md: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 17px/1.6 var(--display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* faint blueprint grid behind everything */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--ink) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 48px 100%,
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 48px;
  mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 70%);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--signal); color: var(--signal-ink); padding: 8px 12px; border-radius: 8px; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  max-width: 1240px; margin: 0 auto;
}
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -.01em; }
.wordmark .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 12px var(--signal); }
.top nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.top nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.top nav a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(40px, 9vw, 120px) var(--gutter) clamp(56px, 9vw, 120px);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero h1 {
  font-size: clamp(56px, 10vw, 128px);
  line-height: .9; letter-spacing: -.045em; font-weight: 800;
  margin: 0 0 28px;
}
.lede { font-size: clamp(18px, 2vw, 21px); color: #C6D0E2; max-width: 34em; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 16px/1 var(--display); padding: 15px 22px; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--signal); color: var(--signal-ink); }
.btn-primary:hover { background: #FFC85C; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }

/* terminal: the one bold element */
.terminal {
  background: #060C19; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(245,184,65,.06), 0 0 80px -20px rgba(245,184,65,.18);
  overflow: hidden; min-width: 0;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #0A1222; }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2A3858; }
.term-bar b { margin-left: auto; font: 400 13px var(--mono); color: var(--muted); }
.term-body {
  margin: 0; padding: 22px 22px 26px; min-height: 340px;
  font: 400 clamp(12.5px, 1.35vw, 14.5px)/1.75 var(--mono); color: #B9C5DB;
  white-space: pre-wrap; word-break: break-word;
}
.term-body .p { color: var(--signal); }
.term-body .ok { color: var(--ok); }
.term-body .dim { color: #5E6D8C; }
.term-body .hl { color: var(--text); font-weight: 600; }
.term-body .cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--signal); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- products ---------- */
.products { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.section-head { border-top: 1px solid var(--line); padding-top: 40px; margin-bottom: clamp(32px, 6vw, 72px); display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: end; }
.section-head h2, .about h2 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -.03em; line-height: 1; margin: 0; font-weight: 800; }
.section-head p { margin: 0; color: var(--muted); max-width: 36em; }

.case {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center;
  padding: clamp(40px, 7vw, 96px) 0;
  border-bottom: 1px solid var(--line);
}
.case.flip .case-text { order: 2; }
.case h3 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -.03em; line-height: 1; margin: 14px 0 10px; font-weight: 800; }
.tagline { font-size: 20px; color: var(--tint); margin: 0 0 18px; font-weight: 500; }
.case-text > p { max-width: 34em; }
.case-text p { color: #C6D0E2; }
.features { list-style: none; padding: 0; margin: 22px 0 30px; display: grid; gap: 10px; }
.features li { padding-left: 22px; position: relative; color: var(--muted); max-width: 34em; }
.features li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 8px; border-radius: 2px; background: var(--tint); }
.features strong { color: var(--text); font-weight: 600; }
.note { color: var(--muted) !important; font-style: italic; }

.status {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-size: 14px; font-weight: 600; padding: 5px 12px 5px 10px; border-radius: 6px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.status-request::before { background: var(--signal); }
.status-soon::before { background: #E9C46A; box-shadow: 0 0 0 3px rgba(233,196,106,.2); }
.status-live::before { background: #3DDC84; box-shadow: 0 0 0 3px rgba(61,220,132,.2); }
.status-private::before { background: #6B7894; }
.status-dev::before { background: transparent; border: 2px solid var(--signal); width: 6px; height: 6px; }

/* phones */
.case-art { min-width: 0; position: relative; }
.phones { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 0; }
.phones.two { grid-template-columns: repeat(2, 1fr); max-width: 520px; margin-inline: auto; }
.phone {
  margin: 0; border-radius: 28px; padding: 7px; background: #1B2540;
  border: 1px solid #2C3A5E;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,.8);
}
.phone img { border-radius: 22px; width: 100%; height: auto; }
.phones .p1 { transform: translateX(-14%) rotate(3deg) translateY(18px); z-index: 1; }
.phones .p2 { transform: scale(1.1); z-index: 2; }
.phones .p3 { transform: translateX(14%) rotate(-3deg) translateY(18px); z-index: 1; }
.phones.two .p1 { transform: translateX(-6%) rotate(2deg); }
.phones.two .p2 { transform: translateX(6%) rotate(-2deg) translateY(36px); }

/* Discord-like embed (generic chat styling, no logos) */
.chat { border-radius: var(--r-lg); padding: 22px; background: var(--ink-2); border: 1px solid var(--line); }
.chat-cmd { font: 400 14px var(--mono); color: var(--muted); margin-bottom: 14px; }
.chat-cmd .slash { color: #B8C6FF; background: rgba(143,168,255,.12); padding: 2px 6px; border-radius: 5px; }
.embed { background: #0D1730; border-left: 4px solid var(--tint); border-radius: 8px; padding: 16px 18px; }
.embed-title { margin: 0; font-weight: 700; font-size: 18px; }
.embed-sub { margin: 2px 0 14px; color: var(--muted); font-size: 14px; }
.fall-list { margin: 0; padding: 0; list-style: none; counter-reset: f; display: grid; gap: 2px; }
.fall-list li {
  counter-increment: f; display: grid; grid-template-columns: 26px 1fr auto; column-gap: 10px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid #1E2B4A; font-size: 15px;
}
.fall-list li::before { content: counter(f); color: var(--muted); font-size: 13px; grid-row: span 2; }
.fall-list b { font-weight: 600; }
.fall-list span { grid-column: 2; color: var(--muted); font-size: 13.5px; }
.fall-list em { grid-row: 1; grid-column: 3; font-style: normal; color: var(--tint); font-size: 14px; }
.embed-foot { margin: 12px 0 0; color: #6B7894; font-size: 13px; }

/* Telegram-like posts */
.chat-tg { font-family: var(--he); display: grid; gap: 12px; background: linear-gradient(160deg, #13203B, #0D1730); }
.tg-post { background: #1A2847; border-radius: 16px 16px 16px 4px; padding: 14px 16px 22px; position: relative; font-size: 15.5px; line-height: 1.55; max-width: 460px; }
.tg-post p { margin: 0 0 10px; color: var(--text); }
.tg-post p:last-of-type { margin-bottom: 0; }
.tg-alert { border-inline-start: 3px solid var(--tint); }
.tg-meta { position: absolute; bottom: 6px; left: 12px; font-size: 12px; color: var(--muted); }

/* workshop */
.workshop { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 88px); }
.workshop h3 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; margin: 0; font-weight: 700; color: var(--muted); }
.workshop-item { border: 1px dashed var(--line); border-radius: var(--r-md); padding: 24px; }
.workshop-item h4 { font-size: 24px; margin: 12px 0 6px; letter-spacing: -.01em; }
.workshop-item p:last-child { margin: 0; color: var(--muted); }

/* ---------- about ---------- */
.about { width: calc(100% - 2 * var(--gutter)); max-width: calc(1240px - 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 88px); margin-top: 32px; }
.about-text p { font-size: clamp(18px, 1.8vw, 20px); color: #C6D0E2; max-width: 34em; margin: 0 0 18px; }
.stack { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.stack div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.stack dt { color: var(--muted); }
.stack dd { margin: 0; }

.foot { width: calc(100% - 2 * var(--gutter)); max-width: calc(1240px - 2 * var(--gutter)); margin: 0 auto; padding: 32px 0 48px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 15px; border-top: 1px solid var(--line); }
.foot p { margin: 0; }

/* ---------- dialog ---------- */
dialog {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; width: min(480px, calc(100vw - 32px));
  background: var(--ink-2); color: var(--text);
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
}
dialog::backdrop { background: rgba(4,8,18,.72); backdrop-filter: blur(4px); }
dialog form, .req-done { padding: 28px; }
dialog h2 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.02em; }
.req-sub { margin: 0 0 20px; color: var(--muted); }
dialog label { display: grid; gap: 6px; font-weight: 500; font-size: 15px; margin-bottom: 14px; }
dialog input, dialog textarea {
  font: 400 16px var(--display); color: var(--text); background: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; resize: vertical;
}
dialog input:focus, dialog textarea:focus { outline: none; border-color: var(--signal); }
.hp { position: absolute; left: -9999px; }
.req-error { color: #FF8A7A; min-height: 1.2em; margin: 0 0 8px; font-size: 15px; }
.req-actions { display: flex; justify-content: flex-end; gap: 10px; }
.req-done p { color: var(--muted); margin: 6px 0 22px; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero, .case, .section-head, .workshop, .about-grid { grid-template-columns: 1fr; }
  .case.flip .case-text { order: 0; }
  .term-body { min-height: 300px; }
  .case-art { margin-top: 8px; }
  .phones { max-width: 460px; margin-inline: auto; }
}
@media (max-width: 520px) {
  .top nav a[href="#about"] { display: none; }
  .phones .p1 { transform: translateX(-8%) rotate(3deg) translateY(12px); }
  .phones .p3 { transform: translateX(8%) rotate(-3deg) translateY(12px); }
  .stack div { grid-template-columns: 96px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .term-body .cursor { animation: none; }
}
