/* Reset & base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

:root {
  /* Layout & spacing */
  --max-width: 1200px;
  --gutter: 2rem;
  --space-xl: 8rem;
  --space-lg: 6rem;
  --space-md: 3.5rem;

  /* Typography */
  --base-font-size: 18px;
  --body-line-height: 1.65;

  /* Colors */
  --bg-light: #f5f5f5;
  --bg-dark: #1b0d3a;
  --accent: #431b83;
  --accent-dark: #2d1557;
  --cta-contrast: #ff7f50;
  /* contextual text colors */
  --text-on-light: rgba(27,13,58,0.95); /* dark text for light backgrounds */
  --text-on-dark: #ffffff; /* light text for dark backgrounds */
}

html { font-size: var(--base-font-size); }
body {
  font-family: 'Arial', sans-serif;
  line-height: var(--body-line-height);
  color: var(--text-on-dark);
  background-color: var(--bg-dark);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* center and constrain section content */
section > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Ensure the absolutely-positioned hero background isn't constrained by section > * */
#hero > .hero-bg {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  left: 0;
  right: 0;
}

/* Hero Section */
#hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl) 0;
  /* allow upward hover motion of buttons without clipping */
  overflow: visible;
}
.hero-content {
  position: relative;
  z-index: 2;
  /* ensure hero text contrasts with dark hero background */
  color: var(--text-on-dark);
}
.hero-title {
  /* larger fluid / responsive heading */
  font-size: clamp(2.75rem, 5vw + 1.5rem, 6.25rem);
  margin-bottom: 1.25rem;
  color: var(--text-on-dark);
  line-height: 1.4;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.6vw + 0.5rem, 1.375rem);
  margin-bottom: 2.25rem;
  /* narrower measure for better readability */
  max-width: 80ch;
  margin-left: auto;
  margin-right: auto;
  color: rgba(255,255,255,0.95);
}
.hero-buttons .cta-btn {
  display: inline-block;
  margin: 0 0.6rem;
  padding: 1rem 2.5rem;
  background-color: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 12px;
  transition: transform 180ms ease, background-color 180ms ease;
  font-size: 1.05rem;
}
.hero-buttons, .cta-buttons { padding-top: 6px; } /* reserve vertical space for upward hover motion */
.hero-buttons .cta-btn:hover { 
  transform: translateY(-3px); /* smaller lift to avoid clipping */
  background-color: var(--bg-dark); 
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.hero-buttons .cta-btn.outline {
  background-color: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}
.hero-buttons .cta-btn.outline:hover {
  background-color: var(--accent);
  color: #fff;
}
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: url('hero-bg.jpg') center/cover no-repeat; */
  filter: none; /* gradient overlay handles contrast */
  z-index: 1;
}

/* Brand gradient overlay for professional contrast over the video */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Layered gradients using brand colors: bg-dark and accent */
  background:
    /* subtle accent vignette from top-right */
    radial-gradient(120% 120% at 100% 0%, rgba(108, 45, 213, 0.24), rgba(108, 45, 213, 0) 60%),
    /* main vertical darkening using bg-dark */
    linear-gradient(180deg,
      rgba(27, 13, 58, 0.62) 0%,
      rgba(27, 13, 58, 0.50) 35%,
      rgba(27, 13, 58, 0.38) 65%,
      rgba(27, 13, 58, 0.32) 100%
    );
}

/* Ensure background video covers the hero area and stays behind content */
.hero-bg .hero-video {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; /* ensure cropping is centered */
  pointer-events: none; /* keep hero content clickable */
}

/* Showcase Section */
#showcase {
  background-color: var(--bg-light);
  color: var(--bg-dark);
  padding: var(--space-lg) 0;
  /* width: 100vw; */
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}
.section-title {
  text-align: center;
  font-size: clamp(1.75rem, 2.2vw + 1rem, 3rem);
  margin-bottom: 3.5rem;
  padding: 0 var(--gutter);
}
/* Product Grid - Using Flexbox for centering */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.product-card {
  position: relative;
  margin-bottom: calc(var(--space-md) / 1.2);
  background: transparent;
  padding: 0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(11,8,30,0.05);
  flex: 0 0 auto;
  width: 100%;
  max-width: 420px;
  overflow: hidden; /* clip background image to rounded corners */
}

.product-title {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  margin-bottom: 0.45rem;
}

.product-title .product-main {
  font-size: 1.5rem;
  text-align: center;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.1;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.product-title .product-subtitle {
  font-size: 1.2rem;
  text-align: center;
  color: var(--accent);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .product-card { 
    box-shadow: none;
    border-radius: 8px;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
  }
  
  .product-title .product-main {
    font-size: 1.2rem;
  }
  
  .product-title .product-subtitle {
    font-size: 0.95rem;
  }
}

@media (min-width: 769px) {
  .product-card {
    width: calc(50% - 0.75rem);
    min-width: 300px;
  }
}

@media (min-width: 1200px) {
  .product-card {
    width: calc(33.333% - 1rem);
    min-width: 340px;
    max-width: 440px;
  }
}
.product-desc {
  margin-bottom: 0.85rem;
  color: var(--text-on-light);
}
.product-list {
  list-style: none;
  padding-left: 1rem;
  margin-bottom: 2.8rem;
  min-height: 4.5rem; /* Ensure minimum space for list items */
}
.product-list li::before {
  content: "✔";
  margin-right: 0.4rem;
  color: var(--cta-contrast);
}

.product-bottom-label {
  font-size: min(0.8rem, 2.8vw);
  font-style: italic;
  position: absolute;
  bottom: 0.6rem;
  left: 1rem;
  max-width: calc(100% - 2rem);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2; /* include standard property for completeness */
  -webkit-box-orient: vertical;
  white-space: normal;
  z-index: 2;
}

/* Why Section */
#why {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
  padding: var(--space-lg) 0;
  text-align: center;
}
#why h2 {
  font-size: clamp(1.75rem, 2.2vw + 1rem, 2.75rem);
  margin-bottom: 2.25rem;
}
.benefits {
  list-style: none;
  font-size: clamp(1rem, 1.2vw + 0.6rem, 1.25rem);
  text-align: left;
  width:fit-content;
}
.benefits li { 
  margin-bottom: 1.1rem;
  color: var(--text-on-dark);
}
p.check-mark {
  color: var(--cta-contrast);
  display: inline;
  font-size: 2rem;
  vertical-align: middle;
}
div.check-mark-icon {
  width: 1.8rem;
  height: 1.8rem;
  background: url("/assets/orange-check.png") center/cover no-repeat;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* CTA Section */
/* CTA Section */
#cta {
  background-color: var(--accent);
  text-align: center;
  padding: var(--space-lg) 0;
}
#cta h2 {
  font-size: clamp(1.75rem, 2.2vw + 1rem, 2.75rem);
  margin-bottom: 1rem;
  color: #fff;
}
#cta p {
  font-size: clamp(1rem, 1.2vw + 0.4rem, 1.25rem);
  margin-bottom: 2rem;
  color: rgba(255,255,255,0.95);
}
.cta-buttons .cta-btn {
  margin: 0 0.6rem;
  padding: 1rem 2.25rem;
  background-color: #fff;
  color: var(--accent);
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
  display: inline-block; /* ensure height respects padding */
}
.cta-buttons .cta-btn:hover { 
  transform: translateY(-3px);
  background-color: var(--cta-contrast); 
  color: #fff; 
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.cta-buttons .cta-btn.outline {
  background-color: transparent;
  border: 2px solid #fff;
  color: #fff;
  display: inline-block;
}
.cta-buttons .cta-btn.outline:hover { background-color: #fff; color: var(--accent); }

/* General improvements */
h1,h2,h3,h4 { letter-spacing: -0.02em; }
p, li { color: var(--text-on-light); }

/* About Section */
#about {
  position: relative;
  overflow: hidden; /* keep decorative accents from affecting layout */
  /* subtle tint blended with the light background to add color */
  background: linear-gradient(180deg, rgba(67, 27, 131, 0.06), rgba(255, 127, 80, 0.03)), var(--bg-light);
  color: var(--bg-dark);
  padding: var(--space-lg) 0;
  text-align: center;
}

/* Decorative top bar that uses brand accent colors */
#about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--cta-contrast));
  z-index: 2;
}

#about .section-title {
  color: var(--accent);
  margin-bottom: 1rem;
  position: relative;
}
#about .section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--cta-contrast));
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

#about .about-content {
  max-width: 92ch;
  margin: 0 auto;
  padding: 0 var(--gutter);
  font-size: clamp(1rem, 1.1vw + 0.4rem, 1.06rem);
  line-height: 1.75;
  text-align: left;
}
#about .about-content p {
  margin-bottom: 1rem;
  color: var(--bg-dark);
}
@media (max-width: 768px) {
  #about .about-content { text-align: center; }
}

/* Responsive tweaks */
/* Responsive tweaks */
@media (max-width: 1024px) {
  :root { --space-xl: 6rem; --space-lg: 4.5rem; }
  .product-card { padding: 1rem; }
}

@media (max-width: 768px) {
  :root {
    --gutter: 1rem;
  }
  /* removed unused .hero class padding (hero uses #hero id) */
  .hero-title { font-size: clamp(1.8rem, 7.5vw, 2.6rem); }
  .hero-subtitle { font-size: 1rem; }
  #why, #cta { padding: 2.5rem 0; }
  .product-card { 
    box-shadow: none;
    border-radius: 8px;
    margin-bottom: 1rem;
  }
  .product-title .product-main {
    font-size: 1.2rem;
  }
  .product-title .product-subtitle {
    font-size: 0.95rem;
  }
  .product-desc {
    font-size: 0.9rem;
  }
  .product-list {
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
  }
  .hero-buttons .cta-btn, .cta-buttons .cta-btn { 
    width: 100%;
    display: block;
    margin: 0.5rem 0;
  }
}

/* removed unused grid-template-columns (flex layout retained) */

@media (min-width: 1200px) {
  :root { --max-width: 1400px; }
  section > * { padding-left: calc(var(--gutter) * 1.5); padding-right: calc(var(--gutter) * 1.5); }
  /* removed ineffective grid-template-columns on flex container */
}

/* Background image for product cards */
.product-card .product-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card .product-image {
  display: block;
  width: 100%;
  height: auto; /* keep full proportions */
  flex-shrink: 0;
}
.product-card .text-card {
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-grow: 1; /* fill remaining space */
  margin-top: -15%; /* overlap the image slightly */
}

/* Color overrides for text on image backgrounds */
/* Text colors on light card */
.product-card .text-card .product-title .product-main { color: var(--accent); }
.product-card .text-card .product-title .product-subtitle { color: var(--text-on-light); }
.product-card .text-card .product-desc,
.product-card .text-card .product-list li,
.product-card .text-card .product-bottom-label { color: var(--text-on-light); }
/* removed duplicate checkmark color override (already set globally) */
/* Override absolute position from global */
.product-card .text-card .product-bottom-label { position: static; max-width: none; }

/* Site footer */
#site-footer {
  background: linear-gradient(90deg, var(--accent-dark), var(--bg-dark));
  color: var(--text-on-dark);
  width: 100vw;
}
.footer-inner {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  flex-wrap: wrap; /* still wrap on narrow screens */
}
.footer-links {
  max-height: min-content;
  display: flex; /* keep links horizontally aligned */
  align-items: center;
}
.footer-left, .footer-center, .footer-right { display: flex; align-items: center; }
.footer-center { justify-content: center; }
.footer-left .footer-logo img { height: 36px; width: auto; display: block; }
/* Ensure footer-tall items are vertically centered with consistent line-height */
.footer-inner, .footer-links a, .footer-right small { line-height: 1; overflow-y: hidden; }
.footer-links a { overflow-y: hidden; color: rgba(255,255,255,0.92); text-decoration: none; margin-left: 1rem; font-weight: 600; display: inline-flex; align-items:center; height: 36px; }
.footer-links a .footer-icon { width: 22px; height: 22px; display: inline-block; margin-right: 0.6rem; }
.footer-links a .footer-link-text { overflow-y: hidden; vertical-align: middle; }
.footer-links a:first-child { margin-left: 0; }
.footer-links a:hover, .footer-links a:focus { color: var(--cta-contrast); }
.footer-right { color: rgba(255,255,255,0.78); font-size: 0.95rem; overflow-y: hidden;}
.footer-right small { font-size: 0.85rem; overflow-y: hidden; padding-right: 1.5rem;}


@media (min-width: 769px) {
  /* Prevent wrapping on wider screens; center links horizontally */
  .footer-inner { flex-wrap: nowrap; position: relative; }
  .footer-center { 
    position: absolute; 
    left: 50%; 
    top: 50%; 
    transform: translate(-50%, -50%); /* perfectly center in footer height */
    margin: 0; /* override mobile margin */
  }
}

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; text-align: center; padding-top: 0.6rem; padding-bottom: 0.6rem; gap: 1rem; }
  .footer-center { margin: 0.25rem 0; }
  .footer-links a { margin: 0 0.5rem; }
  .footer-right { margin-top: 0.25rem; }
}

/* Cookie Consent Popup */
.cookie-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-dark);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.cookie-popup.show {
  opacity: 1;
  transform: translateY(0);
}

.cookie-content {
  max-width: 800px;
  text-align: center;
}

.cookie-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  text-align: justify;
  color: var(--text-on-dark);
}

.accept-btn {
  background-color: var(--cta-contrast);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
}

.accept-btn:hover {
  background-color: #e66b3a;
}