/* ==========================================================================
   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-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 */

  /* 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;
}

/* =========================
   SECTION 1: 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);
}

.logo-bar__logo {
  width: 100%;
  max-width: clamp(280px, 23.4375vw, 450px); /* 450px at 1920, scales down */
  height: auto;
}

/* =========================
   SECTION 2: TITLE BLOCK
   ========================= */
.title-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--color-blue-primary);
  padding-top: clamp(40px, 5.729vw, 110px); /* 110px at 1920, scales down */
  padding-bottom: clamp(30px, 3.125vw, 60px); /* 60px at 1920, scales down */
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}

.title-block__heading {
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--color-white);
  text-align: center;
  text-transform: uppercase;
  font-size: var(--font-size-display);
  line-height: 0.9;
  letter-spacing: -0.5px;
}

.title-block__copy {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-white);
  font-size: var(--font-size-subtitle);
  text-align: center;
  margin-top: var(--space-xs);
}

/* =========================
   SECTION 3: HERO
   ========================= */
.hero {
  position: relative;
  background-color: var(--color-blue-primary);
  width: 100%;
}

.hero__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top;
}

.hero__overlay {
  position: absolute;
  top: clamp(20px, 5vw, 40px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__intro {
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--color-white);
  text-transform: uppercase;
  font-size: var(--font-size-hero-intro);
  line-height: 1;
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--color-white);
  text-transform: uppercase;
  font-size: var(--font-size-hero);
  line-height: 1;
  white-space: nowrap;
}

.hero__credit {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero__credit-name {
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--color-white);
  text-transform: uppercase;
  font-size: var(--font-size-credit);
  line-height: 1.2;
}

.hero__credit-title {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-white);
  text-transform: uppercase;
  font-size: var(--font-size-credit-sm);
  line-height: 1.2;
}

/* =========================
   SECTION 4: VIDEO
   ========================= */
.video-section__container {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.video-section__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-section__cover-image {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-section__play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-blue-accent);
  border: none;
  border-radius: 50%;
  width: clamp(70px, 5.2083vw, 100px);
  height: clamp(70px, 5.2083vw, 100px);
  cursor: pointer;
  z-index: 2;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  -webkit-tap-highlight-color: transparent;
}

.video-section__play-btn:hover {
  background: var(--color-blue-hover);
}

.video-section__play-btn.is-hidden {
  display: none;
}

.play-icon {
  width: clamp(32px, 2.5vw, 48px);
  height: clamp(32px, 2.5vw, 48px);
  fill: var(--color-white);
  display: block;
  flex-shrink: 0;
}

/* =========================
   SECTION BANNER (shared for lens-tech, bio-resin, halo, etc.)
   ========================= */
.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--green {
  background-color: var(--color-green);
}

.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;
}

.section-banner__title--long {
  font-size: clamp(32px, 3.4vw, 65px);
}

/* =========================
   SECTION 7: BEYOND POLARIZED
   ========================= */
.beyond-polarized {
  background-color: var(--color-navy);
  padding: var(--section-padding-y) var(--section-padding-x);
  text-align: center;
}

.beyond-polarized__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-section-md);
  color: var(--color-white);
  margin: 0 0 var(--space-md);
  line-height: 1;
}

.beyond-polarized__subcopy {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--font-size-body-lg);
  color: var(--color-white);
  margin: 0 auto var(--space-xl);
  max-width: var(--max-width-text);
  line-height: 1.4;
}

.beyond-polarized__images {
  display: flex;
  justify-content: center;
  gap: 0;
}

.beyond-polarized__image {
  height: clamp(200px, 20.8333vw, 400px);
  width: auto;
  display: block;
}

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

.lens-options__container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xl);
  margin: 0 auto;
}

.lens-options__image {
  width: 100%;
  max-width: 650px;
  height: auto;
}

/* =========================
   SECTION 9: HOW IT WORKS
   ========================= */
.how-it-works {
  background-color: var(--color-white);
  padding: var(--section-padding-y) var(--section-padding-x);
  text-align: center;
}

.how-it-works__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-section);
  text-transform: uppercase;
  color: var(--color-blue-accent);
  margin: 0 0 clamp(30px, 3.125vw, 60px); /* 60px at 1920, scales down */
  line-height: 1;
}

.how-it-works__subtitle {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-subtitle);
  text-transform: uppercase;
  color: var(--color-navy);
  margin: 0 auto clamp(30px, 3.125vw, 60px); /* 60px at 1920, scales down */
  max-width: var(--max-width-text);
  line-height: 1.3;
}

.how-it-works__content {
  display: inline-block;
  text-align: left;
}

.how-it-works__intro {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-body-lg);
  color: var(--color-navy);
  text-transform: uppercase;
  margin: 0 0 var(--space-sm);
}

.how-it-works__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.how-it-works__list li {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-body-lg);
  color: var(--color-navy);
  text-transform: uppercase;
  padding-left: var(--space-lg);
  position: relative;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.how-it-works__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background-color: var(--color-blue-accent);
  border-radius: 50%;
}

/* =========================
   SECTION 10: COSTA 580 IMAGE
   ========================= */
.costa-580 {
  background-color: var(--color-white);
  padding: 0 var(--section-padding-x) var(--section-padding-y);
  text-align: center;
}

.costa-580__image {
  display: inline-block;
  max-width: 60%;
  height: auto;
}

/* =========================
   SECTION 11: LENS TOGGLE
   ========================= */
.lens-toggle-section {
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
}

.lens-toggle-section__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 3vw, 60px);
  padding: clamp(16px, 2vw, 32px) var(--section-padding-x);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.lens-toggle-section__label {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(28px, 3vw, 58px);
  color: #182a46;
  line-height: 1;
  text-align: center;
}

.lens-toggle-section__switch {
  position: relative;
  width: clamp(90px, 6.5vw, 124px);
  height: clamp(36px, 2.5vw, 48px);
  background-color: #b0b0b0;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.lens-toggle-section__switch[aria-pressed="true"] {
  background-color: #0081c6;
}

.lens-toggle-section__switch:focus-visible {
  outline: 3px solid #0081c6;
  outline-offset: 2px;
}

.lens-toggle-section__switch-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(11px, 0.75vw, 14px);
  color: var(--color-white);
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lens-toggle-section__switch-label--on {
  left: clamp(10px, 0.7vw, 14px);
  opacity: 0;
}

.lens-toggle-section__switch-label--off {
  right: clamp(10px, 0.7vw, 14px);
  opacity: 1;
}

.lens-toggle-section__switch[aria-pressed="true"]
  .lens-toggle-section__switch-label--on {
  opacity: 1;
}

.lens-toggle-section__switch[aria-pressed="true"]
  .lens-toggle-section__switch-label--off {
  opacity: 0;
}

.lens-toggle-section__switch-knob {
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  width: clamp(28px, 2vw, 40px);
  height: clamp(28px, 2vw, 40px);
  background-color: var(--color-white);
  border-radius: 50%;
  transition: left 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lens-toggle-section__switch[aria-pressed="true"]
  .lens-toggle-section__switch-knob {
  left: calc(100% - clamp(28px, 2vw, 40px) - 4px);
}

/* Image container fills remaining space */
.lens-toggle-section__image-container {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.lens-toggle-section__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================
   SECTION 13: PROTECTING
   ========================= */
.protecting {
  background-color: var(--color-white);
  padding: var(--section-padding-y) var(--section-padding-x);
  text-align: center;
}

.protecting__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-section-sm);
  color: var(--color-navy);
  margin: 0 auto var(--space-lg);
  line-height: 1.2;
  max-width: var(--max-width-text-lg);
}

.protecting__copy {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--font-size-body);
  color: var(--color-navy);
  margin: 0 auto;
  line-height: 1.5;
  max-width: var(--max-width-text-lg);
}

/* =========================
   SECTION 14: BIO RESIN IMAGE
   ========================= */
.bio-resin-image {
  background-color: var(--color-white);
  padding: 0 var(--section-padding-x) var(--section-padding-y);
  text-align: center;
}

.bio-resin-image__image {
  display: inline-block;
  max-width: 60%;
  height: auto;
}

.bio-resin-image__caption {
  font-family: "proxima-nova", sans-serif;
  font-weight: 400;
  font-size: clamp(12px, 0.78vw, 15px);
  color: #182a46;
  text-align: center;
  margin-top: 20px;
  line-height: 1.5;
}

/* =========================
   PRODUCT GRID (shared for halo-products, best-sellers)
   ========================= */
.product-grid {
  background-color: var(--color-white);
  padding: var(--space-4xl) var(--section-padding-x);
}

.product-grid__container {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  max-width: var(--max-width-products);
  margin: 0 auto;
}

.product-grid__item {
  text-align: center;
  flex: 1;
  max-width: 400px;
}

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

.product-grid__name {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-product);
  color: var(--color-navy);
  margin: var(--space-lg) 0 0;
  line-height: 1.2;
}

.product-grid__tag {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-tag);
  color: var(--color-blue-accent);
  margin: var(--space-xs) 0 0;
  line-height: 1.2;
}

/* =========================
   SECTION 20: ENTRY LEVEL
   ========================= */
.entry-level {
  background-color: var(--color-white);
  padding: var(--section-padding-y) var(--section-padding-x);
}

.entry-level__container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xl);
  max-width: var(--max-width-products);
  margin: 0 auto;
}

.entry-level__left,
.entry-level__right {
  flex: 1;
  max-width: 600px;
}

.entry-level__left {
  text-align: center;
}

.entry-level__image {
  width: 100%;
  height: auto;
  display: block;
}

.entry-level__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-product-lg);
  color: var(--color-navy);
  margin: var(--space-md) 0 0;
  line-height: 1.2;
}

.entry-level__subtitle {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: var(--font-size-tag);
  color: var(--color-blue-accent);
  margin: var(--space-xs) 0 0;
  line-height: 1.2;
}

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

/* ----- LARGE DESKTOP: 1440px ----- */
@media (max-width: 1440px) {
  /* Costa 580 image smaller */
  .costa-580__image {
    max-width: 80%;
  }

  /* Stack lens options */
  .lens-options__container {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .lens-options__image {
    max-width: 60%;
  }
}

/* ----- STACK BREAKPOINT: 900px ----- */
@media (max-width: 900px) {
  .lens-options__image {
    max-width: 80%;
  }

  /* Stack entry level */
  .entry-level {
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .entry-level__container {
    flex-direction: column;
    gap: var(--space-2xl);
  }

  .entry-level__left {
    max-width: 500px;
    padding-left: var(--section-padding-x);
    padding-right: var(--section-padding-x);
  }

  .entry-level__right {
    max-width: none;
    width: 100%;
  }

  /* Stack product grid */
  .product-grid__container {
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xl);
  }

  .product-grid__item {
    max-width: 350px;
  }

  /* Beyond polarized images stack */
  .beyond-polarized__images {
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg); /* 30px */
  }

  .beyond-polarized__image {
    width: 100%;
    max-width: 500px;
    height: auto;
  }
}

/* ----- TABLET PORTRAIT: 768px ----- */
@media (max-width: 768px) {
  /* Logo handled by clamp() */
}

/* ----- MOBILE: 600px ----- */
@media (max-width: 600px) {
  .title-block__heading {
    max-width: clamp(250px, 80vw, 300px);
  }

  .title-block__copy {
    max-width: clamp(250px, 80vw, 300px);
  }

  .hero__overlay {
    top: clamp(0px, 3vw, 30px);
  }

  .lens-options__image {
    max-width: 100%;
  }

  /* Reduce spacing */
  :root {
    --space-2xl: 40px;
    --space-3xl: 50px;
    --space-4xl: 60px;
    --space-5xl: 50px;
  }

  /* Costa 580 and Bio Resin images expand */
  .costa-580__image,
  .bio-resin-image__image {
    max-width: 95%;
  }

  /* How it works list bullet adjustment */
  .how-it-works__list li {
    padding-left: 24px;
  }

  .how-it-works__list li::before {
    width: 10px;
    height: 10px;
  }

  /* Remove top padding from entry level */
  .entry-level {
    padding-top: 0;
  }
}

/* ----- SMALL MOBILE: 480px ----- */
@media (max-width: 480px) {
  /* Hero overlay */
  .hero__title {
    font-size: 26px;
  }

  .hero__intro {
    font-size: 16px;
  }

  /* Beyond polarized padding adjustment */
  .beyond-polarized {
    padding-bottom: 0;
  }
}
