/* ==========================================================================
   NxTrail — Landing Page Styles
   ========================================================================== */

:root {
  --navy-900: #031428;
  --navy-800: #052857;
  --navy-700: #0a3468;
  --navy-600: #1a4a80;
  --orange-500: #f07828;
  --orange-600: #d86518;
  --orange-400: #ff9447;
  --white: #ffffff;
  --gray-50: #f7faff;
  --gray-100: #eef3f9;
  --gray-200: #dde5ef;
  --gray-400: #94a8be;
  --gray-600: #5c7290;
  --gray-800: #2a3f5c;
  --gray-900: #141e2e;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(5, 40, 87, 0.06);
  --shadow-md: 0 8px 24px rgba(5, 40, 87, 0.1);
  --shadow-lg: 0 16px 48px rgba(5, 40, 87, 0.14);
  --container: 1120px;
  --header-h: 72px;
}

/* Reset
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, p {
  margin: 0;
}

/* Utilities
   -------------------------------------------------------------------------- */

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.text-accent {
  color: var(--orange-500);
}

/* Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--orange-500);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--orange-600);
}

.btn-navy {
  background: var(--navy-800);
  color: var(--white);
}

.btn-navy:hover {
  background: var(--navy-700);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-sm {
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
}

.btn-email {
  padding: 1rem 1.75rem;
  font-size: 1rem;
}

/* Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

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

.logo img {
  height: 36px;
  width: auto;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--navy-800);
}

/* Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--navy-900);
  color: var(--white);
  overflow: hidden;
  padding: 3.5rem 0 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 55%, #0a3a6e 100%);
  pointer-events: none;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 140%;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 40px,
    rgba(240, 120, 40, 0.06) 40px,
    rgba(240, 120, 40, 0.06) 42px
  );
  transform: rotate(-5deg);
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--white), transparent);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding-bottom: 4rem;
}

.hero-content {
  padding-block: 1rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-bottom: 2rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.hero-visual {
  position: relative;
}

.hero-image-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 3px solid var(--orange-500);
  box-shadow: var(--shadow-lg);
}

.hero-image-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 1;
}

.hero-image-frame img {
  width: 100%;
  aspect-ratio: 7 / 5;
  object-fit: cover;
}

.savings-badge {
  position: absolute;
  bottom: -1.25rem;
  right: -0.5rem;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  min-width: 130px;
}

.savings-badge__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.125rem;
}

.savings-badge__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--orange-500);
  line-height: 1.1;
}

.savings-badge--large {
  position: static;
  flex-shrink: 0;
  padding: 1.25rem 1.75rem;
}

.savings-badge--large .savings-badge__value {
  font-size: 2.25rem;
}

/* Feature Bar
   -------------------------------------------------------------------------- */

.feature-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 2rem 0;
  margin-top: -1px;
}

.feature-bar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.feature-bar h2 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 0.25rem;
}

.feature-bar p {
  font-size: 0.8125rem;
  color: var(--gray-600);
}

/* Sections
   -------------------------------------------------------------------------- */

.section {
  padding: 5rem 0;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-eyebrow--blue {
  color: var(--navy-600);
}

.section-eyebrow--orange {
  color: var(--orange-500);
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--navy-800);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1.0625rem;
  color: var(--gray-600);
  max-width: 42rem;
  margin-bottom: 3rem;
  line-height: 1.65;
}

/* What We Do
   -------------------------------------------------------------------------- */

.what-we-do {
  background: var(--gray-50);
}

.card-grid {
  display: grid;
  gap: 1.25rem;
}

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

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

.service-card--featured {
  background: var(--navy-800);
  color: var(--white);
  border-color: var(--navy-800);
}

.service-card--featured p {
  color: rgba(255, 255, 255, 0.72);
}

.icon-box {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  color: var(--navy-700);
  margin-bottom: 1.25rem;
}

.icon-box svg {
  width: 22px;
  height: 22px;
}

.icon-box--accent {
  background: rgba(240, 120, 40, 0.15);
  color: var(--orange-400);
}

.service-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
}

.service-card p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-600);
}

/* How It Works
   -------------------------------------------------------------------------- */

.how-it-works {
  background: var(--white);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 3.5rem;
  counter-reset: step;
}

.step-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--orange-500);
  background: rgba(240, 120, 40, 0.1);
  border-radius: 50%;
  margin-bottom: 0.875rem;
}

.step-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.8125rem;
  color: var(--gray-600);
  line-height: 1.55;
}

/* Route Comparison
   -------------------------------------------------------------------------- */

.route-comparison {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.route-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}

.route-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.route-pills--muted span:not(.route-arrow) {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  border-radius: 999px;
}

.route-arrow {
  color: var(--gray-400);
  font-size: 0.875rem;
  user-select: none;
}

.pill {
  padding: 0.625rem 1.125rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}

.pill--blue {
  background: #dbeafe;
  color: #1e4a8a;
}

.pill--navy {
  background: var(--navy-800);
  color: var(--white);
}

.pill--orange {
  background: var(--orange-500);
  color: var(--white);
}

/* Trust Section
   -------------------------------------------------------------------------- */

.trust-section {
  background: var(--gray-50);
  padding-block: 4rem;
}

.trust-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--navy-800);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}

.trust-card h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.trust-card p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 36rem;
  line-height: 1.65;
}

/* CTA Section
   -------------------------------------------------------------------------- */

.cta-section {
  padding-block: 4rem;
}

.cta-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 2.5rem 3rem;
  box-shadow: var(--shadow-sm);
}

.cta-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  color: var(--orange-500);
}

.cta-icon svg {
  width: 100%;
  height: 100%;
}

.cta-text {
  flex: 1;
}

.cta-text h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 0.375rem;
}

.cta-text p {
  font-size: 0.9375rem;
  color: var(--gray-600);
}

/* Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.55);
  padding: 1.75rem 0;
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-tags {
  color: rgba(255, 255, 255, 0.4);
}

/* Responsive — Tablet
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 3rem;
  }

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

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .tag-list {
    justify-content: center;
  }

  .hero-visual {
    max-width: 540px;
    margin-inline: auto;
  }

  .feature-bar-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

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

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-card {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem;
  }

  .cta-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
}

/* Responsive — Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--gray-200);
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
  }

  .nav-links a {
    display: block;
    padding: 0.875rem 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--gray-100);
  }

  .nav-cta {
    margin-top: 1rem;
    text-align: center;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .savings-badge {
    right: 0.5rem;
    bottom: -1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .feature-bar-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .feature-bar article {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
  }

  .feature-bar article:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .card-grid--4 {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .route-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .route-pills::-webkit-scrollbar {
    display: none;
  }

  .route-pills--muted span:not(.route-arrow),
  .pill {
    flex-shrink: 0;
  }

  .cta-card .btn-email {
    width: 100%;
    white-space: normal;
    word-break: break-all;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(var(--container), 100% - 1.5rem);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .trust-card {
    padding: 2rem 1.5rem;
  }
}
