/* ---- Theme tokens -------------------------------------------------
   Dark is the default (no attribute / [data-theme="dark"]).
   Light is opt-in via [data-theme="light"] on <html>, set by the
   toggle in app.js and persisted to localStorage. */
:root,
[data-theme="dark"] {
  --bg: #0a1220;
  --bg-alt: #0f1b2c;
  --surface: #131f30;
  --border: #24354c;
  --text: #eef2f7;
  --muted: #93a2b8;
  --blue: #2f8bff;
  --blue-bright: #5cc4ff;
  --blue-tint: rgba(47, 139, 255, 0.16);
  /* Darker gradient used only for the blue accent buttons/fab (not the
     lighter --blue/--blue-bright, which stay as-is for text accents,
     focus rings, checkmarks etc.). */
  --btn-accent-from: #2f8bff;
  --btn-accent-to: #175fc7;
  --band-1: #060b14;
  --band-2: #16283d;
  --band-text: #ffffff;
  --band-text-muted: #b7c4d6;
  --band-border: rgba(255, 255, 255, 0.08);
  --input-bg: #0f1a29;
  --header-bg: rgba(10, 18, 32, 0.85);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.03), 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.45);
  --hero-bg: radial-gradient(ellipse 900px 480px at 50% -10%, rgba(47, 139, 255, 0.22), transparent 65%), var(--bg);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0b1e33;
  --muted: #5b6b7c;
  --blue: #0078fc;
  --blue-bright: #22a6ff;
  --blue-tint: #eaf4ff;
  --btn-accent-from: #0078fc;
  --btn-accent-to: #0058b8;
  --band-1: #0b1e33;
  --band-2: #142c47;
  --band-text: #ffffff;
  --band-text-muted: #b7c4d6;
  --band-border: rgba(255, 255, 255, 0.08);
  --input-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.9);
  --shadow-sm: 0 1px 3px rgba(11, 30, 51, 0.06), 0 1px 2px rgba(11, 30, 51, 0.04);
  --shadow-md: 0 10px 30px rgba(11, 30, 51, 0.08);
  --hero-bg: linear-gradient(180deg, var(--blue-tint) 0%, var(--bg) 65%);
}

:root {
  --radius: 14px;
  --max-width: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Guarantee the native [hidden] attribute always wins, even over elements
   that also set an explicit `display` value (e.g. display:flex banners/nav). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top);
  transition: background-color 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
}
.skip-link:focus { left: 10px; top: 10px; }

/* Icons — inline Font Awesome Free SVGs (see index.html for attribution
   comment). Sized to 1em so each icon scales with its container's
   font-size, the same way the emoji glyphs they replaced used to. */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  flex-shrink: 0;
}

/* Scroll-reveal animations -------------------------------------------
   Progressive enhancement: .reveal elements are fully visible by
   default. Only once JS confirms it actually ran (the inline <head>
   script adds .has-js to <html> before first paint — same pattern as
   the theme anti-FOUC guard) do they start hidden and animate in the
   first time they scroll into view, so a blocked/failed script never
   leaves content stuck invisible. Fully disabled for visitors who ask
   for reduced motion. Items sharing a .reveal-group cascade in with a
   short stagger (delay set per-element by app.js) instead of all
   popping in at once. */
.has-js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.has-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .has-js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn--accent {
  background: linear-gradient(135deg, var(--btn-accent-from), var(--btn-accent-to));
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 120, 252, 0.32);
}
.btn--accent:hover { box-shadow: 0 8px 26px rgba(0, 120, 252, 0.4); }
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--ghost-invert {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn--ghost-invert:hover { border-color: #fff; }
.btn--small { padding: 9px 18px; font-size: 0.85rem; }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }

/* On phones, stack the multi-button action rows (hero, quote form, contact)
   into full-width, centered buttons instead of side-by-side/wrapping —
   easier to tap and reads cleaner on a narrow screen. Matches the same
   breakpoint used elsewhere for mobile-specific layout. */
@media (max-width: 759px) {
  .hero__actions,
  .form-actions,
  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__actions .btn,
  .form-actions .btn,
  .contact-actions .btn {
    width: 100%;
    text-align: center;
  }
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--blue); }
.theme-toggle:active { transform: scale(0.93); }
.mobile-nav .theme-toggle {
  width: auto;
  height: auto;
  border-radius: 999px;
  padding: 10px 16px;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Banners */
.install-banner, .offline-banner {
  position: sticky;
  top: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--band-1);
  color: var(--band-text);
  border-bottom: 1px solid var(--band-border);
  padding: 10px 16px;
}
.install-banner__text { display: flex; flex-direction: column; flex: 1; font-size: 0.85rem; }
.install-banner__text strong { font-size: 0.9rem; }
.install-banner__text span { color: var(--band-text-muted); }
.offline-banner {
  justify-content: center;
  background: #5b3d0e;
  color: #ffd79a;
  font-size: 0.85rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
}
.brand__logo { height: 28px; width: auto; }
.nav { display: none; align-items: center; gap: 22px; }
.nav a:not(.btn):not(.theme-toggle) { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.nav a:not(.btn):not(.theme-toggle):hover { color: var(--blue); }

.nav-toggle {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 20px 16px;
}
.mobile-nav a:not(.btn) {
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.mobile-nav .btn { margin-top: 12px; }

@media (min-width: 760px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* Utility: only render on phone-sized viewports — hidden from the same
   width up where the site switches to the desktop nav, so it disappears
   on tablets and larger too, not just desktop. */
@media (min-width: 760px) {
  .mobile-only { display: none !important; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 60px;
  background: var(--hero-bg);
  text-align: center;
  transition: background 0.2s ease;
}
.hero__inner { position: relative; z-index: 1; }
.hero__logo { max-width: 380px; width: 78%; margin: 0 auto 28px; }
.hero__headline {
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero__headline .accent-text { color: var(--blue); }
.hero__sub {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}
.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section { padding: 68px 0; }
.section--alt { background: var(--bg-alt); transition: background-color 0.2s ease; }
.eyebrow {
  display: block;
  text-align: center;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 10px;
}
.section__title {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  margin: 0 0 8px;
  text-align: center;
  color: var(--text);
  font-weight: 800;
}
.section__lead {
  text-align: center;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* Pillars (home page service summary) */
.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 36px;
}
@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.card__icon { font-size: 1.8rem; margin-bottom: 14px; }
.card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 0.94rem; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--band-1) 0%, var(--band-2) 100%);
  padding: 44px 0;
  text-align: center;
}
.cta-banner__title {
  color: var(--band-text);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 800;
  margin: 0 0 22px;
}
.cta-banner__title .accent-text { color: var(--blue-bright); }

/* About */
.about-intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.about-intro p {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.02rem;
  margin: 0 0 18px;
}
.about-intro__lede {
  color: var(--text) !important;
  font-weight: 700;
  font-size: 1.1rem !important;
}
.about-closing {
  text-align: center;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  margin: 36px auto 0;
  max-width: 640px;
}

/* 4-step process */
.process {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 46px auto 0;
}
@media (min-width: 760px) {
  .process { grid-template-columns: repeat(4, 1fr); }
}
.process__step {
  text-align: center;
  padding: 6px 10px;
}
.process__num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin: 0 auto 14px;
  font-size: 1rem;
}
.process__label {
  color: var(--text);
  font-weight: 700;
  font-size: 0.98rem;
}

/* Why Klik checklist */
.why-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  max-width: 880px;
  margin: 40px auto 0;
}
@media (min-width: 620px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
.why-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.why-item__check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.why-item p {
  margin: 0;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.5;
  font-weight: 600;
}

/* Services */
.services-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  margin-top: 36px;
}
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.service-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.service-card__rule {
  width: 36px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  margin: 0 0 16px;
}
.service-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.service-card li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.service-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.service-card li:last-child { margin-bottom: 0; }

/* Quote form */
.quote-form {
  max-width: 580px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-md);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
/* Honeypot field: present in the DOM (so bots see and fill it) but
   invisible and unreachable for real visitors/keyboard/screen-reader users. */
.form-row--hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.form-row--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 480px) {
  .form-row--split { grid-template-columns: 1fr 1fr; }
}
.form-row--split > div { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.85rem; color: var(--text); font-weight: 700; }
input, select, textarea {
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 139, 255, 0.2);
}
/* Required fields left empty on a submit attempt — cleared automatically
   as soon as the visitor starts typing/selecting a value (see app.js). */
.field-invalid {
  border-color: #ef6a6a;
  box-shadow: 0 0 0 3px rgba(239, 106, 106, 0.15);
}
.field-invalid:focus {
  border-color: #ef6a6a;
  box-shadow: 0 0 0 3px rgba(239, 106, 106, 0.3);
}
.form-actions {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.quote-status {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--blue);
  min-height: 1.2em;
}
.quote-status.error { color: #ef6a6a; }

/* Contact */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  max-width: 900px;
  margin: 0 auto 30px;
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  flex: 1 1 180px;
  max-width: 240px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.contact-item__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}
.contact-item__value { font-weight: 700; color: var(--text); }
.contact-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Floating WhatsApp / Just Klik button */
.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 140;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--btn-accent-from), var(--btn-accent-to));
  color: #fff;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 10px 26px rgba(0, 120, 252, 0.4);
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.15s ease;
}
.whatsapp-fab:hover { box-shadow: 0 12px 30px rgba(0, 120, 252, 0.5); }
.whatsapp-fab--hidden {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}

/* Back to top — mirrors .whatsapp-fab's position/shadow language on the
   opposite corner. Hidden by default; app.js adds --visible once the
   visitor has scrolled down a bit, and removes it again near the top. */
.back-to-top {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 140;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--btn-accent-from), var(--btn-accent-to));
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 120, 252, 0.4);
  margin-bottom: env(safe-area-inset-bottom);
  opacity: 0;
  transform: translateY(14px) scale(0.85);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.15s ease;
}
.back-to-top--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.back-to-top:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 12px 30px rgba(0, 120, 252, 0.5); }
.back-to-top:active { transform: scale(0.92); }
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 0.2s ease;
    transform: none;
  }
  .back-to-top--visible,
  .back-to-top:hover,
  .back-to-top:active {
    transform: none;
  }
}

/* Footer */
.site-footer {
  background: var(--band-1);
  color: var(--band-text-muted);
  border-top: 1px solid var(--band-border);
  padding: 30px 0 calc(96px + env(safe-area-inset-bottom));
}
@media (min-width: 760px) {
  .site-footer { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  text-align: center;
}
.site-footer__mark { border-radius: 6px; }

/* Offline page */
.offline-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  gap: 10px;
  background: var(--bg);
  color: var(--text);
}
.offline-page img { border-radius: 20px; margin-bottom: 10px; }
.offline-page h1 { color: var(--text); }
