/* ============================================================
   ClickDose Labs — Shared Design System
   Reusable foundation for all service pages.
   Tokens, base, buttons, nav (+ dropdown), footer, reveal.
   Page-specific section styles live inline in each page.
   ============================================================ */

:root {
  --color-bg: #FDF8F4;
  --color-bg-alt: #F7F2EE;
  --color-surface: #FFFFFF;
  --color-text: #14181F;
  --color-text-soft: #2B313D;
  --color-muted: #6B7280;
  --color-border: #E8E2DC;
  --color-border-soft: #EFEAE5;
  --color-accent: #00C9A7;
  --color-accent-hover: #00B396;
  --color-accent-light: #00E6BE;
  --color-accent-tint: rgba(0, 201, 167, 0.08);
  --color-dark: #0B0F18;
  --color-dark-soft: #14181F;
  --color-danger: #D9594E;
  --gradient-stats: linear-gradient(135deg, #00C9A7 0%, #00B396 100%);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --h1-size: clamp(2.75rem, 6vw, 4.5rem);
  --h2-size: clamp(1.875rem, 4vw, 2.75rem);
  --h3-size: clamp(1.125rem, 2vw, 1.375rem);
  --body-size: 1rem;
  --body-lg: clamp(1.05rem, 1.5vw, 1.2rem);
  --body-sm: 0.9375rem;
  --caption: 0.8125rem;
  --section-padding: clamp(5rem, 10vw, 8rem);
  --container-max: 1200px;
  --container-padding: clamp(1.5rem, 4vw, 3rem);
  --radius: 8px;
  --radius-lg: 14px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 2px rgba(11, 15, 24, 0.04), 0 1px 3px rgba(11, 15, 24, 0.04);
  --shadow-md: 0 8px 24px rgba(11, 15, 24, 0.06);
  --shadow-lg: 0 18px 50px rgba(11, 15, 24, 0.08);
  --nav-height: 72px;
  --nav-height-mobile: 60px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--color-text);
}

.section-label {
  font-family: var(--font-display);
  font-size: var(--caption);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.section-label--muted {
  color: var(--color-muted);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.95rem 2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow var(--transition-normal), background var(--transition-normal), color var(--transition-normal);
  min-height: 44px;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn--primary { background: var(--color-accent); color: #FFFFFF; }
.btn--primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 10px 26px rgba(0, 201, 167, 0.32);
  transform: translateY(-2px);
}

.btn--dark { background: var(--color-dark); color: #FFFFFF; }
.btn--dark:hover {
  background: var(--color-text);
  box-shadow: 0 10px 26px rgba(11, 15, 24, 0.2);
  transform: translateY(-2px);
}

.btn--lg { font-size: 1.0625rem; padding: 1.1rem 2.5rem; }

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn--outline:hover {
  border-color: var(--color-text);
  background: var(--color-text);
  color: #FFFFFF;
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.stagger > .reveal:nth-child(2) { transition-delay: 0.08s; }
.stagger > .reveal:nth-child(3) { transition-delay: 0.16s; }
.stagger > .reveal:nth-child(4) { transition-delay: 0.24s; }
.stagger > .reveal:nth-child(5) { transition-delay: 0.3s; }
.stagger > .reveal:nth-child(6) { transition-delay: 0.36s; }

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
}
.nav.scrolled {
  background: rgba(253, 248, 244, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--color-border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}
.nav__logo img { height: 32px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-soft);
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--color-accent); }
.nav__cta .btn { font-size: 0.875rem; padding: 0.7rem 1.4rem; min-height: 42px; }

/* ---- NAV: Services dropdown ---- */
.nav__dropdown { position: relative; }
.nav__dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-soft);
  transition: color 0.2s ease;
}
.nav__dropdown-trigger svg {
  width: 12px; height: 12px;
  stroke: currentColor; stroke-width: 2.5;
  fill: none;
  transition: transform 0.25s ease;
}
.nav__dropdown:hover .nav__dropdown-trigger,
.nav__dropdown:focus-within .nav__dropdown-trigger { color: var(--color-accent); }
.nav__dropdown:hover .nav__dropdown-trigger svg,
.nav__dropdown:focus-within .nav__dropdown-trigger svg { transform: rotate(180deg); }

.nav__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 280px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.nav__dropdown:hover .nav__menu,
.nav__dropdown:focus-within .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav__menu::before {
  content: '';
  position: absolute;
  top: -0.5rem; left: 0; right: 0;
  height: 0.5rem;
}
.nav__menu-item {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}
.nav__menu-item:hover { background: var(--color-bg-alt); }
.nav__menu-item h4 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.15rem;
}
.nav__menu-item p {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.4;
}
.nav__menu-item--soon { opacity: 0.55; cursor: default; }
.nav__menu-item--soon:hover { background: transparent; }
.nav__menu-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--color-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(249, 250, 251, 0.55);
  padding: 3rem 0 2rem;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer__logo img { height: 28px; width: auto; }
.footer__links { display: flex; gap: 2rem; align-items: center; }
.footer__links a {
  font-size: 0.875rem;
  color: rgba(249, 250, 251, 0.55);
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.footer__links a:hover { color: #FFFFFF; }
.footer__right { display: flex; align-items: center; gap: 0.5rem; }
.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: rgba(249, 250, 251, 0.4);
  transition: color 0.2s ease;
}
.footer__social a:hover { color: #FFFFFF; }
.footer__social svg { width: 20px; height: 20px; fill: currentColor; }
.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: var(--caption);
  text-align: center;
}

/* ---- RESPONSIVE (shared foundation) ---- */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__cta .btn { font-size: 0.8125rem; padding: 0.6rem 1.15rem; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
  .footer__right { justify-content: center; }
}

@media (max-width: 480px) {
  .nav__inner { height: var(--nav-height-mobile); }
  .nav__logo img { height: 26px; }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
