@property --mag-tear-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}

.magazine-teaser {
  position: absolute;
  top: 100px;
  left: 0;
  right: 0;
  z-index: 18;
  width: 100%;
  height: 134px;
}

.magazine-teaser__link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #111;
  color: #fff;
  isolation: isolate;
  -webkit-clip-path: polygon(
    0 10%, 2% 5%, 4% 10%, 6% 4%, 8% 11%, 10% 6%, 12% 10%, 14% 4%,
    16% 11%, 18% 5%, 20% 9%, 22% 4%, 24% 10%, 26% 6%, 28% 11%, 30% 4%,
    32% 9%, 34% 5%, 36% 11%, 38% 4%, 40% 10%, 42% 6%, 44% 11%, 46% 4%,
    48% 9%, 50% 5%, 52% 11%, 54% 4%, 56% 10%, 58% 6%, 60% 11%, 62% 4%,
    64% 9%, 66% 5%, 68% 11%, 70% 4%, 72% 10%, 74% 6%, 76% 11%, 78% 4%,
    80% 9%, 82% 5%, 84% 11%, 86% 4%, 88% 10%, 90% 6%, 92% 11%, 94% 4%,
    96% 9%, 98% 5%, 100% 10%, 100% 91%, 98% 96%, 96% 90%, 94% 95%,
    92% 89%, 90% 96%, 88% 91%, 86% 95%, 84% 89%, 82% 96%, 80% 90%, 78% 95%,
    76% 89%, 74% 96%, 72% 91%, 70% 95%, 68% 89%, 66% 96%, 64% 90%, 62% 95%,
    60% 89%, 58% 96%, 56% 91%, 54% 95%, 52% 89%, 50% 96%, 48% 90%, 46% 95%,
    44% 89%, 42% 96%, 40% 91%, 38% 95%, 36% 89%, 34% 96%, 32% 90%, 30% 95%,
    28% 89%, 26% 96%, 24% 91%, 22% 95%, 20% 89%, 18% 96%, 16% 90%, 14% 95%,
    12% 89%, 10% 96%, 8% 91%, 6% 95%, 4% 89%, 2% 96%, 0 92%
  );
  clip-path: polygon(
    0 10%, 2% 5%, 4% 10%, 6% 4%, 8% 11%, 10% 6%, 12% 10%, 14% 4%,
    16% 11%, 18% 5%, 20% 9%, 22% 4%, 24% 10%, 26% 6%, 28% 11%, 30% 4%,
    32% 9%, 34% 5%, 36% 11%, 38% 4%, 40% 10%, 42% 6%, 44% 11%, 46% 4%,
    48% 9%, 50% 5%, 52% 11%, 54% 4%, 56% 10%, 58% 6%, 60% 11%, 62% 4%,
    64% 9%, 66% 5%, 68% 11%, 70% 4%, 72% 10%, 74% 6%, 76% 11%, 78% 4%,
    80% 9%, 82% 5%, 84% 11%, 86% 4%, 88% 10%, 90% 6%, 92% 11%, 94% 4%,
    96% 9%, 98% 5%, 100% 10%, 100% 91%, 98% 96%, 96% 90%, 94% 95%,
    92% 89%, 90% 96%, 88% 91%, 86% 95%, 84% 89%, 82% 96%, 80% 90%, 78% 95%,
    76% 89%, 74% 96%, 72% 91%, 70% 95%, 68% 89%, 66% 96%, 64% 90%, 62% 95%,
    60% 89%, 58% 96%, 56% 91%, 54% 95%, 52% 89%, 50% 96%, 48% 90%, 46% 95%,
    44% 89%, 42% 96%, 40% 91%, 38% 95%, 36% 89%, 34% 96%, 32% 90%, 30% 95%,
    28% 89%, 26% 96%, 24% 91%, 22% 95%, 20% 89%, 18% 96%, 16% 90%, 14% 95%,
    12% 89%, 10% 96%, 8% 91%, 6% 95%, 4% 89%, 2% 96%, 0 92%
  );
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.38));
}

.magazine-teaser__link:focus-visible {
  outline: 4px solid #fff;
  outline-offset: -8px;
}

.magazine-teaser__link[aria-disabled="true"] {
  cursor: default;
}

.magazine-teaser__reveal {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(112deg, rgba(255, 230, 0, 0.08), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 85px, rgba(255, 255, 255, 0.025) 86px 87px),
    linear-gradient(105deg, #080808 0%, #1d1d1d 54%, #080808 100%);
  box-shadow:
    inset 0 10px 14px -12px rgba(255, 230, 0, 0.95),
    inset 0 -10px 14px -12px rgba(255, 230, 0, 0.95);
}

.magazine-teaser__reveal::before,
.magazine-teaser__reveal::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  width: 100%;
  height: 8px;
  background:
    repeating-linear-gradient(90deg, #ffe600 0 17px, #fff2a2 18px 23px, #d5b900 24px 28px);
  opacity: 0.78;
  filter: blur(0.25px);
}

.magazine-teaser__reveal::before {
  top: 5px;
  transform: rotate(-0.08deg);
}

.magazine-teaser__reveal::after {
  bottom: 5px;
  transform: rotate(0.08deg);
}

.magazine-teaser__reveal-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 126px minmax(260px, 1fr) auto 120px;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
  width: min(1280px, calc(100% - 64px));
  height: 100%;
  margin: 0 auto;
  padding: 8px 0;
}

.magazine-teaser__date {
  display: grid;
  place-items: center;
  min-height: 76px;
  padding: 10px 12px;
  border: 2px solid #111;
  background: #ffe600;
  color: #111;
  font-size: 13px;
  line-height: 1.18;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
  clip-path: polygon(0 0, 94% 0, 100% 10%, 96% 20%, 100% 31%, 96% 43%, 100% 54%, 96% 66%, 100% 78%, 96% 89%, 100% 100%, 0 100%);
}

.magazine-teaser__copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 7px;
  min-width: 0;
}

.magazine-teaser__masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28em;
  font-size: clamp(25px, 2.25vw, 38px);
  line-height: 0.94;
  font-weight: 950;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.magazine-teaser__masthead strong {
  color: #ffe600;
  font-weight: inherit;
}

.magazine-teaser__slogan {
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(13px, 1.12vw, 17px);
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.magazine-teaser__cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid #ffe600;
  border-radius: 999px;
  color: #ffe600;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.magazine-teaser__cta[hidden] {
  display: none !important;
}

.magazine-teaser__arrow {
  font-size: 22px;
  line-height: 0.8;
  transition: transform 0.2s ease;
}

.magazine-teaser__mascot {
  position: relative;
  z-index: 2;
  align-self: end;
  width: 126px;
  max-width: none;
  height: auto;
  margin-bottom: -15px;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.42));
  transition: transform 0.24s ease;
}

.magazine-teaser__link[href]:hover .magazine-teaser__cta,
.magazine-teaser__link:focus-visible .magazine-teaser__cta {
  background: #ffe600;
  color: #111;
  transform: translateY(-2px);
}

.magazine-teaser__link[href]:hover .magazine-teaser__arrow,
.magazine-teaser__link:focus-visible .magazine-teaser__arrow {
  transform: translateX(4px);
}

.magazine-teaser__link[href]:hover .magazine-teaser__mascot,
.magazine-teaser__link:focus-visible .magazine-teaser__mascot {
  transform: translateY(-3px) rotate(-1deg);
}

.magazine-teaser__paper,
.magazine-teaser__tear-line {
  --mag-tear-x: 100%;
  animation: magazine-tear-progress 3.35s 0.62s cubic-bezier(0.54, 0.02, 0.28, 1) forwards;
}

.magazine-teaser__paper {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  overflow: hidden;
  color: #1b1915;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(46, 42, 34, 0.12) 22.2% 22.5%, transparent 22.7% 47%, rgba(46, 42, 34, 0.1) 47.2% 47.5%, transparent 47.7% 72%, rgba(46, 42, 34, 0.1) 72.2% 72.5%, transparent 72.7%),
    repeating-linear-gradient(0deg, rgba(50, 45, 36, 0.055) 0 1px, transparent 1px 5px),
    #eee6d4;
  clip-path: polygon(
    0 0,
    var(--mag-tear-x) 0,
    calc(var(--mag-tear-x) - 1.2%) 7%,
    calc(var(--mag-tear-x) - 0.1%) 14%,
    calc(var(--mag-tear-x) - 0.8%) 21%,
    calc(var(--mag-tear-x) - 1.6%) 29%,
    calc(var(--mag-tear-x) - 0.2%) 37%,
    calc(var(--mag-tear-x) - 1.1%) 45%,
    calc(var(--mag-tear-x) - 0.3%) 53%,
    calc(var(--mag-tear-x) - 1.5%) 61%,
    calc(var(--mag-tear-x) - 0.2%) 69%,
    calc(var(--mag-tear-x) - 1.2%) 77%,
    calc(var(--mag-tear-x) - 0.1%) 85%,
    calc(var(--mag-tear-x) - 1.4%) 93%,
    var(--mag-tear-x) 100%,
    0 100%
  );
  pointer-events: none;
  will-change: clip-path;
}

.magazine-teaser__paper::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background:
    radial-gradient(circle at 14% 30%, rgba(74, 65, 49, 0.28) 0 0.7px, transparent 0.9px),
    radial-gradient(circle at 68% 68%, rgba(74, 65, 49, 0.22) 0 0.7px, transparent 0.9px);
  background-size: 15px 17px, 19px 21px;
}

.magazine-teaser__paper-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 8px;
  width: min(1280px, calc(100% - 96px));
  height: 100%;
  margin: 0 auto;
  padding: 18px 0;
}

.magazine-teaser__paper-kicker {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.magazine-teaser__paper-title {
  max-width: 850px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 2.1vw, 34px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.magazine-teaser__tear-line {
  position: absolute;
  z-index: 6;
  top: 7px;
  bottom: 7px;
  left: var(--mag-tear-x);
  display: block;
  width: 27px;
  background: linear-gradient(90deg, rgba(116, 101, 76, 0.35), #fffaf0 33%, #d3c6ae 69%, rgba(88, 75, 56, 0.2));
  clip-path: polygon(48% 0, 83% 5%, 40% 11%, 74% 18%, 27% 25%, 68% 32%, 33% 39%, 82% 47%, 30% 54%, 70% 62%, 25% 70%, 79% 77%, 38% 84%, 72% 92%, 45% 100%, 0 100%, 0 0);
  filter: drop-shadow(-8px 0 7px rgba(0, 0, 0, 0.36));
  pointer-events: none;
  transform: translateX(-46%);
  will-change: left;
}

.magazine-teaser__tear-line::before {
  content: "";
  position: absolute;
  top: 20%;
  left: -7px;
  width: 38px;
  height: 36px;
  background: linear-gradient(135deg, #fffaf0, #cfc1a7);
  box-shadow: -5px 6px 7px rgba(0, 0, 0, 0.24);
  clip-path: polygon(0 9%, 100% 0, 79% 44%, 100% 100%, 21% 83%);
  transform: rotate(-7deg);
  animation: magazine-paper-curl 0.52s ease-in-out infinite alternate;
}

.magazine-teaser__tear-line::after {
  content: "";
  position: absolute;
  top: 64%;
  left: 3px;
  width: 13px;
  height: 19px;
  background: #e7dcc6;
  clip-path: polygon(15% 0, 100% 16%, 72% 100%, 0 73%);
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.28));
  animation: magazine-paper-fragment 1.1s 1.35s ease-in both;
}

.magazine-teaser.is-open .magazine-teaser__paper,
.magazine-teaser.is-open .magazine-teaser__tear-line {
  --mag-tear-x: 0%;
  opacity: 0;
  animation: none;
}

@keyframes magazine-tear-progress {
  0% { --mag-tear-x: 100%; opacity: 1; }
  11% { --mag-tear-x: 92%; opacity: 1; }
  19% { --mag-tear-x: 89%; opacity: 1; }
  33% { --mag-tear-x: 72%; opacity: 1; }
  41% { --mag-tear-x: 69%; opacity: 1; }
  55% { --mag-tear-x: 50%; opacity: 1; }
  63% { --mag-tear-x: 47%; opacity: 1; }
  76% { --mag-tear-x: 29%; opacity: 1; }
  84% { --mag-tear-x: 25%; opacity: 1; }
  96% { --mag-tear-x: 4%; opacity: 1; }
  100% { --mag-tear-x: 0%; opacity: 0; }
}

@keyframes magazine-paper-curl {
  from { transform: rotate(-10deg) translateX(-2px); }
  to { transform: rotate(-3deg) translateX(2px); }
}

@keyframes magazine-paper-fragment {
  0% { opacity: 0; transform: translate(0, -7px) rotate(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-22px, 56px) rotate(-74deg); }
}

@media (max-width: 1180px) {
  .magazine-teaser { top: 98px; }
  .magazine-teaser__reveal-inner {
    grid-template-columns: 108px minmax(230px, 1fr) auto 106px;
    gap: 16px;
    width: calc(100% - 44px);
  }
  .magazine-teaser__paper-inner { width: calc(100% - 64px); }
  .magazine-teaser__mascot { width: 112px; }
}

@media (max-width: 900px) {
  .magazine-teaser {
    top: 98px;
    height: 120px;
  }
  .magazine-teaser__reveal-inner {
    grid-template-columns: 96px minmax(190px, 1fr) auto 88px;
    gap: 12px;
    width: calc(100% - 32px);
  }
  .magazine-teaser__date { min-height: 68px; font-size: 11px; }
  .magazine-teaser__cta { min-height: 42px; padding: 9px 13px; }
  .magazine-teaser__cta-label { display: none; }
  .magazine-teaser__mascot { width: 96px; }
}

@media (max-width: 640px) {
  .magazine-teaser {
    top: 86px;
    width: 100%;
    height: 108px;
  }
  .magazine-teaser__reveal-inner {
    grid-template-columns: 72px minmax(0, 1fr) 30px;
    gap: 8px;
    width: calc(100% - 16px);
    padding: 7px 0;
  }
  .magazine-teaser__date {
    min-height: 62px;
    padding: 8px 7px;
    font-size: 10px;
    letter-spacing: 0.055em;
  }
  .magazine-teaser__copy { gap: 4px; }
  .magazine-teaser__masthead {
    gap: 0.22em;
    font-size: clamp(16px, 4.8vw, 20px);
    line-height: 0.98;
  }
  .magazine-teaser__slogan {
    font-size: 11px;
    line-height: 1.15;
  }
  .magazine-teaser__cta {
    min-height: 34px;
    padding: 0;
    border: 0;
  }
  .magazine-teaser__arrow { font-size: 24px; }
  .magazine-teaser__mascot { display: none; }
  .magazine-teaser__paper,
  .magazine-teaser__tear-line {
    animation-duration: 2.85s;
  }
  .magazine-teaser__paper-inner {
    width: calc(100% - 38px);
    padding: 15px 0;
  }
  .magazine-teaser__paper-kicker { font-size: 9px; }
  .magazine-teaser__paper-title { font-size: 20px; }
}

@media (max-width: 360px) {
  .magazine-teaser__date {
    padding-inline: 5px;
    font-size: 9px;
  }
  .magazine-teaser__slogan { font-size: 10px; }
  .magazine-teaser__masthead { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .magazine-teaser__paper,
  .magazine-teaser__tear-line {
    --mag-tear-x: 0%;
    opacity: 0;
    animation: none;
  }
  .magazine-teaser__cta,
  .magazine-teaser__arrow,
  .magazine-teaser__mascot {
    animation: none;
    transition: none;
  }
}
