/**
 * Retro Footer — Base Styles (structure only)
 *
 * "The Receipt": a torn-edge paper receipt, centered, dropped on the store
 * floor at a slight angle with a strip of tape at the top. Inside, the store
 * header sits over a stack of printed line-items (the sections), a stamped
 * socials row, and a barcode + credit at the bottom.
 *
 * Structure:
 *   .retro-footer            – section, the store floor
 *   .retro-footer__receipt   – the tilted receipt wrapper (carries shadow/tape)
 *     .retro-footer__edge    – torn paper edges (top + bottom)
 *     .retro-footer__paper   – the printed surface (padding lives here)
 *
 * All color, texture, torn-edge shape and shadow treatment live in styles/*.css.
 */

.retro-footer {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.retro-footer__inner {
  max-width: 120rem;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* ========================================================================
   THE RECEIPT
   ======================================================================== */

.retro-footer__receipt {
  position: relative;
  width: 100%;
  max-width: 30rem;
  transform: rotate(-0.9deg);   /* dropped, not placed */
}

/* a strip of tape pinning the receipt to the floor */
.retro-footer__tape {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  width: 6.5rem;
  height: 1.7rem;
  transform: translateX(-50%) rotate(2.5deg);
  z-index: 3;
  pointer-events: none;
}

/* torn paper edges — shape + color in the variant */
.retro-footer__edge {
  position: relative;
  z-index: 1;
  height: 0.7rem;
}

/* the printed surface */
.retro-footer__paper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem clamp(1.5rem, 4vw, 2.5rem);
}

/* ---------------------------------------------------------------- HEADER */

.retro-footer__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.retro-footer__store {
  text-decoration: none;
  color: inherit;
}

.retro-footer__store-name {
  display: block;
  font-family: var(--header);
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 0.95;
  word-break: break-word;
}

.retro-footer__slogan {
  margin: 0;
  font-family: var(--body);
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 22rem;
}

/* register meta line (monospace, like printed register text) */
.retro-footer__meta {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-family: var(--r-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

/* dashed divider, like a perforation line */
.retro-footer__rule {
  height: 0;
  border-top: 1px dashed;
}

/* ----------------------------------------------------------- LINE-ITEMS */

.retro-footer__items {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.retro-footer__item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.34rem 0.3rem;
  text-decoration: none;
  color: inherit;
  z-index: 0;
}

.retro-footer__item-name {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* dotted leader filling the gap between name and tag */
.retro-footer__leader {
  flex: 1 1 auto;
  align-self: flex-end;
  height: 0;
  margin-bottom: 0.28em;
  border-bottom: 2px dotted;
  opacity: 0.45;
}

.retro-footer__item-tag {
  flex: none;
  font-family: var(--r-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.18rem 0.42rem;
  border: 1.5px solid;
  border-radius: 2px;
  white-space: nowrap;
}

/* ------------------------------------------------------------- SOCIALS */

.retro-footer__socials-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.retro-footer__label {
  margin: 0;
  font-family: var(--body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.retro-footer__socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.retro-footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0.42rem;
  border-radius: 3px;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.2s ease, color 0.2s ease;
}

.retro-footer__social svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------------------------------------------------------- RECEIPT FOOT */

.retro-footer__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.retro-footer__barcode {
  width: 70%;
  max-width: 14rem;
  height: 2.6rem;
}

.retro-footer__credit {
  font-family: var(--r-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.retro-footer__credit:hover {
  opacity: 0.62;
}

.retro-footer__thanks {
  margin: 0;
  font-family: var(--header);
  font-size: 1.15rem;
  line-height: 1;
}

/* ---------------------------------------------------------- FOCUS STATES */

.retro-footer__item:focus-visible,
.retro-footer__social:focus-visible,
.retro-footer__store:focus-visible,
.retro-footer__credit:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media screen and (max-width: 479px) {
  .retro-footer__receipt {
    transform: rotate(0deg);   /* keep edges flush with the narrow viewport */
    max-width: 22rem;
  }
}

/* ========================================================================
   REDUCED MOTION
   ======================================================================== */

@media (prefers-reduced-motion: reduce) {
  .retro-footer__social {
    transition: background-color 0.2s ease, color 0.2s ease;
  }
}
