/* =========================================================================
   global.css  —  Doorstep IT Care landing page
   Single source of theme tokens, base styles, dark-mode overrides, animations.
   Linked from: index.html, privacy-policy.html, terms-of-service.html
   ========================================================================= */

/* ---------- 1. Theme tokens (light mode default) -------------------------- */
:root {
  /* Brand palette — deep navy + electric cyan + orange CTA */
  --color-primary: #0B1F3A;          /* deep navy */
  --color-primary-700: #0E2A4F;
  --color-primary-900: #060F1E;
  --color-secondary: #00D4FF;        /* electric cyan */
  --color-secondary-600: #00B5DB;
  --color-accent: #FF7A1A;           /* CTA orange */
  --color-accent-600: #E66200;

  /* Surfaces / text — light mode */
  --color-bg: #FFFFFF;
  --color-surface: #F4F7FB;
  --color-surface-2: #E8EEF6;
  --color-text: #0B1F3A;
  --color-text-soft: #364B6B;
  --color-muted: #6B7A90;
  --color-border: #D8E0EB;

  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-danger:  #DC2626;
  --color-star:    #FFB400;

  /* Typography */
  --font-heading: 'Archivo Narrow', 'Oswald', 'Bebas Neue', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Type scale */
  --font-size-hero:    clamp(2.4rem, 5.5vw, 4.5rem);
  --font-size-section: clamp(1.7rem, 3.2vw, 2.6rem);
  --font-size-body:    1rem;
  --font-size-sm:      0.875rem;
  --font-size-xs:      0.75rem;

  /* Layout / shadows */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 6px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 31, 58, 0.08);
  --shadow-lg: 0 18px 48px rgba(11, 31, 58, 0.14);

  --container-max: 1280px;
  --header-h: 72px;
}

/* ---------- 2. Dark mode overrides --------------------------------------- */
[data-theme="dark"] {
  --color-bg:        #060F1E;
  --color-surface:   #0B1F3A;
  --color-surface-2: #102A4D;
  --color-text:      #EAF2FF;
  --color-text-soft: #B7C5DC;
  --color-muted:     #8497B4;
  --color-border:    #1A3460;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
}

/* ---------- 3. Resets & base --------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

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

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

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
  color: var(--color-text);
}

p { margin: 0 0 1em; }

/* ---------- 4. Custom utility classes ------------------------------------ */
.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }

.text-hero    { font-size: var(--font-size-hero); font-weight: 800; line-height: 1.04; letter-spacing: -0.02em; }
.text-section { font-size: var(--font-size-section); font-weight: 800; letter-spacing: -0.01em; }
.text-eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-secondary-600);
}
[data-theme="dark"] .text-eyebrow { color: var(--color-secondary); }

.container-x {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 768px) { .container-x { padding-inline: 2rem; } }
@media (min-width: 1280px) { .container-x { padding-inline: 3rem; } }

/* Section colour blocks — for full-bleed alternating rhythm.
   In dark mode the primary block is deep navy. In light mode it
   becomes a soft surface so the page reads as a true light theme
   (only the hero + footer remain dark — industry-standard pattern). */
.bg-primary-block {
  background: linear-gradient(135deg, var(--color-primary-900) 0%, var(--color-primary) 100%);
  color: #EAF2FF;
}
.bg-primary-block h1, .bg-primary-block h2, .bg-primary-block h3 { color: #fff; }

[data-theme="light"] .bg-primary-block {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
[data-theme="light"] .bg-primary-block h1,
[data-theme="light"] .bg-primary-block h2,
[data-theme="light"] .bg-primary-block h3 { color: var(--color-text); }

.bg-surface-block { background: var(--color-surface); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 0;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(255, 122, 26, 0.32);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn-primary:hover { background: var(--color-accent-600); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

.btn-whatsapp {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 0;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.32);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn-whatsapp:hover { background: #1FB955; transform: translateY(-2px); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  background: transparent;
  color: var(--color-text);
  font-weight: 600;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--color-border);
  font-size: 1rem;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.btn-ghost:hover { border-color: var(--color-secondary); color: var(--color-secondary-600); }
[data-theme="dark"] .btn-ghost:hover { color: var(--color-secondary); }

.btn-cyan-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: transparent;
  color: var(--color-secondary);
  font-weight: 700;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--color-secondary);
  font-size: .92rem;
  transition: background .15s ease, color .15s ease;
}
.btn-cyan-outline:hover { background: var(--color-secondary); color: var(--color-primary); }

/* Trust pill — used in hero badges row */
.trust-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #EAF2FF;
  padding: .45rem .85rem;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

/* Cards */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-secondary); }

[data-theme="dark"] .card { background: var(--color-surface); }

/* Service icon — true circle, never squeezes inside a flex row */
.svc-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  flex-shrink: 0;          /* prevent pill-shape squeeze inside flex parents */
  aspect-ratio: 1 / 1;     /* belt-and-braces: keep it square even if width/height is overridden */
  border-radius: 50%;      /* true circle */
  background: linear-gradient(135deg, rgba(0, 212, 255, .15), rgba(0, 212, 255, .05));
  color: var(--color-secondary-600);
  border: 1px solid rgba(0, 212, 255, .25);
}
[data-theme="dark"] .svc-icon { color: var(--color-secondary); }

/* Process step number badge */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-secondary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  border: 2px solid var(--color-secondary);
}
[data-theme="dark"] .step-num { background: var(--color-secondary); color: var(--color-primary); border-color: var(--color-secondary); }

/* Locality chip */
.area-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 600;
  font-size: .9rem;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.area-chip:hover { border-color: var(--color-secondary); color: var(--color-secondary-600); }
[data-theme="dark"] .area-chip:hover { color: var(--color-secondary); }

/* FAQ accordion */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  margin-bottom: .75rem;
  overflow: hidden;
}
[data-theme="dark"] .faq-item { background: var(--color-surface); }

.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; text-align: left;
  padding: 1.1rem 1.25rem;
  background: transparent; border: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
}
.faq-q .chev {
  display: inline-flex; flex: 0 0 auto;
  width: 28px; height: 28px;
  align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--color-surface);
  transition: transform .25s ease, background .15s ease;
}
[data-theme="dark"] .faq-q .chev { background: var(--color-surface-2); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); background: var(--color-secondary); color: var(--color-primary); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .25s ease;
  color: var(--color-text-soft);
  padding: 0 1.25rem;
}
.faq-item.open .faq-a {
  max-height: 600px;
  padding: 0 1.25rem 1.2rem;
}

/* Star rating row */
.stars { display: inline-flex; gap: 2px; color: var(--color-star); }

/* Form inputs */
.field {
  width: 100%;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font: inherit;
  color: var(--color-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field:focus {
  outline: 0;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, .18);
}
[data-theme="dark"] .field { background: var(--color-surface); }

.label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .35rem;
  color: var(--color-text);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  transition: background-color .25s ease;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color .15s ease, color .15s ease;
}
.theme-toggle:hover { border-color: var(--color-secondary); color: var(--color-secondary-600); }
[data-theme="dark"] .theme-toggle:hover { color: var(--color-secondary); }

.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun  { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: inline; }

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 600px at 85% 0%, rgba(0, 212, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at 15% 100%, rgba(255, 122, 26, 0.18), transparent 65%),
    linear-gradient(150deg, #060F1E 0%, #0B1F3A 55%, #0E2A4F 100%);
  color: #EAF2FF;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 90% 20%, rgba(0, 212, 255, .25), transparent 40%);
}

/* Trust strip under hero (Hedpro-style 4-up icon row) */
.trust-strip {
  background: var(--color-primary-900);
  border-top: 1px solid rgba(0, 212, 255, .22);
  border-bottom: 1px solid rgba(0, 212, 255, .22);
}

/* Pricing row */
.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px dashed var(--color-border);
}
.price-row:last-child { border-bottom: 0; }
.price-row .price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-secondary-600);
}
[data-theme="dark"] .price-row .price { color: var(--color-secondary); }

/* Technician avatar circle */
.tech-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-700));
  color: var(--color-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  border: 3px solid var(--color-secondary);
  margin-inline: auto;
}

/* Ratings star (Google card style) */
.rev-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: 100%;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .rev-card { background: var(--color-surface); }

.rev-card .name { font-weight: 700; font-family: var(--font-heading); }
.rev-card .area { color: var(--color-muted); font-size: .85rem; }

/* Footer */
.site-footer {
  background: var(--color-primary-900);
  color: #B7C5DC;
}
.site-footer h3 {
  color: #fff;
  font-family: var(--font-heading);
}
.site-footer a:hover { color: var(--color-secondary); }
.social-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.18);
  color: #fff;
  transform-origin: center;
  transition:
    background .2s ease,
    color .2s ease,
    border-color .2s ease,
    transform .2s ease,
    box-shadow .2s ease;
}
.social-icon svg { transition: stroke-width .2s ease; }
.social-icon:hover,
.social-icon:focus-visible {
  background: var(--color-secondary);   /* bright cyan dominates */
  color: #062340;                        /* very dark navy glyph — darker than icon stays readable */
  border-color: var(--color-secondary);
  transform: translateY(-4px) scale(1.12);
  box-shadow:
    0 12px 28px rgba(0, 212, 255, 0.55),
    0 0 0 6px rgba(0, 212, 255, 0.22);
  outline: none;
}
.social-icon:hover svg,
.social-icon:focus-visible svg { stroke-width: 2.6; }
.social-icon:active { transform: translateY(-1px) scale(1.04); }

/* Map embed */
.map-frame {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: var(--radius-md);
  filter: saturate(.9);
}
[data-theme="dark"] .map-frame { filter: invert(.9) hue-rotate(180deg) saturate(.5); }

/* ---------- 5. Animations ------------------------------------------------ */
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(0, 212, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}
.pulse-cyan { animation: pulseRing 2.4s infinite; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }

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

/* ---------- 6. Legal pages (privacy, terms) ------------------------------- */
.legal-page {
  max-width: 820px;
  margin-inline: auto;
  padding: 2rem 1.25rem 4rem;
  line-height: 1.7;
}
.legal-page h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.legal-page h2 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: .6rem; }
.legal-page p, .legal-page li { color: var(--color-text-soft); }
.legal-page ul { padding-left: 1.25rem; }
.legal-page a { color: var(--color-secondary-600); text-decoration: underline; }
[data-theme="dark"] .legal-page a { color: var(--color-secondary); }
.back-home {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--color-secondary-600);
}
[data-theme="dark"] .back-home { color: var(--color-secondary); }

/* ---------- 7. Misc helpers --------------------------------------------- */
.divider {
  height: 1px; background: var(--color-border); border: 0; margin: 2.5rem 0;
}
.lead { font-size: 1.1rem; color: var(--color-text-soft); }

.area-grid {
  display: flex; flex-wrap: wrap; gap: .55rem;
}
/* Collapsed state — only the first 6 chips visible */
.area-grid:not(.expanded) .area-chip:nth-child(n+7) {
  display: none;
}

.area-more-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .9rem;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: transparent;
  color: var(--color-secondary-600);
  border: 1.5px dashed var(--color-secondary);
  font-weight: 700;
  font-size: .9rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.area-more-btn:hover {
  background: var(--color-secondary);
  color: var(--color-primary);
  border-style: solid;
}
[data-theme="dark"] .area-more-btn { color: var(--color-secondary); }
.area-more-btn .chev {
  display: inline-flex;
  transition: transform .25s ease;
}
.area-more-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* Visually hidden — for a11y skip-text */
.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;
}
