/* ==========================================================================
   Section: footer  →  assets/section-footer.css
   Figma 1352-3579: a #080808 band, 1440×756 at 1440, 60px below the store features.
     top     322 tall (40px padding), a vertical hairline at the centre (x 720):
             left   newsletter, 580 wide, 60px in: Heading/H2 (48px box) → 16 → note (Body/M, #b0b0b0)
                    → 24 → "Product Preference:" (Body/L) → 16 → radios 24px apart → 16 → the
                    580×56 email box (#3b3b3b stroke, 16px / 8px in) with a 40px secondary button
             right  60px in from the centre, 55px down: 80px mark → 24 → "OCHOA" (Averia Serif
                    Libre 96px bold italic, #e9d8ce → white) → 40 → five 24px social icons 24 apart
     middle  40px under the hairline: three 192px menus 72 apart (17px rows, 16 apart) with the
             32×20 payment icons on the photo's bottom line | "FIND STORES ↗" → 12 → 452×257 photo;
             40px down to the next hairline
     bottom  24px under it: copyright | country selector; the band ends 21px lower
   Settings — custom properties on .footer
     --footer-bg #080808   --footer-line #3b3b3b   --footer-muted #b0b0b0
   ========================================================================== */
.footer {
  --footer-bg: var(--color-black);
  --footer-line: var(--color-border-secondary);
  --footer-muted: var(--color-text-disabled);
  --footer-gutter: var(--page-gutter);

  overflow: clip;
  background: var(--footer-bg);
  color: var(--color-text-inverse);
}

/* ------------------------------------------------------------------- top */
.footer__top {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--footer-line);
}

/* the centre hairline runs down through the row's bottom line, as Figma draws it */
.footer__top::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -1px;
  left: 50%;
  width: 1px;
  background: var(--footer-line);
}

.footer__newsletter {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: calc(580px + var(--footer-gutter));
  max-width: 100%;
  padding: 40px 0 40px var(--footer-gutter);
}

.footer__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Heading/H2: EB Garamond 500 40px / 1.2 */
.footer__heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 2.7778vw, 40px);
  font-weight: 500;
  line-height: 1.2;
}

.footer__note {
  color: var(--footer-muted);
  font-size: var(--text-body-m-size);
  line-height: 20px;
}

.footer__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__preference {
  margin: 0;
  padding: 0;
  border: 0;
}

/* Body/L: Inter 500 16px / 1.6 on Figma's 26px box */
.footer__legend {
  margin-bottom: 16px;
  padding: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 26px;
}

.footer__options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.footer__option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--footer-muted);
  font-size: var(--text-body-m-size);
  line-height: 20px;
  cursor: pointer;
  transition: color var(--duration-fast) ease;
}

.footer__option > span {
  width: var(--width-whole-px);
}

.footer__option .icon-radio {
  color: var(--color-icon-secondary);
}

.footer__option .icon-radio-checked,
.footer__option:has(input:checked) .icon-radio {
  display: none;
}

.footer__option:has(input:checked) {
  color: var(--color-text-inverse);
}

.footer__option:has(input:checked) .icon-radio-checked {
  display: block;
}

.footer__option:hover {
  color: var(--color-text-inverse);
}

.footer__option:has(input:focus-visible) .icon {
  outline: 2px solid currentColor;
  outline-offset: 1px;
  border-radius: 50%;
}

/* 580×56 box: 16px in on the left, 8px on the right, the button centred */
.footer__field {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--footer-line);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast) ease;
}

.footer__field:focus-within {
  border-color: var(--color-icon-secondary);
}

.footer__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text-inverse);
  font-size: 16px;
  line-height: 16px;
  outline: none;
}

.footer__input::placeholder {
  color: var(--footer-muted);
  opacity: 1;
}

.footer__submit {
  flex: none;
}

/* ----------------------------------------------------------------- brand */
.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  padding: 55.18px var(--footer-gutter) 40px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* the mark's 92px drawing carries its drop shadow; the layout box is Figma's 80px */
.footer__logo .icon-logo-footer {
  margin: -2px -6px -10px;
}

/* Averia Serif Libre 700 italic 96px / 0.8 (77px box), a left-to-right #e9d8ce → white fill */
.footer__wordmark {
  width: var(--width-whole-px);
  background: linear-gradient(90deg, #e9d8ce 0%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-logo);
  font-size: 96px;
  font-style: italic;
  font-weight: 700;
  line-height: 77px;
  white-space: nowrap;
}

.footer__social.footer__social {
  display: flex;
  gap: 24px;
  padding: 0;
}

.footer__social-link {
  display: block;
  color: var(--color-icon-secondary);
  transition: color var(--duration-fast) ease;
}

/* Figma shows LinkedIn in white: the hover state */
.footer__social-link:hover,
.footer__social-link:focus-visible {
  color: var(--color-text-inverse);
}

/* ---------------------------------------------------------------- middle */
.footer__middle {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding: 40px var(--footer-gutter);
  border-bottom: 1px solid var(--footer-line);
}

.footer__links {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}

.footer__menus {
  display: flex;
  gap: 72px;
}

.footer__menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 192px;
}

/* Figma sets every menu row in a 17px box; the 14px links overflow it the same way */
.footer__menu-title {
  height: 17px;
  color: var(--footer-muted);
  font-size: var(--text-body-s-size);
  font-weight: 500;
  line-height: 1.2;
}

.footer__menu-list.footer__menu-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
}

.footer__menu-list li {
  height: 17px;
  font-size: var(--text-body-m-size);
  line-height: 1.4;
}

.footer__menu-list a {
  transition: color var(--duration-fast) ease;
}

.footer__menu-list a[data-accent] {
  color: var(--color-success);
}

.footer__menu-list a:hover {
  color: var(--footer-muted);
}

.footer__payments.footer__payments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.footer__stores {
  display: flex;
  flex: 0 1 452px;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Body/M(500): Inter 500 14px / 1.2, with an 18px arrow */
.footer__stores-link {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  color: var(--color-text-inverse);
  font-size: var(--text-body-m-size);
  font-weight: 500;
  line-height: 1.2;
}

.footer__stores-link .icon {
  color: var(--color-icon-inverse);
  transition: transform var(--duration-fast) var(--ease-out);
}

.footer__stores-link:hover .icon {
  transform: translate(2px, -2px);
}

.footer__stores-media {
  --grain-opacity: 0.2;

  position: relative;
  display: block;
  aspect-ratio: 452 / 257;
  overflow: hidden;
  background: var(--footer-line);
}

.footer__stores-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focal-x, 50%) var(--focal-y, 50%);
  transform: scale(var(--zoom, 1));
  transform-origin: var(--focal-x, 50%) var(--focal-y, 50%);
}

/* ---------------------------------------------------------------- bottom */
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 24px var(--footer-gutter) 21px;
  color: var(--footer-muted);
  font-size: var(--text-body-m-size);
  line-height: 20px;
}

.footer__localization {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--footer-muted);
  line-height: 20px;
  transition: color var(--duration-fast) ease;
}

.footer__localization > span {
  width: var(--width-whole-px);
}

.footer__localization .icon-chevron-down {
  margin-left: 4px; /* Figma: 8px after the label, 4px after the flag */
  color: var(--color-icon-tertiary);
}

.footer__localization:hover {
  color: var(--color-text-inverse);
}

/* ------------------------------------------------------------- responsive */

/* Below 1200 the three 192px menus leave the photo too little room: it moves under them */
@media (max-width: 1199px) {
  .footer__middle {
    flex-direction: column;
  }

  .footer__stores {
    flex-basis: auto;
    max-width: 452px;
  }
}

/* Tablet: the newsletter over the brand */
@media (max-width: 989px) {
  .footer__top {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__top::before {
    display: none;
  }

  .footer__newsletter {
    width: auto;
    max-width: calc(580px + 2 * var(--footer-gutter));
    padding-right: var(--footer-gutter);
  }

  .footer__brand {
    padding-top: 40px;
    border-top: 1px solid var(--footer-line);
  }
}

/* Phones: menus two to a row, a smaller wordmark */
@media (max-width: 749px) {
  .footer__menus {
    flex-wrap: wrap;
    gap: 40px 24px;
  }

  .footer__menu {
    width: calc(50% - 12px);
  }

  .footer__logo {
    gap: 16px;
  }

  .footer__logo .icon-logo-footer {
    width: 64.4px;
    height: 64.4px;
    margin: -1.4px -4.2px -7px;
  }

  .footer__wordmark {
    font-size: 64px;
    line-height: 52px;
  }

  .footer__field {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer__option,
  .footer__field,
  .footer__social-link,
  .footer__menu-list a,
  .footer__stores-link .icon,
  .footer__localization {
    transition: none;
  }
}
