/* DAOx app-factory template — deep-blue brand system */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700;800&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --bg: #eef2f6;
  --card: #ffffff;
  --border: #d7e0e8;
  --ink: #16202a;
  --muted: #4e5d6b;
  --brand: #1a5f96;
  --brand-deep: #0b2a47;
  --brand-bright: #2b7cb8;
  --brand-mid: #1b5a8b;
  --brand-tint: #e8eff5;
  --gradient: linear-gradient(121deg, #0b2a47, #1b5a8b);
  --ok: #1f8a4c;
  --err: #b3261e;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(11, 42, 71, .08), 0 10px 30px rgba(11, 42, 71, .12);
  --sans: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 16.5px/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }

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

h1, h2, h3 { font-family: var(--sans); color: var(--ink); letter-spacing: -.2px; }

/* ---------- nav ---------- */
.nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky; top: 0; z-index: 10;
}
.nav .wrap { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--sans); font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.3px; }
.logo em { font-style: normal; color: var(--brand-mid); }
.logo:hover { text-decoration: none; }
.nav nav { display: flex; gap: 22px; align-items: center; }
.nav nav a { font-family: var(--sans); color: var(--muted); font-weight: 600; font-size: 15px; }
.nav nav a:hover { color: var(--brand); text-decoration: none; }
.badge {
  font-family: var(--sans);
  background: var(--brand-tint); color: var(--brand);
  border: 1px solid #c3d6e5; border-radius: 999px;
  padding: 3px 14px; font-size: 13px; font-weight: 700;
}

/* ---------- hero (brand gradient band) ---------- */
.hero {
  background: var(--gradient);
  text-align: center;
  padding: 88px 24px 130px;
  color: #fff;
}
.eyebrow {
  display: inline-block; margin-bottom: 20px;
  font-family: var(--sans);
  color: #fff; background: rgba(255, 255, 255, .14);
  border: 1.5px solid rgba(255, 255, 255, .75);
  border-radius: 999px; padding: 5px 18px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.1; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: #fff;
  max-width: 780px; margin: 0 auto;
}
.tagline {
  font-size: 20px; color: #f2fbff;
  max-width: 640px; margin: 20px auto 0;
}
.tagline em { font-style: italic; }
.sub { color: rgba(255, 255, 255, .85); margin-top: 12px; font-size: 15.5px; }

/* ---------- product card (overlaps the gradient) ---------- */
.product { padding: 0 24px 56px; margin-top: -72px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
}
.card.center { text-align: center; }
label {
  display: block; font-family: var(--sans); font-size: 13.5px; font-weight: 700;
  color: var(--ink); margin: 18px 0 6px; letter-spacing: .2px;
}
label:first-child { margin-top: 0; }
input, textarea, select {
  width: 100%; background: #f7fcfe; color: var(--ink);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font: 15px/1.6 var(--sans);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
  outline: none; border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(27, 90, 139, .2);
  background: #fff;
}
::placeholder { color: #93a8b3; }

.btn {
  display: inline-block; margin-top: 20px; cursor: pointer;
  font-family: var(--serif);
  background: var(--card); color: var(--brand);
  border: 2px solid var(--brand); border-radius: 999px;
  padding: 10px 26px; font-size: 16px; font-weight: 600;
  transition: background .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--brand-tint); text-decoration: none; }
.btn.primary {
  background: var(--gradient); border: none; color: #fff;
  width: 100%; padding: 15px 26px; font-size: 17.5px;
  box-shadow: 0 6px 18px rgba(11, 42, 71, .35);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: wait; }

.status { margin-top: 16px; font-size: 14.5px; color: var(--muted); }
.status.err { color: var(--err); font-weight: 600; }
.status.ok { color: var(--ok); font-weight: 600; }

.result {
  margin-top: 20px; padding: 26px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 15.5px;
}

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 20px 24px 56px; }
.step {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 22px;
  text-align: center;
}
.step span {
  display: inline-flex; width: 38px; height: 38px;
  align-items: center; justify-content: center;
  font-family: var(--sans);
  background: var(--gradient); color: #fff;
  border-radius: 50%; font-weight: 800; font-size: 16px;
}
.step h3 { margin: 14px 0 6px; font-size: 19px; font-weight: 700; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- pricing ---------- */
.pricing { text-align: center; padding: 24px 24px 56px; }
.pricing h2 { font-size: 32px; font-weight: 700; }
.pricing .sub { color: var(--muted); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.pack {
  position: relative;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 32px 20px 28px;
}
.pack.featured { border: 2px solid var(--brand-mid); }
.pack.featured::before {
  content: "Most popular";
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  font-family: var(--sans);
  background: var(--gradient); color: #fff;
  border-radius: 999px; padding: 2px 16px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .4px; white-space: nowrap;
}
.pack h3 { font-size: 16px; color: var(--muted); font-weight: 600; }
.pack .price { font-family: var(--sans); font-size: 40px; font-weight: 800; letter-spacing: -1px; margin: 12px 0 2px; }
.pack .per { color: var(--muted); font-size: 13px; }
.pack .btn { padding: 8px 30px; }

/* ---------- faq ---------- */
.faq { padding: 24px 24px 72px; }
.faq h2 { text-align: center; font-size: 32px; font-weight: 700; margin-bottom: 26px; }
details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 22px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
summary { cursor: pointer; font-family: var(--sans); font-weight: 700; font-size: 16px; }
summary::marker { color: var(--brand-mid); }
details p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 34px 0; color: var(--muted); font-size: 14px; text-align: center;
  background: var(--card);
  font-family: var(--sans);
}

@media (max-width: 680px) {
  .hero { padding: 56px 20px 110px; }
  .steps, .packs { grid-template-columns: 1fr; }
  .card { padding: 24px 18px; }
  
}

/* ---------- print the result ---------- */
@media print {
  body * { visibility: hidden; }
  #result, #result * { visibility: visible; }
  #result { position: absolute; left: 0; top: 0; width: 100%; border: none; box-shadow: none; background: #fff; color: #000; }
}

/* ---------- typography: no widows ---------- */
h1, h2, h3, h4, summary { text-wrap: balance; }
p, li, .tagline, .sub { text-wrap: pretty; }

/* ---------- consultant chat (factory navy) ---------- */
[hidden] { display: none !important; }
.chat-card { padding: 0; overflow: hidden; }
.chat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.chan-name { font-family: var(--sans); font-size: 16px; }
.chan-sub { font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.chat-scroll { height: 460px; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: #f4f7fa; }
.msg { display: flex; gap: 10px; max-width: 90%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.avatar { flex: 0 0 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 800 14px var(--sans); color: #fff; }
.av-c { background: var(--brand-mid); }
.bubble { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--brand-mid); border-radius: 4px 12px 12px 12px; padding: 11px 14px; font-size: 15px; white-space: pre-wrap; box-shadow: 0 1px 3px rgba(11,42,71,.06); }
.msg.me .bubble { background: var(--brand-tint); border: none; border-radius: 12px 4px 12px 12px; }
.who { display: block; font: 700 12px var(--sans); color: var(--brand-mid); margin-bottom: 3px; }
.typing .bubble { color: var(--muted); font-style: italic; }
.srcs { margin-top: 8px; }
.src { font: 600 12px var(--sans); margin-right: 10px; }
.chat-compose { display: flex; gap: 10px; align-items: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); }
.chat-compose textarea { flex: 1; resize: none; min-height: 44px; max-height: 130px; }
.send-btn { border-radius: 50% !important; width: 44px; height: 44px; flex: 0 0 44px; padding: 0 !important; font-size: 17px !important; display: inline-flex; align-items: center; justify-content: center; margin-top: 0 !important; }
.chat-under { padding: 0 18px 14px; }
.status { margin: 0 18px 14px; }
@media (max-width: 680px) {
  .nav { position: static; }
  .product.wrap { padding: 0 8px; }
  .chat-scroll { height: min(60dvh, 520px); padding: 12px 10px; }
  .msg { max-width: 96%; }
  .chat-compose textarea, .chat-under input { font-size: 16px; }
}
