/* features.css */
:root {
  --primary: #00599d;
  --primary-container: #0072c6;
  --primary-solid: #0072c6;
  --on-primary: #ffffff;
  --surface: #ffffff;
  --on-surface: #1a1c1c;
  --on-surface-variant: #414752;
  --secondary: #466081;
  --tertiary: #8c4300;
  --tertiary-fixed: #ffdbc7;
  --outline: #717783;
  --outline-variant: #c0c7d3;
  --surface-container-low: #f3f3f3;
  --surface-container-lowest: #ffffff;
  --surface-container-highest: #e2e2e2;
  --secondary-container: #bcd6fd;
  --on-secondary-container: #435d7e;
  --error: #ba1a1a;
}

body {
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Sub-Navbar */
.sub-navbar {
  position: sticky;
  top: 64px; /* Assuming main navbar is 64px */
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  z-index: 40;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sub-nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  overflow-x: auto;
}

.sub-nav-links {
  display: flex;
  gap: 1.5rem;
}

.sub-nav-links a {
  text-decoration: none;
  color: var(--on-surface-variant);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s;
  white-space: nowrap;
}

.sub-nav-links a:hover {
  color: var(--primary);
}

.sub-nav-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn-sub {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-sub-primary {
  background: linear-gradient(to right, var(--primary), var(--primary-container));
  color: #fff !important;
}

.btn-sub-primary:hover {
  transform: scale(0.98);
  opacity: 0.9;
}

.btn-sub-outline {
  border: 1px solid var(--outline-variant);
  color: var(--primary);
}

.btn-sub-outline:hover {
  background: var(--surface-container-low);
}

.btn-sub-text {
  color: var(--on-surface-variant);
}

.btn-sub-text:hover {
  color: var(--primary);
}

/* Typography & Utilities */
.features-main {
  padding-top: 4rem;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.grid-2-col {
  display: grid;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .grid-2-col {
    grid-template-columns: 1fr 1fr;
  }
  .grid-2-col.reverse > :first-child {
    order: 2;
  }
  .grid-2-col.reverse > :last-child {
    order: 1;
  }
}

.badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  background-color: var(--secondary-container);
  color: var(--on-secondary-container);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.badge-outline {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.heading-1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .heading-1 {
    font-size: 3.75rem;
  }
}

.heading-2 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .heading-2 {
    font-size: 3rem;
  }
}

.text-primary { color: var(--primary); }
.text-tertiary { color: var(--tertiary); }
.text-secondary { color: var(--secondary); }
.text-white { color: #fff; }
.text-light { color: #d3e4ff; } /* primary-fixed */
.text-light-dim { color: rgba(211, 228, 255, 0.8); }

.body-large {
  font-size: 1.125rem;
  color: var(--on-surface-variant);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.font-bold { font-weight: 700; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-3xl { max-width: 48rem; }
.text-center { text-align: center; }

/* Sections */
.section-gray { background-color: var(--surface-container-low); }
.section-white { background-color: var(--surface); }
.section-primary { background-color: var(--primary); }

/* Hero Section Specifics */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-grid-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-grid-item h3 {
  font-weight: 700;
  font-size: 1rem;
}

.icon-large { font-size: 2rem; }

.hero-image-wrapper {
  position: relative;
}

.glow-bg {
  position: absolute;
  inset: -1rem;
  background: linear-gradient(to top right, rgba(0,89,157,0.1), rgba(140,67,0,0.1));
  border-radius: 2rem;
  filter: blur(24px);
  z-index: 0;
}

.hero-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(192, 199, 211, 0.2);
  z-index: 1;
}

/* Feature List (Section 2) */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: var(--surface-container-lowest);
  border: 1px solid rgba(192, 199, 211, 0.1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.icon-box { color: var(--primary-container); }

/* Custom Grid */
.image-grid-wrapper {
  background-color: rgba(226, 226, 226, 0.3);
  padding: 1rem;
  border-radius: 1.5rem;
}

.custom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.grid-card {
  height: 12rem;
  border-radius: 1rem;
  background-color: var(--surface-container-lowest);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid-card p { font-weight: 700; }
.bg-primary-solid { background-color: var(--primary-solid); }
.offset-up { transform: translateY(-1rem); }
.offset-down { transform: translateY(1rem); }
@media (min-width: 1024px) {
  .offset-up { transform: translateY(-2rem); }
  .offset-down { transform: translateY(2rem); }
}

.icon-xl { font-size: 2.5rem; }

/* Icon Text List */
.icon-text-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.icon-text-item {
  display: flex;
  gap: 1rem;
}

.icon-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: rgba(0, 89, 157, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-circle span { color: var(--primary); }

.icon-text-item h4 {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.icon-text-item p {
  color: var(--on-surface-variant);
  font-size: 0.875rem;
}

.icon-box-large {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: var(--surface-container-highest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s;
}

.hover-effect:hover .icon-box-large {
  background-color: var(--primary);
}
.hover-effect:hover .icon-box-large span {
  color: #fff;
}

/* Pin Mockup */
.box-shadow-large {
  background-color: var(--surface-container-lowest);
  border-radius: 2rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(192, 199, 211, 0.1);
}

.pin-mockup {
  background-color: var(--surface);
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid rgba(192, 199, 211, 0.3);
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  max-width: 24rem;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

.pin-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.pin-boxes {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pin-box {
  width: 2.5rem;
  height: 3.5rem;
  background-color: var(--surface-container-highest);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 4px solid var(--primary);
}

.divider {
  height: 0.25rem;
  background-color: rgba(192, 199, 211, 0.2);
  border-radius: 9999px;
  width: 100%;
  margin-bottom: 1.5rem;
}

.secure-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--on-surface-variant);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.btn-join {
  width: 100%;
  background-color: var(--primary);
  color: #fff;
  padding: 1rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-join:hover {
  background-color: var(--primary-container);
}

/* 4 Cards Grid */
.cards-4-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .cards-4-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .cards-4-grid { grid-template-columns: repeat(4, 1fr); }
}

.card-outline {
  background-color: var(--surface-container-lowest);
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(192, 199, 211, 0.1);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s;
  text-align: left;
}

.card-outline:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card-outline h3 {
  font-weight: 700;
  font-size: 1.25rem;
  margin: 1rem 0 0.5rem;
}

.card-outline p {
  color: var(--on-surface-variant);
  font-size: 0.875rem;
}

/* Split Banner */
.split-image-banner {
  border-radius: 2rem;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  position: relative;
  border: 1px solid rgba(192, 199, 211, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
}

.split-side {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.split-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.7s;
}

.split-side:hover img {
  filter: grayscale(0%);
}

.split-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 89, 157, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-overlay.second-color {
  background-color: rgba(70, 96, 129, 0.4);
}

.split-overlay span {
  color: #fff;
  font-weight: 800;
  font-size: 1.875rem;
  text-transform: uppercase;
  letter-spacing: -0.05em;
}

/* Features Grid (Dark bg) */
.features-grid-white {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.feature-box {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-box h4 {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.feature-box p {
  font-size: 0.875rem;
  color: rgba(211, 228, 255, 0.6);
}

/* Static Cards */
.static-cards-wrapper {
  position: relative;
  transform: rotate(-6deg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: max-content;
}

.static-cards-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.offset-row {
  margin-left: 3rem;
}

@media (max-width: 768px) {
  .offset-row {
    margin-left: 0;
  }
}

.scroll-card {
  width: 12rem;
  height: 16rem;
  flex-shrink: 0;
  background-color: #fff;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-img-wrapper {
  width: 100%;
  height: 8rem;
  background-color: var(--surface-container);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.small-bold {
  font-size: 0.75rem;
  font-weight: 700;
}

.scroll-card h5 {
  color: var(--on-surface);
  font-weight: 700;
  margin-top: 0.25rem;
}



/* Dashboard Mockup */
.dashboard-mockup {
  background-color: var(--surface-container-highest);
  border-radius: 2.5rem;
  padding: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.mockup-header {
  background-color: var(--surface-container-low);
  height: 3rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(192, 199, 211, 0.1);
  border-radius: 1.5rem 1.5rem 0 0;
}

.dots { display: flex; gap: 0.375rem; }
.dot { width: 0.75rem; height: 0.75rem; border-radius: 9999px; }
.dot.red { background-color: rgba(186, 26, 26, 0.2); }
.dot.orange { background-color: rgba(140, 67, 0, 0.2); }
.dot.green { background-color: rgba(0, 89, 157, 0.2); }

.mockup-title {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--on-surface-variant);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mockup-body {
  background-color: var(--surface);
  padding: 1.5rem;
  border-radius: 0 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-box {
  height: 5rem;
  background-color: var(--surface-container-lowest);
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-box .label {
  font-size: 0.625rem;
  color: var(--on-surface-variant);
}

.stat-box .value {
  font-size: 1.5rem;
  font-weight: 900;
}

.chart-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
}

.bars {
  height: 10rem;
  background-color: var(--surface-container-lowest);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.bar {
  flex: 1;
  background-color: rgba(0, 89, 157, 0.2);
  border-radius: 0.125rem 0.125rem 0 0;
}
.h-60 { height: 60%; }
.h-80 { height: 80%; background-color: rgba(0, 89, 157, 0.4); }
.h-45 { height: 45%; }
.h-90 { height: 90%; background-color: rgba(0, 89, 157, 0.6); }
.h-30 { height: 30%; }
.h-75 { height: 75%; background-color: rgba(0, 89, 157, 0.5); }

.ai-insight {
  padding: 1rem;
  background-color: var(--tertiary-fixed);
  border-radius: 0.75rem;
  border: 1px solid rgba(140, 67, 0, 0.1);
}

.insight-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.ai-insight p {
  font-size: 0.75rem;
  font-weight: 500;
  color: #733600;
}

/* CTA */
.section-cta {
  padding: 8rem 2rem;
  text-align: center;
  max-width: 64rem;
  margin: 0 auto;
}

.cta-box {
  background: linear-gradient(to bottom right, var(--on-surface), #1e293b);
  border-radius: 3rem;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  width: 16rem;
  height: 16rem;
  filter: blur(100px);
}

.blur-1 {
  top: 0; right: 0;
  background-color: rgba(0, 89, 157, 0.2);
}

.blur-2 {
  bottom: 0; left: 0;
  background-color: rgba(140, 67, 0, 0.1);
}

.z-10 { z-index: 10; }
.relative { position: relative; }

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .cta-buttons { flex-direction: row; }
}

.btn-primary-large {
  background-color: var(--primary);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary-large:hover {
  background-color: var(--primary-container);
  transform: scale(0.98);
}

.btn-outline-large {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-outline-large:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(0.98);
}

/* ==============================================
   RESPONSIVE — mobile-first fixes
   ============================================== */

/* --- Shared container padding --- */
@media (max-width: 767px) {
  .container {
    padding: 2.5rem 1.25rem;
  }

  .features-main {
    padding-top: 2rem;
  }

  /* Headings */
  .heading-1 { font-size: 2rem; }
  .heading-2 { font-size: 1.75rem; }

  /* Grid gap */
  .grid-2-col { gap: 2rem; }

  /* Hero image — don't let it overpower on small screens */
  .hero-image {
    aspect-ratio: 4 / 3;
    max-width: 100%;
  }

  .hero-image-wrapper {
    max-width: 100%;
    overflow: hidden;
  }

  /* Hero feature grid → 1 col on tiny screens */
  .hero-grid {
    grid-template-columns: 1fr;
  }

  /* Split banner → stack vertically on mobile */
  .split-image-banner {
    flex-direction: column;
    aspect-ratio: auto;
    height: auto;
  }

  .split-side {
    height: 200px;
  }

  /* 4-card grid already 2-col at 768; force 1-col below 480 */
}

@media (max-width: 479px) {
  .cards-4-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* --- Static Cards (Ready Libraries section) ---
     Remove rotation + fixed width on mobile so cards don't bleed */
@media (max-width: 1023px) {
  .static-cards-wrapper {
    transform: none;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .static-cards-row {
    flex-wrap: wrap;
    justify-content: center;
  }

  .offset-row {
    margin-left: 0;
  }

  .scroll-card {
    width: 10rem;
    height: 14rem;
  }

  .card-img-wrapper {
    height: 6.5rem;
  }
}

/* --- Pin mockup — prevent overflow --- */
@media (max-width: 767px) {
  .pin-mockup {
    max-width: 100%;
    padding: 1.5rem 1rem;
  }

  .pin-boxes {
    gap: 0.4rem;
  }

  .pin-box {
    width: 2rem;
    height: 2.75rem;
    font-size: 1.125rem;
  }
}

/* --- Dashboard mockup --- */
@media (max-width: 767px) {
  .dashboard-mockup {
    border-radius: 1.5rem;
    padding: 0.75rem;
  }

  .mockup-body {
    padding: 1rem;
    gap: 1rem;
  }

  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .bars { height: 7rem; }

  /* CTA */
  .cta-box { padding: 2.5rem 1.5rem; }
  .section-cta { padding: 4rem 1.25rem; }
}

/* --- box-shadow-large (Section 3) --- */
@media (max-width: 767px) {
  .box-shadow-large {
    border-radius: 1.25rem;
  }
}
