/* ============================================================
   KOSPO Systems — landing styles
   ============================================================ */

:root {
  --ink:        #0b0f17;
  --ink-2:      #121826;
  --ink-line:   #232b3d;
  --paper:      #f7f8fa;
  --white:      #ffffff;
  --text:       #1b1f28;
  --text-soft:  #4b5262;
  --text-mute:  #6b7280;
  --border:     #e4e7ec;
  --accent:     #3b5bff;
  --accent-ink: #2a45d8;
  --ok:         #2ea043;
  --warn:       #d29922;
  --info:       #4f8cff;
  --radius:     12px;
  --radius-sm:  8px;
  --wrap:       1120px;
  --shadow-sm:  0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-md:  0 4px 12px rgba(16, 24, 40, .08), 0 12px 32px rgba(16, 24, 40, .06);
  --font:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:       ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 12px; left: 12px;
  width: auto; height: auto;
  clip: auto; margin: 0;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
  z-index: 200;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: #1d2536; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-mute); }
.btn-sm { padding: 9px 16px; font-size: 0.875rem; }
.btn-block { width: 100%; }

.section-dark .btn-ghost,
.hero .btn-ghost { color: #e9ecf5; border-color: var(--ink-line); }
.section-dark .btn-ghost:hover,
.hero .btn-ghost:hover { border-color: #4a5675; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 248, 250, .85);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
  display: inline-flex;
  gap: 6px;
}
.wordmark:hover { text-decoration: none; }
.wordmark-strong { font-weight: 700; }
.wordmark-light { font-weight: 400; color: var(--text-mute); }

.site-nav { display: flex; align-items: center; }
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-menu a:hover { color: var(--text); text-decoration: none; }
.nav-cta a { color: var(--white); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  position: relative;
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px; height: 2px;
  background: var(--text);
  transform: translateX(-50%);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bar { top: 50%; margin-top: -1px; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(59, 91, 255, .16), transparent 60%),
    linear-gradient(180deg, #0b0f17 0%, #0e1320 100%);
  color: #e9ecf5;
  padding: clamp(56px, 9vw, 104px) 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero-title {
  font-size: clamp(2.1rem, 5.4vw, 3.35rem);
  font-weight: 800;
  color: var(--white);
}
.hero-title-sub {
  display: block;
  margin-top: 10px;
  font-size: 0.46em;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #9aa4bd;
}
.hero-lead {
  margin: 22px 0 30px;
  font-size: 1.075rem;
  color: #b9c1d6;
  max-width: 34em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-contact {
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: #8b93ab;
}
.hero-contact a { color: #c9d2ea; }

/* ---------- terminal ---------- */
.terminal {
  background: #0a0d14;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #11151f;
  border-bottom: 1px solid var(--ink-line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-amber { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #7b8398;
}
.terminal-body {
  margin: 0;
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.9;
  color: #c9d2ea;
  white-space: pre-wrap;
  word-break: break-word;
}
.t-prompt { color: var(--accent); }
.t-ok { color: #3fb950; }
.t-warn { color: #d29922; }
.t-info { color: #58a6ff; }
.t-caret { color: #3fb950; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- generic section ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-muted { background: #eef1f6; }
.section-dark {
  background: linear-gradient(180deg, #0b0f17, #0d121e);
  color: #e9ecf5;
}
.section-head { margin-bottom: 44px; max-width: 40rem; }
.section-head-center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); font-weight: 700; }
.section-dark .section-head h2 { color: var(--white); }
.section-sub { margin: 12px 0 0; color: var(--text-soft); }
.section-dark .section-sub { color: #b9c1d6; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  margin: 0 0 12px;
}
.eyebrow-invert { color: #7f93ff; }

/* ---------- card grids ---------- */
.card-grid { display: grid; gap: 20px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- build cards ---------- */
.build-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.build-card-body { padding: 26px 24px 22px; flex: 1; }
.icon-tile {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: #eef1fb;
  color: var(--accent-ink);
  font-size: 1.15rem;
  margin-bottom: 16px;
}
.build-card h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.build-card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }

.status-bar {
  margin: 0;
  padding: 12px 24px;
  background: #0c1119;
  font-family: var(--mono);
  font-size: 0.76rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.status-key { color: #6b7280; }
.status-val { font-weight: 600; }
.status-dev { color: #d29922; }
.status-nda { color: #8b93ab; }
.status-planned { color: #58a6ff; }

/* ---------- code cards (stack) ---------- */
.code-card {
  background: #0d121e;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: #10162296;
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--mono);
  font-size: 0.8rem;
}
.code-file { color: #c9d2ea; }
.code-file::before { content: "\25A0  "; color: #5b6479; }
.code-tag { color: #7b8398; font-size: 0.72rem; }
.chip-list {
  list-style: none;
  margin: 0;
  padding: 18px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: #aeb8d4;
  background: #151b29;
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 5px 10px;
}
.chip::before { content: "\203A "; color: var(--accent); }

/* ---------- process ---------- */
.process-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.process-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
}
.process-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.process-ln { font-size: 0.68rem; font-weight: 400; color: var(--text-mute); }
.process-card h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; }
.process-card p { margin: 0; color: var(--text-soft); font-size: 0.9rem; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.about-copy h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); font-weight: 700; margin-bottom: 16px; }
.about-copy > p { color: var(--text-soft); margin: 0 0 20px; }
.value-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.value-list li {
  position: relative;
  padding-left: 26px;
  color: var(--text-soft);
  font-size: 0.95rem;
}
.value-list li::before {
  content: "\2713";
  position: absolute; left: 0; top: 0;
  color: var(--ok);
  font-weight: 700;
}
.value-list strong { color: var(--text); }

.founder-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-md);
}
.founder-avatar {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.founder-name { margin: 0; font-weight: 700; font-size: 1.05rem; }
.founder-role { margin: 2px 0 14px; color: var(--text-mute); font-size: 0.9rem; }
.founder-note {
  margin: 0 0 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.85rem;
}
.founder-mail { font-family: var(--mono); font-size: 0.82rem; word-break: break-all; }

/* ---------- contact ---------- */
.contact-wrap { max-width: 680px; }
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-md);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}
.field-hint { font-weight: 400; color: var(--text-mute); }
.req { color: #d0342c; }
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fbfcfd;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 91, 255, .15);
}
.field input:invalid:not(:placeholder-shown) { border-color: #e4a6a2; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-consent {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-mute);
  background: #f4f6f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 4px 0 18px;
}
.form-consent strong { color: var(--text-soft); }

.form-status { margin: 14px 0 0; font-size: 0.9rem; min-height: 1.2em; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-err { color: #d0342c; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: #aeb6cb;
  padding: 48px 0 28px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink-line);
}
.footer-brand .wordmark { color: #e9ecf5; }
.footer-brand .wordmark-light { color: #7b8398; }
.footer-brand p { margin: 10px 0 0; font-size: 0.88rem; color: #7f8aa4; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: flex-start; }
.footer-nav a { color: #aeb6cb; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--white); }

.footer-legal { padding-top: 22px; }
.footer-entity {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: #c9d2ea;
}
.footer-entity a { color: #c9d2ea; text-decoration: underline; }
.footer-copy { margin: 0; font-size: 0.82rem; color: #6b7280; }

/* ---------- legal page ---------- */
.legal {
  max-width: 760px;
  padding: clamp(48px, 8vw, 88px) 24px;
  margin: 0 auto;
}
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 8px; }
.legal .legal-updated { color: var(--text-mute); font-size: 0.88rem; margin: 0 0 36px; }
.legal h2 { font-size: 1.2rem; font-weight: 700; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--text-soft); }
.legal ul { padding-left: 20px; }
.legal a { text-decoration: underline; }
.legal .back-link { display: inline-block; margin-top: 40px; font-family: var(--mono); font-size: 0.85rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
    display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { padding: 0 20px; }
  .nav-menu a { display: block; padding: 12px 0; font-size: 1rem; }
  .nav-cta { padding: 10px 20px 6px; }
  .nav-cta a { display: block; text-align: center; }
}

@media (max-width: 560px) {
  .process-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
