/* =====================================================================
   Business Web Express — main.css
   Design system: palette, typography, layout, components, animations.
   Vanilla CSS, no build step. Professional blue theme.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette (blue) */
  --brand:        #1e5fbf;   /* primary blue — buttons, links, accents */
  --brand-dark:   #14498f;   /* hover / active */
  --brand-light:  #e8f1fc;   /* tints, section bands, card image areas */
  --brand-glow:   rgba(30, 95, 191, .28);

  --ink:          #16202e;   /* dark footer + headings */
  --text:         #2a3441;   /* body text */
  --text-muted:   #5b6675;   /* secondary text */
  --text-tertiary: #a5adba;  /* faint text/icons, e.g. the admin-toggle icon */

  --bg:           #ffffff;   /* light content area */
  --bg-alt:       #f5f8fc;   /* alternating sections */
  --border:       #dce3ec;
  --success:      #1a7f37;
  --danger:       #c62828;
  --warning:      #b26a00;
  --gold:         #f2b705;   /* stars / highlights */

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          Helvetica, Arial, sans-serif;

  /* Spacing scale */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* Radii + shadows */
  --radius:    14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(22,32,46,.06), 0 1px 2px rgba(22,32,46,.04);
  --shadow:    0 8px 24px rgba(22,32,46,.08);
  --shadow-lg: 0 20px 48px rgba(22,32,46,.14);

  --maxw: 1160px;
  --nav-h: 68px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
strong { color: var(--ink); }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm); transition: top .18s ease;
}
.skip-link:focus { top: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--brand-glow); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--sp-9) 0; }
.section--tight { padding: var(--sp-8) 0; }
.section--alt { background: var(--bg-alt); }
.section--ink { background: var(--ink); color: #cdd6e2; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--brand { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #eaf2fd; }
.section--brand h2, .section--brand h3 { color: #fff; }

.section-head { max-width: 720px; margin: 0 auto var(--sp-7); text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: var(--sp-3);
}
.section--ink .eyebrow, .section--brand .eyebrow { color: #9ec3f2; }
.lead { font-size: 1.15rem; color: var(--text-muted); }
.section--ink .lead, .section--brand .lead { color: #cdd6e2; }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
  text-align: center; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px var(--brand-glow); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 26px var(--brand-glow); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: var(--brand-light); color: var(--brand-dark); }
.btn-ghost:hover { background: #d7e7fb; color: var(--brand-dark); }
.btn-white { background: #fff; color: var(--brand-dark); }
.btn-white:hover { background: #f0f5fc; color: var(--brand-dark); transform: translateY(-2px); }
.btn-lg { font-size: 1.08rem; padding: 16px 32px; }
.btn-block { display: flex; width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-6); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c6d5ea; }
.card h3 { margin-top: var(--sp-3); }
.card p:last-child { margin-bottom: 0; }

/* Icon chip */
.icon-chip {
  width: 52px; height: 52px; border-radius: 14px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--brand-light); color: var(--brand);
}
.icon-chip svg { width: 26px; height: 26px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 460px at 82% -8%, rgba(30,95,191,.16), transparent 60%),
    linear-gradient(180deg, var(--brand-light) 0%, #ffffff 72%);
  padding: calc(var(--nav-h) + 40px) 0 var(--sp-9);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-8); align-items: center; }
.hero h1 { margin-bottom: var(--sp-4); }
.hero .lead { font-size: 1.28rem; margin-bottom: var(--sp-6); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero-trust { margin-top: var(--sp-6); display: flex; flex-wrap: wrap; gap: var(--sp-5); color: var(--text-muted); font-size: .95rem; }
.hero-trust b { color: var(--ink); }
.hero-art { filter: drop-shadow(0 24px 48px rgba(22,32,46,.18)); }

/* ---------- Feature / benefit lists ---------- */
.feature { text-align: left; }
.feature h3 { font-size: 1.15rem; margin: var(--sp-4) 0 var(--sp-2); }
.feature p { color: var(--text-muted); margin: 0; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding: 6px 0 6px 30px; color: var(--text); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--success);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/78% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/78% no-repeat;
}

/* ---------- Steps (How It Works) ---------- */
.steps { counter-reset: step; display: grid; gap: var(--sp-5); }
.step { position: relative; padding-left: 74px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 52px; height: 52px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px var(--brand-glow);
}
.step h3 { margin: 6px 0 4px; }
.step p { color: var(--text-muted); margin: 0; }

/* ---------- Pricing ---------- */
.price-card { display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); position: relative; }
.price-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px;
}
.price { font-size: 2.4rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.price small { display: block; font-size: .85rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.price-card .checklist { margin: var(--sp-4) 0 var(--sp-6); flex: 1; }

/* ---------- Testimonials ---------- */
.quote-card { background: #fff; }
.quote-card .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: var(--sp-3); }
.quote-card blockquote { margin: 0 0 var(--sp-4); font-size: 1.08rem; color: var(--text); }
.quote-author { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 800; }
.quote-author b { color: var(--ink); display: block; }
.quote-author span { color: var(--text-muted); font-size: .9rem; }

/* ---------- FAQ accordion ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer; font-family: inherit;
  font-size: 1.1rem; font-weight: 700; color: var(--ink); text-align: left;
  padding: 22px 44px 22px 0; position: relative;
}
.faq-q::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--brand); transition: transform .2s ease;
}
.faq-q[aria-expanded="true"]::after { content: "\2013"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a > div { padding: 0 0 22px; color: var(--text-muted); }

/* ---------- Prototype / portfolio cards ---------- */
.thumb {
  border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border);
  background: var(--brand-light); aspect-ratio: 16 / 10;
}
.thumb svg, .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--brand-dark); background: var(--brand-light);
  padding: 4px 10px; border-radius: 999px; margin-bottom: var(--sp-3);
}
.mini-list { list-style: none; padding: 0; margin: 0 0 var(--sp-5); }
.mini-list li { padding: 3px 0 3px 20px; position: relative; color: var(--text-muted); font-size: .95rem; }
.mini-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }

/* ---------- Browser mockup (image-free previews) ---------- */
.mockup {
  aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: #fff; display: flex; flex-direction: column;
}
.mockup-bar { height: 26px; background: #eef2f7; display: flex; align-items: center; gap: 5px; padding: 0 10px; border-bottom: 1px solid var(--border); flex: none; }
.mockup-bar i { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.mockup-bar .url { margin-left: 8px; height: 10px; flex: 1; max-width: 60%; background: #dbe3ee; border-radius: 5px; }
.mockup-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 14px; color: #fff;
  background: var(--mk, linear-gradient(135deg, var(--brand), var(--brand-dark)));
}
.mockup-body .mk-label { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.mockup-body .mk-sub { font-size: .8rem; opacity: .9; }
.mockup-body .mk-bars { display: flex; gap: 5px; margin-top: 4px; }
.mockup-body .mk-bars span { width: 34px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.55); }
.mockup-body .mk-bars span:nth-child(2) { width: 22px; } .mockup-body .mk-bars span:nth-child(3) { width: 28px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: var(--sp-3); }
.cta-band .btn { margin-top: var(--sp-4); }

/* ---------- Comparison table ---------- */
.compare-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; background: #fff; }
.compare th, .compare td { padding: 14px 18px; text-align: center; border-bottom: 1px solid var(--border); }
.compare thead th { background: var(--brand-light); color: var(--ink); font-size: .95rem; position: sticky; top: 0; }
.compare tbody th { text-align: left; font-weight: 600; color: var(--text); }
.compare tr:last-child td, .compare tr:last-child th { border-bottom: 0; }
.compare .yes { color: var(--success); font-weight: 800; }
.compare .no { color: var(--text-tertiary, #a5adba); }
.compare .col-featured { background: #f2f7fe; }

/* ---------- Header / nav (rendered by components.js) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  background: rgba(255,255,255,.9); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { height: var(--nav-h); display: flex; align-items: center; gap: var(--sp-5); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand .logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.brand span b { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; list-style: none; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 8px; color: var(--text);
  font-weight: 600; font-size: .95rem;
}
.nav-links a:hover { background: var(--brand-light); color: var(--brand-dark); }
.nav-links a[aria-current="page"] { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px;
  color: var(--ink);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* Subtle link to the password-protected backoffice; lives in nav-links so it
   inherits the same right-alignment/drawer behavior without extra flex math.
   Selectors are scoped as ".nav-links a.admin-toggle" (specificity 0,2,1) so
   they reliably beat the generic ".nav-links a" rule (0,1,1) above. */
.nav-links a.admin-toggle {
  display: inline-flex; align-items: center; justify-content: center; padding: 8px;
  color: var(--text-tertiary); opacity: .55; transition: opacity .15s ease, color .15s ease;
}
.nav-links a.admin-toggle:hover { background: none; opacity: 1; color: var(--brand); }
.admin-toggle svg { width: 20px; height: 20px; }
.admin-toggle-label { display: none; }
@media (max-width: 1080px) {
  .nav-links a.admin-toggle { justify-content: flex-start; gap: 10px; padding: 12px 14px; opacity: .75; }
  .admin-toggle svg { width: 18px; height: 18px; }
  .admin-toggle-label { display: inline; font-weight: 600; font-size: .95rem; }
}

/* Mobile drawer */
.nav-backdrop { position: fixed; inset: 0; background: rgba(22,32,46,.5); opacity: 0; visibility: hidden; transition: opacity .2s ease; z-index: 98; }
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

/* ---------- Prototype demo toolbar (on /prototypes/*.html) ---------- */
.proto-bar {
  position: sticky; top: 0; z-index: 120; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; font-size: .9rem;
}
.proto-bar .pb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.proto-bar a.pb-back { color: #cdd6e2; font-weight: 600; white-space: nowrap; }
.proto-bar a.pb-back:hover { color: #fff; }
.proto-bar .pb-tag { background: rgba(255,255,255,.12); padding: 4px 12px; border-radius: 999px; font-size: .78rem; white-space: nowrap; }
.proto-bar .btn { padding: 9px 18px; font-size: .9rem; }
@media (max-width: 640px) { .proto-bar .pb-tag { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #a9b4c2; padding: var(--sp-8) 0 var(--sp-5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--sp-6); }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: var(--sp-4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #a9b4c2; }
.site-footer a:hover { color: #fff; }
.footer-brand .brand { color: #fff; margin-bottom: var(--sp-4); }
.footer-brand .brand span { color: #fff; }
.footer-brand p { color: #8a95a4; max-width: 34ch; }
.social { display: flex; gap: 10px; margin-top: var(--sp-4); }
.social a {
  width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; color: #cdd6e2;
}
.social a:hover { background: var(--brand); color: #fff; }
.social svg { width: 20px; height: 20px; }
.footer-bottom {
  margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .88rem; color: #8a95a4;
}
.footer-bottom a { color: #8a95a4; }

/* ---------- Scroll reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.stack > * + * { margin-top: var(--sp-3); }
.pill { display:inline-block; background: var(--brand-light); color: var(--brand-dark); font-weight:700; font-size:.85rem; padding:6px 14px; border-radius:999px; }

/* ---------- Responsive ---------- */
/* Nav collapses earlier than the layout grid (10 links + CTA need the room) */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100dvh; width: min(320px, 82vw);
    background: #fff; box-shadow: var(--shadow-lg); flex-direction: column;
    align-items: stretch; gap: 4px; padding: calc(var(--nav-h) + 16px) 18px 24px;
    margin: 0; transform: translateX(100%); transition: transform .25s ease; z-index: 99;
    overflow-y: auto;
  }
  body.nav-open .nav-links { transform: none; }
  .nav-links a { padding: 12px 14px; font-size: 1.05rem; }
  .nav-actions { flex-direction: column; align-items: stretch; margin: 12px 0 0; }
  .nav-actions .btn { width: 100%; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { max-width: none; }
  .hero-cta, .hero-trust { justify-content: center; }
  .hero-art { max-width: 480px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: var(--sp-8) 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .nav-backdrop, .no-print { display: none !important; }
  body { font-size: 12pt; color: #000; }
  .section { padding: 12px 0; }
}
