/* ==========================================================================
   Theme variables
   - default :root = light
   - :root.dark = dark (manual toggle via document.documentElement.classList.add('dark'))
   - Also respects system preference via media query (applies dark vars if user prefers)
   ========================================================================== */

:root {
  --bg: #f9fafb;
  --bg-soft: #f3f4f6;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.9);
  --border-subtle: rgba(148, 163, 184, 0.3);
  --accent: #0ea5e9;
  --accent-soft: rgba(14, 165, 233, 0.12);
  --accent-strong: #0284c7;
  --text: #111827;
  --muted: #6b7280;
  --danger: #dc2626;
  --radius-lg: 18px;
  --shadow-soft: 0 8px 25px rgba(2,6,23,0.06);
  --shadow-subtle: 0 4px 15px rgba(2,6,23,0.04);
  --nav-height: 70px;
  --glass-bg: rgba(255,255,255,0.6);
}

/* Manual dark toggle */
:root.dark {
  --bg: #050816;
  --bg-soft: #070b1b;
  --surface: #0b1220;
  --surface-soft: rgba(15, 23, 42, 0.8);
  --border-subtle: rgba(148, 163, 184, 0.2);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --accent-strong: #0ea5e9;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f97373;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.9);
  --shadow-subtle: 0 10px 30px rgba(15, 23, 42, 0.65);
  --nav-height: 70px;
  --glass-bg: rgba(15,23,42,0.6);
}

/* ==========================================================================
   Base / Reset
   ========================================================================== */

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow-x: hidden; scroll-behavior: smooth;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 55%),
    radial-gradient(circle at bottom right, var(--accent-soft), transparent 60%),
    var(--bg);
}
body { display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Layout helpers */
.page-shell { flex: 1; display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(18px);
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 55%),
    var(--glass-bg);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.logo-mark { display: inline-flex; align-items: center; gap: 0.65rem; }

.logo-icon {
  width: 38px; height: 38px; border-radius: 50%; position: relative; overflow: hidden;
  background-image: url(/assets/logo.png); background-position: center; background-repeat: no-repeat; background-size: contain;
}

.logo-text { font-weight: 700; letter-spacing: 0.03em; font-size: 1.1rem; }
.logo-text span { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 1.2rem; font-size: 0.9rem; color: var(--muted);
}
.nav-links a {
  padding: 0.35rem 0.15rem; border-radius: 999px; position: relative; transition: color 0.18s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.25rem; height: 2px; border-radius: 999px;
  transform-origin: center; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: transform 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta { display: flex; align-items: center; gap: 0.65rem; }

/* Buttons */
.btn {
  border-radius: 999px; padding: 0.55rem 1.1rem; border: 1px solid transparent;
  font-size: 0.9rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.35rem;
  cursor: pointer; transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.16s ease, box-shadow 0.16s ease;
  background: none; color: var(--text);
}

.btn-primary {
  background: radial-gradient(circle at top left, var(--accent), var(--accent-strong));
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  color: #0b1120;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

/* outline button uses surface tokens */
.btn-outline {
  border-color: var(--border-subtle);
  background: var(--surface-soft);
  color: var(--muted);
}
.btn-outline:hover {
  border-color: color-mix(in srgb, var(--border-subtle) 80%, transparent);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

/* Small controls */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; border: 1px solid var(--border-subtle);
  background: var(--surface-soft); cursor: pointer; font-size: 0.95rem; color: var(--muted);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.18s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--border-subtle) 90%, transparent); box-shadow: var(--shadow-subtle); }

.menu-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px; cursor: pointer;
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border-subtle);
  background: var(--surface-soft);
  align-items: center;
}
.menu-toggle span {
  height: 2px; width: 16px; border-radius: 999px; background: color-mix(in srgb, var(--text) 65%, transparent 35%);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding: 3.5rem 0 2.75rem; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 2.5rem; align-items: center; }

.hero-pill {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.8rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: radial-gradient(circle at top left, var(--accent-soft), var(--surface-soft));
  color: color-mix(in srgb, var(--text) 85%, transparent);
  font-size: 0.75rem; letter-spacing: 0.09em; text-transform: uppercase;
}

.hero-pill-dot { width: 7px; height: 7px; border-radius: 999px; background: #22c55e; box-shadow: 0 0 0 6px rgba(34,197,94,0.18); }

.hero-title { margin: 1.2rem 0 0.6rem; font-size: clamp(2.2rem, 3.1vw + 1.4rem, 3.1rem); line-height: 1.05; letter-spacing: -0.03em; }
.hero-title span {
  background: linear-gradient(120deg, color-mix(in srgb, var(--text) 12%, white 88%), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-sub { margin: 0 0 1.4rem; color: var(--muted); max-width: 30rem; font-size: 0.97rem; }

.hero-metrics { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 1.6rem; }

.metric {
  padding: 0.6rem 0.9rem; border-radius: 0.9rem; border: 1px solid var(--border-subtle);
  background: var(--surface); min-width: 140px; box-shadow: var(--shadow-subtle);
}
.metric strong { display: block; font-size: 1.05rem; }
.metric span { display: block; color: var(--muted); font-size: 0.76rem; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.1rem; }
.hero-contact { margin-top: 1.4rem; font-size: 0.83rem; color: var(--muted); }
.hero-contact a { color: var(--accent); }

.hero-right { position: relative; transform-style: preserve-3d; }

.hero-card {
  border-radius: 1.4rem; padding: 1.3rem 1.3rem 1.1rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow-soft); border: 1px solid var(--border-subtle);
  position: relative; overflow: hidden; animation: floatUp 0.9s ease-out both;
}
.hero-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }

.hero-badge {
  font-size: 0.74rem; padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--surface-soft); color: color-mix(in srgb, var(--text) 85%, transparent);
}

.hero-status { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.hero-status-dot { width: 8px; height: 8px; border-radius: 999px; background: #22c55e; box-shadow: 0 0 0 6px rgba(34,197,94,0.2); }

.hero-card-main {
  border-radius: 1rem; padding: 0.85rem; background: var(--surface-soft); border: 1px solid var(--border-subtle);
}
.hero-card-main img { border-radius: 0.85rem; border: 1px solid var(--border-subtle); }

.hero-orbit {
  position: absolute; inset: -80px; border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent);
  pointer-events: none; opacity: 0.6;
}
.hero-orbit::after {
  content: ""; position: absolute; width: 8px; height: 8px; border-radius: 999px; background: var(--accent);
  top: 10%; left: 70%; box-shadow: 0 0 0 10px var(--accent-soft); animation: orbit 11s linear infinite; transform-origin: -180px 110px;
}

.hero-glow {
  position: absolute; inset: 12%; filter: blur(40px);
  background: radial-gradient(circle at top, var(--accent-soft), transparent 70%), radial-gradient(circle at bottom, var(--surface), transparent 70%);
  opacity: 0.45; pointer-events: none; mix-blend-mode: screen;
}

/* Animations */
@keyframes floatUp { from { opacity: 0; transform: translateY(25px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes orbit { to { transform: rotate(360deg); } }

/* ==========================================================================
   Sections & Headings
   ========================================================================== */

.section { padding: 2.75rem 0; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.6rem; }

.section-kicker {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; color: var(--muted); margin-bottom: 0.3rem;
}
.section-title { font-size: 1.4rem; margin: 0; }
.section-title span { color: var(--accent); }
.section-sub { margin: 0; color: var(--muted); max-width: 23rem; font-size: 0.9rem; }

/* ==========================================================================
   Feature groups (Packages)
   ========================================================================== */

.feature-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; }

.feature-card {
  border-radius: var(--radius-lg); padding: 1.2rem 1.1rem 1.1rem;
  background: var(--surface); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-subtle);
  font-size: 0.9rem; position: relative; overflow: hidden;
}
.feature-tag { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 0.35rem; }

.feature-card h3 { margin: 0 0 0.55rem; font-size: 1rem; }
.feature-card ul { list-style: none; margin: 0.2rem 0 0; padding: 0; color: var(--muted); font-size: 0.83rem; }
.feature-card li { display: flex; gap: 0.45rem; margin-bottom: 0.4rem; }
.feature-card li::before {
  content: ""; flex: 0 0 6px; height: 6px; border-radius: 999px; margin-top: 0.35rem;
  background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft);
}
.feature-card::after {
  content: ""; position: absolute; inset: 55% -40%; background: radial-gradient(circle at top, var(--accent-soft), transparent 65%);
  opacity: 0; transition: opacity 0.25s ease;
}
.feature-card:hover::after { opacity: 1; }

/* ==========================================================================
   Pricing
   ========================================================================== */

.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }

.plan-card {
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border-subtle);
  padding: 1.1rem 1rem 1rem; box-shadow: var(--shadow-subtle); font-size: 0.9rem; position: relative; overflow: hidden;
}
.plan-card.popular { border-color: color-mix(in srgb, var(--accent) 75%, transparent); box-shadow: var(--shadow-soft); }
.plan-label { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.69rem; color: var(--muted); margin-bottom: 0.35rem; }
.plan-card h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.price { font-size: 1.35rem; font-weight: 600; margin-bottom: 0.2rem; }
.plan-note { font-size: 0.78rem; color: var(--muted); }

.plan-popular-badge {
  position: absolute; top: 0.7rem; right: 1rem; font-size: 0.68rem; padding: 0.2rem 0.5rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); background: var(--surface-soft);
  color: var(--accent); letter-spacing: 0.09em; text-transform: uppercase;
}

.pricing-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }

/* ==========================================================================
   Clients / Cards
   ========================================================================== */

.clients-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.15rem; align-items: stretch; }

.client-card {
  border-radius: 0.9rem; padding: 0.7rem 0.7rem 0.55rem; background: var(--surface); border: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 0.4rem; align-items: center; text-align: center; font-size: 0.78rem; color: var(--muted);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.client-card img { max-width: 100%; max-height: 80px; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,0.06)); }
.client-card span { font-size: 0.72rem; color: color-mix(in srgb, var(--muted) 90%, var(--text) 10%); }
.client-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-subtle); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }

/* ==========================================================================
   Demo / Carousel
   ========================================================================== */

.demo-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2rem; align-items: center; }

.feature-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; }
.feature-list li {
  padding: 0.5rem 0.7rem; border-radius: 0.8rem; cursor: pointer; color: var(--muted); border: 1px solid transparent; background: transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.feature-list li.active {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
  background: radial-gradient(circle at top left, var(--accent-soft), var(--surface-soft));
  color: var(--text);
}

.demo-tip { margin-top: 0.9rem; font-size: 0.8rem; color: var(--muted); }

.carousel-shell {
  border-radius: 1.2rem; padding: 0.5rem; background: var(--surface); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-soft); position: relative;
}
.carousel-frame { border-radius: 0.9rem; overflow: hidden; position: relative; background: var(--surface); min-height: 260px; }
.carousel-slide { position: absolute; inset: 0; display: none; padding: 0.9rem; }
.carousel-slide.active { display: block; }
.carousel-slide img { border-radius: 0.7rem; border: 1px solid var(--border-subtle); }

.carousel-caption {
  position: absolute; left: 1.1rem; bottom: 0.9rem; padding: 0.45rem 0.8rem; font-size: 0.78rem; border-radius: 999px;
  background: var(--surface-soft); border: 1px solid var(--border-subtle); color: var(--muted); backdrop-filter: blur(12px);
}

.carousel-controls { margin-top: 0.6rem; display: flex; justify-content: flex-end; gap: 0.4rem; }
.carousel-btn {
  width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--surface-soft);
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.78rem;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.carousel-btn:hover { border-color: color-mix(in srgb, var(--accent) 70%, transparent); color: var(--text); transform: translateY(-1px); }

/* ==========================================================================
   Map
   ========================================================================== */

.map-shell { border-radius: 1.1rem; padding: 0.7rem; background: radial-gradient(circle at top left, var(--accent-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: var(--shadow-soft); }
.map-shell img { border-radius: 0.9rem; border: 1px solid var(--border-subtle); }

/* ==========================================================================
   Contact / Forms
   ========================================================================== */

.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 2rem; }

.contact-card {
  border-radius: var(--radius-lg); padding: 1.2rem 1.1rem 1.1rem; background: var(--surface); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-soft);
}
.contact-details p { margin: 0 0 0.3rem; font-size: 0.88rem; }
.contact-details a { color: var(--accent); }

.contact-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; font-size: 0.75rem; }
.contact-badge { padding: 0.25rem 0.6rem; border-radius: 999px; border: 1px solid var(--border-subtle); color: var(--muted); }

form.contact-form { display: grid; grid-template-columns: 1fr; gap: 0.55rem; font-size: 0.85rem; }
form.contact-form label { color: var(--muted); }

.input, textarea {
  border-radius: 0.75rem; border: 1px solid var(--border-subtle); padding: 0.55rem 0.7rem; background: var(--surface); color: var(--text); font: inherit; resize: vertical; min-height: 38px;
}
.input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }

/* ==========================================================================
   Legal / Footer
   ========================================================================== */

.legal-strip {
  padding: 1.4rem 0 0.8rem; border-top: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.7rem; font-size: 0.8rem; justify-content: space-between; align-items: center;
}

.legal-links { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.legal-links a {
  color: var(--muted); border-radius: 999px; padding: 0.25rem 0.55rem; border: 1px solid transparent; cursor: pointer;
}
.legal-links a:hover { border-color: var(--border-subtle); color: var(--text); }

.footer {
  border-top: 1px solid var(--border-subtle); padding: 1.1rem 0 1.6rem; margin-top: 1rem; font-size: 0.78rem; color: var(--muted);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-inner { justify-content: space-between; }
  .hero-grid, .demo-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-right { order: -1; }
  .feature-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clients-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .feature-groups { grid-template-columns: minmax(0, 1fr); }
  .pricing-grid { grid-template-columns: minmax(0, 1fr); }
  .clients-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 2.6rem; }
  .section { padding: 2.2rem 0; }
}

/* Mobile nav dropdown */
.nav-links-mobile {
  display: none; flex-direction: column; gap: 0.4rem; padding: 0.75rem 1rem 1rem; border-top: 1px solid var(--border-subtle); background: var(--glass-bg);
}
.nav-links-mobile a { padding: 0.35rem 0.25rem; color: var(--muted); font-size: 0.88rem; }
.nav-links-mobile a:hover { color: var(--text); }
.nav-links-mobile.open { display: flex; }

/* Utilities */
.h-100 { height: 100%; }
