/* ================================================================
   Arkly Solutions — Apple-Inspired Minimal Design
   ================================================================ */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --primary-bg: #eef2ff;
  --accent: #06b6d4;
  --text: #1D1D1F;
  --text-light: #6E6E73;
  --text-muted: #86868B;
  --bg: #FBFBFD;
  --bg-alt: #F5F5F7;
  --bg-card: #ffffff;
  --border: #E5E5EA;
  --shadow: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.06);
  --radius: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
  --primary: #818cf8;
  --primary-dark: #6366f1;
  --primary-light: #a5b4fc;
  --primary-bg: rgba(99,102,241,0.12);
  --accent: #22d3ee;
  --text: #F5F5F7;
  --text-light: #A1A1A6;
  --text-muted: #6E6E73;
  --bg: #000000;
  --bg-alt: #1C1C1E;
  --bg-card: #1C1C1E;
  --border: #38383A;
  --shadow: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.3);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

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

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Buttons ──────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  opacity: 0.88;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  box-shadow: 0 4px 12px rgba(79,70,229,0.12);
}
.hero-btn-outline {
  border: 2px solid var(--primary) !important;
}

.btn-white {
  background: white;
  color: var(--primary);
}
.btn-white:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.btn-lg { padding: 18px 40px; font-size: 1rem; }

.link-cta {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.link-cta::after {
  content: '\203A';
  font-size: 1.2em;
}
.link-cta:hover {
  gap: 8px;
}

/* ── Navigation ───────────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(251,251,253,0.72);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-bottom: 0.5px solid rgba(0,0,0,0.06);
  transition: background 0.3s;
}
.navbar.scrolled {
  background: rgba(251,251,253,0.92);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo-img { height: 32px; position: relative; top: 3px; }

.nav-links {
  display: flex;
  gap: 36px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.82rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; font-weight: 600; }

.nav-cta {
  font-size: 0.82rem;
  padding: 8px 20px;
  border-radius: 980px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-cta { font-size: 0.78rem; padding: 5px 11px; min-height: 32px; }
  .nav-toggle { display: flex; }
  /* Pages with 2+ nav CTAs (e.g. arklytech.html: Portal + Start Free Trial)
     overflow the 375px navbar and push the secondary CTA into the logo.
     Hide the secondary CTA on mobile — it's reachable from the hero/pricing
     sections on every page that carries a duplicate. */
  .nav-actions .nav-cta + .nav-cta { display: none; }
  /* Tighten the remaining CTA's margin so the hamburger sits flush. */
  .nav-actions .nav-cta { margin-right: 0 !important; }
  .nav-container { padding: 0 16px; }
  .nav-actions { gap: 6px; }
}

/* ── Hero ─────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
  background: var(--bg);
}

.product-hero {
  padding: 140px 0 80px;
}

.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-grid { display: none; }
.hero-glow { display: none; }

.hero-content {
  position: relative;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 980px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.65;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
}

.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-trust {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: -24px;
  margin-bottom: 40px;
  letter-spacing: 0.2px;
}

@media (max-width: 768px) {
  .hero { padding: 110px 0 60px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-stats { gap: 32px; }
  .container { padding: 0 24px; }
  .services, .why-us, .about-section, .testimonials, .product-highlight, .pricing, .contact, .cta-section { padding: 44px 0; }
  .footer { padding: 44px 0 24px; }
  .section-header { margin-bottom: 28px; }
}

/* ── Sections ─────────────────────────────────────────────────── */

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 36px;
}

.section-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 980px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}

.section-header p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.65;
}

/* ── Services (feature cards) ─────────────────────────────────── */

.services {
  padding: 60px 0;
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch;
}

.services-grid.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  word-break: break-word;
}
.service-card p {
  flex: 1;
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 12px;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.service-card p {
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-features li {
  font-size: 0.84rem;
  color: var(--text-light);
  padding-left: 18px;
  position: relative;
}
.service-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  background: var(--primary);
  border-radius: 50%;
}

@media (max-width: 1024px) { .services-grid, .services-grid.grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .services-grid, .services-grid.grid-4 { grid-template-columns: 1fr; }
  .product-card-split { grid-template-columns: 1fr !important; text-align: center; }
  .product-card-split img { margin: 0 auto 16px; width: 120px !important; height: 120px !important; }
  .product-card-split .service-features { text-align: left !important; }
  .product-card-split p { text-align: left !important; }
}

/* ── Why Us (numbered steps) ──────────────────────────────────── */

.why-us { padding: 60px 0; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.why-card {
  padding: 36px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-card:hover {
  box-shadow: var(--shadow-lg);
}

.why-num {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
  opacity: 0.6;
}

.why-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.why-card p {
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.65;
}

@media (max-width: 1024px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .why-grid { grid-template-columns: 1fr; } }

/* ── About ────────────────────────────────────────────────────── */

.about-section {
  padding: 60px 0;
  background: var(--bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-content { text-align: center; }

.about-content h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.about-content p {
  text-align: left;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 16px;
}

.about-highlight {
  color: var(--primary) !important;
  font-weight: 600;
  font-style: italic;
}

.about-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.about-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-light);
}
.about-stat span {
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ── Testimonials ─────────────────────────────────────────────── */

.testimonials { padding: 60px 0; }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
}

.testimonial-quote {
  display: none;
}

.testimonial-card p {
  color: var(--text-light);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 24px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.82rem;
}

.testimonial-author strong { font-size: 0.88rem; font-weight: 600; }
.testimonial-author span { color: var(--text-muted); font-size: 0.78rem; }

@media (max-width: 768px) { .testimonials-grid { grid-template-columns: 1fr; } }

/* ── Brand Carousel ──────────────────────────────────────────── */

.brand-carousel-section {
  padding: 48px 0;
  background: var(--bg);
  overflow: hidden;
}

.brand-carousel-label {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
}

.brand-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.brand-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 56px;
  width: max-content;
  min-width: max-content;
  animation: scroll-brands 35s linear infinite;
}

.brand-track:hover { animation-play-state: paused; }

.brand-track img {
  flex: 0 0 auto;
  height: 28px;
  width: auto;
  max-width: 120px;
  max-height: 28px;
  object-fit: contain;
  transition: filter 0.3s;
}

.brand-track img:hover { filter: none; }

@keyframes scroll-brands {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .brand-carousel-section { padding: 32px 0; }
  .brand-track { gap: 40px; }
  .brand-track img { height: 20px; max-height: 20px; max-width: 120px; }
}

/* ── Product Highlight ────────────────────────────────────────── */

.product-highlight { padding: 60px 0; background: var(--bg-alt); }

.highlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.highlight-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 60px;
}

.highlight-tagline {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 16px;
}

.highlight-content { text-align: center; }
.highlight-content p { color: var(--text-light); line-height: 1.65; margin-bottom: 16px; text-align: left; }

.highlight-features {
  list-style: none;
  margin: 24px 0;
  text-align: left;
}
.highlight-features li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--text-light);
  font-size: 0.88rem;
}
.highlight-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

.phone-mockup {
  background: #1D1D1F;
  border-radius: 40px;
  padding: 12px;
  max-width: 280px;
  margin: 0 auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.12);
  overflow: hidden;
}

.phone-screen {
  background: #000;
  border-radius: 28px;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.phone-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
}

.chat-msg {
  display: block;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  line-height: 1.5;
  max-width: 85%;
}
.chat-msg.bot {
  background: #2C2C2E;
  color: #F5F5F7;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.chat-msg.user {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

@media (max-width: 768px) {
  .highlight-grid { grid-template-columns: 1fr; gap: 48px; }
  .highlight-content h2 { font-size: 1.6rem; }
  .highlight-tagline { font-size: 1rem; }
  .highlight-features { max-width: 100%; margin: 20px auto; text-align: left; }
  .highlight-content .btn { width: 100%; justify-content: center; }
  .product-highlight .phone-mockup { max-width: 260px; margin: 0 auto; }
  .product-highlight .phone-screen { min-height: 240px; }
}

/* ── Manufacturer Grid ────────────────────────────────────────── */

.mfr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
}

.mfr-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mfr-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 640px) { .mfr-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Logo Grid (Compatibility section) ───────────────────────── */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}

.logo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.logo-card img {
  height: 24px;
  max-height: 24px;
  max-width: 110px;
  width: auto;
  object-fit: contain;
  transition: filter 0.3s;
}

.logo-card:hover img { filter: none; }

@media (max-width: 768px) {
  .logo-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px; }
  .logo-card { padding: 14px 10px; min-height: 48px; }
  .logo-card img { height: 18px; max-height: 18px; max-width: 84px; }
}

@media (max-width: 480px) {
  .logo-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .logo-card img { height: 16px; max-height: 16px; max-width: 72px; }
}

/* ── Pricing ──────────────────────────────────────────────────── */

.pricing { padding: 60px 0; background: var(--bg); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-card:hover {
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  box-shadow: 0 4px 24px rgba(79,70,229,0.12);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 980px;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.pricing-price {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}
.pricing-price span {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}
.pricing-card li {
  padding: 8px 0;
  font-size: 0.86rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  padding-left: 22px;
  position: relative;
}
.pricing-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

.pricing-card .btn { width: 100%; justify-content: center; }

.pricing-two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 640px;
}

.pricing-desc {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-bottom: 20px;
}

.pricing-includes {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.pricing-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 8px;
}
.billing-toggle span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}
.billing-toggle span.active {
  color: var(--text);
  font-weight: 600;
}
.billing-toggle .toggle-track {
  position: relative;
  width: 52px;
  height: 28px;
  min-width: 52px;
  background: var(--border);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.3s;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.billing-toggle .toggle-track::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
}
.billing-toggle .toggle-track:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.billing-toggle .toggle-track.on {
  background: var(--primary);
}
.billing-toggle .toggle-track .toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.billing-toggle .toggle-track.on .toggle-thumb {
  left: 27px;
}
.billing-toggle .billing-save-badge {
  display: inline-block;
  background: #10b981;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
}
@media (max-width: 400px) {
  .billing-toggle { gap: 8px; }
  .billing-toggle span { font-size: 0.82rem; }
  .billing-save-badge { font-size: 0.62rem; padding: 2px 6px; }
}

@media (max-width: 640px) { .pricing-two { grid-template-columns: 1fr; } }

.pricing-four {
  grid-template-columns: repeat(4, 1fr);
  max-width: 980px;
}
.pricing-four .pricing-card { padding: 28px 20px; }
.pricing-four .pricing-price { font-size: 2.2rem; }

@media (max-width: 860px) { .pricing-four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .pricing-four { grid-template-columns: 1fr; }
}

.pricing-five {
  grid-template-columns: repeat(5, 1fr);
  max-width: 1080px;
  gap: 10px;
}
.pricing-five .pricing-card { padding: 24px 12px; }
.pricing-five .pricing-card h3 { font-size: 1rem; }
.pricing-five .pricing-price { font-size: 1.8rem; }
.pricing-five .pricing-desc { font-size: 0.78rem; }
.pricing-five .pricing-card .btn { padding: 10px 16px; font-size: 0.78rem; }
.pricing-five .pricing-note { font-size: 0.68rem; }

@media (max-width: 1100px) {
  .pricing-five { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .pricing-five .pricing-price { font-size: 2.2rem; }
}
@media (max-width: 860px) { .pricing-five { grid-template-columns: repeat(2, 1fr); } }
.pricing-three {
  grid-template-columns: repeat(3, 1fr);
  max-width: 980px;
}
@media (max-width: 860px) { .pricing-three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .pricing-grid, .pricing-five, .pricing-three { grid-template-columns: 1fr; max-width: 380px; }
  .arklytech-card { grid-template-columns: 1fr !important; }
  .arklytech-card > div:first-child { text-align: center; }
  .arklytech-card > div:last-child { text-align: left; }
}

/* ── FAQ ──────────────────────────────────────────────────────── */

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.faq-item h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.faq-item p {
  font-size: 0.86rem;
  color: var(--text-light);
  line-height: 1.65;
}

@media (max-width: 640px) { .faq-grid { grid-template-columns: 1fr; } }

/* ── Compare grid ─────────────────────────────────────────────── */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.compare-card {
  border-radius: var(--radius);
  padding: 36px 28px;
}
.compare-before {
  background: #FEF2F2;
  border: 1px solid #FEE2E2;
}
.compare-after {
  background: #F0FDF4;
  border: 1px solid #DCFCE7;
}
.compare-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.compare-card ul { list-style: none; }
.compare-card li {
  padding: 6px 0;
  font-size: 0.86rem;
  color: var(--text-light);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.compare-card li:last-child { border: none; }

@media (max-width: 640px) { .compare-grid { grid-template-columns: 1fr; } }

/* ── CTA ──────────────────────────────────────────────────────── */

.cta-section {
  padding: 60px 0;
  background: var(--primary);
}

.cta-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.cta-content h2 {
  color: white;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-content p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  margin-bottom: 36px;
  line-height: 1.65;
}

/* ── Active nav link ──────────────────────────────────────────── */

.nav-links a.active { opacity: 1; font-weight: 600; }

/* ── Sticky CTA bar ──────────────────────────────────────────── */

.sticky-cta {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--primary);
  color: white;
  padding: 8px 0;
  font-size: 0.82rem;
  transform: translateY(-100%);
  transition: transform 0.3s;
}
.sticky-cta.visible { transform: translateY(0); }
.sticky-cta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.btn-sm { padding: 6px 16px; font-size: 0.78rem; border-radius: 980px; }
.sticky-cta .btn-white {
  background: white;
  color: var(--primary);
  font-weight: 600;
}
@media (max-width: 640px) {
  .sticky-cta-inner span { display: none; }
}

/* ── Contact ──────────────────────────────────────────────────── */

.contact { padding: 60px 0; background: var(--bg-alt); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contact-info h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.contact-info p {
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 24px;
}

.contact-details { margin-bottom: 24px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-light);
  font-size: 0.92rem;
}
.contact-item a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.contact-item svg { color: var(--primary); flex-shrink: 0; }

.contact-note {
  font-size: 0.84rem;
  color: var(--text-muted);
  border-left: 2px solid var(--primary-light);
  padding-left: 16px;
}

.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--text);
  background: var(--bg-alt);
  transition: background 0.2s, box-shadow 0.2s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  background: var(--bg);
  box-shadow: 0 0 0 2px var(--primary);
}

.contact-form textarea { resize: vertical; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ── Footer ───────────────────────────────────────────────────── */

.footer {
  background: #1D1D1F;
  color: rgba(255,255,255,0.56);
  padding: 60px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-logo { height: 28px; margin-bottom: 16px; filter: brightness(10); }

.footer-brand p { font-size: 0.86rem; line-height: 1.65; max-width: 280px; }

.footer-links h4 {
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.48);
  text-decoration: none;
  font-size: 0.84rem;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255,255,255,0.88); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  text-align: center;
  font-size: 0.78rem;
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
  .footer-grid > :nth-child(4) { grid-column: 2 / -1; }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-grid > :nth-child(4) { grid-column: auto; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ── Theme Toggle ────────────────────────────────────────────── */

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 980px;
  cursor: pointer;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
  margin-left: 8px;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-logo-light { display: none !important; }
[data-theme="dark"] .theme-logo-dark { display: inline-block !important; }

.nav-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

@media (max-width: 768px) {
  .theme-toggle { margin-left: 0; }
}

/* ── Mobile nav ──────────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(251,251,253,0.78);
    backdrop-filter: saturate(180%) blur(30px);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    padding: 24px;
    gap: 16px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    transform: translateX(0);
  }
  .nav-links.open {
    display: flex;
  }
}

/* ── Dark theme overrides ────────────────────────────────────── */

[data-theme="dark"] .navbar {
  background: rgba(0,0,0,0.72);
  border-bottom-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .navbar.scrolled {
  background: rgba(0,0,0,0.88);
}

[data-theme="dark"] .hero {
  background: var(--bg);
}

[data-theme="dark"] .hero-badge {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .pricing-card,
[data-theme="dark"] .mfr-card,
[data-theme="dark"] .logo-card,
[data-theme="dark"] .contact-form-wrap,
[data-theme="dark"] .about-stat,
[data-theme="dark"] .why-card {
  background: var(--bg-card);
}

[data-theme="dark"] .billing-toggle .toggle-track {
  background: #374151;
}
[data-theme="dark"] .billing-toggle .toggle-track.on {
  background: var(--primary);
}
[data-theme="dark"] .billing-toggle .toggle-track .toggle-thumb {
  background: #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
[data-theme="dark"] .billing-save-badge {
  background: #059669;
}
[data-theme="dark"] .btn-primary {
  box-shadow: none;
}
[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 4px 12px rgba(129,140,248,0.2);
}

[data-theme="dark"] .btn-outline {
  color: var(--primary);
  border-color: var(--primary);
}
[data-theme="dark"] .btn-outline:hover {
  background: var(--primary);
  color: #000;
}

[data-theme="dark"] .btn-white {
  background: var(--bg-card);
  color: var(--primary);
}

[data-theme="dark"] .compare-before {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
}
[data-theme="dark"] .compare-after {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.2);
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form select,
[data-theme="dark"] .contact-form textarea {
  background: var(--bg);
  color: var(--text);
}

[data-theme="dark"] .footer {
  background: #000000;
}

[data-theme="dark"] .footer-logo { filter: brightness(10); }

[data-theme="dark"] .brand-track img:not(.theme-logo-light):not(.theme-logo-dark) {
  filter: invert(1);
}
[data-theme="dark"] .brand-track img:hover:not(.theme-logo-light):not(.theme-logo-dark) {
  filter: invert(1);
}

[data-theme="dark"] .logo-card img:not(.theme-logo-light):not(.theme-logo-dark) {
  filter: invert(1);
}
[data-theme="dark"] .logo-card:hover img:not(.theme-logo-light):not(.theme-logo-dark) {
  filter: invert(1);
}

[data-theme="dark"] .nav-toggle span {
  background: var(--text);
}

@media (max-width: 768px) {
  [data-theme="dark"] .nav-links.open {
    background: rgba(0,0,0,0.96);
  }
}

[data-theme="dark"] .cta-section {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

[data-theme="dark"] .sticky-cta {
  background: var(--primary-dark);
}

[data-theme="dark"] .phone-mockup {
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

[data-theme="dark"] .why-num {
  color: var(--primary);
}

/* ── Legal pages (privacy, terms, refund) ────────────────────── */

.legal-page {
  padding: 120px 0 60px;
  background: var(--bg);
}

.legal-content {
  max-width: 680px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-content .legal-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.legal-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-content p {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-content ul {
  list-style: none;
  margin-bottom: 16px;
  padding: 0;
}

.legal-content li {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.75;
  padding: 4px 0 4px 20px;
  position: relative;
}

.legal-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 5px;
  height: 5px;
  background: var(--primary);
  border-radius: 50%;
}

.legal-content a {
  color: var(--primary);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-content strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Screen-reader only (visually hidden labels) ─────────────── */
.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;
}

/* ── ROI Calculator ───────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
}

/* ── Scroll fade-in (applied by script.js) ───────────────────── */
/* Elements start with opacity:0 translateY(20px) via JS,
   then animate to opacity:1 translateY(0) on intersection */

/* ── Print styles ───────────────────── */
@media print {
  .navbar, .footer, .theme-toggle, .nav-toggle, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { padding: 40px 0 20px; }
  a { color: #000; text-decoration: underline; }
  .section { page-break-inside: avoid; }
}
