/* eSMS Africa — public site styles
   Colours (--accent, --accent-dark, --accent-soft, --accent-deep, --secondary, --bg) are injected from Admin > Settings. */
:root {
  --accent: #4b8753; --accent-dark: #336038; --accent-soft: #e6f0e8; --accent-deep: #16261a;
  --secondary: #a2aebb; --bg: #f3f3f3;
  --surface: #ffffff; --text: #1f2933; --muted: #5b6673; --border: #dde1e6;
  --wa: #25d366;
  --radius: 12px; --radius-lg: 22px;
  --shadow: 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-lg: 0 18px 44px rgba(16, 24, 40, .16);
  --container: 1180px;
  --font-head: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.65; color: var(--text); background: var(--bg); }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; border-radius: 4px; }
.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; background: var(--accent-dark); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 200; }
.skip-link:focus { top: 12px; color: #fff; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 820px; }
.center { text-align: center; margin-top: 36px; }
.muted { color: var(--muted); }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.18; letter-spacing: -.012em; color: var(--accent-deep); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
h2 { font-size: clamp(1.55rem, 2.9vw, 2.15rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 11px 24px; border-radius: 10px; border: 2px solid transparent; font: 600 .98rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--accent-dark); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-light { background: #fff; color: var(--accent-deep); }
.btn-light:hover { background: var(--accent-soft); color: var(--accent-deep); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost-light:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-whatsapp { background: var(--wa); color: #06331a; }
.btn-whatsapp:hover { background: #1ebe5a; color: #06331a; }
.btn-lg { min-height: 52px; padding: 13px 30px; font-size: 1.04rem; }
.btn-block { width: 100%; margin-top: 12px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.btn-row-center { justify-content: center; }
.link-more { font-weight: 600; text-decoration: none; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }

.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: .8rem; font-weight: 600; }
.badge-flag { background: var(--accent); color: #fff; }
.badge-soon { background: #e6e9ed; color: #3d4753; }
.mini-tag { font-size: .72rem; background: #e6e9ed; color: #3d4753; padding: 1px 8px; border-radius: 999px; margin-left: 6px; white-space: nowrap; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--accent-deep); color: #dbe6dd; font-size: .86rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.topbar a { color: #dbe6dd; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; margin-right: 20px; }
.topbar a:hover { color: #fff; }
.topbar-contact { display: flex; flex-wrap: wrap; }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent-deep); font-family: var(--font-head); font-size: 1.3rem; }
.brand b { color: var(--accent); }
.brand img { height: 40px; width: auto; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; }
.brand-light { color: #fff; }
.brand-light b { color: #b9d8be; }

.primary-nav { display: flex; align-items: center; gap: 22px; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 10px 12px; color: var(--text); text-decoration: none; font-weight: 500; border-radius: 8px; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--accent-dark); background: var(--accent-soft); }
.primary-nav .nav-cta { color: #fff; }
.primary-nav .nav-cta:hover { color: #fff; background: var(--accent-dark); }
.has-sub { display: flex; align-items: center; }
.sub-toggle { display: none; }
.sub { display: none; position: absolute; left: 0; top: 100%; min-width: 260px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; flex-direction: column; align-items: stretch; gap: 0; z-index: 20; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: flex; }
.nav-toggle { display: none; background: none; border: 0; color: var(--accent-deep); padding: 8px; cursor: pointer; border-radius: 8px; }

.flash { padding: 12px 0; font-weight: 500; }
.flash-success { background: var(--accent-soft); color: var(--accent-deep); }
.flash-error { background: #fdeceb; color: #8a1f17; }

/* ---------- Breadcrumbs & page hero ---------- */
.breadcrumbs { background: var(--surface); border-bottom: 1px solid var(--border); font-size: .88rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 12px 0; gap: 6px; }
.breadcrumbs li + li::before { content: '/'; margin-right: 6px; color: var(--secondary); }
.breadcrumbs a { text-decoration: none; }
.page-hero { background: var(--accent-soft); padding: 52px 0 46px; }
.page-hero h1 { margin-bottom: .3em; }
.page-hero .lead { margin-bottom: 0; }
.page-hero .badge { margin-bottom: 12px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Media frames ---------- */
.media-frame { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--accent-soft), var(--secondary)); }
.media-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-frame.tall { aspect-ratio: 5 / 4; }
.media-frame.wide { aspect-ratio: 16 / 9; margin-bottom: 30px; }
.media-frame.post-media { aspect-ratio: 16 / 10; border-radius: 0; }
.media-frame.team-photo { aspect-ratio: 1; width: 140px; border-radius: 50%; margin-bottom: 14px; }
.media-frame.svc-media { border-radius: 0; aspect-ratio: auto; min-height: 100%; }

/* ---------- Hero ---------- */
.hero { background: var(--surface); padding: 64px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 34px 0 0; padding: 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dd { margin: 0; font: 700 1.7rem var(--font-head); color: var(--accent-dark); }
.hero-stats dt { color: var(--muted); font-size: .9rem; }
.hero-visual { position: relative; padding: 0 0 36px 36px; }
.hero-visual::before { content: ''; position: absolute; inset: -22px -22px 0 30px; background: var(--accent-soft); border-radius: 34px; }
.hero-photo { position: relative; aspect-ratio: 4 / 3.3; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.sms-card { position: absolute; left: 0; bottom: 0; width: min(300px, 82%); background: #fff; border-radius: 22px; padding: 16px 16px 8px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.sms-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.sms-head strong { display: block; font-size: .95rem; line-height: 1.2; }
.sms-head small { color: var(--muted); font-size: .76rem; }
.sms-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 .85rem var(--font-head); }
.bubble { margin: 0 0 8px; padding: 9px 13px; background: #eef1f4; border-radius: 16px 16px 16px 4px; font-size: .84rem; line-height: 1.45; color: #2b3540; max-width: 92%; }
/* One orchestrated moment: the three sample messages arrive in turn. */
.bubble { animation: bubble-in .5s ease both; }
.b1 { animation-delay: .5s; } .b2 { animation-delay: 1.7s; } .b3 { animation-delay: 2.9s; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

.trust-strip { background: var(--accent-deep); color: #e6efe8; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.trust-grid div { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.trust-grid .icon { color: #9fd0a7; flex: none; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 680px; margin: 0 0 42px; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-copy .btn-row { margin-top: 8px; }

/* Services: flagship card leads and is wider */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.section-alt .svc-card { background: var(--bg); }
.svc-body { padding: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1; }
.svc-body h3 { margin: 10px 0 6px; }
.svc-body h3 a { color: inherit; text-decoration: none; }
.svc-body h3 a:hover { color: var(--accent-dark); }
.svc-body p { color: var(--muted); flex: 1; }
.svc-icon, .why-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); }
.svc-flagship { grid-column: span 2; display: grid; grid-template-columns: 1fr 1.05fr; border: 2px solid var(--accent); }
.svc-flagship .svc-body { padding: 34px; justify-content: center; }
.svc-flagship h3 { font-size: 1.6rem; }
.svc-card.is-soon { border-style: dashed; }
.svc-grid-even .svc-flagship { grid-column: auto; display: flex; }
.svc-grid-even .svc-flagship .svc-media { display: none; }
.svc-grid-even .svc-flagship .svc-body { padding: 26px; }
.svc-grid-even .svc-flagship h3 { font-size: 1.18rem; }

.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 30px; }
.why-item { display: flex; gap: 16px; align-items: flex-start; }
.why-item h3 { margin-bottom: .25em; }
.why-item p { color: var(--muted); margin: 0; }

.section-dark { background: var(--accent-deep); color: #dbe6dd; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-head p { color: #b8c9bc; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; }
.steps li { position: relative; padding-top: 4px; }
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 22px; left: 58px; right: -16px; border-top: 2px dashed rgba(255,255,255,.28); }
.step-no { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 1.05rem var(--font-head); position: relative; z-index: 1; }
.steps p { color: #b8c9bc; margin: 0; }

.ind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ind-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px; }
.ind-card h3, .ind-card h2 { margin: 14px 0 6px; font-size: 1.15rem; }
.ind-card p { color: var(--muted); margin: 0; }
.ind-card-photo { padding: 0; overflow: hidden; }
.ind-body { padding: 24px 26px 28px; }

.soon-band { background: var(--accent-soft); }
.soon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.soon-item { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: #fff; border: 1px dashed var(--accent); border-radius: 14px; text-decoration: none; color: var(--text); }
.soon-item:hover { border-style: solid; color: var(--text); }
.soon-item strong { display: block; }
.soon-item small { color: var(--accent-dark); font-weight: 600; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; gap: 6px; }
.plan-card.featured { border: 2px solid var(--accent); box-shadow: var(--shadow-lg); }
.plan-price { font: 700 1.8rem var(--font-head); color: var(--accent-dark); margin: 0; }
.tick-list { list-style: none; padding: 0; margin: 10px 0 20px; flex: 1; }
.tick-list li { display: flex; gap: 10px; padding: 5px 0; }
.tick-list .icon { color: var(--accent); flex: none; }

.post-grid, .testi-grid, .team-grid, .office-grid { display: grid; gap: 24px; }
.post-grid { grid-template-columns: repeat(3, 1fr); }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.section-alt .post-card { background: var(--bg); }
.post-body { padding: 20px 22px 24px; }
.post-body time { color: var(--muted); font-size: .86rem; }
.post-body h2, .post-body h3 { font-size: 1.14rem; margin: 6px 0 8px; }
.post-body h2 a, .post-body h3 a { color: inherit; text-decoration: none; }
.post-body h2 a:hover, .post-body h3 a:hover { color: var(--accent-dark); }
.post-body p { color: var(--muted); }

.testi-grid { grid-template-columns: repeat(3, 1fr); }
.testi { margin: 0; background: var(--bg); border-radius: 14px; padding: 26px; border: 1px solid var(--border); }
.testi blockquote { margin: 0 0 16px; }
.testi figcaption span { display: block; color: var(--muted); font-size: .9rem; }
.google-reviews { margin-top: 30px; }

.team-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.team-card { text-align: center; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.team-card .media-frame { margin-left: auto; margin-right: auto; }

.office-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.office-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px; }
.section-alt .office-card { background: var(--bg); }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list .icon { color: var(--accent); flex: none; margin-top: 3px; }
.map-wrap { margin-top: 18px; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

.cta-band { background: var(--accent-dark); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .2em; }
.cta-band p { margin: 0; color: #d3e3d6; }
.cta-band .btn-row { margin-top: 0; }

/* ---------- Detail pages ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.side-card { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.side-card h2 { font-size: 1.3rem; }
.side-phone { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; }
.side-phone .icon { color: var(--accent); }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.plain-list { padding-left: 1.2em; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 34px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.inline-cta, .inline-newsletter { background: var(--accent-soft); border-radius: 16px; padding: 28px; margin: 28px 0; }
.inline-cta h2, .inline-newsletter h2 { font-size: 1.35rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.chip { padding: 7px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); font-weight: 500; }
.chip.active, .chip:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span { min-width: 42px; padding: 8px 14px; text-align: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; }
.pagination span { background: var(--accent); color: #fff; border-color: var(--accent); }
.empty { padding: 40px; text-align: center; background: var(--surface); border: 1px dashed var(--secondary); border-radius: 14px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-group { margin: 36px 0 14px; font-size: 1.3rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { flex: none; color: var(--accent); transition: transform .2s; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 6px; color: var(--muted); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 30px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .94rem; }
.req { color: #b3261e; }
input, select, textarea { width: 100%; padding: 12px 14px; font: inherit; color: var(--text); background: #fff; border: 1.5px solid #c9d0d8; border-radius: 10px; }
input, select { min-height: 46px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { resize: vertical; }
.notice { border-radius: 14px; padding: 22px 26px; margin-bottom: 22px; }
.notice h2 { font-size: 1.3rem; }
.notice-success { background: var(--accent-soft); border: 1px solid var(--accent); }
.notice-error { background: #fdeceb; border: 1px solid #e3a09a; color: #8a1f17; }
.notice ul { margin: 8px 0 0; padding-left: 1.2em; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: start; }
.contact-side { display: grid; gap: 20px; }
.wa-card { background: #eafaf0; border: 1px solid #b6e8c8; border-radius: 16px; padding: 24px; }
.wa-card h2 { font-size: 1.25rem; }

.newsletter-strip { background: var(--accent-soft); padding: 40px 0; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.newsletter-inner h2 { font-size: 1.4rem; margin-bottom: .15em; }
.newsletter-inner p { margin: 0; color: var(--muted); }
.newsletter-form { display: flex; gap: 10px; flex: 1 1 380px; max-width: 520px; position: relative; }
.newsletter-form input[type="email"] { flex: 1; }
.inline-newsletter .newsletter-form { max-width: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--accent-deep); color: #c3d2c6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-top: 60px; padding-bottom: 44px; }
.site-footer h3 { color: #fff; font-size: 1.02rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #c3d2c6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .contact-list .icon { color: #9fd0a7; }
.footer-brand p { margin: 14px 0 18px; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: .9rem; }

/* ---------- Social + WhatsApp widgets ---------- */
.social-row { display: flex; flex-wrap: wrap; gap: 10px; }
.social-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; transition: background .18s, color .18s; }
.social-icon:hover { background: var(--accent); color: #fff; text-decoration: none; }
.social-row-sm .social-icon { width: 30px; height: 30px; background: transparent; }
.social-row-sm .social-icon .icon { width: 16px; height: 16px; }
.social-row-dark .social-icon, .team-card .social-icon { background: var(--accent-soft); color: var(--accent-dark); }
.social-row-dark .social-icon:hover, .team-card .social-icon:hover { background: var(--accent); color: #fff; }
.team-card .social-icon { margin: 8px auto 0; }
.social-rail { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 60; display: none; flex-direction: column; gap: 2px; background: var(--accent-dark); padding: 8px; border-radius: 0 14px 14px 0; animation: rail-in .6s .8s ease both; }
.social-rail .social-icon { background: transparent; }
.social-rail .social-icon:hover { background: rgba(255,255,255,.2); }
@keyframes rail-in { from { transform: translate(-100%, -50%); } to { transform: translate(0, -50%); } }

.whatsapp-widget { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--wa); color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.25); animation: wa-pulse 2s ease-out infinite; }
.whatsapp-widget:hover { color: #fff; transform: scale(1.06); }
.whatsapp-widget.calm { animation: none; }
@keyframes wa-pulse { 0% { box-shadow: 0 8px 22px rgba(0,0,0,.25), 0 0 0 0 rgba(37,211,102,.55); } 100% { box-shadow: 0 8px 22px rgba(0,0,0,.25), 0 0 0 20px rgba(37,211,102,0); } }

.notfound { padding: 110px 0; }
.big-code { font: 700 clamp(5rem, 18vw, 9rem)/1 var(--font-head); color: var(--accent-soft); margin: 0; -webkit-text-stroke: 2px var(--accent); }

/* ---------- Responsive ---------- */
@media (min-width: 1025px) { .social-rail { display: flex; } }

@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); flex-direction: column; align-items: stretch; padding: 12px 22px 22px; max-height: calc(100vh - 72px); overflow-y: auto; }
  .nav-open .primary-nav { display: flex; }
  .primary-nav ul { flex-direction: column; align-items: stretch; }
  .primary-nav a { padding: 12px; }
  .has-sub { flex-wrap: wrap; }
  .has-sub > a { flex: 1; }
  .sub-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; color: var(--text); cursor: pointer; }
  .sub { position: static; display: none; width: 100%; box-shadow: none; border: 0; border-left: 2px solid var(--accent-soft); border-radius: 0; margin: 0 0 6px 12px; padding: 0 0 0 8px; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: none; }
  .has-sub.sub-open > .sub { display: flex; }
  .primary-nav .nav-cta { margin-top: 12px; text-align: center; }
  .hero-grid, .split, .detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .side-card { position: static; }
  .svc-grid, .post-grid, .testi-grid, .ind-grid, .soon-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .svc-flagship { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
}

@media (max-width: 768px) {
  .topbar-contact a span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .trust-grid { grid-template-columns: 1fr; gap: 10px; }
  .svc-grid, .post-grid, .testi-grid, .ind-grid, .soon-grid, .why-grid { grid-template-columns: 1fr; }
  .svc-flagship { grid-column: auto; grid-template-columns: 1fr; }
  .svc-flagship .svc-media { min-height: 200px; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 64px; }
  .hero-visual { padding-left: 14px; }
  .hero-visual::before { inset: -14px -10px 0 14px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .topbar-inner { justify-content: center; }
  .topbar .social-row { display: none; }
  .steps, .footer-grid { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
  .newsletter-form { flex-direction: column; }
  .sms-card { position: relative; width: 100%; margin-top: -40px; left: 0; }
  .hero-visual { padding-left: 0; }
  .hero-visual::before { display: none; }
  .whatsapp-widget { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .form-card { padding: 22px; }
}

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

/* ---------- Developer / documentation content ---------- */
.prose pre { background: #14201a; color: #e4f0e7; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: .9rem; line-height: 1.55; margin: 0 0 1.2em; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.prose :not(pre) > code { background: var(--accent-soft); color: var(--accent-deep); padding: 2px 6px; border-radius: 6px; }
.prose pre code { background: none; padding: 0; color: inherit; white-space: pre-wrap; word-break: break-all; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.prose .note { background: #fff7e0; border: 1px solid #ecd38a; border-radius: 12px; padding: 14px 18px; margin: 0 0 1.4em; }
.prose blockquote { margin: 0 0 1.2em; padding: 4px 18px; border-left: 4px solid var(--accent); color: var(--muted); }
.prose img { border-radius: 12px; margin: 1em 0; }
.narrow .prose { max-width: none; }


/* ---------- Header dropdown (v2.1): left-aligned, opens on hover / keyboard, never sticks open ---------- */
.primary-nav .sub { text-align: left; align-items: stretch; gap: 0; }
.primary-nav .sub li { display: block; }
.primary-nav .sub a { padding: 10px 12px; white-space: normal; }
@media (min-width: 1025px) {
  .primary-nav .sub { display: none; position: absolute; left: 0; top: calc(100% + 14px); min-width: 270px; padding: 8px; flex-direction: column;
    background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 150; }
  .primary-nav .sub::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }   /* hover bridge */
  .has-sub:hover > .sub, .has-sub.sub-open > .sub { display: flex; }
  .has-sub:focus-within > .sub { display: none; }
  .has-sub.sub-open > .sub, .has-sub:hover > .sub { display: flex; }
}

.cf-turnstile { margin: 10px 0 4px; min-height: 65px; }
.newsletter-form .cf-turnstile { flex-basis: 100%; }
