/* =============================================================
   AvivTech Automations — Styles
   Dark theme · electric-blue accents · subtle 3D effects · fully responsive
   ============================================================= */

/* ---------- Design tokens (one place to retune the brand) ---------- */
:root {
  --bg:           #050810;
  --bg-elev:      #0a1224;
  --surface:      #0e1830;
  --surface-2:    #131f3d;
  --border:       rgba(56, 189, 248, 0.18);
  --border-strong:rgba(56, 189, 248, 0.45);

  --text:         #f0f9ff;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;

  --accent:       #38bdf8;
  --accent-2:     #0ea5e9;
  --accent-deep:  #0369a1;
  --glow:         rgba(56, 189, 248, 0.35);
  --glow-strong:  rgba(56, 189, 248, 0.55);

  --radius:       14px;
  --radius-sm:    10px;
  --maxw:         1200px;
  --maxw-narrow:  720px;

  --shadow-card:  0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 20px 50px rgba(2, 132, 199, 0.25);
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #7dd3fc; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0; }
p  { margin: 0; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--maxw-narrow); }

.section {
  padding: 96px 0;
  position: relative;
}
.section-alt {
  background:
    radial-gradient(1200px 600px at 50% 0%, rgba(56, 189, 248, 0.06), transparent 70%),
    var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 56px;
  font-size: 1.05rem;
}
.accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #001120;
  box-shadow: 0 8px 24px var(--glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px var(--glow-strong);
  color: #001120;
}
.btn-secondary {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text);
  border-color: var(--border-strong);
  backdrop-filter: blur(6px);
}
.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--text);
}
.btn-full { width: 100%; padding: 16px; font-size: 1.05rem; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(5, 8, 16, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
  padding: 10px 0;
}
.nav.scrolled {
  background: rgba(5, 8, 16, 0.85);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.nav-logo { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 0 14px var(--glow)); }
.nav-brand-text { font-weight: 700; letter-spacing: -0.01em; font-size: 1.15rem; }

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 500;
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(56, 189, 248, 0.06); }
.nav-links .nav-cta {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #001120;
  font-weight: 600;
}
.nav-links .nav-cta:hover { color: #001120; box-shadow: 0 6px 20px var(--glow); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 42px; height: 42px;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--accent);
  border-radius: 1px;
  transition: transform .3s ease, opacity .3s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 0 80px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -10%;
  z-index: -2;
  background:
    radial-gradient(700px 500px at 20% 30%, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(900px 600px at 80% 70%, rgba(3, 105, 161, 0.18), transparent 70%),
    var(--bg);
  filter: blur(0px);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -20px, 0) scale(1.05); }
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  opacity: .55;
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  perspective: 800px;
}
.hero-logo {
  width: min(360px, 72vw);
  height: auto;
  filter: drop-shadow(0 0 50px var(--glow-strong));
  animation: float 5s ease-in-out infinite;
  transform-style: preserve-3d;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotateX(0deg); }
  50%      { transform: translateY(-10px) rotateX(4deg); }
}
.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 4.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .6);
}
.hero-sub {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 36px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero-trust {
  color: var(--text-dim);
  font-size: .9rem;
  letter-spacing: .03em;
}

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.service-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  cursor: pointer;
  outline: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .25s ease;
  transform-style: preserve-3d;
  will-change: transform;
  box-shadow: var(--shadow-card);
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(56,189,248,0) 0%, rgba(56,189,248,0.5) 50%, rgba(56,189,248,0) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}
.service-card:hover::before,
.service-card:focus-visible::before { opacity: 1; }

.service-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35), var(--shadow-hover);
}
.service-card.selected::before { opacity: 1; }

.service-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.10);
  color: var(--accent);
  margin-bottom: 22px;
  transition: transform .35s ease, background .25s ease;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card:hover .service-icon { transform: scale(1.08) rotate(-3deg); background: rgba(56, 189, 248, 0.18); }

.service-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.service-desc {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 22px;
}
.service-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--accent);
  letter-spacing: .02em;
}
.service-select .check {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.service-card.selected .service-select { color: #7dd3fc; }
.service-card.selected .service-select .check {
  background: var(--accent);
  color: #001120;
  transform: scale(1.15);
}

/* ---------- Why grid ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  transition: transform .3s ease, border-color .25s ease, box-shadow .3s ease;
}
.why-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}
.why-num {
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.why-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.why-card p  { color: var(--text-muted); font-size: .95rem; }

/* ---------- Booking form ---------- */
.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--shadow-card);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.form-field { margin-bottom: 18px; display: flex; flex-direction: column; }
.form-field label {
  font-size: .9rem;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 500;
}
.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-dim); }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
  background: #0c1428;
}
.form-field textarea { resize: vertical; min-height: 110px; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  font-size: .92rem;
  color: var(--text-muted);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.check-item input {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background .15s ease, border-color .15s ease;
}
.check-item input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.check-item input:checked::after {
  content: "✓";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  color: #001120;
  font-size: .8rem;
  font-weight: 800;
}
.check-item:hover { border-color: var(--border-strong); color: var(--text); }
.check-item input:checked ~ span { color: var(--text); }

.form-fineprint {
  text-align: center;
  color: var(--text-dim);
  font-size: .85rem;
  margin-top: 14px;
}

.btn-loading { display: none; }
.form.is-loading .btn-text { display: none; }
.form.is-loading .btn-loading { display: inline; }
.form.is-loading button { opacity: .8; pointer-events: none; }

.form-success {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 50px 36px;
  text-align: center;
  box-shadow: var(--shadow-card);
  animation: fadeUp .6s ease both;
}
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #001120;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--glow-strong);
}
.form-success h3 { font-size: 1.6rem; margin-bottom: 10px; }
.form-success p { color: var(--text-muted); margin-bottom: 24px; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .footer-logo { width: 56px; margin-bottom: 14px; filter: drop-shadow(0 0 12px var(--glow)); }
.footer-tag { color: var(--text); font-weight: 500; margin-bottom: 6px; }
.footer-parent { color: var(--text-dim); font-size: .9rem; font-style: italic; }
.footer-contact h4,
.footer-links h4 { color: var(--accent); margin-bottom: 14px; font-size: .95rem; letter-spacing: .05em; text-transform: uppercase; }
.footer-contact p,
.footer-links p { color: var(--text-muted); margin-bottom: 8px; font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: .85rem;
}

/* ---------- Floating WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: pulseRing 2.4s ease-in-out infinite;
}
.whatsapp-float:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.6);
  color: white;
}
@keyframes pulseRing {
  0%   { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70%  { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------- Reveal-on-scroll animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .section { padding: 72px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(5, 8, 16, 0.96);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    padding: 12px 18px 18px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 12px; }
  .nav-links .nav-cta { text-align: center; margin-top: 8px; }

  .form { padding: 24px; }
  .form-row { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }

  .hero { padding: 120px 0 60px; min-height: auto; }
  .hero-ctas .btn { width: 100%; }

  .whatsapp-float { width: 56px; height: 56px; right: 16px; bottom: 16px; }
}

/* Accessibility: respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
