/* ============================================
   BOOSTCODE Landing — styles
   ============================================ */

/* Brand color variables are declared in index.html's Tailwind @theme block.
   Only non-Tailwind tokens live here. */
:root {
  --z-nav:       20;
  --z-footer:     1;
  --z-dark-bg:    1;
  --z-image:      0;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ----- a11y utilities ----- */
.sr-only, .sr-anchor {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: 8px;
  background: var(--color-brand-dark);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  transition: top .2s;
}
.skip-link:focus { top: 8px; }

/* Visible focus for keyboard users only */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--color-brand-blue);
  outline-offset: 3px;
  border-radius: 2px;
}
/* On dark backgrounds use a lighter focus ring */
header .nav-link:focus-visible,
header button:focus-visible,
.m-rich *:focus-visible {
  outline-color: #fff;
}

a { text-decoration: none; }

/* --- Service cards (CSS-only replacement for card4/5/6.svg) --- */
.service-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
}
.service-card-blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
}
.service-card .blob-1 {
  width: 173px; height: 173px;
  right: -54px; top: -67px;
  background: #EEEAFE;
}
.service-card .blob-2 {
  width: 117px; height: 117px;
  right: -32px; bottom: -60px;
  background: #EEEAFE;
}
.service-card .blob-3 {
  width: 141px; height: 141px;
  left: -41px; bottom: -30px;
}
.service-card .blob-green { background: #D8F7EE; }
.service-card .blob-mint  { background: #E3FAE7; }
.service-card .blob-pink  { background: #FFE6E2; }

/* CTA glow/hover */
.hero-cta { transition: transform .2s, box-shadow .2s; cursor: pointer; }
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 22px 26px rgba(0,0,0,0.18); }

/* =====================================================
   "learn-more" shared link pattern
   Structure: <a class="learn-more"><span>Learn more</span></a>
   Border-bottom is on the inner <span> so only the TEXT is underlined,
   not the → arrow that comes from ::after (matches Figma).
   ===================================================== */
.learn-more {
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  color: var(--color-brand-blue);
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  text-decoration: none;
  transition: color .2s;
}
.learn-more > span {
  border-bottom: 1px solid var(--color-brand-blue);
  padding-bottom: 1px;
}
.learn-more::after {
  content: '→';
  display: inline-block;
  transition: transform .2s;
}
.learn-more:hover::after { transform: translateX(4px); }

/* =====================================================
   DESKTOP vs MOBILE SWITCH
   ===================================================== */
.desktop-wrap { display: block; }
.mobile-wrap  { display: none; }

/* Desktop 1024-1439: scale canvas down proportionally (avoid horizontal scroll) */
@media (min-width: 1024px) and (max-width: 1439px) {
  .desktop-wrap { zoom: calc(100vw / 1440); }
  body { overflow-x: hidden; }
}

/* Tablet & mobile: use mobile layout */
@media (max-width: 1023px) {
  body { overflow-x: hidden; width: 100%; }
  .desktop-wrap { display: none; }
  .mobile-wrap  { display: block; width: 100%; max-width: 100vw; }
  .mobile-wrap * { max-width: 100%; }
  .mobile-wrap h1, .mobile-wrap h2, .mobile-wrap h3, .mobile-wrap h4, .mobile-wrap p {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}

/* Tablet polish: wider content, larger hero illustration, 3-col service cards */
@media (min-width: 768px) and (max-width: 1023px) {
  .m-hero { padding: 60px 48px 80px; }
  .m-hero h1 { font-size: 44px; line-height: 1.15; max-width: 600px; }
  .m-hero p  { font-size: 17px; max-width: 600px; }
  .m-phone { width: 220px; height: 380px; }
  .m-products, .m-partners, .m-services, .m-rich, .m-rich-showcase {
    padding-left: 48px;
    padding-right: 48px;
  }
  .m-products > h2, .m-partners > h2, .m-services > h2 { font-size: 40px; }
  .m-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .m-services > h2 { grid-column: 1 / -1; text-align: center; }
  .m-service-card { margin-bottom: 0; }
}

/* =====================================================
   MOBILE LAYOUT
   ===================================================== */
.mobile-wrap {
  background: #f8fafb;
  min-height: 100vh;
  color: #0e1876;
}

/* Mobile nav */
.mobile-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(14,24,118,0.08);
}
.mobile-menu-btn {
  width: 28px; height: 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 5px 0;
  background: transparent; border: 0; cursor: pointer;
}
.mobile-menu-btn span {
  display: block; width: 100%; height: 2px; background: #0e1876; border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 20px 20px;
  background: #fff;
  border-bottom: 1px solid rgba(14,24,118,0.08);
  gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 4px;
  font-weight: 700;
  color: #0e1876;
  text-decoration: none;
  border-bottom: 1px solid rgba(14,24,118,0.06);
}
.mobile-nav-cta {
  margin-top: 12px;
  padding: 12px 16px;
  background: #e8ae4d;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

/* Mobile hero */
.m-hero {
  position: relative;
  padding: 40px 20px 60px;
  color: #fff;
  background: linear-gradient(159.87deg,#21d4fd 0%,#2152ff 100%);
  overflow: hidden;
}
.m-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15), transparent 40%);
  pointer-events: none;
}
.m-hero h1 {
  position: relative;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
  color: #fff;
  text-shadow: 0 3px 12px rgba(0,0,0,0.18);
}
.m-hero p {
  position: relative;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
  color: rgba(255,255,255,0.9);
}
.m-hero p b { font-weight: 700; }
.m-cta {
  position: relative;
  height: 44px;
  padding: 0 28px;
  background: #e8ae4d;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  border: 0;
  border-radius: 47px;
  box-shadow: 0 12px 20px rgba(0,0,0,0.2);
  cursor: pointer;
}
.m-hero-illust {
  display: flex;
  justify-content: center;
  margin: 32px auto 0;
  position: relative;
}
/* Pure-CSS phone mockup (mobile hero decoration) */
.m-phone {
  position: relative;
  width: 160px;
  height: 280px;
  background: linear-gradient(145deg, #fff, #eef3ff);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25), inset 0 0 0 2px rgba(255,255,255,0.6);
  padding: 10px;
  box-sizing: border-box;
}
.m-phone::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 5px;
  background: #e3e8f3;
  border-radius: 4px;
}
.m-phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

/* Mobile products */
.m-products {
  padding: 56px 20px 40px;
  background: #f8fafb;
}
.m-products > h2 {
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 0 0 36px;
  color: #0e1876;
}
.m-product {
  padding: 28px 0;
  border-bottom: 1px solid rgba(14,24,118,0.08);
}
.m-product:last-child { border-bottom: 0; }
.m-product-img {
  display: block;
  max-width: 280px;
  margin: 0 auto 20px;
}
.m-product h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
  color: #0e1876;
  margin: 0 0 12px;
}
.m-product p {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(5,0,56,0.6);
  margin: 0 0 14px;
}
/* mobile: smaller learn-more */
.mobile-wrap .learn-more { font-size: 15px; line-height: 22px; }

/* Mobile partners */
.m-partners {
  padding: 40px 20px;
  background: #f8fafb;
}
.m-partners > h2 {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 24px;
  color: #0e1876;
}
.m-partners-box {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(100,116,140,0.1);
}
.m-partners-box img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Mobile services */
.m-services {
  padding: 40px 20px;
  background: #f8fafb;
}
.m-services > h2 {
  text-align: center;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 0 0 24px;
  color: #0e1876;
}
.m-service-card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: 0 12px 35px rgba(100,116,140,0.12);
  overflow: hidden;
}
.m-service-card::before,
.m-service-card::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  filter: blur(30px);
  opacity: 0.5;
  pointer-events: none;
}
.m-service-card::before {
  width: 130px; height: 130px;
  right: -40px; top: -40px;
  background: #EEEAFE;
}
.m-service-card::after {
  width: 120px; height: 120px;
  left: -40px; bottom: -40px;
  background: #D8F7EE;
}
.m-service-card:nth-child(3)::after { background: #E3FAE7; }
.m-service-card:nth-child(4)::after { background: #FFE6E2; }
.m-service-card img {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
}
.m-service-card h4 {
  position: relative;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #333;
  margin: 0 0 10px;
}
.m-service-card p {
  position: relative;
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

/* Mobile rich advertising */
.m-rich {
  padding: 80px 20px;
  background: linear-gradient(168deg,#3a416f 0%,#141727 100%);
  text-align: center;
}
.m-rich h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #fff;
  margin: 0;
}
.m-rich-showcase {
  padding: 32px 16px;
  background: #f8fafb;
}
.m-rich-showcase img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Mobile footer */
.m-footer {
  padding: 20px;
  background: #0c0439;
  text-align: center;
}
.m-footer p {
  margin: 0 0 6px;
  color: #a097cf;
  font-size: 13px;
  font-weight: 500;
}
.m-footer p:last-child { margin-bottom: 0; }
.m-footer a { color: inherit; text-decoration: none; }
.m-footer a:hover { color: #fff; }
