/* ===== Callwyn site: corporate design (all pages except /demo) ===== */
:root {
  color-scheme: light;
  --navy: #0a1633;
  --navy-2: #13244d;
  --ink: #0f172a;
  --body: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-tint: #f1f4fb;
  --brand: #4338ca;
  --brand-dark: #3730a3;
  --brand-soft: #eef0fe;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .16);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 32px 64px -24px rgba(15, 23, 42, .28);
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 80px; }
body {
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--body); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
a { color: inherit; }
img, svg { display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  font: 600 15px/1 Inter, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(67, 56, 202, .3); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--outline { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn--outline:hover { border-color: var(--ink); }
.btn--white { background: #fff; color: var(--navy); }
.btn--white:hover { background: #e0e7ff; }
.btn--lg { padding: 15px 24px; font-size: 16px; }
.btn--sm { padding: 9px 14px; font-size: 14px; }
.btn:disabled { opacity: .7; cursor: wait; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand__mark { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px; background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.nav__links { display: flex; gap: 28px; margin-right: auto; }
.nav__links a { text-decoration: none; color: var(--body); font-size: 15px; font-weight: 500; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { display: flex; gap: 10px; }
@media (max-width: 960px) { .nav__links { display: none; } .nav__cta { margin-left: auto; } }
@media (max-width: 520px) { .nav__cta .btn--outline { display: none; } }

/* Section scaffolding */
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.head { max-width: 680px; margin-bottom: 52px; }
.head--center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.head h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 16px; }
.head p { font-size: 18px; }

/* Hero */
.hero { padding: 72px 0 88px; background:
  radial-gradient(900px 420px at 85% 0%, rgba(99, 102, 241, .10), transparent 70%),
  linear-gradient(180deg, #f6f8fe 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); letter-spacing: -.035em; margin: 22px 0 20px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero__sub { font-size: 19px; max-width: 540px; }
.hero__form { display: flex; gap: 10px; margin-top: 32px; max-width: 520px; }
.hero__form input, .cta__form input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line-2);
  font: 16px Inter, sans-serif; color: var(--ink); background: #fff;
}
.hero__form input:focus, .cta__form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.hero__note { font-size: 14px; color: var(--muted); margin-top: 12px; }
.hero__demo { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-weight: 600; color: var(--ink); text-decoration: none; }
.hero__demo .play { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.hero__demo:hover span:last-child { text-decoration: underline; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); list-style: none; font-size: 14px; color: var(--ink); font-weight: 500; }
.checks li { display: flex; align-items: center; gap: 7px; }
.checks .icon { width: 17px; height: 17px; color: var(--ok); stroke-width: 2.4; }
@media (max-width: 980px) { .hero__grid { grid-template-columns: 1fr; gap: 48px; } }
@media (max-width: 520px) { .hero__form { flex-direction: column; } }

/* Product mockup */
.product { position: relative; }
.console { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.console__bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft); font-size: 13px; }
.console__title { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 12px; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.console__meta { color: var(--muted); font-variant-numeric: tabular-nums; }
.console__body { padding: 20px 18px 64px; display: grid; gap: 12px; }
.msg { max-width: 86%; font-size: 14px; line-height: 1.5; }
.msg small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.msg p { padding: 10px 14px; border-radius: 12px; }
.msg--caller p { background: var(--bg-tint); color: var(--ink); border-top-left-radius: 4px; }
.msg--ai { justify-self: end; text-align: left; }
.msg--ai p { background: var(--navy); color: #e2e8f0; border-top-right-radius: 4px; }
.msg { opacity: 0; transform: translateY(6px); animation: rise .5s ease forwards; }
.msg:nth-child(1) { animation-delay: .3s; } .msg:nth-child(2) { animation-delay: 1.1s; }
.msg:nth-child(3) { animation-delay: 1.9s; } .msg:nth-child(4) { animation-delay: 2.7s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.lead {
  position: relative; width: 280px; margin: -44px -22px 0 auto; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 16px; font-size: 13px;
  opacity: 0; animation: rise .6s ease 3.5s forwards;
}
.lead__head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.lead__head .icon { color: var(--ok); width: 18px; height: 18px; }
.lead dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; }
.lead dt { color: var(--muted); }
.lead dd { color: var(--ink); font-weight: 500; }
.lead__foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; }
.caption { font-size: 12px; color: var(--muted); margin-top: 14px; }
@media (max-width: 980px) { .lead { width: auto; margin: -40px 16px 0; } }
@media (prefers-reduced-motion: reduce) { .msg, .lead { animation: none; opacity: 1; transform: none; } .live::before { animation: none; } }

/* Industries strip */
.strip { padding: 34px 0; border-bottom: 1px solid var(--line); }
.strip__inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; justify-content: center; }
.strip__label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.strip__row { display: flex; flex-wrap: wrap; gap: 10px 30px; justify-content: center; }
.strip__row span { font-weight: 600; color: #334155; font-size: 15px; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.calc__panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 32px; }
.field { margin-bottom: 26px; }
.field__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 15px; color: var(--ink); font-weight: 500; }
.field__top output { font-weight: 700; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--brand); height: 22px; cursor: pointer; }
.calc__result { margin-top: 8px; padding: 22px; border-radius: 12px; background: var(--navy); color: #cbd5e1; }
.calc__result strong { display: block; font-size: clamp(34px, 5vw, 46px); color: #fff; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 4px 0; }
.calc__note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.facts { list-style: none; display: grid; gap: 18px; margin-top: 28px; }
.facts li { display: flex; gap: 14px; }
.facts .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.facts b { display: block; color: var(--ink); }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; gap: 40px; } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.step__num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 20px; }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step__time { display: inline-block; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--brand); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; }
.feature { padding: 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature:nth-child(3n) { border-right: 0; }
.feature:nth-last-child(-n+3) { border-bottom: 0; }
.feature .ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 20px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { font-size: 15px; }
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr 1fr; }
  .feature:nth-child(3n) { border-right: 1px solid var(--line); }
  .feature:nth-child(2n) { border-right: 0; }
  .feature:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .feature:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(3n) { border-right: 0; }
  .feature:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .feature:last-child { border-bottom: 0; }
}

/* Industries */
.industries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.industry { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.industry:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.industry h3 { font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.industry h3 .icon { width: 16px; height: 16px; color: var(--muted); transition: color .15s, transform .15s; }
.industry:hover h3 .icon { color: var(--brand); transform: translateX(3px); }
.industry p { font-size: 14px; color: var(--muted); }
.industries__more { text-align: center; margin-top: 28px; color: var(--muted); }
@media (max-width: 980px) { .industries { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .industries { grid-template-columns: 1fr; } }

/* Trust */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust__item { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.trust__item .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: #fff; margin-bottom: 18px; }
.trust__item h3 { font-size: 17px; margin-bottom: 6px; }
.trust__item p { font-size: 15px; }
@media (max-width: 980px) { .trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .trust { grid-template-columns: 1fr; } }

/* Pricing */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.tier { display: flex; flex-direction: column; padding: 32px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.tier--pop { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); position: relative; }
.tier__badge { position: absolute; top: -13px; left: 32px; padding: 4px 12px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; }
.tier h3 { font-size: 18px; }
.tier__for { font-size: 14px; color: var(--muted); margin-top: 4px; }
.tier__price { font-size: 44px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; margin: 22px 0 4px; }
.tier__price span { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tier__setup { font-size: 14px; color: var(--muted); }
.tier ul { list-style: none; display: grid; gap: 11px; margin: 26px 0 30px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink); }
.tier li { display: flex; gap: 10px; align-items: flex-start; }
.tier li .icon { width: 18px; height: 18px; color: var(--ok); stroke-width: 2.4; margin-top: 3px; }
.tier .btn { margin-top: auto; }
.pricing__note { text-align: center; margin-top: 28px; font-size: 15px; color: var(--muted); }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; }
.faq { border-bottom: 1px solid var(--line); }
.faq:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; color: var(--ink); font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 0 22px; max-width: 640px; }
.faq-side p { margin-top: 12px; }
.faq-side a { color: var(--brand); font-weight: 600; text-decoration: none; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; gap: 24px; } }

/* Final CTA */
.cta { background: var(--navy); color: #cbd5e1; padding: 88px 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(600px 300px at 90% 10%, rgba(99, 102, 241, .35), transparent 70%),
  radial-gradient(500px 300px at 0% 100%, rgba(124, 58, 237, .25), transparent 70%); }
.cta__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.cta h2 { color: #fff; font-size: clamp(30px, 4vw, 44px); margin-bottom: 16px; }
.cta p { font-size: 18px; }
.cta__card { background: #fff; border-radius: 18px; padding: 28px; box-shadow: var(--shadow-lg); }
.cta__card h3 { font-size: 19px; margin-bottom: 4px; }
.cta__card > p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.cta__form { display: grid; gap: 10px; }
.cta__note { font-size: 13px; color: var(--muted); margin-top: 12px; text-align: center; }
.cta .checks { border-color: rgba(255, 255, 255, .12); color: #e2e8f0; }
.cta .checks .icon { color: #34d399; }
@media (max-width: 900px) { .cta__inner { grid-template-columns: 1fr; } }

/* Footer */
.footer { background: #fff; padding: 64px 0 32px; border-top: 1px solid var(--line); font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer__about p { margin-top: 14px; max-width: 300px; color: var(--muted); }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a { text-decoration: none; color: var(--muted); }
.footer ul a:hover { color: var(--ink); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }

/* Success modal (used by script.js) */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(10, 22, 51, .55); backdrop-filter: blur(4px); padding: 24px; }
.modal[hidden] { display: none; }
.modal__card { background: #fff; border-radius: 18px; padding: 40px 34px; max-width: 420px; text-align: center; box-shadow: var(--shadow-lg); }
.modal__check { width: 56px; height: 56px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 26px; font-weight: 700; }
.modal__card h3 { font-size: 22px; margin-bottom: 10px; }
.modal__card p { margin-bottom: 24px; }

/* Industry pages: "How Callwyn fixes it" list */
.fixlist { list-style: none; display: grid; gap: 14px; }
.fixlist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.fixlist .icon { width: 20px; height: 20px; color: var(--ok); stroke-width: 2.4; margin-top: 2px; }
.trust--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .trust--3 { grid-template-columns: 1fr; } }

/* Legal pages */
.legal { padding: 64px 0 96px; }
.legal__wrap { max-width: 760px; }
.legal__back { display: inline-flex; color: var(--brand); font-weight: 600; font-size: 14px; text-decoration: none; margin-bottom: 28px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -.03em; margin-bottom: 8px; }
.legal__updated { color: var(--muted); font-size: 14px; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.legal__notice { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; border-radius: 12px; padding: 16px 18px; margin-bottom: 28px; font-size: 15px; }
.legal h2 { font-size: 20px; margin: 36px 0 10px; }
.legal p, .legal li { font-size: 16px; margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal a { color: var(--brand); }
