/* ==========================================================================
   Appula Tech — Premium rebuild
   Dark navy + gold + cyan brand system, glass cards, mouse-reactive mesh.
   ========================================================================== */

:root {
  --bg:        #0a1220;
  --bg-soft:   #0f1c30;
  --bg-card:   #12213a;
  --navy:      #1e3a5f;
  --navy-deep: #0d1b30;
  --ink:       #f4f7fb;
  --ink-mute:  #9fb0c8;
  --ink-dim:   #6f8299;
  --gold:      #fbbf24;
  --gold-soft: #fde68a;
  --cyan:      #06b6d4;
  --cyan-soft: #22d3ee;
  --line:      rgba(255, 255, 255, 0.09);
  --glass:     rgba(255, 255, 255, 0.055);
  --glass-brd: rgba(255, 255, 255, 0.14);
  --whatsapp:  #25d366;

  --gradient-1: rgba(251, 191, 36, 0.55);
  --gradient-2: rgba(6, 182, 212, 0.45);
  --gradient-3: rgba(30, 58, 95, 0.9);

  --ease-soft: cubic-bezier(.16, 1, .3, 1);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --container: 1180px;
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--gold);
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 14px 0 16px; }
h3 { font-size: 1.3rem; }
p { color: var(--ink-mute); }

.section { padding: 120px 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .8s var(--ease-soft), clip-path 1s var(--ease-soft);
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }
.splash-mark {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  display: grid; place-items: center;
  font-weight: 800; color: var(--navy-deep); font-size: 1.4rem;
  animation: splashPulse 1.4s ease-in-out infinite;
}
@keyframes splashPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s, color .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  color: var(--navy-deep);
}
.btn-gold:hover { box-shadow: 0 20px 45px rgba(251,191,36,0.28); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--glass-brd);
}
.btn-ghost:hover { background: var(--glass); border-color: var(--gold); }

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-sm { padding: 12px 22px; font-size: 0.88rem; }
.btn-block { width: 100%; }

.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner {
  display: inline-flex; align-items: center; justify-content: center; gap: inherit;
  will-change: transform;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 18px 0;
  transition: background .35s, box-shadow .35s, padding .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 18, 32, 0.72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-color: var(--line);
  padding: 12px 0;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  display: grid; place-items: center;
  color: var(--navy-deep); font-weight: 800; font-size: 0.95rem;
}

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 0.92rem; color: var(--ink-mute); position: relative; padding: 4px 0;
  transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: var(--gold); transition: width .3s var(--ease-soft);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; background: none; border: none; color: var(--ink);
  width: 40px; height: 40px; place-items: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 120px; padding-bottom: 80px;
  overflow: hidden;
}
.hero-mesh {
  position: absolute; inset: -10%; z-index: -1;
  background:
    radial-gradient(circle 620px at var(--mx, 30%) var(--my, 30%), var(--gradient-1) 0%, transparent 55%),
    radial-gradient(circle 720px at calc(var(--mx, 30%) + 30%) calc(var(--my, 30%) + 25%), var(--gradient-2) 0%, transparent 55%),
    var(--bg);
  filter: blur(70px) saturate(140%);
  transition: background .4s ease;
}
.hero-grid-overlay {
  position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 40%, transparent 100%);
}

.hero-content { max-width: 720px; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-brd);
  font-size: 0.85rem; color: var(--ink-mute);
  backdrop-filter: blur(10px);
}
.badge-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  margin: 26px 0 22px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 1.15rem; color: var(--ink-mute); max-width: 540px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 22px; }
.hero-note { font-size: 0.85rem; color: var(--ink-dim); }

/* ---------- About ---------- */
.about { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-text { font-size: 1.2rem; color: var(--ink); max-width: 780px; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.stat b { display: block; font-size: 2.2rem; color: var(--gold); }
.stat span { font-size: 0.9rem; color: var(--ink-dim); }

/* ---------- Glass card base ---------- */
.glass-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-lg);
  position: relative; isolation: isolate;
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft), border-color .5s;
}
@supports (backdrop-filter: blur(10px)) {
  .glass-card { background: var(--glass); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); }
}
.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(251,191,36,0.35);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.55);
}
.glass-card.has-halo::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(251,191,36,0.16), transparent 65%);
  opacity: 0; transition: opacity .35s;
}
.glass-card.has-halo:hover::before { opacity: 1; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.service-card { padding: 38px 32px; display: flex; flex-direction: column; height: 100%; }
.service-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(6,182,212,0.18));
  color: var(--gold);
}
.service-icon svg { width: 26px; height: 26px; }
.service-card .eyebrow { margin-bottom: 10px; }
.service-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.service-card p { font-size: 0.95rem; margin-bottom: 20px; }
.service-bullets { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.service-bullets li { display: flex; gap: 10px; font-size: 0.9rem; color: var(--ink-mute); align-items: flex-start; }
.service-bullets svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--cyan); }
.service-price { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: 6px; }
.service-price b { font-size: 1.5rem; color: var(--ink); }
.service-price span { font-size: 0.85rem; color: var(--ink-dim); }

/* ---------- Plans ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; max-width: 900px; margin: 0 auto; }
.plan-card { padding: 44px 38px; }
.plan-card.featured {
  border-color: rgba(251,191,36,0.5);
  background: linear-gradient(180deg, rgba(251,191,36,0.08), var(--glass));
}
.plan-badge {
  position: absolute; top: -14px; left: 38px;
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  color: var(--navy-deep); font-size: 0.75rem; font-weight: 700;
  padding: 6px 16px; border-radius: 999px; letter-spacing: 0.03em;
}
.plan-card .plan-name { font-size: 1.5rem; margin-bottom: 4px; }
.plan-card .plan-sub { font-size: 0.9rem; color: var(--ink-dim); margin-bottom: 22px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.plan-price b { font-size: 2.6rem; color: var(--ink); }
.plan-price span { color: var(--ink-dim); font-size: 0.95rem; }
.plan-card > p { margin-bottom: 24px; }
.plan-bullets { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.plan-bullets li { display: flex; gap: 10px; font-size: 0.92rem; align-items: flex-start; }
.plan-bullets svg { width: 17px; height: 17px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.plans-note { text-align: center; max-width: 620px; margin: 40px auto 0; font-size: 0.88rem; color: var(--ink-dim); }

/* ---------- Trial banner ---------- */
.trial-banner {
  background: linear-gradient(120deg, var(--navy), var(--navy-deep) 60%);
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  text-align: center;
  position: relative; overflow: hidden;
  border: 1px solid var(--glass-brd);
}
.trial-banner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle 500px at 20% 20%, rgba(251,191,36,0.18), transparent 60%),
              radial-gradient(circle 500px at 80% 80%, rgba(6,182,212,0.16), transparent 60%);
}
.trial-banner > * { position: relative; }
.trial-banner h2 { margin-top: 12px; }
.trial-banner p { max-width: 520px; margin: 0 auto 30px; }

/* ---------- Demo chat ---------- */
.demo-wrap { display: grid; grid-template-columns: 1fr 420px; gap: 60px; align-items: center; }
.demo-copy .eyebrow { margin-bottom: 14px; }
.demo-features { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.demo-features li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; color: var(--ink-mute); }
.demo-features svg { width: 18px; height: 18px; color: var(--cyan); margin-top: 2px; flex-shrink: 0; }

.phone {
  background: linear-gradient(180deg, #16233b, #0d1928);
  border-radius: 34px;
  border: 1px solid var(--glass-brd);
  padding: 14px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7);
}
.phone-notch { display: flex; justify-content: space-between; padding: 4px 14px 10px; font-size: 0.75rem; color: var(--ink-dim); }
.phone-screen {
  background: var(--bg);
  border-radius: 22px;
  overflow: hidden;
  display: flex; flex-direction: column;
  height: 520px;
}
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: var(--navy); border-bottom: 1px solid var(--line);
}
.chat-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--cyan)); }
.chat-header b { font-size: 0.92rem; display: block; }
.chat-header span { font-size: 0.72rem; color: var(--cyan-soft); display: flex; align-items: center; gap: 5px; }
.chat-header span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-soft); }

.chat-body { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.chat-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 0.87rem; line-height: 1.4; animation: msgIn .35s var(--ease-soft); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.chat-msg.bot { align-self: flex-start; background: var(--bg-card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--gold), #f59e0b); color: var(--navy-deep); font-weight: 500; border-bottom-right-radius: 4px; }
.chat-msg.typing { display: flex; gap: 4px; align-items: center; padding: 12px 16px; }
.chat-msg.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-dim); animation: typingBounce 1.1s infinite; }
.chat-msg.typing span:nth-child(2) { animation-delay: .15s; }
.chat-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.chip {
  font-size: 0.78rem; padding: 8px 13px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-brd); color: var(--ink-mute);
  transition: background .25s, color .25s, border-color .25s;
}
.chip:hover { color: var(--ink); border-color: var(--gold); background: rgba(251,191,36,0.08); }

.chat-input-row { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-input-row input {
  flex: 1; background: var(--bg-card); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; color: var(--ink); font-size: 0.85rem;
}
.chat-input-row input:focus { outline: none; border-color: var(--gold); }
.chat-send {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--gold), #f59e0b); color: var(--navy-deep);
  display: grid; place-items: center; flex-shrink: 0;
}
.chat-send svg { width: 18px; height: 18px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; }
.contact-info-card { padding: 40px 34px; }
.contact-info-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
.contact-info-item svg { width: 20px; height: 20px; color: var(--gold); margin-top: 2px; flex-shrink: 0; }
.contact-info-item b { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); margin-bottom: 3px; }
.contact-info-item span, .contact-info-item a { color: var(--ink); font-size: 0.98rem; }

.form-card { padding: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.82rem; color: var(--ink-mute); }
.field input, .field select, .field textarea {
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 16px; color: var(--ink); font-size: 0.92rem; font-family: inherit;
  transition: border-color .25s, background .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,0.07); }
.field textarea { resize: vertical; min-height: 110px; }
.form-status { margin-top: 14px; font-size: 0.85rem; min-height: 20px; }
.form-status.ok { color: var(--cyan-soft); }
.form-status.err { color: #f87171; }

/* ---------- Footer ---------- */
.site-footer { padding: 70px 0 30px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-brand p { margin-top: 14px; max-width: 340px; font-size: 0.92rem; }
.footer-col b { display: block; margin-bottom: 16px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim); }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.92rem; color: var(--ink-mute); transition: color .25s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-dim); }

/* ---------- Floating actions (FAB) ---------- */
.fab-stack { position: fixed; bottom: 26px; right: 26px; display: flex; flex-direction: column; gap: 14px; z-index: 400; align-items: flex-end; }
.fab {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  transition: transform .35s var(--ease-soft), box-shadow .35s;
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 27px; height: 27px; }
.fab-whatsapp { background: var(--whatsapp); color: #fff; position: relative; }
.fab-whatsapp::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--whatsapp); opacity: 0.55;
  animation: fabPing 2.2s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes fabPing { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }
.fab-mail { background: var(--cyan); color: #fff; width: 46px; height: 46px; }
.fab-mail svg { width: 20px; height: 20px; }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .1s; }
[data-reveal][data-delay="2"] { transition-delay: .2s; }
[data-reveal][data-delay="3"] { transition-delay: .3s; }

/* ---------- Mobile nav ---------- */
.mobile-nav {
  position: fixed; inset: 0; z-index: 480;
  background: rgba(8, 14, 26, 0.98);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.mobile-nav.is-open { opacity: 1; pointer-events: auto; }
.mobile-nav a { font-size: 1.5rem; font-weight: 600; }
.mobile-nav .btn { margin-top: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .demo-wrap { grid-template-columns: 1fr; }
  .demo-wrap .phone { justify-self: center; width: 100%; max-width: 380px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-stats { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .section { padding: 80px 0; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .trial-banner { padding: 48px 26px; }
  .fab { width: 52px; height: 52px; }
  .fab svg { width: 24px; height: 24px; }
}
