:root {
  --black: #080706;
  --paper: #f4ead5;
  --muted: #b9aea0;
  --yellow: #f7b900;
  --red: #d71914;
  --panel: rgba(20, 17, 14, 0.78);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: "Inter", Arial, sans-serif;
}

a {
  color: inherit;
}

.farewell {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 7, 6, 0.62), rgba(8, 7, 6, 0.86)),
    url("../img/slide/fondohumo.png") center / cover no-repeat,
    var(--black);
}

.farewell::before,
.farewell::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.farewell::before {
  inset: 0;
  opacity: 0.24;
  background-image:
    repeating-linear-gradient(8deg, transparent 0 45px, rgba(255,255,255,.028) 46px, transparent 48px),
    radial-gradient(circle at 20% 30%, rgba(215, 25, 20, 0.12), transparent 31%);
  mix-blend-mode: screen;
}

.farewell::after {
  width: 54vw;
  height: 160%;
  right: -18vw;
  top: -30%;
  transform: rotate(13deg);
  border-left: 2px solid rgba(247, 185, 0, 0.22);
  background: linear-gradient(90deg, rgba(215, 25, 20, 0.08), transparent 52%);
}

.farewell__smoke {
  position: absolute;
  z-index: -1;
  inset: auto -20% -28% 18%;
  height: 72%;
  opacity: 0.3;
  filter: blur(30px);
  background: radial-gradient(ellipse, rgba(170, 157, 139, 0.28), transparent 66%);
  animation: breathe 10s ease-in-out infinite alternate;
}

.farewell__glow {
  position: absolute;
  z-index: -1;
  width: 42rem;
  height: 42rem;
  right: -14rem;
  bottom: -27rem;
  border-radius: 50%;
  background: rgba(215, 25, 20, 0.32);
  filter: blur(90px);
}

.topbar,
.hero,
.footer {
  width: min(100% - 48px, 1440px);
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  border-bottom: 1px solid rgba(244, 234, 213, 0.16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 42px;
  aspect-ratio: 1;
  place-items: center;
  transform: rotate(-3deg);
  background: var(--yellow);
  color: #111;
  font: 900 1.15rem/1 "Barlow Condensed", Impact, sans-serif;
  box-shadow: 5px 5px 0 var(--red);
}

.brand__name {
  font: 900 1.38rem/1 "Barlow Condensed", Impact, sans-serif;
  letter-spacing: 0.1em;
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.topbar__status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 14px rgba(215, 25, 20, 0.9);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: center;
  min-height: calc(100svh - 166px);
  padding: clamp(56px, 8vh, 104px) 0 74px;
}

.hero__copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--yellow);
  font: 800 0.82rem/1 "Barlow Condensed", Impact, sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 48px;
  height: 5px;
  content: "";
  transform: skewX(-22deg);
  background: var(--red);
  box-shadow: 12px 0 0 rgba(215, 25, 20, 0.45);
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  transform: rotate(-1deg);
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(4.6rem, 8.8vw, 9rem);
  font-weight: 900;
  line-height: 0.76;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.hero h1 span,
.hero h1 strong {
  display: block;
}

.hero h1 span {
  color: var(--paper);
  text-shadow: 7px 7px 0 rgba(0, 0, 0, 0.88);
}

.hero h1 strong {
  position: relative;
  z-index: 0;
  width: max-content;
  max-width: 100%;
  margin-top: 0.16em;
  color: var(--yellow);
  font-style: italic;
  text-shadow: 7px 7px 0 #130e07;
}

.hero h1 strong::after {
  position: absolute;
  z-index: -1;
  left: -3%;
  bottom: -0.02em;
  width: 106%;
  height: 0.18em;
  content: "";
  transform: skewX(-16deg) rotate(-1deg);
  background: var(--red);
}

.hero__lead {
  max-width: 680px;
  margin: clamp(42px, 6vh, 64px) 0 0;
  font-size: clamp(1.08rem, 1.45vw, 1.3rem);
  line-height: 1.58;
}

.hero__lead strong {
  color: var(--yellow);
}

.hero__thanks {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.signature {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 28px;
  color: var(--paper);
  font: italic 700 1.25rem/1 "Barlow Condensed", Impact, sans-serif;
  letter-spacing: 0.04em;
}

.signature__line {
  width: 48px;
  height: 3px;
  transform: rotate(-4deg);
  background: var(--yellow);
  box-shadow: 8px 5px 0 var(--red);
}

.hero__next {
  position: relative;
  z-index: 1;
}

.next-card {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  padding: clamp(210px, 22vw, 285px) clamp(28px, 4vw, 55px) 44px;
  transform: rotate(1.2deg);
  border: 1px solid rgba(244, 234, 213, 0.2);
  background:
    linear-gradient(155deg, rgba(32, 27, 22, 0.9), rgba(13, 11, 9, 0.96)),
    var(--panel);
  box-shadow: 24px 24px 0 rgba(0, 0, 0, 0.22);
}

.next-card::before {
  position: absolute;
  z-index: 1;
  top: 42%;
  right: -4%;
  left: -4%;
  height: 44px;
  content: "";
  transform: rotate(-5deg) skewX(-10deg);
  background: var(--red);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.34);
}

.next-card::after {
  position: absolute;
  top: 20px;
  right: 20px;
  bottom: 20px;
  left: 20px;
  content: "";
  border: 1px solid rgba(247, 185, 0, 0.16);
  pointer-events: none;
}

.next-card__number {
  position: absolute;
  z-index: 0;
  top: -28px;
  right: 20px;
  color: rgba(244, 234, 213, 0.035);
  font: 900 13rem/1 "Barlow Condensed", Impact, sans-serif;
}

.next-card__dog {
  position: absolute;
  z-index: 2;
  top: -54px;
  left: 50%;
  width: min(87%, 430px);
  height: 340px;
  overflow: hidden;
  transform: translateX(-50%);
  filter: saturate(0.75) contrast(1.08) drop-shadow(0 15px 20px rgba(0,0,0,.6));
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(#000 0 76%, transparent 100%);
  mask-image: linear-gradient(#000 0 76%, transparent 100%);
}

.next-card__dog img {
  display: block;
  width: 100%;
  height: auto;
}

.next-card__content {
  position: relative;
  z-index: 3;
}

.next-card__kicker {
  margin: 0 0 12px;
  color: var(--yellow);
  font: 800 0.76rem/1 "Barlow Condensed", Impact, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.next-card h2 {
  margin: 0;
  font: 900 clamp(3rem, 4.6vw, 4.9rem)/0.82 "Barlow Condensed", Impact, sans-serif;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.next-card h2 em {
  color: var(--yellow);
  font-style: italic;
}

.next-card__content > p:not(.next-card__kicker) {
  max-width: 450px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.72;
}

.trail-link {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
  border-bottom: 2px solid var(--red);
  padding: 0 0 8px;
  color: var(--paper);
  font: 800 0.88rem/1 "Barlow Condensed", Impact, sans-serif;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease;
}

.trail-link:hover,
.trail-link:focus-visible {
  border-color: var(--yellow);
  color: var(--yellow);
}

.trail-link:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 6px;
}

.trail-link__arrow {
  font-family: Arial, sans-serif;
  font-size: 1rem;
}

.footer {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 0 24px;
  color: rgba(244, 234, 213, 0.5);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer__soon {
  color: var(--yellow);
}

.embers span {
  position: absolute;
  z-index: 3;
  bottom: -24px;
  width: 4px;
  height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px 2px rgba(215, 25, 20, 0.7);
  animation: ember-rise 8s linear infinite;
  pointer-events: none;
}

.embers span:nth-child(1) { left: 5%; animation-delay: -1s; animation-duration: 7s; }
.embers span:nth-child(2) { left: 14%; animation-delay: -5s; animation-duration: 10s; }
.embers span:nth-child(3) { left: 28%; animation-delay: -2s; animation-duration: 9s; }
.embers span:nth-child(4) { left: 43%; animation-delay: -6s; animation-duration: 8s; }
.embers span:nth-child(5) { left: 56%; animation-delay: -4s; animation-duration: 11s; }
.embers span:nth-child(6) { left: 69%; animation-delay: -7s; animation-duration: 8s; }
.embers span:nth-child(7) { left: 77%; animation-delay: -3s; animation-duration: 10s; }
.embers span:nth-child(8) { left: 84%; animation-delay: -8s; animation-duration: 9s; }
.embers span:nth-child(9) { left: 91%; animation-delay: -2s; animation-duration: 7s; }
.embers span:nth-child(10) { left: 97%; animation-delay: -6s; animation-duration: 12s; }

@keyframes ember-rise {
  0% { transform: translate3d(0, 0, 0) rotate(20deg) scale(0.5); opacity: 0; }
  10% { opacity: 0.85; }
  70% { opacity: 0.55; }
  100% { transform: translate3d(50px, -105vh, 0) rotate(260deg) scale(0.1); opacity: 0; }
}

@keyframes breathe {
  from { transform: translate3d(-2%, 2%, 0) scale(0.96); opacity: 0.2; }
  to { transform: translate3d(2%, -2%, 0) scale(1.06); opacity: 0.42; }
}

@media (max-width: 980px) {
  .farewell {
    overflow: visible;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 64px;
    min-height: auto;
    padding-bottom: 124px;
  }

  .hero__copy {
    padding-top: 20px;
  }

  .hero h1 {
    font-size: clamp(4.6rem, 14vw, 8.5rem);
  }

  .next-card {
    max-width: 650px;
    min-height: 560px;
    margin-left: auto;
    padding-top: 300px;
  }

  .next-card__dog {
    width: min(77%, 440px);
  }
}

@media (max-width: 620px) {
  .topbar,
  .hero,
  .footer {
    width: min(100% - 32px, 1440px);
  }

  .topbar {
    min-height: 78px;
  }

  .brand__mark {
    width: 36px;
  }

  .brand__name {
    font-size: 1.12rem;
  }

  .topbar__status {
    font-size: 0;
  }

  .topbar__status i {
    width: 8px;
    height: 8px;
  }

  .hero {
    gap: 50px;
    padding-top: 54px;
  }

  .hero h1 {
    font-size: clamp(3.9rem, 18vw, 6rem);
  }

  .hero__lead {
    margin-top: 38px;
  }

  .next-card {
    min-height: 530px;
    padding: 265px 28px 36px;
  }

  .next-card::before {
    top: 38%;
  }

  .next-card__dog {
    top: -23px;
    width: min(92%, 390px);
    height: 310px;
  }

  .next-card h2 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .footer {
    position: absolute;
    align-items: flex-end;
    gap: 16px;
    padding-bottom: 20px;
  }

  .footer span {
    max-width: 48%;
  }

  .footer__soon {
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
