/* HH Nexus Marketing — Global styles (Part 1)
   Tailwind handles utilities; this file owns brand tokens, glass/3D, hero, motion. */

:root {
  --bg: #05070d;
  --bg-elevated: #0b1220;
  --navy: #0a1628;
  --cyan: #22d3ee;
  --green: #22c55e;
  --purple: #8b5cf6;
  --white: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.14);
  --glow-green: rgba(34, 197, 94, 0.35);
  --glow-cyan: rgba(34, 211, 238, 0.28);
  --radius: 1.25rem;
  --header-h: 4.25rem;
  --font: "Manrope", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--white);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.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;
}

/* ---------- Layout ---------- */
.site-main {
  overflow-x: clip;
}

.section {
  position: relative;
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section-inner {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.section-subtitle {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
}

/* ---------- Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: rgba(5, 7, 13, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(5, 7, 13, 0.88);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  flex-shrink: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-text {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem 1.25rem;
  background: rgba(8, 12, 22, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 0.75rem;
  border-radius: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.mobile-nav a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}

.mobile-nav .btn {
  width: 100%;
  margin-top: 0.5rem;
}

@media (min-width: 1024px) {
  .nav-links,
  .nav-cta {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }
}

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #04140c;
  background: linear-gradient(135deg, var(--green), #34d399 45%, var(--cyan));
  box-shadow: 0 12px 32px var(--glow-green);
}

.btn-primary:hover {
  box-shadow: 0 16px 40px var(--glow-cyan);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(148, 163, 184, 0.28);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.08);
}

/* ---------- Card system ---------- */
.glass-card,
.glow-card,
.depth-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  transform-style: preserve-3d;
}

.glow-card {
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(34, 197, 94, 0.08),
    0 0 40px rgba(34, 211, 238, 0.06);
}

.depth-card {
  transform: perspective(1200px) translateZ(0);
}

.hover-3d {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
  transform-style: preserve-3d;
}

@media (hover: hover) and (pointer: fine) {
  .hover-3d:hover {
    border-color: rgba(34, 211, 238, 0.28);
    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.35),
      0 0 36px rgba(34, 197, 94, 0.08);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  animation: gridDrift 28s linear infinite;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.hero-orb-a {
  width: 340px;
  height: 340px;
  top: -80px;
  right: 8%;
  background: rgba(34, 197, 94, 0.28);
}

.hero-orb-b {
  width: 280px;
  height: 280px;
  bottom: 5%;
  left: -40px;
  background: rgba(34, 211, 238, 0.22);
}

.hero-orb-c {
  width: 200px;
  height: 200px;
  top: 40%;
  left: 42%;
  background: rgba(139, 92, 246, 0.16);
}

.hero-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 28% 68%, rgba(34, 211, 238, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 55% 18%, rgba(34, 197, 94, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 72% 46%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 88% 72%, rgba(34, 211, 238, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 40% 84%, rgba(255, 255, 255, 0.35), transparent);
  animation: particlePulse 6s ease-in-out infinite alternate;
}

.hero-curve {
  position: absolute;
  width: 120%;
  height: 240px;
  left: -10%;
  bottom: 8%;
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero-copy {
  max-width: 36rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.hero-title {
  margin: 0 0 1.1rem;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero-title .line {
  display: block;
}

.gradient-text {
  background: linear-gradient(120deg, var(--green), #6ee7b7, var(--cyan), #a5f3fc, var(--green));
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 5s linear infinite;
}

.hero-sub {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-trust {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .hero-actions .btn {
    width: 100%;
  }
}

/* ---------- Hero visual dashboard ---------- */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.02;
  max-width: 540px;
  margin-inline: auto;
  perspective: 1200px;
}

.hero-visual-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.dash-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(72%, 300px);
  aspect-ratio: 1 / 1.05;
  transform: translate(-50%, -50%);
  padding: 1.15rem;
  z-index: 2;
}

.dash-core-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dash-core h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--green);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dash-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.dash-online {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.dash-stat {
  padding: 0.7rem 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

.dash-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.dash-stat strong {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.float-card {
  position: absolute;
  z-index: 3;
  min-width: 132px;
  padding: 0.7rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.float-card span {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.float-a { top: 6%; left: 2%; }
.float-b { top: 8%; right: 0; }
.float-c { bottom: 14%; left: 0; }
.float-d { bottom: 10%; right: 2%; }

.connector {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.45;
}

.connector-a {
  left: 22%;
  top: 28%;
  width: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
  transform: rotate(18deg);
}

.connector-b {
  right: 20%;
  top: 30%;
  width: 16%;
  height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
  transform: rotate(-22deg);
}

.connector-c {
  left: 24%;
  bottom: 32%;
  width: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple));
  transform: rotate(-16deg);
}

.connector-d {
  right: 22%;
  bottom: 30%;
  width: 18%;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  transform: rotate(14deg);
}

/* ---------- Services preview ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.25rem;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid .service-card:last-child:nth-child(7) {
    grid-column: 2;
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 240px;
  padding: 1.25rem;
  color: inherit;
}

.service-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.service-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.18);
  color: var(--cyan);
}

.service-num {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.service-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.service-card .service-tag {
  margin: 0;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.service-link {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
}

/* ---------- Demo placeholders ---------- */
.demo-placeholder {
  margin-top: 1.75rem;
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
}

.demo-placeholder strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.demo-placeholder p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
}

.demo-section + .demo-section {
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 2rem;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(600px 280px at 50% 0%, rgba(34, 197, 94, 0.12), transparent 60%),
    var(--bg-elevated);
}

.footer-cta {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.footer-cta h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.footer-cta p {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 20rem;
}

.footer-col h3 {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-col a {
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 600;
}

.footer-col a:hover {
  color: var(--cyan);
}

.footer-copy {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

/* ---------- Reveal helpers for GSAP ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
}

/* ---------- Keyframes ---------- */
@keyframes gradientShift {
  to {
    background-position: 220% center;
  }
}

@keyframes gridDrift {
  to {
    background-position: 56px 56px;
  }
}

@keyframes particlePulse {
  to {
    opacity: 0.55;
    transform: translateY(-6px);
  }
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-grid,
  .hero-particles,
  .gradient-text,
  .hero-kicker .dot {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hover-3d:hover {
    transform: none;
  }
}

/* ---------- Mobile 3D dampening ---------- */
@media (max-width: 767px) {
  .hover-3d:hover {
    transform: none;
  }

  .float-card {
    min-width: 110px;
    padding: 0.55rem 0.65rem;
    font-size: 0.7rem;
  }

  .dash-core {
    width: min(78%, 260px);
  }
}

/* ---------- Part 3 polish ---------- */
.section,
.demo-section,
#home,
#services,
#flagship-agents,
#dental-booking,
#instagram-shop,
#voice-receptionist,
#convert {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.btn-primary {
  background-size: 160% 160%;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-position 0.35s ease;
}

.btn-primary:hover {
  background-position: 100% 50%;
}

.btn-ghost:focus-visible,
.btn-primary:focus-visible,
.chip:focus-visible,
.day-tab:focus-visible,
.time-slot:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.nav-links a.is-active {
  color: var(--white);
  background: rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.demo-shell {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.demo-shell:hover {
  border-color: rgba(34, 211, 238, 0.22);
}

.hero-visual,
.phone-frame,
.dash-core,
.demo-shell {
  contain: layout style;
}

.hero-visual {
  min-height: 320px;
}

@media (max-width: 767px) {
  .hero-orb {
    filter: blur(40px);
    opacity: 0.35;
  }

  .site-header {
    backdrop-filter: blur(10px);
  }

  .glass-card,
  .glow-card,
  .demo-shell {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .nav-links a {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover,
  .hover-3d,
  .demo-shell {
    transition: none !important;
  }
}

