@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Sora:wght@500;600;700&display=swap');

:root {
  --ink: #0a1f44;
  --muted: #3a5273;
  --blue: #0a55e0;
  --blue-soft: #1e8bff;
  --green: #007a5e;
  --green-soft: #12c98e;
  --bg-a: #f4faff;
  --bg-b: #e8f8f2;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(10, 85, 224, 0.14);
}

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

/* overflow-x only on html: setting it on body too breaks position: sticky */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg-a);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* ---------- Layers: bg 0, animation 1, content 2+, nav 100 ---------- */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 12% 8%, rgba(30, 139, 255, 0.16), transparent 70%),
    radial-gradient(55vw 55vh at 88% 92%, rgba(18, 201, 142, 0.18), transparent 70%),
    linear-gradient(160deg, var(--bg-a) 0%, #eef9fb 50%, var(--bg-b) 100%);
}

#field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  display: block;
}

main,
.hero,
.cards-section,
.cta,
.signal-line {
  position: relative;
  z-index: 2;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: block;
  width: 100%;
  margin: 0;
  padding: 24px 0;
  background: rgba(244, 250, 255, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: padding 250ms ease, background-color 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  transition: font-size 250ms ease, gap 250ms ease;
}

.wordmark:hover {
  color: var(--ink);
  text-decoration: none;
}

.wordmark-mark {
  position: relative;
  width: 1.1em;
  height: 1.1em;
  flex: none;
  transition: width 250ms ease, height 250ms ease;
}

.wordmark-mark i {
  position: absolute;
  inset: 0;
  display: block;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.wordmark-mark i:nth-child(1) { background: rgba(30, 139, 255, 0.85); transform: translate(-12%, -8%); }
.wordmark-mark i:nth-child(2) { background: rgba(18, 201, 142, 0.75); transform: translate(14%, 10%) scale(0.9); }

.wordmark-text b {
  font-weight: 700;
  color: var(--blue);
  background: linear-gradient(100deg, var(--blue), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#buy_now_link {
  display: inline-block;
  padding: 12px 24px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--blue), var(--green));
  box-shadow: 0 6px 18px rgba(10, 85, 224, 0.25);
  transition: padding 250ms ease, font-size 250ms ease, transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

#buy_now_link:hover,
#buy_now_link:focus {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 10px 26px rgba(10, 85, 224, 0.35);
}

#buy_now_link:focus-visible,
#buy_now_bottom:focus-visible,
.wordmark:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.site-nav.nav-scrolled {
  padding: 10px 0;
  background: rgba(244, 250, 255, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(10, 31, 68, 0.1);
}

.site-nav.nav-scrolled .wordmark { font-size: 1.3rem; gap: 8px; }
.site-nav.nav-scrolled #buy_now_link { padding: 8px 18px; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 12vh 28px 8vh;
  text-align: center;
}

.hero h1 {
  margin: 0 auto;
  max-width: 1100px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero h1 .line {
  display: block;
}

.hero h1 .accent {
  color: var(--blue);
  background: linear-gradient(100deg, var(--blue) 0%, #0a8fb0 50%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  max-width: 680px;
  margin: 32px auto 0;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- Cards ---------- */
.cards-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4vh 28px 10vh;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  position: relative;
  display: block;
  padding: 38px;
  text-align: left;
  border-radius: 22px;
  background: var(--card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(10, 31, 68, 0.07);
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(10, 85, 224, 0.32);
  box-shadow: 0 22px 50px rgba(10, 85, 224, 0.16);
}

.card-icon {
  position: relative;
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
}

.card-icon i {
  position: absolute;
  display: block;
}

.feature-card:nth-child(1) .card-icon i:nth-child(1) { inset: 0 8px 8px 0; background: rgba(30, 139, 255, 0.75); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.feature-card:nth-child(1) .card-icon i:nth-child(2) { inset: 10px 0 0 10px; background: rgba(18, 201, 142, 0.7); clip-path: polygon(50% 0, 100% 100%, 0 100%); }

.feature-card:nth-child(2) .card-icon i:nth-child(1) { inset: 0 10px 10px 0; background: rgba(10, 85, 224, 0.7); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.feature-card:nth-child(2) .card-icon i:nth-child(2) { inset: 10px 0 0 10px; background: rgba(18, 201, 142, 0.7); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }

.feature-card:nth-child(3) .card-icon i:nth-child(1) { inset: 0 10px 10px 0; background: rgba(0, 163, 255, 0.7); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.feature-card:nth-child(3) .card-icon i:nth-child(2) { inset: 10px 0 0 10px; background: rgba(0, 194, 168, 0.7); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

.feature-card h3 {
  margin: 0 0 14px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
}

.feature-card p {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

/* ---------- CTA ---------- */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6vh 28px 10vh;
}

.signal-status {
  margin: 0 0 22px;
  padding: 8px 18px;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--green);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 122, 94, 0.3);
  border-radius: 999px;
}

#buy_now_bottom {
  display: inline-block;
  padding: 22px 52px;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--blue), var(--green));
  box-shadow: 0 14px 40px rgba(10, 85, 224, 0.32);
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

#buy_now_bottom:hover,
#buy_now_bottom:focus {
  color: #fff;
  text-decoration: none;
  transform: translateY(-3px) scale(1.02);
  filter: brightness(1.08);
  box-shadow: 0 20px 52px rgba(10, 85, 224, 0.42);
}

#buy_now_bottom:active {
  transform: translateY(0) scale(0.99);
}

.signal-sub {
  margin: 22px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
/* Footer markup is injected via SSI; keep it readable above the fixed layers. */
footer {
  position: relative;
  z-index: 2;
  padding: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink);
  background: rgba(244, 250, 255, 0.94);
  border-top: 1px solid var(--line);
}

footer div,
footer p,
footer span,
footer small {
  margin-top: 4px;
  margin-bottom: 4px;
  color: var(--ink);
}

footer .text-muted,
footer .text-secondary {
  color: var(--muted) !important;
}

footer a {
  color: var(--blue);
  text-decoration: underline;
}

footer a:hover {
  color: var(--ink);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .site-nav { padding: 16px 0; }
  .nav-inner { padding: 0 16px; }
  .wordmark { font-size: 1.4rem; }
  #buy_now_link { padding: 10px 16px; font-size: 0.85rem; }
  .site-nav.nav-scrolled { padding: 8px 0; }
  .site-nav.nav-scrolled .wordmark { font-size: 1.15rem; }
  .site-nav.nav-scrolled #buy_now_link { padding: 7px 14px; font-size: 0.8rem; }
  .hero { padding: 10vh 18px 5vh; }
  .hero p { font-size: 1rem; }
  .cards-grid { padding: 3vh 16px 8vh; }
  .feature-card { padding: 28px; }
  .cta { padding: 4vh 16px 8vh; }
  #buy_now_bottom { padding: 18px 30px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-nav, .wordmark, .wordmark-mark, #buy_now_link, #buy_now_bottom, .feature-card {
    transition: none;
  }
  .feature-card:hover, #buy_now_link:hover, #buy_now_bottom:hover { transform: none; }
}
