/* Echo landing page — Nucleos brand (navy / teal / DXP orange) on a clean
 * cool canvas. All styles live here: the vulcan CSP is style-src 'self',
 * so inline <style> / style= attributes would be silently blocked. */

/* ---------- Fonts (self-hosted, CSP font-src 'self') ---------- */
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif-italic-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --canvas: #F7F9FC;
  --paper: #FFFFFF;
  --ink: #102E50;
  --ink-soft: #334155;
  --ink-muted: #5B6680;
  --line: #E2E8F0;
  --line2: #CBD5E1;
  --navy: #102E50;
  --navy-2: #1C3F6B;
  --teal: #0099B8;
  --teal-deep: #007891;
  --teal-tint: #CFFAFE;
  --orange: #EF6C3A;
  --green: #10B981;
  --stripe: linear-gradient(90deg, #0099B8 0%, #119A96 28%, #10B981 52%, #F59E0B 80%, #EF6C3A 100%);
  --radius: 16px;
  --shadow: 0 8px 30px rgba(16, 46, 80, 0.10);
  --shadow-soft: 0 2px 12px rgba(16, 46, 80, 0.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id], header[id] { scroll-margin-top: 72px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--teal-deep); text-decoration: none; }

h1, h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h1 em, h2 em, .thesis em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--teal-deep);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin-bottom: 0.9rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  white-space: nowrap;
}
.btn-lg { padding: 0.8rem 1.7rem; font-size: 1.05rem; }
.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn-ghost {
  border: 1.5px solid var(--line2);
  color: var(--ink);
  background: var(--paper);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.8rem clamp(1.2rem, 5vw, 4rem);
  background: rgba(247, 249, 252, 0.85);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.nav-logo { width: 30px; height: 30px; border-radius: 8px; }
.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--teal-deep); }
.nav-cta { display: flex; gap: 0.6rem; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.2rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
}
.hero-copy .lede { margin: 1.3rem 0 2rem; }
.cta-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.cta-row-center { justify-content: center; }

/* Chat mockup */
.chat-mock {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 460px;
  margin-left: auto;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line2); display: inline-block; }
.chat-title { margin-left: auto; margin-right: auto; font-weight: 700; font-size: 0.85rem; color: var(--ink-muted); }
.msg { font-size: 0.9rem; line-height: 1.5; }
.msg-user {
  background: #EEF2F7;
  border-radius: 14px 14px 4px 14px;
  padding: 0.7rem 0.9rem;
  margin-left: 2.5rem;
  color: var(--ink);
}
.msg-echo {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  color: var(--ink-soft);
  padding-right: 1.5rem;
}
.echo-avatar { width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0; margin-top: 2px; }

.draft-mock {
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: #FBFDFF;
  margin-left: 2.1rem;
}
.draft-mock-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}
.draft-chip {
  background: var(--teal-tint);
  color: var(--teal-deep);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}
.draft-to { font-size: 0.78rem; color: var(--ink-muted); }
.draft-mock-body { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
.draft-mock-actions { display: flex; gap: 0.45rem; }
.mini-btn {
  border: 1px solid var(--line2);
  border-radius: 999px;
  padding: 0.18rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
}
.mini-btn-send {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* ---------- Thesis band ---------- */
.thesis {
  background: var(--navy);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.2rem, 5vw, 4rem);
  position: relative;
}
.thesis::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--stripe);
}
.thesis-line {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.25;
  color: #EAF1F8;
  text-align: center;
  max-width: 22em;
  margin: 0 auto;
}
.thesis-line em { color: #2DD4E5; }

/* ---------- Panels ---------- */
.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.2rem, 5vw, 4rem);
}
.panel-alt { direction: rtl; }
.panel-alt > * { direction: ltr; }
.panel-copy p { color: var(--ink-soft); margin-top: 1.1rem; max-width: 32em; }
.panel-copy h2 { margin-top: 0; }
.panel-visual { min-width: 0; }
.visual-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 1rem;
}

/* Icon grid */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  max-width: 420px;
  margin: 0 auto;
}
.icon-cell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.icon-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.icon-cell img { width: 42%; height: 42%; object-fit: contain; }
.icon-cell-echo { background: var(--navy); border-color: var(--navy); }
.icon-cell-echo img { width: 52%; height: 52%; border-radius: 10px; }

/* Browser mockup */
.browser-mock {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: #FBFDFF;
}
.url-pill {
  background: #EEF2F7;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--ink-muted);
  padding: 0.2rem 0.9rem;
  margin-left: 0.4rem;
}
.live-chip {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--teal-deep);
  background: var(--teal-tint);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.browser-body {
  position: relative;
  padding: 1.2rem 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 220px;
}
.sk {
  height: 12px;
  border-radius: 6px;
  background: #EEF2F7;
}
.sk-w90 { width: 90%; }
.sk-w75 { width: 75%; }
.sk-w60 { width: 60%; }
.sk-w40 { width: 40%; }
.signin-card {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 30%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--orange);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.75rem 0.9rem;
}
.signin-title { font-weight: 700; font-size: 0.85rem; }
.signin-text { font-size: 0.78rem; color: var(--ink-muted); margin: 0.15rem 0 0.55rem; }
.signin-actions { display: flex; gap: 0.45rem; }

/* Vault mockup */
.vault-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}
.vault-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.2rem 1.1rem;
}
.vault-card-cc {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-color: var(--navy);
  color: #EAF1F8;
  transform: translateX(1.6rem);
  box-shadow: var(--shadow);
}
.vault-card-cc .vault-label { color: #7F93AB; }
.vault-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.vault-kind {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-deep);
  background: var(--teal-tint);
  border-radius: 999px;
  padding: 0.12rem 0.6rem;
}
.vault-card-cc .vault-kind { background: rgba(45, 212, 229, 0.18); color: #2DD4E5; }
.vault-lock { font-size: 0.72rem; color: var(--ink-muted); }
.vault-card-cc .vault-lock { color: #7F93AB; }
.vault-name { font-weight: 700; font-size: 1.02rem; margin-bottom: 0.55rem; }
.vault-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.28rem 0;
  border-top: 1px solid var(--line);
}
.vault-card-cc .vault-row { border-top-color: rgba(234, 241, 248, 0.12); }
.vault-label { color: var(--ink-muted); }
.masked { letter-spacing: 0.12em; font-size: 0.75rem; align-self: center; }

/* Collaboration mockup */
.chat-mock-collab { margin: 0 auto; }
.collab-chip {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--teal-deep);
  background: var(--teal-tint);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
}
.chat-mock-collab .chat-title { margin-right: 0; }
.msg-block { display: flex; flex-direction: column; gap: 0.3rem; }
.msg-author {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}
.avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
}
.avatar-a { background: var(--teal-deep); }
.avatar-b { background: var(--orange); }
.msg-user-b { background: #FDF0E9; }
.shared-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.shared-tools-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.shared-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FBFDFF;
  padding: 0.2rem 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.shared-tool img { height: 14px; width: auto; }

/* ---------- Open source ---------- */
.open-source {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.2rem, 5vw, 4rem);
}
.open-source .lede { margin: 1.2rem auto 2.2rem; }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 1.6rem clamp(1.2rem, 5vw, 4rem);
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; }
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { color: var(--ink-muted); }
.footer-links a:hover { color: var(--teal-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero,
  .panel {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .panel-alt { direction: ltr; }
  .chat-mock { margin: 0 auto; }
  .signin-card { left: 18%; }
  .vault-card-cc { transform: none; }
}

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