/* Intelligent by Design Management — site styles */

:root {
  --ink: #0f1b2d;
  --ink-soft: #3a4a60;
  --muted: #5f6f84;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-alt: #f2efe8;
  --line: #e3ded3;
  --brand: #1d3f72;
  --brand-strong: #132c52;
  --accent: #d98b2b;
  --accent-text: #a35f0f;
  --accent-soft: #fbeedd;
  --on-brand: #ffffff;
  --ok: #2f7a4f;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
  --radius: 14px;
  --max: 1160px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef2f8;
    --ink-soft: #c3cddb;
    --muted: #97a4b6;
    --bg: #0d1522;
    --surface: #142033;
    --surface-alt: #18263b;
    --line: #26364d;
    --brand: #8fb4ec;
    --brand-strong: #b5cdf3;
    --accent: #f0a849;
    --accent-text: #f0a849;
    --accent-soft: #2e2516;
    --on-brand: #0d1522;
    --ok: #6cc193;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--surface-alt); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 70px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav-links .btn { margin-top: 8px; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .98rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-accent { background: var(--accent); color: #1b1205; }
.btn-accent:hover { color: #1b1205; filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--ink); }
.nav-links .btn-primary { color: var(--on-brand); padding: 9px 16px; }
.nav-links .btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }

/* Hero */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--ok); flex: none; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 22px;
}
.hero-card h3 { font-size: .85rem; font-family: var(--font-body); color: var(--muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feed li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 12px; background: var(--surface-alt); }
.feed .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.feed .ico svg { width: 20px; height: 20px; }
.feed strong { display: block; font-size: .95rem; }
.feed span { font-size: .87rem; color: var(--muted); }
.hero-card .note { font-size: .78rem; color: var(--muted); margin: 14px 0 0; }

@media (max-width: 900px) {
  .hero { padding: 48px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Sections */
section { padding: 72px 0; }
.section-alt { background: var(--surface-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } section { padding: 52px 0; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card .icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 18px; }
.card .icon svg { width: 24px; height: 24px; }
.card p { color: var(--ink-soft); }
.card .more { margin-top: auto; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.card .more::after { content: "→"; transition: transform .15s; }
.card .more:hover::after { transform: translateX(3px); }
.card-feature { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.card-feature p { color: color-mix(in srgb, var(--on-brand) 85%, transparent); }
.card-feature .icon { background: color-mix(in srgb, var(--on-brand) 15%, transparent); color: var(--on-brand); }
.card-feature .more, .card-feature .more:hover { color: var(--on-brand); }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 24px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-head); font-size: 2rem; color: var(--accent-text); display: block; margin-bottom: 8px; line-height: 1;
}
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Check lists */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.checks svg { width: 22px; height: 22px; color: var(--ok); margin-top: 3px; }
.checks strong { display: block; }
.checks span { color: var(--ink-soft); }

/* CTA band */
.cta-band { background: #132c52; color: #fff; border-radius: 22px; padding: 48px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: rgba(255,255,255,.82); margin: 0; font-size: 1.08rem; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; padding: 32px 24px; } }

/* Service detail */
.page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero .lead { margin-bottom: 0; }
.service-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.service-nav a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-size: .9rem; font-weight: 500; background: var(--surface); }
.service-nav a:hover { color: var(--ink); border-color: var(--brand); }
.service { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; padding: 64px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.service:last-of-type { border-bottom: 0; }
.service .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 18px; }
.service .icon svg { width: 26px; height: 26px; }
.service p { color: var(--ink-soft); }
.service .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.service .panel h3 { font-size: .9rem; font-family: var(--font-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
@media (max-width: 860px) { .service { grid-template-columns: 1fr; gap: 24px; padding: 48px 0; } }

/* Example reply */
.reply-demo { margin-top: 22px; border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; font-size: .95rem; color: var(--ink-soft); }
.reply-demo .stars { color: var(--accent-text); letter-spacing: 2px; }
.reply-demo p { margin-bottom: .6em; }

/* Forms */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 6px; margin: 0; }
legend { font-weight: 600; font-size: .92rem; padding: 0 6px; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
@media (max-width: 600px) { .checkbox-grid { grid-template-columns: 1fr; } }
.checkbox-grid label { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0; padding: 6px 0; }
.checkbox-grid input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-note { font-size: .88rem; color: var(--muted); margin: 0; }
.form-status { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); display: none; }
.form-status.show { display: block; }

.contact-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; }
.contact-list .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.contact-list .ico svg { width: 20px; height: 20px; }
.contact-list span { color: var(--muted); font-size: .9rem; display: block; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent-text); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); padding-bottom: 18px; margin: 0; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 52px 0 28px; margin-top: 40px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; color: var(--ink-soft); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { color: var(--ink-soft); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Prose */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-soft); }

/* Chat widget */
.chat-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 28px rgba(15,27,45,.3);
  display: grid; place-items: center; transition: transform .15s;
}
.chat-launcher:hover { transform: scale(1.05); }
.chat-launcher svg { width: 28px; height: 28px; }
.chat-panel {
  position: fixed; right: 20px; bottom: 92px; z-index: 61;
  width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100vh - 120px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15,27,45,.28); display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
@media (max-width: 480px) { .chat-panel { right: 16px; } .chat-launcher { right: 16px; bottom: 16px; } }
.chat-head { background: var(--brand); color: var(--on-brand); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-head strong { display: block; font-size: 1rem; }
.chat-head span { font-size: .8rem; opacity: .85; }
.chat-close { background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 4px 8px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: .93rem; line-height: 1.45; }
.msg.bot { background: var(--surface-alt); color: var(--ink); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 4px; align-self: flex-end; }
.msg a { color: inherit; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--brand); color: var(--brand); background: var(--surface); border-radius: 999px; padding: 6px 12px; font: 500 .85rem var(--font-body); cursor: pointer; }
.chip:hover { background: var(--brand); color: var(--on-brand); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form input { padding: 10px 12px; }
.chat-form button { flex: none; padding: 10px 14px; }

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

/* Logo wordmark */
.brand-name em { font-style: italic; font-weight: 500; color: var(--accent-text); }
.brand-name small { display: flex; align-items: center; gap: 7px; }
.brand-name small::before { content: ""; width: 14px; height: 1.5px; background: var(--accent); flex: none; }
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.04); }
.brand-mark { transition: transform .25s ease; }

/* Pricing */
.service-nav .nav-pricing { border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
#pricing { scroll-margin-top: 70px; }
.bundle-note { display: inline-block; margin-top: 6px; padding: 8px 16px; border-radius: 999px; background: var(--accent-soft); color: var(--ink) !important; font-size: .98rem !important; }
.price-group { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 36px 0; border-top: 1px solid var(--line); }
.price-group:first-of-type { border-top: 0; padding-top: 8px; }
.price-intro h3 { font-size: 1.45rem; margin-bottom: .35em; }
.price-intro p { color: var(--ink-soft); font-size: .98rem; }
.price-intro a { font-weight: 600; text-decoration: none; font-size: .95rem; }
.price-intro a::after { content: " →"; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan-popular { border: 2px solid var(--accent); }
.plan-badge { position: absolute; top: -12px; left: 22px; background: var(--accent); color: #1b1205; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.plan-name { font-family: var(--font-body); font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.price { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.price strong { font-family: var(--font-head); font-size: 2.5rem; font-weight: 600; line-height: 1.1; color: var(--ink); }
.price span { color: var(--muted); font-size: .95rem; }
.setup { font-size: .88rem; color: var(--accent-text); font-weight: 600; margin: 4px 0 16px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; font-size: .95rem; color: var(--ink-soft); }
.plan-list li { padding-left: 24px; position: relative; }
.plan-list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 11px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; }
.price-footnote { text-align: center; color: var(--muted); font-size: .9rem; margin: 28px auto 0; max-width: 720px; }
@media (max-width: 900px) { .price-group { grid-template-columns: 1fr; gap: 18px; } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; gap: 24px; } }
