/* The opening uses the approved hand-lettered painting at its original proportions.
   Each link, price, heading and media control is an independent HTML element. */
:root {
  --book-paper: #fff3df;
  --book-ink: #552e20;
  --book-red: #933421;
  --book-line: #ddc8ab;
}
.storybook {
  background: var(--book-paper) url('assets/frida/papier.webp') repeat;
  background-size: 7rem 7rem;
}
.story-page {
  width: 100%;
  margin-inline: auto;
  color: var(--book-ink);
  background: var(--book-paper);
}
.story-page img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
}
.story-page .paint-line {
  display: block;
  position: relative;
  isolation: isolate;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  border-radius: 0;
  text-decoration: none;
  box-shadow: none;
  line-height: 1;
}
.paint-line > img { position: relative; z-index: 1; }
.paint-line > .ink {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  align-content: center;
  gap: 0 .2em;
  padding-inline: .4rem;
  text-align: center;
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.16;
  overflow: hidden;
}
.song-ribbon {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 742fr) minmax(0, 167fr);
  background: #fbecd4;
}
.ribbon-window { min-width: 0; overflow: hidden; }
.ribbon-track { display: flex; width: 100%; animation: christmas-ribbon 23s linear 2s infinite; }
.ribbon-track img { flex: 0 0 100%; min-width: 0; }
@keyframes christmas-ribbon { to { transform: translateX(-100%); } }
.song-ribbon audio { display: none; }
.song-switch { cursor: pointer; }
.song-switch::after, .painted-control::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 0;
  width: 100%;
  height: max(100%, 44px);
  transform: translateY(-50%);
}
.song-switch.has-status img { visibility: hidden; }
.song-switch.has-status .ink {
  background: #faead3 url('assets/frida/papier.webp') repeat;
  color: #7f2e1b;
  font: 400 clamp(.88rem, 3.2vw, 1.35rem)/1.1 var(--hand);
  text-decoration: underline;
  text-underline-offset: .14em;
}
.story-page .paint-line:focus-visible { z-index: 3; outline: 3px solid #164d56; outline-offset: -3px; }
.story-page .price-choice a:focus-visible { outline-color: #ffedaa; }
.tour-line { display: grid; align-items: start; grid-template-columns: minmax(0, 387fr) minmax(0, 522fr); }
.paint-welcome .tour-line { position: relative; z-index: 1; }
/* On the illustrated page the gold wash follows the printed brushstroke. */
.tour-wash {
  position: absolute; z-index: 2; inset: 10% 2.5% 13% 9.5%;
  pointer-events: none; opacity: 0; background: #edac48; mix-blend-mode: multiply;
  -webkit-mask: var(--brush) center / 100% 100% no-repeat;
  mask: var(--brush) center / 100% 100% no-repeat;
}
.tour-arrow {
  position: absolute; z-index: 2; left: 44%; top: 85%;
  width: 41%; aspect-ratio: 112 / 40;
  background: #a04b2c var(--grain) 36% 55% / 7rem auto;
  background-blend-mode: multiply;
  /* A tapered brush line bending back toward the tour button. */
  clip-path: polygon(3% 12%, 6% 9%, 25% 13%, 28% 17%, 26% 22%, 12% 19%, 22% 39%, 35% 55%, 51% 68%, 64% 72%, 76% 71%, 87% 61%, 98% 39%, 96% 49%, 89% 67%, 78% 79%, 64% 84%, 50% 79%, 34% 65%, 21% 48%, 10% 26%, 14% 54%, 12% 59%, 10% 56%, 4% 26%);
  clip-path: shape(from 3% 13%,
    curve to 6% 9% with 3% 10% / 4% 9%,
    curve to 27% 15% with 12% 8% / 22% 13%,
    curve to 25% 22% with 30% 18% / 28% 23%,
    line to 12% 19%,
    curve to 64% 72% with 24% 47% / 45% 72%,
    curve to 98% 39% with 79% 74% / 91% 61%,
    curve to 65% 83% with 94% 62% / 84% 84%,
    curve to 10% 26% with 44% 85% / 23% 57%,
    line to 14% 52%,
    curve to 10% 55% with 15% 61% / 11% 62%,
    curve to 3% 13% with 7% 43% / 5% 24%, close);
}
@media (prefers-reduced-motion: no-preference) {
  #open-tour.tour-in-view .tour-wash { animation: tour-gold 2.1s ease-in-out .2s 2; }
  #open-tour.tour-in-view .tour-arrow { animation: tour-point 2.1s ease-in-out .2s 2; }
}
@keyframes tour-gold {
  0%, 100% { opacity: 0; }
  40%, 52% { opacity: .75; }
}
@keyframes tour-point {
  0%, 100% { transform: translate(0, 0); }
  46% { transform: translate(-4%, -5%); }
}
.paint-offer {
  position: relative; isolation: isolate; padding: clamp(1.9rem, 6vw, 2.8rem) 1rem;
  color: #fff4dc; text-align: center; background: var(--paper) var(--grain) repeat;
}
.paint-offer::before {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: url('assets/frida/roter-pinselstrich.webp') center / 107% 100% no-repeat;
}
.paint-offer[hidden] { display: none; }
.deal-day {
  font: 400 clamp(1.2rem, 2.15vw, 2rem)/1.15 var(--hand);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em;
}
#black-friday-title {
  margin: .08em 0 .12em; color: inherit;
  font: 700 clamp(1.65rem, 7.4vw, 4rem)/1.1 'Fraunces', Georgia, serif;
}
.deal-claim { font: 400 clamp(1.48rem, 3.1vw, 3rem)/1.08 var(--hand); }
.deal-amount { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem 1.25rem; margin-top: .65rem; }
.current-amount { white-space: nowrap; font: 400 clamp(1.2rem, 1.9vw, 1.75rem)/1.1 var(--hand); }
.current-amount strong { font: 500 clamp(2.15rem, 3.7vw, 3.6rem)/1 'Fraunces', Georgia, serif; }
.former-amount { font: 400 clamp(1rem, 1.45vw, 1.3rem)/1.15 var(--hand); }
.former-amount del { display: block; font-size: 1.35em; }
.price-choice { margin: .65rem 0 .4rem; }
.price-choice a { color: #792b18; font-size: clamp(1.3rem, 1.85vw, 1.75rem); }
.price-choice a::before { background: #fff0d2; }
.price-choice a:hover::before { background: #ffe3ad; }
.deal-access { font: 400 clamp(1rem, 1.5vw, 1.4rem)/1.2 var(--hand); }
html:not(.has-black-friday-offer) .forest-floor {
  mask-image: linear-gradient(to bottom, black 58%, transparent);
}
html:not(.has-black-friday-offer) .paint-lektorat > :first-child img {
  mask-image: linear-gradient(to bottom, transparent, black 29%);
}
html:not(.past-story) .mobile-start { display: none; }

@media (prefers-reduced-motion: reduce) { .ribbon-track { animation: none; } }
@media (hover: hover) {
  .painted-control:hover img, .song-switch:hover img { filter: brightness(1.035); }
}
.story-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 clamp(.75rem, 3vw, 2.1rem);
  padding: .6rem 1rem;
  background: #fcf2e2;
  border-block: 1px solid var(--book-line);
}
.story-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 400 1.16rem/1.22 var(--hand);
  color: var(--book-ink);
  text-decoration: underline;
  text-decoration-color: #c1a38b;
  text-underline-offset: .26em;
}
.tour-screen {
  width: min(94vw, 60rem);
  max-width: 94vw;
  max-height: 90dvh;
  box-sizing: border-box;
  margin: auto;
  padding: clamp(.75rem, 2.2vw, 1.5rem);
  overflow: auto;
  border: 1px solid var(--book-line);
  border-radius: .65rem;
  background: #fff6e8;
  color: var(--book-ink);
  box-shadow: 0 1.2rem 5rem #28180e40;
}
.tour-screen:not([open]) { display: none; }
.tour-screen::backdrop { background: #25170edb; }
.tour-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.tour-heading h2 { margin: 0; color: var(--book-ink); font: 400 clamp(1.4rem, 4vw, 2.3rem)/1.14 var(--hand); }
.tour-heading button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--book-red);
  font: 600 .95rem/1.2 'DM Sans', sans-serif;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.tour-screen video { display: block; width: 100%; height: auto; aspect-ratio: 16/9; max-height: 70dvh; background: #221913; }
html.tour-is-open { overflow: hidden; }

@media (max-width: 19.99rem), (forced-colors: active) {
  .tour-wash, .tour-arrow { display: none; }
  .story-page .paint-line > img, .story-page .paint-line > picture, .paint-welcome .forest-floor, .tour-line > img { display: none; }
  .story-page .paint-line > .ink {
    position: static;
    display: block;
    padding: .45rem 1rem;
    overflow: visible;
    text-align: left;
  }
  .tour-line { display: block; }
  .song-ribbon { display: flex; align-items: center; justify-content: space-between; padding-inline: .35rem; }
  .ribbon-track { display: none; }
  .ribbon-window .readable-only { position: static; width: auto; height: auto; white-space: normal; clip-path: none; }
  .story-page a { min-height: 44px; text-decoration: underline; }
  .painted-control .ink { font-weight: 700; }
}

.story-page picture { display: block; position: relative; z-index: 1; }
.wide-song-scroll { display: none; }
.story-mast { margin: 0; padding: 0; }
.story-nav { background: var(--paper) var(--grain) repeat; }
.story-nav a { text-decoration-color: #ad875f; }
/* The illustrated mobile page opens into a landscape on tablets and larger screens. */
@media (min-width: 52rem) {
  .storybook, .story-page { background: var(--paper) var(--grain) repeat; background-size: 9rem auto; }
  .story-page { max-width: none; }
  .song-ribbon {
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center; height: 2.05rem; background: #f5dfb7;
  }
  .ribbon-track, .song-switch > img { display: none; }
  .ribbon-window { max-width: 100%; }
  .wide-song-scroll {
    --song-step: max(24rem, 27vw);
    display: flex; width: max-content; color: #75432b;
    font: 400 clamp(1rem,1.25vw,1.18rem)/1.2 var(--hand);
    animation: winter-song-wide 17s linear infinite;
  }
  .wide-song-scroll > span {
    display: inline-flex; width: var(--song-step); justify-content: space-around;
    align-items: center; padding-inline: .7rem; gap: .5rem; white-space: nowrap;
  }
  .wide-song-scroll i { font-style: normal; color: #6c502e; }
  .story-page .song-switch { min-width: 6.1rem; margin-inline: .45rem var(--outer); color: var(--red); }
  .story-page .song-switch .ink, .story-page .song-switch.has-status .ink {
    position: static; display: block; padding-inline: .35rem; overflow: visible;
    font: 400 1.2rem/1.55 var(--hand); text-decoration: underline; text-underline-offset: .15em;
    background: transparent;
  }
  .story-mast {
    display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
    padding: .63rem var(--outer) .65rem;
  }
  .story-page .painted-brand { width: clamp(10.5rem, 17vw, 16rem); flex: 0 0 auto; }
  .story-mast .story-nav {
    border: 0; background: none; padding: 0; justify-content: flex-end;
    gap: .15rem clamp(1rem, 2vw, 2.5rem);
  }
  .story-nav a { font-size: clamp(1.02rem, 1.45vw, 1.35rem); }
  .paint-welcome {
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    position: relative; isolation: isolate;
    min-height: clamp(20rem, 29vw, 38rem);
    padding: clamp(1.15rem, 2.5vw, 2.5rem) var(--outer) clamp(2.2rem, 4vw, 4.4rem);
    background: #fdf0dc url('assets/frida/fridas-panorama.webp') center 54% / cover no-repeat;
  }
  .paint-welcome h1 { width: clamp(18rem, 33vw, 34rem); }
  .story-page .painted-brand .ink, .paint-welcome h1 .ink {
    position: absolute; inset: auto; margin: -1px; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0;
  }
  .paint-welcome .tour-line { display: block; margin-top: clamp(.8rem,1.4vw,1.5rem); }
  .tour-wash { inset: 0; }
  .tour-arrow { left: calc(100% + .15rem); top: 46%; width: clamp(4rem, 6.3vw, 6.5rem); }
  .tour-line > img, .tour-line a > img { display: none; }
  .paint-welcome .forest-floor {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
  .story-page #open-tour {
    width: fit-content; min-height: 48px; display: flex; align-items: center; justify-content: center;
    padding: .5em 1.65em; color: #792b18;
    font: 400 clamp(1.32rem, 1.85vw, 1.75rem)/1.18 var(--hand);
  }
  #open-tour::before {
    content: ''; position: absolute; inset: 0; z-index: -1; background: #f2cf89;
    -webkit-mask: var(--brush) center / 100% 100% no-repeat;
    mask: var(--brush) center / 100% 100% no-repeat;
  }
  .story-page #open-tour .ink {
    position: static; display: block; padding: 0; color: inherit; font: inherit; overflow: visible;
  }
  #open-tour:hover .ink { text-decoration: underline; text-underline-offset: .15em; }
  .paint-offer {
    margin-top: clamp(-2.6rem,-2.5vw,-1.1rem);
    display: grid; grid-template-columns: 1.1fr minmax(0,1fr); align-items: center;
    gap: clamp(2rem, 6vw, 8rem); padding: clamp(2.1rem, 3vw, 3.2rem) var(--outer);
    text-align: left; background: transparent;
  }
  .paint-lektorat .paint-line > img { display: none; }
  .paint-lektorat .paint-line > .ink {
    position: static; display: block; padding: 0; text-align: start; font: inherit; overflow: visible;
  }
  #black-friday-title { font-size: clamp(2.65rem, 4.3vw, 4.6rem); }
  .deal-amount { justify-content: flex-start; margin: 0; gap: clamp(1rem, 2.4vw, 3rem); }
  .paint-lektorat {
    position: relative; isolation: isolate;
    display: grid; grid-template-columns: 1.16fr .84fr; align-items: center;
    column-gap: clamp(1.5rem, 3vw, 3.8rem);
    padding: clamp(1.6rem,3.2vw,3.5rem) calc(var(--outer) + 6vw) clamp(1.7rem, 3vw, 3.1rem) var(--outer);
  }
  .paint-lektorat > p:first-child { grid-column: 1; color: var(--red); font: 400 clamp(1.2rem,1.9vw,1.72rem)/1.15 var(--hand); }
  .paint-lektorat #lektorat-title { grid-column: 1; margin-top: .12rem; font: 400 clamp(2.3rem, 4.25vw, 4.2rem)/1.07 var(--hand); letter-spacing: -.025em; }
  .paint-lektorat p:last-child { grid-column: 2; grid-row: 1 / span 2; font: 400 clamp(1.32rem, 2.05vw, 1.92rem)/1.21 var(--hand); }
  .paint-lektorat::before {
    content: ''; position: absolute; inset: auto var(--outer) 0; height: .7rem;
    background: var(--line-art) center / 100% 100% no-repeat;
  }
  .paint-lektorat::after {
    content: ''; z-index: -1; position: absolute; right: .5vw; bottom: .4rem; height: 93%; width: 10vw; pointer-events: none;
    background: url('assets/frida/halme.webp') right bottom / contain no-repeat; opacity: .8;
    -webkit-mask-image: linear-gradient(0deg, transparent, black 18%); mask-image: linear-gradient(0deg, transparent, black 18%);
  }
}
@keyframes winter-song-wide { to { transform: translateX(calc(-1 * var(--song-step))); } }
@media (prefers-reduced-motion: reduce) { .wide-song-scroll { animation: none; } }
@media (forced-colors: active) {
  .wide-song-scroll { display: none; }
  .paint-offer::before, .paint-lektorat::after { display: none; }
  .paint-welcome { background: Canvas; }
  .story-page .paint-line picture { display: none; }
  .story-page .paint-line .ink {
    position: static !important; display: block; width: auto !important; height: auto !important;
    clip-path: none !important; color: CanvasText; white-space: normal !important;
    margin: 0 !important; padding: .25rem !important;
  }
}
