/* Piezas que comparten todas las páginas: contenedor, accesibilidad, enlaces, marca, cabecera y pie. */

/* Contenedor */

.container {
  width: min(1220px, calc(100% - 104px));
  margin-inline: auto;
}

@media (max-width: 1100px) {
  .container {
    width: calc(100% - 72px);
  }
}

@media (max-width: 800px) {
  .container {
    width: calc(100% - 40px);
  }
}

@media (max-width: 380px) {
  .container {
    width: calc(100% - 32px);
  }
}

/* Accesibilidad */

.skip-link {
  position: fixed;
  z-index: 100;
  top: -100px;
  left: 16px;
  background: var(--honey);
  padding: 8px 14px;
}

.skip-link:focus {
  top: 12px;
}

.skip-link:not(:focus) {
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Etiquetas y enlaces */

.mini-label {
  font: 14px/1.5 var(--pixel);
  letter-spacing: .08em;
}

.underlined-link {
  display: inline-block;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.underlined-link:hover {
  color: var(--cinnamon);
}

/* Marca: el logo con «Café con Leche STUDIOS». La cabecera y el pie ajustan su tamaño. */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img {
  border-radius: 50%;
  object-fit: cover;
}

.brand > span {
  font: 600 22px/1.05 var(--display);
  letter-spacing: -.06em;
}

.brand small {
  display: block;
  font: 10px var(--body);
  letter-spacing: .42em;
  margin-top: 8px;
}

/* Cabecera: el logo al centro y dos enlaces a cada lado. */

.site-header {
  background: var(--cream);
  border-bottom: 1px solid #3a221825;
}

.site-header > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: space-between;
  align-items: center;
  gap: 58px;
  min-height: 112px;
}

.site-header .brand {
  justify-self: center;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-block: 14px;
  text-align: center;
}

.site-header .brand img {
  width: 58px;
  height: 58px;
}

.site-header .brand > span {
  font-size: 24px;
}

.site-header .brand small {
  letter-spacing: .43em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .015em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-nav-left {
  justify-self: end;
}

.header-nav-right {
  justify-self: start;
}

.header-nav a {
  padding-block: 12px;
  text-underline-offset: 6px;
}

.header-nav a:hover {
  color: var(--cinnamon);
  text-decoration: underline;
}

.site-header .nav-support {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--milk);
  border: 1px solid var(--coffee);
  border-radius: 24px;
  padding: 9px 16px;
  box-shadow: 2px 3px 0 #3a221818;
  transition: background .2s, transform .2s;
}

.site-header .nav-support:hover,
.site-header .nav-support:focus-visible {
  background: var(--honey);
  color: var(--coffee);
  transform: rotate(-2deg);
  text-decoration: none;
}

/* La tacita de «Apóyanos»: echa vapor al pasar el mouse. */

.tiny-cup {
  display: inline-block;
  position: relative;
  width: 19px;
  height: 16px;
  border: 1.6px solid currentColor;
  border-radius: 2px 2px 6px 6px;
  flex: none;
}

.tiny-cup::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-left: 0;
  border-radius: 0 5px 5px 0;
  right: -7px;
  top: 1px;
}

.tiny-cup::before,
.tiny-cup i {
  content: "";
  position: absolute;
  border-left: 1.5px solid currentColor;
  border-radius: 50%;
  height: 7px;
  width: 4px;
  top: -10px;
  left: 4px;
  opacity: 0;
  transition: opacity .2s;
}

.tiny-cup i {
  left: 11px;
  top: -12px;
}

a:hover .tiny-cup::before,
a:hover .tiny-cup i,
a:focus-visible .tiny-cup::before,
a:focus-visible .tiny-cup i {
  opacity: 1;
  animation: cup-steam 1.2s ease-out 2;
}

@keyframes cup-steam {
  from {
    transform: translateY(2px);
  }
  to {
    transform: translateY(-3px);
  }
}

@media (max-width: 1100px) {
  .site-header > .container {
    gap: 28px;
  }

  .header-nav {
    gap: 20px;
    font-size: 12px;
  }

  .site-header .brand > span {
    font-size: 21px;
  }

  .site-header .brand img {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 800px) {
  .site-header > .container {
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 0 12px;
    padding-bottom: 12px;
  }

  .site-header .brand {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-block: 14px 7px;
    gap: 7px;
  }

  .site-header .brand img {
    width: 48px;
    height: 48px;
  }

  .site-header .brand small {
    font-size: 8px;
  }

  .header-nav {
    gap: 10px;
  }

  .header-nav-left {
    grid-column: 1;
    grid-row: 2;
  }

  .header-nav-right {
    grid-column: 2;
    grid-row: 2;
  }

  .header-nav a {
    padding-block: 9px;
  }

  .site-header .nav-support {
    padding: 7px 8px;
    gap: 8px;
  }

  .nav-support .tiny-cup {
    width: 14px;
    height: 13px;
  }

  .nav-support .tiny-cup::after {
    width: 5px;
    height: 6px;
    right: -5px;
  }
}

@media (max-width: 380px) {
  .site-header > .container {
    grid-template-columns: 1fr 1fr;
  }

  .header-nav {
    flex-direction: column;
    justify-self: center;
    gap: 0;
  }

  .site-header .nav-support {
    padding: 7px 10px;
    gap: 9px;
  }
}

/* Pie */

.site-footer {
  padding: 35px 0 18px;
  background: var(--cream);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.35fr 1fr .8fr .8fr;
  gap: 35px;
  align-items: start;
}

.footer-top .brand > span {
  font-size: 18px;
}

.footer-top .brand img {
  width: 44px;
  height: 44px;
}

.footer-top .brand small {
  font-size: 8px;
}

.footer-top > p {
  padding-top: 5px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.footer-top nav {
  display: grid;
  gap: 9px;
  padding-top: 4px;
  font-size: 14px;
  font-weight: 800;
}

.footer-top nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #3a221825;
  font-size: 10px;
  color: var(--ink-soft);
}

.footer-bottom > span:first-child {
  font: 9px var(--pixel);
  letter-spacing: .04em;
}

@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 25px;
  }

  .footer-top > p {
    display: none;
  }

  .footer-top .brand > span {
    font-size: 16px;
  }

  .footer-top .brand img {
    width: 39px;
    height: 39px;
  }
}

@media (max-width: 800px) {
  .site-footer {
    padding: 28px 0 18px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px 23px;
  }

  .footer-top .brand {
    grid-column: 1 / -1;
  }

  .footer-top .brand > span {
    font-size: 18px;
  }

  .footer-top .brand img {
    width: 43px;
    height: 43px;
  }

  .footer-top nav {
    gap: 12px;
  }

  .footer-bottom {
    flex-wrap: wrap;
    gap: 11px;
    font-size: 9px;
  }

  .footer-bottom > span:first-child {
    font-size: 8px;
  }
}

@media (max-width: 380px) {
  .footer-top .brand > span {
    font-size: 17px;
  }
}

/* Boleta: la base que comparten la portada y «Apóyanos»; cada página le da su papel y su tinta. */

.support-receipt {
  color: var(--coffee);
  transform: rotate(4deg);
  box-shadow: 8px 9px 0 #0003;
  text-align: center;
}

.support-receipt p {
  font-size: 9px;
  color: var(--coffee);
  margin-top: 19px;
}

@media (max-width: 1100px) {
  .support-receipt {
    padding-inline: 21px;
  }
}

@media (max-width: 800px) {
  .support-receipt {
    width: min(350px, calc(100% - 28px));
    margin: 0 auto 5px;
    transform: rotate(3deg);
  }
}
