/* =============================================================
   NEXHOST — styles.css
   Mobile-first, BEM-ish structure
   Palette:
     --navy:   #0D1B2A   (background dark)
     --indigo: #5B4FE9   (primary brand)
     --mint:   #4EFFD6   (accent highlight)
     --pearl:  #F0EEF6   (light surface)
     --white:  #FAFAFA   (text on dark)
     --muted:  #8A97A8   (secondary text)
   ============================================================= */

/* ─── RESET & BASE ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:        #0D1B2A;
  --navy-light:  #132233;
  --indigo:      #5B4FE9;
  --indigo-dark: #4740c8;
  --mint:        #4EFFD6;
  --pearl:       #F0EEF6;
  --white:       #FAFAFA;
  --muted:       #8A97A8;
  --border:      rgba(255, 255, 255, 0.07);

  --font-display: 'Syne', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;

  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 60px rgba(91, 79, 233, 0.35);

  --transition: 0.2s ease;
  --max-width:  1160px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ─── SKIP LINK ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--indigo);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 500;
  z-index: 9999;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

/* ─── LAYOUT HELPERS ────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .container { padding-inline: 2rem; }
}

@media (min-width: 1024px) {
  .container { padding-inline: 2.5rem; }
}

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--indigo);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(91, 79, 233, 0.4);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--indigo-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(91, 79, 233, 0.5);
}
.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--pearl);
  border: 1.5px solid rgba(240, 238, 246, 0.25);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: rgba(240, 238, 246, 0.55);
  background: rgba(240, 238, 246, 0.05);
  transform: translateY(-2px);
}

.btn--full {
  width: 100%;
}

/* ─── HEADER / NAV ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 27, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.nav__logo:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.logo-icon {
  color: var(--mint);
  font-size: 1.1em;
  line-height: 1;
}

/* Hamburger toggle (mobile) */
.nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--white);
  position: relative;
}
.nav__toggle:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger {
  position: relative;
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger::before { top: -5px; }
.hamburger::after  { top:  5px; }

/* Open state */
.nav__toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}
.nav__toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg) translate(3.5px, 3.5px);
}
.nav__toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg) translate(3.5px, -3.5px);
}

/* Nav links */
.nav__links {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--navy-light);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 1rem 1.25rem 1.5rem;
  gap: 0.25rem;
  z-index: 99;
}

.nav__links.is-open {
  display: flex;
}

.nav__link {
  display: block;
  padding: 0.625rem 0.5rem;
  color: var(--pearl);
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover,
.nav__link:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}
.nav__link:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.nav__cta {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--indigo);
  color: var(--white) !important;
  border-radius: var(--radius-md);
  font-weight: 500;
}
.nav__cta:hover,
.nav__cta:focus-visible {
  background: var(--indigo-dark) !important;
}

@media (min-width: 768px) {
  .nav__toggle { display: none; }
  .nav__links {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    align-items: center;
    gap: 0.25rem;
  }
  .nav__link { padding: 0.5rem 0.75rem; }
  .nav__cta { margin-top: 0; }
}

/* ─── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-block: 5rem 4rem;
  overflow: hidden;
}

/* Subtle dot-grid background */
.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(91, 79, 233, 0.18) 0%, transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(78, 255, 214, 0.07) 0%, transparent 45%);
  pointer-events: none;
}
.hero__bg-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  align-items: center;
}

/* Text column */
.hero__copy {
  text-align: center;
  max-width: 560px;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 1.25rem;
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.headline-accent {
  /* Gradient text */
  background: linear-gradient(135deg, var(--indigo) 0%, var(--mint) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.hero__trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  display: inline-block;
  flex-shrink: 0;
}

/* Visual column */
.hero__visual {
  width: 100%;
  max-width: 400px;
  perspective: 800px;
}

/* ─── TILT CARD ─────────────────────────────────────────────── */
.tilt-card {
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #1a2d44, #0f2035);
  border: 1px solid rgba(91, 79, 233, 0.25);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.3s ease;
  cursor: default;
  position: relative;
}

.tilt-card__inner {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: translateZ(0);
}

/* Moving glow overlay */
.tilt-card__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 50%),
    rgba(91, 79, 233, 0.22) 0%,
    transparent 60%
  );
}
.tilt-card:hover .tilt-card__glow {
  opacity: 1;
}

/* Faux browser header */
.tilt-card__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.traffic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.traffic-dot--red    { background: #ff5f57; }
.traffic-dot--yellow { background: #ffbd2e; }
.traffic-dot--green  { background: #28c840; }

.tilt-card__title {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* Metrics */
.tilt-card__metric { display: flex; flex-direction: column; gap: 0.4rem; }

.metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.metric-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--white);
}
.metric-value small {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.metric-value--accent {
  color: var(--mint);
}
.metric-value--small {
  font-size: 1.6rem;
}

/* Progress bar */
.metric-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.metric-bar__fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--indigo), #8a7ef8);
  animation: barFill 1.4s 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.metric-bar__fill--accent {
  background: linear-gradient(90deg, var(--mint), #a3ffea);
}

@keyframes barFill {
  from { width: 0; }
  to   { width: var(--bar-to, 99.98%); }
}

/* Status footer */
.tilt-card__footer {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--mint);
  background: rgba(78, 255, 214, 0.08);
  border: 1px solid rgba(78, 255, 214, 0.18);
  border-radius: 99px;
  padding: 0.35rem 0.9rem;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  position: relative;
  flex-shrink: 0;
}
.status-pulse::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(78, 255, 214, 0.35);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1);   opacity: 0.8; }
  50%       { transform: scale(1.6); opacity: 0;   }
}

/* Hero layout — side-by-side on tablet+ */
@media (min-width: 900px) {
  .hero {
    padding-block: 6.5rem 5rem;
  }
  .hero__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
  }
  .hero__copy {
    text-align: left;
    flex: 1;
  }
  .hero__actions { justify-content: flex-start; }
  .hero__trust   { justify-content: flex-start; }
  .hero__visual  {
    flex-shrink: 0;
    max-width: 380px;
    width: 100%;
  }
}

/* ─── SECTION SHARED ────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 620px;
  margin-inline: auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ─── FEATURES ──────────────────────────────────────────────── */
.features {
  padding-block: 5rem;
  border-top: 1px solid var(--border);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 560px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .features__grid { grid-template-columns: repeat(4, 1fr); }
}

/* Feature card */
.feature-card {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.feature-card:hover,
.feature-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(91, 79, 233, 0.45);
  box-shadow: 0 12px 36px rgba(91, 79, 233, 0.15);
}
.feature-card:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(91, 79, 233, 0.12);
  border: 1px solid rgba(91, 79, 233, 0.22);
  border-radius: var(--radius-md);
  color: var(--indigo);
  flex-shrink: 0;
}
.feature-card:hover .feature-card__icon,
.feature-card:focus-visible .feature-card__icon {
  background: rgba(91, 79, 233, 0.2);
  color: #8a7ef8;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--white);
}

.feature-card__desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── PRICING ───────────────────────────────────────────────── */
.pricing {
  padding-block: 5rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent 0%, rgba(91, 79, 233, 0.04) 100%);
}

.pricing__inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
}

.pricing__copy {
  text-align: center;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.pricing__card {
  background: var(--navy-light);
  border: 1px solid rgba(91, 79, 233, 0.35);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-glow);
}

.plan-name {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--indigo);
  font-weight: 500;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--white);
  line-height: 1;
}
.plan-price small {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0;
  font-family: var(--font-body);
  font-weight: 400;
}

.plan-perks {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: 1.25rem;
}

.plan-perks li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9375rem;
  color: var(--pearl);
}
.plan-perks li::before {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(78, 255, 214, 0.15);
  border: 1.5px solid var(--mint);
  /* checkmark via clip-path */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='3,8 7,12 13,5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 14px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='3,8 7,12 13,5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 14px;
  background-color: var(--mint);
}

@media (min-width: 860px) {
  .pricing__inner {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5rem;
  }
  .pricing__copy { text-align: left; align-items: flex-start; }
}

/* ─── FOOTER ────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 3.5rem;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.footer__brand { max-width: 260px; }

.footer__logo {
  font-size: 1.125rem;
  margin-bottom: 0.6rem;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 2rem;
}

@media (min-width: 480px) {
  .footer__nav { grid-template-columns: repeat(3, auto); }
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__col-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  font-weight: 500;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__col a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color var(--transition);
  border-radius: 2px;
}
.footer__col a:hover,
.footer__col a:focus-visible {
  color: var(--pearl);
}
.footer__col a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.footer__bottom {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (min-width: 760px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* ─── SCROLL REVEAL ─────────────────────────────────────────── */
/* Elements that animate in on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger delay for grid children */
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }

/* ─── REDUCED MOTION ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tilt-card {
    transform: none !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
