/* ══════════════════════════════════════════════════════════════
   COMPUTIO — Main Stylesheet
   Palette: White · Deep Navy (#0A1628) · Accent Blue (#2563EB)
══════════════════════════════════════════════════════════════ */

/* ── 1. CSS Custom Properties ─────────────────────────────── */
:root {
  /* Colors — light mode */
  --bg:             #ffffff;
  --bg-secondary:   #f8fafc;
  --bg-card:        #ffffff;
  --border:         #e2e8f0;
  --text:           #0a1628;
  --text-muted:     #64748b;
  --accent:         #2563eb;
  --accent-hover:   #1d4ed8;
  --accent-light:   #dbeafe;
  --navy:           #0a1628;

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;

  /* Radii */
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10,22,40,.06), 0 1px 2px rgba(10,22,40,.04);
  --shadow:    0 4px 16px rgba(10,22,40,.08), 0 2px 4px rgba(10,22,40,.04);
  --shadow-lg: 0 20px 48px rgba(10,22,40,.12), 0 4px 8px rgba(10,22,40,.06);

  /* Transitions */
  --transition: 200ms ease;
  --transition-slow: 400ms ease;
}

/* Dark mode overrides */
[data-theme="dark"] {
  --bg:            #0a1628;
  --bg-secondary:  #0f1f3d;
  --bg-card:       #111f3a;
  --border:        #1e3a5f;
  --text:          #f1f5f9;
  --text-muted:    #94a3b8;
  --accent:        #3b82f6;
  --accent-hover:  #60a5fa;
  --accent-light:  #1e3a5f;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow:    0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 20px 48px rgba(0,0,0,.5);
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; font-family: var(--font); }

/* ── 3. Layout utilities ──────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-24);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section__label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.section__title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section__subtitle {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 540px;
  margin-inline: auto;
}

/* ── 4. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37,99,235,.35);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn--full { width: 100%; }

.btn__loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.loading .btn__text { opacity: 0; }
.btn.loading .btn__loader { display: block; position: absolute; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── 5. Header / Nav ──────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background var(--transition-slow), border-color var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: opacity var(--transition);
}
.nav__logo:hover { opacity: .8; }

.nav__logo-img {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

/* Show correct logo per theme */
[data-theme="light"] .nav__logo-img--dark  { display: none; }
[data-theme="dark"]  .nav__logo-img--light { display: none; }

/* Nav links */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-left: auto;
  margin-right: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--transition);
}
.nav__link:hover,
.nav__link.active { color: var(--text); }
.nav__link:hover::after,
.nav__link.active::after { width: 100%; }

/* Nav actions */
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-light);
}

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

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 6. Hero ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: var(--space-20);
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero__badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 99px;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-6);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.hero__title {
  font-size: clamp(var(--text-4xl), 7vw, var(--text-6xl));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}

.hero__title-accent {
  background: linear-gradient(96deg, #FF3E81 -4.72%, #4706FF 96.59%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: var(--text-muted);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-10, 2.5rem);
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Blobs */
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
}
[data-theme="dark"] .hero__blob { opacity: 0.22; }

.hero__blob--1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; right: -100px;
}
.hero__blob--2 {
  width: 400px; height: 400px;
  background: #60a5fa;
  bottom: -100px; left: -80px;
}

/* ── 7. Services ──────────────────────────────────────────── */
.services {
  background: var(--bg-secondary);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card--featured {
  background: linear-gradient(96deg, #FF3E81 -4.72%, #4706FF 96.59%);
  color: #fff;
}
.card--featured .card__text,
.card--featured .card__link { color: rgba(255,255,255,.85); }
.card--featured .card__link:hover { color: #fff; }
.card--featured:hover { box-shadow: 0 20px 48px rgba(37,99,235,.4); }

.card__icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-light);
  border-radius: var(--radius);
  color: var(--accent);
  flex-shrink: 0;
}
.card--featured .card__icon {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.card__title {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.3;
}

.card__text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.card__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.card__link:hover { color: var(--accent-hover); }

/* ── 8. About ─────────────────────────────────────────────── */
.about__inner {
  display: flex;
  flex-direction: column;
  max-width: 720px;
}

.about__content { display: flex; flex-direction: column; gap: var(--space-6); }

.about__content .section__label { text-align: left; }
.about__content .section__title { text-align: left; }

.about__text {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.8;
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.stat__number {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}
.stat__plus, .stat__pct, .stat__slash {
  font-size: var(--text-2xl);
  font-weight: 700;
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ── 9. Contact ───────────────────────────────────────────── */
.contact {
  background: var(--bg-secondary);
}

.contact__inner {
  max-width: 680px;
}

.contact .section__header { margin-bottom: var(--space-12); }

.contact__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.btn--chat {
  font-size: var(--text-lg);
  padding: 1rem 2.25rem;
  gap: var(--space-3);
}

.contact__note {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.contact__note-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(34,197,94,.25);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(34,197,94,.25); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,.1); }
}

/* ── 10. Footer ───────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-8);
  background: var(--bg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity var(--transition);
}
.footer__logo:hover { opacity: .7; }

.footer__logo-img {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

/* Show correct logo per theme */
[data-theme="light"] .footer__logo-img--dark  { display: none; }
[data-theme="dark"]  .footer__logo-img--light { display: none; }

.footer__copy {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: var(--space-6);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer__link:hover { color: var(--accent); }

/* ── 11. Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .section { padding-block: var(--space-16); }

  /* Remove backdrop-filter on mobile so the fixed nav panel isn't
     trapped inside the header's stacking context */
  .header.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }

  /* Nav */
  .nav__links {
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--bg);
    background-color: var(--bg); /* explicit fallback */
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: var(--space-6);
    border-top: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 999;
  }
  .nav__links.open { transform: translateX(0); }

  .nav__link {
    display: block;
    padding: var(--space-4) 0;
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .nav__link::after { display: none; }

  .hamburger { display: flex; }


  /* About */
  .about__inner {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  /* Contact form */
  .form__row { grid-template-columns: 1fr; }

  /* Footer */
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding-inline: var(--space-4); }
  .hero__cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 320px; }
  .about__stats { grid-template-columns: 1fr; }
}

/* ── 12. Tawk.to widget shadow ────────────────────────────── */
/* .tawk-min-container = minimised bubble
   .tawk-max-container = open chat window                     */
.tawk-min-container,
.tawk-max-container {
  box-shadow:
    0 24px 64px rgba(10, 22, 40, .28),
    0 8px 24px  rgba(10, 22, 40, .16) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

[data-theme="dark"] .tawk-min-container,
[data-theme="dark"] .tawk-max-container {
  box-shadow:
    0 24px 64px rgba(0, 0, 0, .55),
    0 8px 24px  rgba(0, 0, 0, .35) !important;
}

/* ── 13. Accessibility ────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

