:root {
  --font: Rubik, Helvetica, Arial, sans-serif;
  --white: #fff;
  --black: #000;
  --text: #0a0a0a;
  --muted: #666;
  --overlay: rgba(0, 0, 0, 0.56);
  --logo-bg: rgba(255, 255, 255, 0.71);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --anim-duration: 480ms;
  --page-pad: 1rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-x: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

fieldset {
  border: 0;
  min-inline-size: 0;
}

/* —— Hero (mobile base) —— */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    calc(1.75rem + var(--safe-top))
    max(var(--page-pad), env(safe-area-inset-right, 0px))
    calc(1.5rem + var(--safe-bottom))
    max(var(--page-pad), env(safe-area-inset-left, 0px));
  color: var(--white);
  background-color: var(--overlay);
  background-image: url("hero.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: multiply;
  overflow-x: hidden;
}

.hero__brand {
  width: min(58%, 220px);
  margin: 0 auto 1.1rem;
  background: var(--logo-bg);
}

.hero__brand img {
  width: 100%;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 960px;
  text-align: center;
  text-wrap: balance;
}

.hero__content h1 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.85rem, 7.2vw, 2.4rem);
  font-weight: 500;
  line-height: 1.08;
}

.hero__content > p {
  margin-bottom: 1.25rem;
  max-width: 36em;
  font-size: clamp(1rem, 3.8vw, 1.15rem);
  font-weight: 700;
  line-height: 1.35;
}

.hero__mark {
  display: none;
}

/* —— Product interest —— */
.interest {
  width: 100%;
  margin: 0 0 0.35rem;
}

.interest__label {
  margin-bottom: 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.interest__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* Last odd item centered on its own row (mobile) */
.interest__grid .product:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc((100% - 0.65rem) / 2);
}

.product {
  cursor: pointer;
  min-width: 0;
}

.product input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  height: 100%;
  min-height: 100%;
  padding: 0.45rem 0.45rem 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid #fff;
  border-radius: 12px;
  color: var(--black);
  transition:
    border-color 220ms var(--ease),
    background-color 220ms var(--ease),
    transform 220ms var(--ease),
    box-shadow 220ms var(--ease),
    opacity 220ms var(--ease),
    filter 220ms var(--ease);
}

.product__card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #f0f0f0;
}

.product__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #ececec;
  color: #888;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}

.product__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--black);
}

/* Selected state — strongly marked */
.product input:checked + .product__card {
  z-index: 1;
  border-color: var(--black);
  border-width: 3px;
  background: #fff;
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 12px 28px rgba(0, 0, 0, 0.4);
}

.product input:checked + .product__card::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: var(--black) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 0.85rem no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.product input:checked + .product__card .product__title {
  color: var(--black);
}

/* Dim other options when one is selected */
.interest__grid:has(input:checked) .product:not(:has(input:checked)) .product__card {
  opacity: 0.48;
  filter: grayscale(0.35);
  transform: scale(0.97);
}

.product input:focus-visible + .product__card {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.interest--error .product__card {
  border-color: #e07070;
}

.interest__hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffd0d0;
}

/* —— CTA —— */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  margin-top: 1rem;
  padding: 0.85rem 1.25rem;
  color: var(--white);
  background: var(--black);
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  transition: color 250ms var(--ease), background-color 250ms var(--ease);
}

.cta:active {
  color: var(--black);
  background: var(--white);
}

.cta__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* —— Modal —— */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: stretch;
  padding: 0;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  background: var(--white);
  border-radius: 0;
  overflow: hidden;
}

.modal__header {
  flex-shrink: 0;
  padding:
    calc(1.15rem + var(--safe-top))
    3.25rem
    1rem
    1.15rem;
  background: #0a0a0a;
  color: var(--white);
}

.modal__eyebrow {
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.modal__header h2 {
  margin-bottom: 0.4rem;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.15;
}

.modal__intro {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
  text-wrap: pretty;
}

.modal__intro strong {
  font-weight: 700;
  color: var(--white);
}

.modal__close {
  position: absolute;
  top: calc(0.65rem + var(--safe-top));
  right: 0.65rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.7rem;
  line-height: 1;
}

.modal__dialog iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: var(--white);
  padding-bottom: var(--safe-bottom);
}

/* —— Footer —— */
.footer {
  background-color: rgba(0, 0, 0, 0.32);
}

.footer__inner {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding:
    0.9rem
    max(1rem, env(safe-area-inset-right, 0px))
    calc(0.9rem + var(--safe-bottom))
    max(1rem, env(safe-area-inset-left, 0px));
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.footer__inner a {
  font-weight: 700;
}

.footer__aleo {
  display: inline-block;
  vertical-align: middle;
  margin: 0 2px 0 4px;
}

.footer__aleo img {
  display: inline-block;
  width: 44px;
  margin-bottom: -3px;
  padding: 0 4px 2px 0;
}

/* —— Animations —— */
.animate {
  animation: rise-in var(--anim-duration) var(--ease) both;
}

.animate--delay-1 { animation-delay: 60ms; }
.animate--delay-2 { animation-delay: 120ms; }
.animate--delay-3 { animation-delay: 180ms; }
.animate--delay-4 { animation-delay: 240ms; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate {
    animation: none;
  }

  .cta,
  .product__card {
    transition: none;
  }
}

/* —— Tablet+ —— */
@media (min-width: 600px) {
  :root {
    --page-pad: 1.5rem;
  }

  body {
    font-size: 17px;
  }

  .hero {
    justify-content: center;
    padding-top: calc(2.5rem + var(--safe-top));
    padding-bottom: calc(2rem + var(--safe-bottom));
  }

  .hero__brand {
    width: min(36%, 240px);
    margin-bottom: 1.35rem;
  }

  .hero__content h1 {
    font-size: clamp(2.2rem, 4.5vw, 2.75rem);
  }

  .hero__content > p {
    margin-bottom: 1.5rem;
    font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  }

  .interest__label {
    font-size: 0.9rem;
  }

  .interest__grid {
    gap: 0.85rem;
    max-width: 640px;
  }

  .interest__grid .product:last-child:nth-child(odd) {
    width: calc((100% - 0.85rem) / 2);
  }

  .product__card {
    padding: 0.65rem 0.65rem 0.85rem;
    border-radius: 14px;
  }

  .product__title {
    font-size: 0.9rem;
    min-height: 0;
  }

  .cta {
    width: auto;
    min-width: 260px;
    padding: 0.95rem 2.5rem;
    font-size: 1.15rem;
  }

  .modal {
    place-items: center;
    padding: 1rem;
  }

  .modal__dialog {
    width: min(640px, 100%);
    height: min(820px, calc(100dvh - 2rem));
    border-radius: 14px;
  }

  .modal__header {
    padding: 1.35rem 3.25rem 1.1rem 1.4rem;
  }

  .modal__header h2 {
    font-size: 1.55rem;
  }

  .footer__inner {
    width: 90%;
    font-size: 13px;
    text-align: left;
  }
}

/* —— Desktop —— */
@media (min-width: 981px) {
  :root {
    --page-pad: 2rem;
  }

  body {
    font-size: 18px;
    line-height: 1.7;
  }

  .hero {
    padding: 2rem;
    box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.3);
  }

  .hero__brand {
    width: 13%;
    max-width: 15%;
    margin-bottom: 1.5rem;
  }

  .hero__content h1 {
    margin-bottom: 0.75rem;
    font-size: 3rem;
  }

  .hero__content > p {
    margin-bottom: 1.75rem;
    font-size: 1.5rem;
    line-height: 1.4;
  }

  .hero__mark {
    display: block;
    position: absolute;
    right: 2rem;
    width: 3%;
    max-width: 3%;
    pointer-events: none;
  }

  .hero__mark--top {
    top: calc(2% + 100px);
  }

  .hero__mark--bottom {
    bottom: 8%;
  }

  .interest__label {
    margin-bottom: 0.85rem;
    font-size: 0.95rem;
  }

  .interest__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 760px;
  }

  .interest__grid .product:last-child:nth-child(odd) {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
  }

  .product__card {
    gap: 0.65rem;
    padding: 0.75rem 0.75rem 1rem;
  }

  .product__title {
    font-size: 0.95rem;
  }

  .cta {
    margin-top: 1.25rem;
    padding: 14px 70px;
    font-size: 1.25rem;
    letter-spacing: 1px;
    line-height: 1.7;
  }

  .cta__icon {
    width: 20px;
    height: 20px;
    transition: transform 250ms var(--ease);
  }

  .modal__dialog {
    width: min(720px, 100%);
    height: min(860px, calc(100dvh - 2.5rem));
  }

  .modal__header {
    padding: 1.5rem 3.25rem 1.15rem 1.5rem;
  }

  .modal__header h2 {
    font-size: 1.65rem;
  }

  .modal__intro {
    font-size: 0.95rem;
  }

  .footer__inner {
    width: 80%;
    padding: 15px 0;
    font-size: 14px;
  }

  .footer__aleo img {
    width: 50px;
  }
}

/* Hover only when device supports it */
@media (hover: hover) and (pointer: fine) {
  .product:hover .product__card {
    border-color: rgba(0, 0, 0, 0.55);
    background: #fff;
    transform: translateY(-2px);
  }

  .product:has(input:checked):hover .product__card {
    transform: translateY(-4px) scale(1.04);
  }

  .cta:hover {
    color: var(--black);
    background: var(--white);
  }

  .cta:hover .cta__icon {
    transform: translateX(2px);
  }

  .modal__close:hover {
    background: rgba(255, 255, 255, 0.22);
  }

  .footer__inner a:hover {
    opacity: 0.8;
  }
}

/* —— Page Remerciement —— */
.hero--thanks {
  justify-content: center;
}

.thanks {
  max-width: 36rem;
}

.thanks__icon {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--black);
}

.thanks__text {
  margin-bottom: 1.5rem;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  text-wrap: pretty;
}

.thanks__text p {
  margin: 0 0 0.75rem;
}

.thanks__text p:last-child {
  margin-bottom: 0;
}

a.cta {
  text-decoration: none;
}

@media (min-width: 600px) {
  .thanks__icon {
    width: 5rem;
    height: 5rem;
    margin-bottom: 1.5rem;
  }

  .thanks__text {
    margin-bottom: 1.75rem;
  }
}
