/* ============================================
   demoooo.trws-music.com — shared styles
   Konzept: Papier statt Interface.
   Nichts ist perfekt ausgerichtet. Keine Animation
   ausser dem Haken. Mobile first (380px Referenz).
   ============================================ */

:root {
  --paper:      #EDE8DC;   /* Recyclingpapier, leicht vergilbt */
  --paper-warm: #E3DCCB;   /* Notizzettel, einen Ton dunkler */
  --ink:        #1F1B16;   /* Kugelschreiber-Schwarz, nicht #000 */
  --ink-soft:   #5A5147;   /* verblasst */
  --red:        #C0342B;   /* Stempelrot – nur Akzent */
  --tape:       #D9CFA8;   /* Washi, senfgelb-blass */

  --hand: "Caveat", "Bradley Hand", cursive;
  --type: "Special Elite", "Courier New", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 28px 20px 64px;
  background-color: var(--paper);
  /* Papierfaser: feines Rauschen + Fleckigkeit */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(160,140,100,.10) 0, transparent 42%),
    radial-gradient(circle at 82% 74%, rgba(140,120,90,.09) 0, transparent 46%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--type);
  font-size: 15px;
  line-height: 1.65;
  max-width: 520px;
  margin-inline: auto;
}

/* ---------- 1 · Gruss ---------- */

.greet {
  font-family: var(--hand);
  font-size: clamp(52px, 17vw, 76px);
  line-height: .95;
  margin: 0 0 2px;
  transform: rotate(-2.5deg);
  transform-origin: left center;
}

.greet img { max-width: 88%; height: auto; display: block; }

.greet-sub {
  font-family: var(--hand);
  font-size: 23px;
  line-height: 1.25;
  color: var(--ink-soft);
  margin: 14px 0 30px 6px;
  transform: rotate(-.8deg);
  max-width: 20em;
}

.greet-sub .heart { color: var(--red); }

/* ---------- 2 · Video im Polaroid ---------- */

.hint {
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-soft);
  margin: 0 0 8px 4px;
  text-transform: lowercase;
}

.polaroid {
  position: relative;
  background: #FBF9F4;
  padding: 11px 11px 44px;
  box-shadow: 0 2px 0 rgba(0,0,0,.05), 0 10px 22px -14px rgba(0,0,0,.5);
  transform: rotate(1.4deg);
  margin: 0 0 6px;
}

/* Washi-Tape: zwei Streifen, unterschiedlich schief */
.polaroid::before,
.polaroid::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 27px;
  background: var(--tape);
  opacity: .82;
  /* ausgefranste Kanten */
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 4px);
          mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 4px);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.polaroid::before { top: -13px; left: -16px;  transform: rotate(-27deg); }
.polaroid::after  { top: -11px; right: -18px; transform: rotate(21deg); }

.stage {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #17140F;
  overflow: hidden;
  cursor: pointer;
}

.stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ton-an-Overlay */
.sound {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  padding: 0 0 18px;
  pointer-events: none;
}

.sound span {
  font-family: var(--hand);
  font-size: 26px;
  line-height: 1;
  color: #FBF9F4;
  background: rgba(20,16,12,.62);
  padding: 9px 20px 12px;
  border-radius: 40px 38px 42px 36px / 38px 42px 36px 40px;
  transform: rotate(-1.6deg);
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

.stage.is-audible .sound { display: none; }

.polaroid figcaption {
  position: absolute;
  left: 16px; right: 16px; bottom: 11px;
  font-family: var(--hand);
  font-size: 21px;
  color: var(--ink);
  transform: rotate(-.9deg);
}

/* ---------- 3 · Kontext ---------- */

.note {
  font-family: var(--hand);
  font-size: 24px;
  line-height: 1.35;
  margin: 34px 4px 30px;
  transform: rotate(.5deg);
}

/* ---------- 4 · Tracks ---------- */

.tracks-label {
  font-family: var(--hand);
  font-size: 25px;
  margin: 0 0 12px 2px;
  transform: rotate(-1.2deg);
}

.track {
  background: #FBF9F4;
  padding: 8px;
  margin-bottom: 14px;
  box-shadow: 0 8px 18px -14px rgba(0,0,0,.55);
}
.track:nth-child(odd)  { transform: rotate(-.7deg); }
.track:nth-child(even) { transform: rotate(.6deg); }

.track iframe { display: block; width: 100%; border: 0; }

/* ---------- 5 · Ankreuz-Zettel (Signature) ---------- */

.slip {
  position: relative;
  background: var(--paper-warm);
  padding: 26px 20px 24px;
  margin: 42px 0 36px;
  transform: rotate(-1.1deg);
  box-shadow: 0 10px 22px -16px rgba(0,0,0,.6);
  /* oben abgerissen */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' preserveAspectRatio='none'%3E%3Cpath d='M0 14 L14 6 L30 15 L48 5 L66 16 L84 7 L104 17 L124 6 L146 15 L168 5 L190 16 L212 7 L234 17 L256 6 L278 15 L300 5 L322 16 L344 7 L366 15 L386 6 L400 14 L400 400 L0 400 Z' fill='%23000'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' preserveAspectRatio='none'%3E%3Cpath d='M0 14 L14 6 L30 15 L48 5 L66 16 L84 7 L104 17 L124 6 L146 15 L168 5 L190 16 L212 7 L234 17 L256 6 L278 15 L300 5 L322 16 L344 7 L366 15 L386 6 L400 14 L400 400 L0 400 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}

.slip h2 {
  font-family: var(--hand);
  font-size: 27px;
  font-weight: 400;
  margin: 0 0 16px;
  transform: rotate(.6deg);
}

.opt {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 9px 2px;
  border: 0;
  background: none;
  font-family: var(--type);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.opt:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.box {
  flex: 0 0 auto;
  width: 25px; height: 25px;
  margin-top: 1px;
  position: relative;
}

/* handgezeichneter Kasten */
.box::before {
  content: "";
  position: absolute; inset: 0;
  border: 1.5px solid var(--ink);
  border-radius: 2px 4px 2px 5px / 4px 2px 5px 2px;
  transform: rotate(-2deg);
}

.box svg {
  position: absolute;
  inset: -7px -5px;
  width: 34px; height: 34px;
  overflow: visible;
}

.box svg path {
  fill: none;
  stroke: var(--red);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
}

.opt[aria-pressed="true"] .box svg path {
  animation: draw .34s cubic-bezier(.6,.05,.3,1) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.reply {
  font-family: var(--hand);
  font-size: 24px;
  line-height: 1.3;
  color: var(--red);
  margin: 14px 0 0 8px;
  transform: rotate(-1.4deg);
  display: none;
}
.reply.show { display: block; }

/* ---------- 6 · Footer ---------- */

.sign {
  font-family: var(--hand);
  font-size: 26px;
  margin: 40px 0 0 4px;
  transform: rotate(-1.6deg);
}

.sign a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  padding-bottom: 1px;
}

.tiny {
  font-size: 10.5px;
  letter-spacing: .05em;
  color: var(--ink-soft);
  margin-top: 26px;
  opacity: .75;
}

/* ---------- a11y ---------- */

@media (prefers-reduced-motion: reduce) {
  .opt[aria-pressed="true"] .box svg path { animation: none; stroke-dashoffset: 0; }
}

@media (min-width: 560px) {
  body { padding-top: 46px; font-size: 15.5px; }
}
