:root {
  --bg: #0b1220;
  --bg-alt: #101a2e;
  --card: #15213a;
  --text: #e6ecf5;
  --muted: #9fb0c8;
  --accent: #ff9900;
  --accent-2: #3aa0ff;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { width: min(1080px, 92%); margin: 0 auto; }
.narrow { width: min(720px, 92%); }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 18, 32, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1d2b47;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.nav nav { display: flex; gap: 20px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text) !important; }
.brand span { color: var(--accent); font-weight: 600; }

@media (max-width: 640px) {
  .brand span { display: none; }
}

.hero {
  padding: 96px 0 72px;
  background: radial-gradient(900px 400px at 80% -10%, rgba(58, 160, 255, 0.25), transparent),
              radial-gradient(700px 300px at 10% 0%, rgba(255, 153, 0, 0.15), transparent);
}
.eyebrow { color: var(--accent-2); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.15; margin: 0 0 16px; max-width: 18ch; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 60ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }

.stats { display: flex; gap: 32px; flex-wrap: wrap; list-style: none; padding: 0; margin: 40px 0 0; color: var(--muted); }
.stats strong { display: block; color: var(--text); font-size: 1.4rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #1a1100;
  border: 0;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-small { padding: 8px 16px; color: #1a1100 !important; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid #2c3f63; }

.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: 2rem; margin: 0 0 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid #1f2f50; border-radius: var(--radius); padding: 24px; }
.card h3 { margin-top: 0; color: var(--accent); }
.card p { color: var(--muted); margin-bottom: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border-radius: var(--radius); padding: 24px; border: 1px solid #1f2f50; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-2); color: #04111f; font-weight: 700; }
.steps h3 { margin: 12px 0 6px; }
.steps p { margin: 0; color: var(--muted); }

form { display: grid; gap: 16px; margin-top: 20px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 0.95rem; }
input, select, textarea {
  background: #0c1426;
  border: 1px solid #2c3f63;
  color: var(--text);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-2); border-color: transparent; }
.hp { position: absolute; left: -9999px; }
#form-status { min-height: 1.5em; margin: 0; }
#form-status.ok { color: #5bd68a; }
#form-status.err { color: #ff7b7b; }

.footer { padding: 28px 0; border-top: 1px solid #1d2b47; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 640px) {
  .nav nav a:not(.btn) { display: none; }
}

.sub { margin: 36px 0 14px; font-size: 1.2rem; color: var(--accent); }
.table-wrap { overflow-x: auto; border: 1px solid #1f2f50; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #1f2f50; vertical-align: top; }
thead th { background: var(--card); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; white-space: nowrap; }
td { color: var(--muted); }
th.aws { color: #ff9900; }
th.azure { color: #3aa0ff; }
th.gcp { color: #5bd68a; }
.pillars td:nth-child(n+3), .pillars th:nth-child(n+3) { text-align: center; white-space: nowrap; }
.note { color: var(--muted); font-size: 0.92rem; margin: 14px 0 0; }
.note a { color: var(--accent-2); }
.cards-sm { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cards-sm li { background: var(--card); border: 1px solid #1f2f50; border-radius: var(--radius); padding: 16px 18px; color: var(--muted); }
.cards-sm strong { color: var(--text); display: block; margin-bottom: 4px; }

.section-lead { color: var(--muted); max-width: 70ch; margin: -12px 0 24px; }

.chips { display: flex; gap: 10px; list-style: none; padding: 0; margin: 28px 0 0; flex-wrap: wrap; }
.chip { padding: 4px 14px; border-radius: 999px; border: 1px solid #2c3f63; font-size: 0.85rem; font-weight: 600; }
.chip.aws { color: #ff9900; }
.chip.azure { color: #3aa0ff; }
.chip.gcp { color: #5bd68a; }

.terms { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: var(--muted); }
.terms strong { color: var(--text); }

details { background: var(--card); border: 1px solid #1f2f50; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }

.arch-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.arch-tab, .cloud-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid #2c3f63;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.arch-tab:hover, .cloud-btn:hover { color: var(--text); }
.arch-tab.active, .cloud-btn.active { background: var(--accent-2); border-color: var(--accent-2); color: #04111f; font-weight: 700; }
.arch-tab.multi { border-style: dashed; }
.arch-tab.multi.active { border-style: solid; }

.arch-panel { background: var(--bg); border: 1px solid #1f2f50; border-radius: var(--radius); padding: 24px; }
.arch-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.arch-head h3 { margin: 0 0 6px; font-size: 1.4rem; }
.arch-summary { color: var(--muted); margin: 0; max-width: 70ch; }
.cloud-toggle { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.multi-note { color: var(--muted); font-size: 0.9rem; }

.arch-diagram { overflow-x: auto; margin-top: 20px; background: #0c1426; border-radius: var(--radius); border: 1px solid #1d2b47; }
.arch-svg { display: block; width: 100%; height: auto; }
.arch-node-box { fill: #15213a; stroke-width: 1.5; }
.arch-node-role { fill: #9fb0c8; font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; }
.arch-node-name { fill: #e6ecf5; font-size: 12.5px; font-weight: 700; }
.arch-node-name.small { font-size: 11px; }
.arch-cloud-badge { font-size: 8.5px; font-weight: 800; letter-spacing: 0.08em; }
.arch-edge { stroke: #7d90ad; stroke-width: 1.6; }
.arch-edge.dashed { stroke-dasharray: 6 5; }
.arch-edge-label { fill: #9fb0c8; font-size: 10.5px; paint-order: stroke; stroke: #0c1426; stroke-width: 4px; }
.arch-group { fill: rgba(58, 160, 255, 0.04); stroke: #2c3f63; stroke-width: 1.2; stroke-dasharray: 5 5; }
.arch-group-label { fill: #9fb0c8; font-size: 11px; font-weight: 600; }

.arch-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 14px 0 0; color: var(--muted); font-size: 0.82rem; }
.arch-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

.arch-notes { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; margin-top: 22px; }
.arch-notes h4 { margin: 0 0 8px; color: var(--accent); }
.arch-notes ul { margin: 0; padding-left: 18px; color: var(--muted); }
.arch-notes li { margin-bottom: 6px; }
.arch-notes a { color: var(--accent-2); }

@media (max-width: 760px) {
  .arch-notes { grid-template-columns: 1fr; }
  .arch-svg { min-width: 760px; }
}

.chat { position: fixed; right: 20px; bottom: 20px; z-index: 50; }
.chat-fab {
  background: var(--accent);
  color: #1a1100;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.chat-fab:hover { filter: brightness(1.08); }
.chat-panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: min(380px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid #2c3f63;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--card); border-bottom: 1px solid #1f2f50; }
.chat-head strong { display: block; }
.chat-head span { color: var(--muted); font-size: 0.8rem; }
.chat-close { background: transparent; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.chat-close:hover { color: var(--text); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 180px; }
.chat-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 0.93rem; white-space: pre-wrap; word-wrap: break-word; }
.chat-msg.bot { background: var(--card); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--accent-2); color: #04111f; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.typing { color: var(--muted); font-style: italic; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 10px; }
.chat-quick[hidden] { display: none; }
.chat-chip { background: transparent; color: var(--accent-2); border: 1px solid #2c3f63; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.82rem; cursor: pointer; }
.chat-chip:hover { border-color: var(--accent-2); }
.chat-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #1f2f50; margin: 0; }
.chat-form input { flex: 1; min-width: 0; padding: 10px 12px; }
.chat-note { margin: 0; padding: 0 14px 12px; color: var(--muted); font-size: 0.74rem; }
.chat-note a { color: var(--accent-2); }
.chat-link { display: inline-block; margin-top: 8px; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: #1a1100; font-weight: 700; text-decoration: none; }
.chat-link:hover { filter: brightness(1.08); }

@media (max-width: 480px) {
  .chat { right: 12px; bottom: 12px; }
}
