@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;500;600;700&display=swap");

/* Base */
/* Brand variables now come from css-global.css */
*,
*::after,
*::before {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-family: Arial, sans-serif;
}

body {
  background: #fff;
  color: var(--clr-secondary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessible skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: var(--page-gutter);
  top: var(--page-gutter);
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--clr-primary);
  color: #fff;
  border-radius: 4px;
  z-index: 9999;
}

.section {
  width: 100%;
  padding: 40px 0;
}

.flex {
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  padding: 0 var(--page-gutter);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

/* Responsive headings */
.primary {
  font-size: clamp(2.2rem, 4.5vw, 4rem); /* scales down on tablet/phone */
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--clr-primary);
  line-height: 1.05;
}

.secondary {
  font-size: clamp(1.7rem, 3vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--clr-secondary);
}

.tertiary {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 20px;
  color: #3a4956;
}

a {
  color: var(--clr-primary);
}

a:hover {
  color: var(--clr-accent);
}

.btn {
  padding: 12px 18px;
  background: var(--clr-primary);
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  display: inline-block;
  margin: 18px 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:focus {
  outline: 3px solid rgba(0, 118, 184, 0.18);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(3, 64, 110, 0.08);
}

/* -------- HERO SECTION -------- */
#hero-section {
  background: #ffffff;
  margin-top: 60px; /* space for fixed nav */
  padding: 40px 0 40px;
}

/* Override .flex utility on this section */
#hero-section.section {
  display: block;
}

/* Hero layout: 2 columns (text + slider), widget spans full-width row */
#hero-section .container {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  align-items: center;
  column-gap: 28px;
  row-gap: 24px;
}

/* Base text & visual styles used across site */
.text,
.visual {
  width: 50%;
}

.text {
  margin: 0 20px;
}

.visual img {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(6, 42, 84, 0.06);
}

/* Hero-specific overrides so mobile/tablet behave nicely */
#hero-section .text,
#hero-section .visual {
  width: 100%;
}

#hero-section .text {
  margin: 0;
  max-width: 640px;
}

#hero-section .visual {
  position: relative;
  overflow: hidden;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  display: block !important; /* override inline display:flex */
}

/* Make last child (contact widget container) span full row */
#hero-section .container > *:last-child {
  grid-column: 1 / -1;
}

/* Hero slider overrides */
.visual img.slider-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.visual img.slider-image.active {
  opacity: 1;
}

.overlay-text {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
}

/* How It Works */
#how-it-works {
  width: 100%;
  padding: 40px 0 24px 0;
  background: #fff;
}

/* Disable hover effects inside How It Works */
#how-it-works .box:hover,
#how-it-works .box:focus {
  background: inherit !important;
  color: inherit !important;
  transform: none !important;
  box-shadow: none !important;
}

#how-it-works .box:hover ion-icon,
#how-it-works .box:focus ion-icon {
  color: inherit !important;
}

.how-grid {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.box {
  border: 1px solid #d5dee6;
  padding: 20px;
  margin: 6px;
  border-radius: 10px;
  font-size: 16px;
  transition: 0.22s ease;
  cursor: pointer;
  width: 260px;
  background: #fff;
}

.box ion-icon {
  font-size: 34px;
  color: var(--clr-primary);
  margin: 8px 0;
  display: block;
}

.box.active,
.box:hover {
  color: #fff;
  border-color: var(--clr-primary);
  background: linear-gradient(180deg, var(--clr-primary), var(--clr-accent));
}

.box h3 {
  margin-bottom: 8px;
  color: #07324a;
}

.box p {
  color: #17313f;
  font-size: 15px;
}

/* Testimonial */
#testimonial .visual img {
  margin-left: auto;
  max-width: 520px;
}

.user {
  margin-top: 18px;
  justify-content: flex-start;
  display: flex;
  align-items: center;
}

.user img {
  width: 56px;
  border-radius: 6px;
  margin-right: 14px;
}

/* FAQ (currently commented out in HTML) */
#faq .secondary {
  text-align: center;
}

.faq {
  width: 60%;
  margin: 24px auto 20px auto;
}

summary {
  padding: 1em;
  border: 1px solid #d6e6ef;
  margin-bottom: 1em;
  cursor: pointer;
  outline: none;
  border-radius: 0.4em;
  font-weight: 600;
}

details[open] summary ~ * {
  animation: open 300ms ease-in-out;
}

@keyframes open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* App */
#app {
  text-align: center;
}

.app-store {
  background: #0b2332;
  margin: 0 10px;
  padding: 8px 14px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

.app-store p {
  margin-top: 0;
  margin-bottom: 0;
}

.app-store span {
  font-size: 14px;
  line-height: 18px;
}

.app-store ion-icon {
  font-size: 26px;
}

.download {
  margin: 18px 0;
}

/* Trusted Logos */
.trusted-logos {
  background: #f9f9f9;
  padding: 2rem 0;
}

.trusted-container {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  text-align: center;
  padding: 0 20px;
}

.trusted-container h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  color: #004080;
  font-weight: 600;
}

.trusted-container p {
  color: #555;
}

.logo {
  margin-top: 10px;
}

.logo-slider {
  display: flex;
  width: 100%;
  overflow: hidden;
}

.logo-track {
  display: flex;
  animation: scroll 20s linear infinite;
}

.logo-track img {
  height: 60px;
  margin: 0 40px;
  filter: grayscale(100%);
  opacity: 0.8;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.logo-track img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ===== Why (section) ===== */
.why {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0, 118, 184, 0.08), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-top: 1px solid #e9f2f8;
  border-bottom: 1px solid #e9f2f8;
}

.why-head {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 18px;
}

.why-lead {
  color: #2a3b46;
  font-size: 18px;
  line-height: 1.5;
  margin: 8px auto 14px;
}

.why-badges {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
}

.why-badges li {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--clr-primary);
  background: rgba(0, 118, 184, 0.08);
  border: 1px solid rgba(0, 118, 184, 0.16);
  white-space: nowrap;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.why-card {
  background: #fff;
  border: 1px solid #e6eef6;
  border-radius: 12px;
  padding: 16px 16px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 6px 18px rgba(6, 42, 84, 0.04);
}

.why-card:hover,
.why-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(0, 118, 184, 0.25);
  box-shadow: 0 10px 24px rgba(6, 42, 84, 0.08);
}

.why-card .why-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--clr-primary);
  box-shadow: 0 2px 8px rgba(0, 118, 184, 0.22);
  margin-bottom: 10px;
  user-select: none;
}

.why-card h3 {
  font-size: 18px;
  color: var(--clr-secondary);
  margin-bottom: 6px;
}

.why-card p {
  color: #405463;
  font-size: 15px;
  line-height: 1.55;
}

.why-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
}

/* ========= RESPONSIVE TWEAKS ========= */

/* Medium screens: tighten vertical spacing a bit */
@media (max-width: 1024px) {
  .section {
    padding: 32px 0;
  }

  #hero-section {
    margin-top: 72px;
    padding-top: 32px;
  }

  /* Hero stacks vertically on tablets, centered */
  #hero-section .container {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  #hero-section .text,
  #hero-section .visual {
    max-width: 720px;
    margin: 0 auto;
  }

  #hero-section .container > *:last-child {
    justify-self: center;
  }

  .hero-sub {
    font-size: 15px;
  }
}

/* small screens */
@media (max-width: 952px) {
  .section {
    padding: 32px 0;
  }
}

@media (max-width: 858px) {
  #hero-section {
    margin-top: 80px;
  }

  .flex {
    flex-direction: column;
  }

  .visual,
  .text {
    width: 86%;
    margin: 12px auto;
    text-align: center;
  }

  #hero-section .text,
  #hero-section .visual {
    width: 100%;
  }

  #hero-section .text {
    text-align: center;
  }

  #hero-section .visual {
    margin-top: 16px;
  }

  /* About section: keep things compact */
  #about .visual img {
    max-width: 340px;
    margin: 0 auto 16px;
  }

  .faq {
    width: 100%;
  }

  /* Why grid: 2 columns on tablet/phone */
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 12px;
  }

  .section {
    padding: 28px 0;
  }

  #hero-section {
    margin-top: 72px;
    padding-top: 24px;
  }

  .hero-sub {
    max-width: 100%;
  }

  /* Why grid: 1 column on small phones */
  .why-grid {
    grid-template-columns: 1fr;
  }

  .trusted-container {
    padding: 0 12px;
  }

  .logo-track img {
    height: 32px;
    margin: 0 12px;
  }
}

/* tiny screens */
@media (max-width: 480px) {
  .btn {
    font-size: 16px;
    padding: 10px 14px;
  }

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

  .app-store {
    justify-content: center;
    width: 100%;
  }
}

/* small accessibility focus */
a:focus,
button:focus,
input:focus {
  outline: 3px solid rgba(0, 118, 184, 0.12);
  outline-offset: 2px;
  border-radius: 6px;
}

/* subtle entrance for sections */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Product Categories Grid */
.section.product-grid {
  padding: 3rem 0;
  background: #f5f7fa;
  color: var(--clr-secondary);
}

.section.product-grid .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter); /* keep same horizontal gutter as hero */
}

/* Section Header */
.product-grid-head {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 620px;
}

.product-grid-head .secondary {
  font-size: clamp(1.75rem, 2.2vw, 2.25rem);
  margin-bottom: 0.5rem;
  color: var(--clr-primary);
}

.product-grid-lead {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(31, 42, 54, 0.8);
}

/* Grid Layout */
.product-grid-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

/* Larger screens: keep rows balanced (e.g., 3x3 instead of 4+2 for 6 items) */
@media (min-width: 900px) {
  .product-grid-wrapper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Cards */
.product-grid-card {
  background: #ffffff;
  border-radius: 0.85rem;
  padding: 2rem 1.5rem 1.75rem;
  border: 1px solid rgba(0, 118, 184, 0.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    transform 160ms ease-out,
    box-shadow 160ms ease-out,
    border-color 160ms ease-out,
    background-color 160ms ease-out;
  cursor: pointer;
}

.product-grid-card:hover,
.product-grid-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(0, 118, 184, 0.4);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

/* Icon /Image container */
.product-grid-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(0, 161, 228, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.product-grid-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Ionicons fallback */
.product-grid-icon ion-icon {
  font-size: 2rem;
  color: var(--clr-primary);
}

/* Text */
.product-grid-card h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--clr-secondary);
}

.product-grid-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(31, 42, 54, 0.8);
  max-width: 280px;
}

/* Responsive Tweaks for product grid */
@media (max-width: 600px) {
  .section.product-grid {
    padding: 2.5rem 0;
  }

  .product-grid-icon {
    width: 80px;
    height: 80px;
  }

  .product-grid-card {
    padding: 1.6rem 1.2rem;
  }
}

/* Conversion Strip styles */
.conversion-strip {
  background:
    radial-gradient(900px 360px at 100% -20%, rgba(255, 255, 255, 0.15), transparent 60%),
    linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  color: #fff;
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.conversion-strip .cta-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.conversion-strip .cta-copy {
  max-width: 640px;
}

.conversion-strip .cta-copy .secondary {
  margin: 0 0 6px;
}

.conversion-strip .cta-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.conversion-strip .btn-invert {
  background: #fff;
  color: var(--clr-primary);
  border: 1px solid rgba(0, 118, 184, 0.2);
  margin: 0;
}

.conversion-strip .btn-invert:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.conversion-strip .cta-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 600;
}

.conversion-strip .cta-link {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.conversion-strip .cta-link:hover {
  text-decoration: underline;
}

.conversion-strip .cta-divider {
  opacity: 0.6;
}

.conversion-strip ion-icon {
  font-size: 18px;
}

@media (max-width: 680px) {
  .conversion-strip .cta-wrap {
    align-items: flex-start;
  }

  .conversion-strip .cta-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
