/* ============ Design tokens ============ */
:root {
  --navy: #031B4E;
  --royal: #064BCB;
  --electric: #008CFF;
  --cyan: #00D9FF;
  --violet: #7A00E6;
  --magenta: #D500D7;
  --orange: #FF7A00;
  --off-white: #F6F9FF;
  --text: #101828;
  --muted: #667085;
  --border: #E4E9F2;
  --white: #FFFFFF;
  --success: #12805C;
  --danger: #B42318;

  --gradient-brand: linear-gradient(120deg, var(--navy) 0%, var(--royal) 45%, var(--violet) 80%, var(--magenta) 100%);
  --gradient-accent: linear-gradient(90deg, var(--electric), var(--cyan));

  --font-heading: 'Manrope', 'Space Grotesk', sans-serif;
  --font-body: 'Inter', 'Manrope', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(3, 27, 78, 0.06);
  --shadow-md: 0 8px 24px rgba(3, 27, 78, 0.10);
  --shadow-lg: 0 20px 48px rgba(3, 27, 78, 0.16);
  --container-w: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 0.5em; color: var(--navy); }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text); }
a { color: var(--royal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.2em; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--white);
  padding: 0.75em 1.25em; z-index: 1000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.container { max-width: var(--container-w); margin: 0 auto; padding: 0 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.85em 1.6em; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gradient-brand); color: var(--white); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-sm { padding: 0.5em 1em; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============ Header ============ */
.announcement-bar { background: var(--navy); color: var(--white); text-align: center; padding: 8px 16px; font-size: 0.85rem; }
.admin-preview-bar {
  /* static, not sticky — .site-header is already sticky at top:0 right
     below it, and both can't own that position at once */
  background: #101828; color: var(--white);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 20px; font-size: 0.82rem; flex-wrap: wrap;
}
.admin-preview-bar .btn { padding: 0.4em 1em; font-size: 0.78rem; }
.admin-preview-bar .btn:not(.btn-ghost) { background: var(--gradient-accent); color: var(--navy); }
.admin-preview-bar-actions { display: flex; gap: 8px; }

/* ============ Live image editing (admin only) ============ */
.live-edit-wrap { position: relative; display: block; width: 100%; }
.live-edit-toolbar {
  position: absolute; top: 8px; left: 8px; z-index: 5; opacity: 0.7; transition: opacity 0.15s ease;
}
.live-edit-wrap:hover .live-edit-toolbar,
.live-edit-wrap:focus-within .live-edit-toolbar { opacity: 1; }
.live-edit-btn {
  background: #101828; color: var(--white); border: none; border-radius: 999px;
  padding: 6px 14px; font-size: 0.78rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-md);
}
.live-edit-btn:hover { background: var(--royal); }
.live-edit-resize-handle {
  position: absolute; bottom: 6px; right: 6px; z-index: 5; width: 20px; height: 20px; border-radius: 5px;
  background: #101828; opacity: 0.55; cursor: nwse-resize; transition: opacity 0.15s ease;
}
.live-edit-resize-handle::after {
  content: ""; position: absolute; inset: 5px; border-right: 2px solid var(--white); border-bottom: 2px solid var(--white);
}
.live-edit-wrap:hover .live-edit-resize-handle,
.live-edit-resize-handle:focus-visible,
.live-edit-wrap.is-resizing .live-edit-resize-handle { opacity: 1; }
.live-edit-wrap:hover img,
.live-edit-wrap.is-resizing img { outline: 2px dashed var(--royal); outline-offset: 2px; }
.live-edit-toast {
  position: absolute; bottom: 8px; left: 8px; z-index: 6; padding: 5px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; color: var(--white); box-shadow: var(--shadow-md);
}
.live-edit-toast-saving { background: #475467; }
.live-edit-toast-success { background: var(--success); }
.live-edit-toast-error { background: var(--danger); }

/* ============ Media picker modal ============
   Shared between /admin (Browse Media on a form field) and public pages
   (live-edit's "Replace image") — both load this file. */
.media-picker-overlay {
  position: fixed; inset: 0; background: rgba(3, 27, 78, 0.55); z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
/* Higher specificity than `.media-picker-overlay` alone — without this, the
   `hidden` attribute's default `display: none` loses to the `display: flex`
   above (equal specificity, author styles win ties), so toggling `.hidden`
   in JS silently does nothing and the modal can never actually close. */
.media-picker-overlay[hidden] { display: none; }
.media-picker-modal { position: relative; z-index: 1; background: var(--white); border-radius: var(--radius-md); width: 100%; max-width: 720px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.media-picker-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.media-picker-close-x {
  background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted);
  padding: 6px 10px; min-width: 36px; min-height: 36px; border-radius: 6px;
}
.media-picker-close-x:hover { color: var(--navy); background: var(--off-white); }
.media-picker-upload { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.media-picker-status { font-size: 0.85rem; color: var(--muted); }
.media-picker-status-success { color: var(--success); font-weight: 600; }
.media-picker-status-error { color: var(--danger); font-weight: 600; }
.media-picker-footer-close { margin-left: auto; }
.media-picker-grid { padding: 16px 20px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.media-picker-empty { grid-column: 1 / -1; }
.media-picker-item {
  position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  cursor: pointer; background: none; padding: 0; display: flex; flex-direction: column;
}
.media-picker-item img, .media-picker-item video { width: 100%; height: 90px; object-fit: cover; display: block; background: var(--off-white); }
.media-picker-item-name {
  font-size: 0.7rem; color: var(--muted); padding: 4px 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.media-picker-item:hover, .media-picker-item:focus-visible { outline: 2px solid var(--royal); }
.media-picker-item-delete {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(16, 24, 40, 0.75); color: var(--white); font-size: 1rem;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.media-picker-item-delete:hover { background: var(--danger); }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { border-radius: 8px; flex-shrink: 0; }
.brand-word { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; color: var(--navy); white-space: nowrap; }
.brand-word strong { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 420px) { .brand-word { display: none; } }
.main-nav { flex-shrink: 0; }
.main-nav ul { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; flex-wrap: nowrap; }
.main-nav a { color: var(--text); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.main-nav a.active, .main-nav a:hover { color: var(--royal); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.header-actions .btn-primary { white-space: nowrap; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-shrink: 0; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }
.mobile-nav { display: none; }

/* Nav collapses to the hamburger well before items would ever have to
   shrink/wrap — 8 nav items + wordmark + CTA button need real room.
   None of brand/.main-nav/.header-actions can flex-shrink (see above),
   so below this width they'd overflow the header rather than silently
   compress into each other — hide the full nav well before that happens. */
@media (max-width: 1280px) {
  .main-nav { display: none; }
  .header-actions .btn-primary { display: none; }
  .menu-toggle { display: block; }
  .mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--white); }
  /* `.mobile-nav { display: none }` above and the `hidden` attribute's own
     default `display: none` are equal specificity either way, so this isn't
     load-bearing for the closed state — but the open state needs an
     explicit override, since nothing else in this file ever sets
     `.mobile-nav`'s display to anything but none. */
  .mobile-nav:not([hidden]) { display: block; }
  .mobile-nav ul { list-style: none; margin: 0; padding: 12px 20px; display: flex; flex-direction: column; gap: 14px; }
  .mobile-nav a { color: var(--text); font-weight: 600; }
}

/* ============ Hero / blocks ============ */
.block { padding: 72px 0; }
.block-alt { background: var(--off-white); }
.block-dark { background: var(--gradient-brand); color: var(--white); }
.block-dark h1, .block-dark h2, .block-dark h3, .block-dark p { color: var(--white); }

.hero { position: relative; overflow: hidden; padding: 96px 0; background: var(--gradient-brand); color: var(--white); }
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: 0.25;
  background-image: radial-gradient(circle at 20% 20%, var(--cyan), transparent 40%), radial-gradient(circle at 80% 60%, var(--magenta), transparent 45%);
}
.hero-tech-pattern { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--cyan); margin-bottom: 12px; }
.hero h1 { color: var(--white); }
.hero p.lead { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 560px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero-slider { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.hero-image .hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease; border-radius: 0; box-shadow: none;
}
.hero-slide.is-active { opacity: 1; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } }

.section-heading { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-heading p { color: var(--muted); font-size: 1.05rem; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 a { color: var(--navy); }
.card h3 a:hover { color: var(--royal); }

.value-strip { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.value-strip span { background: var(--off-white); border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 0.9rem; color: var(--navy); }

.process-steps { counter-reset: step; display: grid; gap: 24px; grid-template-columns: repeat(4, 1fr); }
.process-steps .step { position: relative; padding: 24px; border-radius: var(--radius-md); background: var(--off-white); }
.process-steps .step::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gradient-brand); color: var(--white); font-weight: 800; margin-bottom: 12px; }
@media (max-width: 860px) { .process-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process-steps { grid-template-columns: 1fr; } }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-row .stat-number { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 700px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.testimonial-card { background: var(--off-white); border-radius: var(--radius-md); padding: 28px; }
.testimonial-avatar { border-radius: 50%; object-fit: cover; margin-bottom: 14px; }
.testimonial-card q { display: block; font-size: 1.05rem; color: var(--text); margin-bottom: 16px; }
.testimonial-author { font-weight: 700; color: var(--navy); }

.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.faq-item summary::-webkit-details-marker { color: var(--royal); }

.cta-banner { text-align: center; padding: 64px 0; background: var(--gradient-brand); color: var(--white); border-radius: var(--radius-lg); }
.cta-banner h2, .cta-banner p { color: var(--white); }

.blog-card img { border-radius: var(--radius-md); margin-bottom: 14px; aspect-ratio: 16/9; object-fit: cover; }
.blog-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }

/* ============ Forms ============ */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.field input, .field select, .field textarea {
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-family: inherit; font-size: 0.95rem;
  background: var(--white); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--royal); }
.field-checkbox { flex-direction: row; align-items: flex-start; gap: 10px; }
.field-checkbox input { margin-top: 4px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-alert { background: #FEF3F2; border: 1px solid #FDA29B; color: var(--danger); padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.form-success { background: #ECFDF3; border: 1px solid #6CE9A6; color: var(--success); padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }

/* ============ Footer ============ */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.85); padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h3 { color: var(--white); font-size: 1rem; }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: var(--cyan); }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-contact li { margin-bottom: 8px; }
.footer-social { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.footer-newsletter { margin-top: 20px; }
.footer-newsletter input { padding: 10px 12px; border-radius: 8px; border: none; flex: 1; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.85rem; }
.footer-legal { list-style: none; display: flex; gap: 18px; padding: 0; margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.whatsapp-fab {
  position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: var(--white); display: flex; align-items: center; justify-content: center;
  font-weight: 800; box-shadow: var(--shadow-lg); z-index: 90;
}
.cookie-consent {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--border);
  padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; z-index: 200; box-shadow: var(--shadow-lg);
}
/* Without this, `display: flex` above beats the `hidden` attribute's own
   default `display: none` (equal specificity, author wins) — the banner
   would show on every page load regardless of a returning visitor's saved
   choice, since site.js relies on `hidden` staying true to keep it closed. */
.cookie-consent[hidden] { display: none; }
.cookie-actions { display: flex; gap: 10px; }

/* ============ Utility page sections ============ */
.page-hero-simple { background: var(--off-white); padding: 56px 0; text-align: center; }
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a { color: var(--muted); }
.tag-pill { display: inline-block; background: var(--off-white); color: var(--navy); border-radius: 999px; padding: 4px 12px; font-size: 0.78rem; font-weight: 700; margin-right: 8px; }
.error-page { text-align: center; padding: 120px 20px; }
.error-page .code { font-size: 5rem; font-weight: 800; background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); color: var(--navy); }
.pagination .current { background: var(--navy); color: var(--white); border-color: var(--navy); }
