/* ==========================================================================
   COSTA HYBRID - Main Stylesheet
   Design baseline: 1920px
   Breakpoints: 1440 / 1024 / 900 (stack) / 600 / 480
   ========================================================================== */

/* =========================
   FONTS
   ========================= */
@font-face {
  font-family: "ProximaNova";
  src: url("../fonts/proximanova-regular.woff2") format("woff2"),
    url("../fonts/proximanova-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Stratum2";
  src: url("../fonts/Stratum2-Regular.woff2") format("woff2"),
    url("../fonts/Stratum2-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Stratum2";
  src: url("../fonts/Stratum2-Medium.woff2") format("woff2"),
    url("../fonts/Stratum2-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Stratum2";
  src: url("../fonts/Stratum2-Black.woff2") format("woff2"),
    url("../fonts/Stratum2-Black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vitesse";
  src: url("../fonts/Vitesse-Medium.woff2") format("woff2"),
    url("../fonts/Vitesse-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* =========================
   CSS CUSTOM PROPERTIES
   ========================= */
:root {
  /* Colors */
  --color-white: #ffffff;
  --color-blue-primary: #0260a1;
  --color-blue-accent: #0081c6;
  --color-blue-hover: #006ba3;
  --color-navy: #182a46;
  --color-green: #a5c76f;

  /* Font Families */
  --font-body: "ProximaNova", sans-serif;
  --font-heading: "Stratum2", Arial, sans-serif;

  /* Spacing Scale (px values at 1920px baseline) */
  --space-xs: 5px;
  --space-sm: 10px;
  --space-md: 20px;
  --space-lg: 30px;
  --space-xl: 40px;
  --space-2xl: 60px;
  --space-3xl: 80px;
  --space-4xl: 100px;
  --space-5xl: 110px;

  /* Max Widths */
  --max-width-text: 800px;
  --max-width-text-lg: 900px;
  --max-width-content: 1200px;
  --max-width-products: 1400px;

  /* Typography Scale - fluid with clamp()
     Formula: clamp(min, vw-value, max)
     vw-value calculated as: px / 1920 * 100
     At 1920px, vw resolves to exact px value */

  /* Hero/Display */
  --font-size-display: clamp(40px, 4.0625vw, 78px); /* 78px at 1920 */
  --font-size-hero: clamp(28px, 3.6458vw, 70px); /* 70px at 1920 */

  /* Section Titles */
  --font-size-section: clamp(40px, 4.6875vw, 90px); /* 90px at 1920 */
  --font-size-section-lg: clamp(36px, 4.1667vw, 80px); /* 80px at 1920 */
  --font-size-section-md: clamp(28px, 2.6042vw, 50px); /* 50px at 1920 */
  --font-size-section-sm: clamp(24px, 2.5vw, 48px); /* 48px at 1920 */

  /* Content */
  --font-size-subtitle: clamp(18px, 1.5625vw, 30px); /* 30px at 1920 */
  --font-size-body-lg: clamp(16px, 1.25vw, 24px); /* 24px at 1920 */
  --font-size-body: clamp(14px, 1.0417vw, 20px); /* 20px at 1920 */
  --font-size-body-sm: clamp(14px, 0.9375vw, 18px); /* 18px at 1920 */

  /* Product Names */
  --font-size-product: clamp(20px, 1.5625vw, 30px); /* 30px at 1920 */
  --font-size-product-lg: clamp(24px, 1.875vw, 36px); /* 36px at 1920 */
  --font-size-tag: clamp(14px, 1.0417vw, 20px); /* 20px at 1920 */

  /* Intro Copy */
  --font-size-intro-copy: clamp(30px, 2.2917vw, 44px); /* 44px at 1920 */

  /* Hero Overlay */
  --font-size-hero-intro: clamp(16px, 1.4583vw, 28px); /* 28px at 1920 */
  --font-size-credit: clamp(14px, 1.0417vw, 20px); /* 20px at 1920 */
  --font-size-credit-sm: clamp(12px, 0.9375vw, 18px); /* 18px at 1920 */

  /* Section Padding - fluid */
  --section-padding-y: clamp(50px, 4.1667vw, 80px); /* 80px at 1920 */
  --section-padding-x: clamp(20px, 6.25vw, 120px); /* 120px at 1920 */

  /* Breakpoint for stacking (easy to change) */
  --bp-stack: 900px;
}

/* =========================
   GLOBAL STYLES
   ========================= */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
  background-color: var(--color-white);
}

body {
  font-family: var(--font-body);
  line-height: 1.4;
}

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

/* =========================
   LOGO BAR
   ========================= */
.logo-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  height: clamp(80px, 6.25vw, 120px);
  background-color: var(--color-white);
  padding: 0 var(--section-padding-x);
  position: relative;
}

.logo-bar__logo {
  width: 100%;
  max-width: clamp(
    238px,
    19.9vw,
    468px
  ); /* scaled for 1264px wide logo, file: 1-Optical-Lockup.svg */
  height: auto;
}

@media (max-width: 600px) {
  .logo-bar {
    flex-direction: column;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 10px;
  }
}

/* =========================
   HEADER IMAGE
   ========================= */
.header-image {
  width: 100%;
}

.header-image__image {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .header-image__image {
    height: clamp(280px, 70vw, 400px);
    object-fit: cover;
  }
}

/* =========================
   INTRO COPY
   ========================= */
.intro-copy {
  background-color: var(--color-white);
  padding: var(--section-padding-y) var(--section-padding-x);
  text-align: center;
}

.intro-copy__text {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-intro-copy);
  color: var(--color-navy);
  text-transform: uppercase;
  margin: 0 auto;
  max-width: 800px;
  line-height: 1.15;
}

/* =========================
   SECTION BANNER
   ========================= */
.section-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(30px, 4.1667vw, 80px) var(--section-padding-x); /* 80px at 1920, scales to 30px */
}

.section-banner--blue {
  background-color: var(--color-blue-accent);
}

.section-banner--navy {
  background-color: var(--color-navy);
}

.section-banner__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-section);
  color: var(--color-white);
  text-align: center;
  margin: 0;
  line-height: 1;
}

@media (max-width: 600px) {
  .section-banner__title {
    font-size: clamp(32px, 8vw, 40px);
  }
}


.section-banner__title.lens {
  width: clamp(300px, 80%, 1000px);
}

/* =========================
   SECTION INTRO
   ========================= */
.section-intro {
  background-color: var(--color-white);
  padding: var(--section-padding-y) var(--section-padding-x)
    calc(var(--section-padding-y) - 40px);
  text-align: center;
}

.section-intro__copy {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(18px, 1.6667vw, 24px);
  color: #182a46;
  margin: 0 auto;
  max-width: var(--max-width-text-lg);
  line-height: 1.4;
}

/* ==========================================================================
   RESPONSIVE STYLES
   Breakpoints: 1440 / 1024 / 900 (stack) / 600 / 480
   ========================================================================== */

/* ----- MOBILE: 600px ----- */
@media (max-width: 600px) {
  /* Reduce spacing */
  :root {
    --space-2xl: 40px;
    --space-3xl: 50px;
    --space-4xl: 60px;
    --space-5xl: 50px;
  }
}

/* =========================
   PRODUCT SERIES SECTION
   ========================= */
.product-series {
  --product-padding-top: var(--section-padding-y);
  --product-padding-bottom: var(--section-padding-y);
  background-color: var(--color-white);
  padding: var(--product-padding-top) var(--section-padding-x) var(--product-padding-bottom);
}

.product-series + .product-series {
  --product-padding-top: calc(var(--section-padding-y) - 40px);
}

.product-series__container {
  display: flex;
  gap: clamp(20px, 5vw, 80px);
  max-width: var(--max-width-content);
  margin: 0 auto;
  align-items: center;
}

.product-series__image-column {
  flex: 1;
  min-width: 0;
}

.product-series__image {
  width: 100%;
  height: auto;
  display: block;
}

.product-series__caption {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(20px, 1.4583vw, 28px);
  color: var(--color-blue-accent);
  margin: var(--space-lg) 0 0;
  line-height: 1.2;
  text-align: center;
}

.product-series__text-column {
  flex: 1;
  max-width: 300px;
}

.product-series__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(26px, 1.6667vw, 32px);
  color: var(--color-navy);
  margin: 0;
  line-height: 1.1;
}

.product-series__description {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(16px, 1.0417vw, 18px);
  color: var(--color-navy);
  margin: 15px 0 0;
  line-height: 1.35;
}

.product-series__divider {
  width: 100vw;
  height: 2px;
  background-color: var(--color-blue-accent);
  margin-top: calc(var(--section-padding-y) + 55px);
  margin-left: calc(-1 * var(--section-padding-x));
}

/* Product Series responsive */
@media (max-width: 900px) {
  .product-series {
    --product-padding-top: var(--space-3xl);
    --product-padding-bottom: var(--space-3xl);
  }

  .product-series__container {
    flex-direction: column;
    align-items: center;
  }

  .product-series__image-column {
    max-width: 500px;
    width: 100%;
    order: 2;
  }

  .product-series__text-column {
    text-align: center;
    max-width: 600px;
    order: 1;
  }

  .product-series__divider {
    margin-top: var(--space-3xl);
  }
}

/* =========================
   LENS ASSORTMENT SECTION
   ========================= */
.lens-assortment {
  background-color: var(--color-white);
  padding: var(--section-padding-y) var(--section-padding-x);
}

.lens-assortment__container {
  display: flex;
  gap: clamp(60px, 10vw, 160px);
  max-width: var(--max-width-content);
  margin: 0 auto;
  justify-content: center;
}

.lens-assortment__column {
  flex: 1;
  max-width: 450px;
}

.lens-assortment__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(28px, 2.0833vw, 40px);
  color: #182a46;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.1;
  text-align: center;
}

.lens-assortment__title-line {
  width: 100%;
  height: 2px;
  background-color: #182a46;
  margin-top: 10px;
  margin-bottom: 15px;
}

.lens-assortment__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lens-assortment__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(24, 42, 70, 0.15);
}

.lens-assortment__item:last-child {
  border-bottom: none;
}

.lens-assortment__item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lens-assortment__item-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(16px, 1.0417vw, 20px);
  color: #182a46;
  line-height: 1.3;
}

.lens-assortment__item-helper {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(14px, 0.8333vw, 16px);
  color: #182a46;
  line-height: 1.3;
}

.lens-assortment__item-icon {
  flex-shrink: 0;
  height: clamp(16px, 1.25vw, 24px);
  width: auto;
}

/* Lens Assortment responsive */
@media (max-width: 900px) {
  .lens-assortment__container {
    flex-direction: column;
    align-items: center;
    gap: clamp(45px, 8vw, 70px);
  }

  .lens-assortment__column {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 600px) {
  .lens-assortment__title {
    font-size: clamp(22px, 5.5vw, 28px);
  }

  .lens-assortment__item-icon {
    height: clamp(14px, 4vw, 16px);
  }
}

/* =========================
   LENS CAROUSEL COMPONENT
   Reusable for Single Vision (3 items) and Progressive (4 items)
   ========================= */
.lens-carousel {
  background-color: var(--color-white);
  padding: var(--section-padding-y) 0;
  overflow: hidden;
}

.lens-carousel--progressive {
  padding-bottom: calc(var(--section-padding-y) * 2);
}

.lens-carousel__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(32px, 2.5vw, 48px);
  color: var(--color-navy);
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 clamp(30px, 3vw, 50px);
  padding: 0 var(--section-padding-x);
  line-height: 1.1;
}

/* Track: Desktop = flex row, Mobile = horizontal scroll */
.lens-carousel__track {
  display: flex;
  gap: clamp(20px, 2.5vw, 40px);
  max-width: var(--max-width-products);
  margin: 0 auto;
  padding: 0 clamp(40px, 4vw, 60px);
  justify-content: center;
}

/* Card base styles */
.lens-carousel__card {
  --card-padding: clamp(16px, 1.5vw, 24px);
  flex: 0 0 380px; /* Fixed width: don't grow, don't shrink */
  width: 380px;
  text-align: center;
  background-color: #f5f5f5;
  padding: var(--card-padding);
  border-radius: 4px;
  box-sizing: border-box;
}

/* Image wrapper: contains full image without cropping, flush to card edges */
.lens-carousel__card-image-wrap {
  width: calc(100% + var(--card-padding) * 2);
  margin-top: calc(-1 * var(--card-padding));
  margin-left: calc(-1 * var(--card-padding));
  margin-right: calc(-1 * var(--card-padding));
  background-color: transparent;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.lens-carousel__card-image {
  display: block;
  width: 100%;
  height: auto;
}

/* Icon under image */
.lens-carousel__card-icon {
  display: block;
  margin: clamp(16px, 1.5vw, 24px) auto clamp(12px, 1vw, 16px);
  height: clamp(18px, 1.5vw, 24px);
  width: auto;
}

/* Title: Stratum2 Black, 34px, navy, uppercase */
.lens-carousel__card-title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(24px, 1.77vw, 30px);
  color: var(--color-navy);
  text-transform: uppercase;
  margin: 0 0 clamp(20px, 1.5vw, 24px);
  line-height: 1.1;
}

/* Label: Stratum2 Black, 20px, blue accent, uppercase */
.lens-carousel__card-label {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(16px, 1.04vw, 20px);
  color: var(--color-blue-accent);
  text-transform: uppercase;
  margin: 0 0 clamp(6px, 0.5vw, 10px);
  line-height: 1.2;
}

/* List for body copy with + bullet */
.lens-carousel__card-list {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(16px, 1.04vw, 18px);
  color: var(--color-navy);
  margin: 0;
  padding: 0 0 clamp(16px, 1.25vw, 24px) 0;
  margin-bottom: clamp(16px, 1.25vw, 24px);
  border-bottom: 1px solid #d0d7db;
  line-height: 1.4;
  text-align: left;
  list-style: none;
}

.lens-carousel__card-list:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.lens-carousel__card-list li {
  position: relative;
  padding-left: clamp(18px, 1.25vw, 22px);
  margin-bottom: 6px;
}

.lens-carousel__card-list li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--color-navy);
}

.lens-carousel__card-list li:last-child {
  margin-bottom: 0;
}

/* =========================
   LENS CAROUSEL - WITH ARROWS (Progressive)
   ========================= */
.lens-carousel__wrapper {
  position: relative;
  max-width: var(--max-width-products);
  margin: 0 auto;
  padding: 0 clamp(40px, 4vw, 60px);
}

.lens-carousel--with-arrows .lens-carousel__track {
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
  justify-content: flex-start;
  gap: clamp(20px, 2.5vw, 40px);
}

.lens-carousel--with-arrows .lens-carousel__track::-webkit-scrollbar {
  display: none;
}

.lens-carousel--with-arrows .lens-carousel__card {
  flex: 0 0 380px;
  width: 380px;
  scroll-snap-align: start;
}

.lens-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 3vw, 50px);
  height: clamp(40px, 3vw, 50px);
  background-color: var(--color-blue-accent);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  z-index: 10;
}

.lens-carousel__arrow:hover {
  background-color: var(--color-navy);
}

.lens-carousel__arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lens-carousel__arrow--prev {
  left: 0;
}

.lens-carousel__arrow--next {
  right: 0;
}

.lens-carousel__arrow svg {
  width: clamp(18px, 1.5vw, 24px);
  height: clamp(18px, 1.5vw, 24px);
}

/* =========================
   LENS CAROUSEL - DESKTOP (Show 3 cards, hide 4th)
   Breakpoint: above 900px
   ========================= */
@media (min-width: 901px) {
  .lens-carousel--with-arrows .lens-carousel__track {
    /* Hide overflow so 4th card is not visible - JS scroll still works */
    overflow: hidden;
    /* Calculate width for exactly 3 cards + 2 gaps */
    /* 3 * 380px + 2 * 40px = 1220px */
    max-width: calc(380px * 3 + 40px * 2);
  }
}

/* =========================
   LENS CAROUSEL - MOBILE (Scroll-snap)
   Breakpoint: 900px
   ========================= */
@media (max-width: 900px) {
  .lens-carousel {
    padding: var(--section-padding-y) 0;
  }

  /* Hide arrows on mobile */
  .lens-carousel__arrow {
    display: none;
  }

  .lens-carousel__wrapper {
    padding: 0;
  }

  .lens-carousel--with-arrows .lens-carousel__track {
    padding-left: 20px;
    padding-right: calc(10% - 20px);
    scroll-padding-left: 20px;
  }

  .lens-carousel--with-arrows .lens-carousel__card {
    flex: 0 0 280px;
    width: 280px;
  }

  .lens-carousel__track {
    /* Enable horizontal scroll */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    /* Reset flex for scroll */
    justify-content: flex-start;
    flex-wrap: nowrap;


    padding-left: 20px;
    padding-right: calc(10% - 20px); /* Creates ~10% peek of next card */


    scroll-padding-left: 20px;

    /* Hide scrollbar for cleaner look */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .lens-carousel__track::-webkit-scrollbar {
    display: none;
  }

  .lens-carousel__card {
   
    flex: 0 0 280px;
    width: 280px;
    scroll-snap-align: start;
  }
}

/* =========================
   LENS CAROUSEL - SMALL MOBILE
   Breakpoint: 600px
   ========================= */
@media (max-width: 600px) {
  .lens-carousel__card,
  .lens-carousel--with-arrows .lens-carousel__card {
    flex: 0 0 260px;
    width: 260px;
  }

  .lens-carousel__track,
  .lens-carousel--with-arrows .lens-carousel__track {
    gap: 16px;
  }
}
