/* Paperlikes · The Desk — shared base */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/caveat-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("../fonts/caveat-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Roboto Condensed"; src: url("../fonts/roboto-condensed-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("../fonts/roboto-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* desk */
  --desk: #5b665e;
  --desk-lo: #434d46;
  --desk-hi: #6f7a71;
  /* sudoku */
  --sd-paper: #f3f1ec;
  --sd-paper-2: #ecebf0;
  --sd-lav: #7b7fdb;
  --sd-lav-2: #8a8ee6;
  --sd-lav-wash: #c9cbf3;
  --sd-ink: #2b5ea8;
  --sd-cand: #3a9ad9;
  --sd-navy: #1e2140;
  /* crossword */
  --cw-cyan: #219ebc;
  --cw-yellow: #ffb703;
  --cw-orange: #fb8500;
  --cw-navy: #023047;
  --cw-sky: #8ecae6;
  --cw-paper: #fff5d9;
  --cw-shadow: #7b7b7b;
  --cw-ink: #1b1f5e;
  --cw-ok: #c9f7c9;
  /* brand */
  --dymo: #b8392c;

  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .42 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .3  0 0 0 0 .27  0 0 0 0 .22  0 0 0 .13 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --mottle: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><filter id='m' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='.01 .015' numOctaves='4' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .13 -.03'/></filter><rect width='100%' height='100%' filter='url(%23m)'/></svg>");
  --fibre: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='f' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='.04 .9' numOctaves='2' seed='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .25  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
/* clip an html und body: Nur so lässt sich mobil nichts seitlich wegschieben,
   auch nicht das am Rand hervorlugende Heft oder Magazin (position: fixed) */
html, body { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cw-orange); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- the desk surface (linoleum, top-down, lamp from top-left) ---------------- */
.desk {
  background-color: var(--desk);
  background-image:
    radial-gradient(120% 80% at 18% -10%, rgba(255, 244, 214, .20), rgba(255, 244, 214, 0) 60%),
    radial-gradient(140% 120% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .28) 100%),
    var(--mottle),
    var(--noise);
  background-size: 100% 100vh, 100% 100%, 600px 600px, 220px 220px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-attachment: fixed, scroll, scroll, scroll;
  color: #f1efe8;
  font-family: "Inter", system-ui, sans-serif;
}
/* Touch-Geräte: fester Hintergrund zwingt den Browser, die Fläche bei jedem Scroll-Bild neu zu rastern */
@media (hover: none) {
  .desk { background-attachment: scroll; }
}

/* ---------------- Dymo label: the brand, embossed on tape ---------------- */
.dymo {
  --tilt: -2.5deg;
  display: inline-flex; align-items: center; gap: .55em;
  padding: .42em .9em .38em;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 40%, rgba(0,0,0,.12)),
    var(--noise),
    var(--dymo);
  background-size: auto, 120px 120px, auto;
  color: #fff6ef;
  font: 700 clamp(15px, 1.25vw, 19px)/1 "Roboto Condensed", sans-serif;
  letter-spacing: .26em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 -1px 0 rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.35);
  clip-path: polygon(0 6%, 1.5% 0, 98.5% 2%, 100% 10%, 99.4% 92%, 98% 100%, 1.2% 97%, .3% 88%);
  box-shadow: 0 2px 0 rgba(0,0,0,.25);
  transform: rotate(var(--tilt));
  filter: drop-shadow(1px 2px 1.5px rgba(0,0,0,.35));
  transition: transform .35s var(--ease-spring), filter .35s;
  position: relative;
  white-space: nowrap;
}
.dymo::before, .dymo::after { /* the punched dots at both ends */
  content: ""; width: .32em; height: .32em; border-radius: 50%;
  background: rgba(0,0,0,.22); box-shadow: inset 0 1px 0 rgba(0,0,0,.3), 0 1px 0 rgba(255,255,255,.25);
}
a.dymo:hover { transform: rotate(calc(var(--tilt) + 1.5deg)) translateY(-2px); filter: drop-shadow(2px 6px 4px rgba(0,0,0,.35)); }
.dymo--small { font-size: clamp(13px, 1.05vw, 16px); letter-spacing: .2em; --tilt: 1.5deg; background-color: #1d1f22; }

/* ---------------- PRO badge (Sudoku Paperlike Pro features) ---------------- */
.pro-badge { display: inline-block; margin-left: 4px; padding: 3px 7px 2px; border-radius: 6px; background: var(--sd-lav); color: #fff; font: 700 11px/1.2 "Inter", sans-serif; font-style: normal; letter-spacing: .08em; vertical-align: 2px; white-space: nowrap; }

/* ---------------- handwritten notes & arrows ---------------- */
.note {
  font-family: "Caveat", cursive; font-weight: 700;
  color: var(--sd-ink);
  line-height: 1.05;
}
.scribble path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.draw-on path { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); transition: stroke-dashoffset 1.1s var(--ease-out) var(--d, 0s); }
.in .draw-on path, .draw-on.in path { stroke-dashoffset: 0; }

/* ---------------- store buttons (own design, not official badges) ---------------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: .7em;
  min-height: 52px; padding: .55em 1.15em .55em .9em;
  text-decoration: none; line-height: 1.1;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s;
}
.store small { display: block; font-size: .72em; opacity: .75; letter-spacing: .04em; }
.store b { display: block; font-size: 1.06em; }
.store svg { width: 22px; height: 22px; flex: none; }
/* ink variant (sudoku): soft, paper-ish */
.store--ink { background: var(--sd-navy); color: #f7f6ff; border-radius: 12px; font-family: "Inter", sans-serif; font-weight: 500; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 14px -6px rgba(30,33,64,.55); }
.store--ink:hover { transform: translateY(-2px); background: #2a2e57; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 22px -8px rgba(30,33,64,.6); }
/* block variant (crossword): hard and loud */
.store--block { background: #000; color: #fff; border: 3px solid #000; font-family: "Roboto Condensed", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; box-shadow: 6px 6px 0 var(--cw-shadow); }
.store--block small { color: var(--cw-yellow); opacity: 1; }
.store--block:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--cw-shadow); }
.store--block:active { transform: translate(5px, 5px); box-shadow: 1px 1px 0 var(--cw-shadow); }
.store--block.store--light { background: #fff; color: #000; }
.store--block.store--light small { color: var(--cw-orange); }
/* App Store without a link yet: same look, not clickable */
.store--soon { pointer-events: none; cursor: default; }

/* ---------------- top of the subpages: brand label left, language switch right ---------------- */
.desk-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.lang-switch { --tilt: 2deg; }

/* Häuschen-Band: lugt oben links vom Rand herein, sobald das Label oben weggescrollt ist */
.home-tab {
  --tilt: -5deg;
  position: fixed; z-index: 30; top: 16px; left: -34px;
  padding: .55em .85em .5em 1.7em;
  font-size: 16px;
  transform: translateX(-130%) rotate(var(--tilt));
  pointer-events: none;
}
.home-tab svg { width: 1.45em; height: 1.45em; fill: none; stroke: #fff6ef; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 -1px 0 rgba(0,0,0,.35)); }
.show-home .home-tab, .home-tab:focus-visible { transform: rotate(var(--tilt)); pointer-events: auto; }
.show-home a.home-tab:hover { transform: translateX(8px) rotate(-2deg); }
@media (max-width: 820px) {
  /* schmaler, damit es nur im Heftrand liegt und keinen Text verdeckt */
  .home-tab { top: 12px; left: -38px; padding-right: .55em; font-size: 14px; }
  .home-tab::after { display: none; }
}

/* ---------------- receipt footer ---------------- */
/* the footer is a corner of the desk: app cards, the receipt, a sticky note, a pencil */
.desk-foot {
  position: relative; max-width: 1180px; margin: 0 auto; padding: 80px 24px 100px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 56px;
}
.receipt-wrap { position: relative; display: flex; justify-content: center; }
.df-apps { display: flex; flex-direction: column; align-items: flex-end; gap: 26px; }
.df-app {
  display: flex; align-items: center; gap: 14px; width: 270px; padding: 14px 18px 14px 14px;
  text-decoration: none; transition: transform .45s var(--ease-spring), box-shadow .3s;
}
.df-app img { width: 56px; height: 56px; flex: none; }
.df-app b { display: block; }
.df-app small { display: block; margin-top: 3px; }
.df-app--sd {
  transform: rotate(-4deg); color: var(--sd-navy); border-radius: 8px;
  background: var(--grain) 0 0 / 160px 160px, linear-gradient(170deg, #f8f6f2, #eeecf2);
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 16px 26px -14px rgba(0,0,0,.55);
}
.df-app--sd img { border-radius: 12px; box-shadow: 0 3px 8px rgba(30,33,64,.25); }
.df-app--sd b { font: 600 21px/1.05 "Fraunces", serif; letter-spacing: -.01em; }
.df-app--sd small { font: 700 20px/1 "Caveat", cursive; color: var(--sd-ink); }
.df-app--cw {
  transform: rotate(3deg) translateX(-34px); color: #000;
  background: linear-gradient(rgba(0,0,0,.07) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(0,0,0,.07) 1px, transparent 1px) 0 0 / 22px 22px, var(--cw-yellow);
  border: 3px solid #000; box-shadow: 8px 8px 0 rgba(10,16,14,.45);
}
.df-app--cw img { border: 2.5px solid #000; box-shadow: 3px 3px 0 #000; }
.df-app--cw b { font: 800 20px/1 "Roboto Condensed", sans-serif; text-transform: uppercase; }
.df-app--cw small { font: 700 13px/1 "Roboto Condensed", sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.df-app--sd:hover { transform: rotate(-1deg) translateY(-4px); }
.df-app--cw:hover { transform: rotate(1deg) translate(-36px, -3px); box-shadow: 11px 11px 0 rgba(10,16,14,.4); }
.df-side { justify-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 34px; }
.df-note {
  width: 250px; padding: 24px 22px 22px; transform: rotate(2.5deg);
  background: #e3e2f6 var(--grain); background-size: 160px; background-blend-mode: multiply;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 18px 26px -14px rgba(0,0,0,.45);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 9% 100%, 0 92%);
}
.df-note p { margin: 0 0 12px; font-size: 24px; color: #2a2f6a; }
.df-note__go { display: inline-block; font-size: 25px; color: var(--sd-ink); text-decoration: none; border-bottom: 2px solid currentColor; transition: transform .3s var(--ease-spring); }
.df-note__go:hover { transform: translateX(5px) rotate(-2deg); }
/* Venn-Post-it: Aquarell-Lavendel (Sudoku) und Riso-Gelb (Crossword) mischen sich */
.df-venn {
  position: relative; width: min(280px, 100%); margin: 0 0 0 18px; transform: rotate(-3deg);
  background: #f8f6ef var(--grain); background-size: 160px; background-blend-mode: multiply;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 18px 26px -14px rgba(0,0,0,.45);
  transition: transform .45s var(--ease-spring);
}
.df-venn:hover { transform: rotate(-1deg) translateY(-3px); }
.df-venn svg { display: block; width: 100%; height: auto; overflow: visible; isolation: isolate; }
.v-c--sd { fill: var(--sd-lav-2); stroke: var(--sd-lav); stroke-width: 3; stroke-opacity: .7; }
.v-c--cw { fill: var(--cw-yellow); mix-blend-mode: multiply; }
.v-sd { font: 600 17px "Fraunces", serif; fill: var(--sd-navy); letter-spacing: -.01em; }
.v-cw { font: 800 13.5px "Roboto Condensed", sans-serif; fill: #000; text-transform: uppercase; letter-spacing: .04em; }
.v-mid { font: 700 21px "Caveat", cursive; fill: #fff; }
.v-fig { font: 700 15px "Caveat", cursive; fill: var(--sd-ink); }
.df-venn__tape {
  position: absolute; top: -13px; left: 50%; width: 96px; height: 26px; margin-left: -48px; transform: rotate(4deg);
  background: repeating-linear-gradient(90deg, rgba(255,183,3,.5) 0 5px, rgba(255,183,3,.32) 5px 10px);
  clip-path: polygon(3% 0, 97% 4%, 100% 30%, 96% 60%, 100% 100%, 2% 96%, 0 65%, 4% 35%);
}
.df-pencil { width: 270px; margin: 8px 10px 0 0; transform: rotate(-6deg); filter: drop-shadow(3px 6px 4px rgba(0,0,0,.35)); pointer-events: none; }
@media (max-width: 980px) {
  .desk-foot { grid-template-columns: 1fr; justify-items: center; gap: 44px; padding: 60px 16px 90px; }
  .df-apps { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px; }
  .df-app--cw { transform: rotate(3deg); }
  .df-app--cw:hover { transform: rotate(1deg) translateY(-3px); }
  .df-side { justify-self: center; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 40px 34px; }
  .df-venn { margin: 0; }
  .df-pencil { position: absolute; right: -40px; bottom: 30px; width: 220px; margin: 0; transform: rotate(-14deg); }
}
@media (max-width: 600px) {
  .df-app { width: min(300px, 88vw); }
  .df-pencil { display: none; }
}
.receipt {
  --zig: 10px;
  position: relative;
  width: min(360px, 92vw);
  padding: 34px 26px 30px;
  background: #fbfaf6 var(--grain);
  background-size: 160px 160px;
  background-blend-mode: multiply;
  color: #2a2a2a;
  font: 400 14px/1.45 "Roboto Condensed", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  transform: rotate(-1.6deg);
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.3)) drop-shadow(0 2px 2px rgba(0,0,0,.2));
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zig) 51% repeat-x;
          mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--zig) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--zig) 51% repeat-x;
}
.receipt h2 { margin: 0 0 2px; text-align: center; font: 800 22px/1.2 "Roboto Condensed", sans-serif; color: #2a2a2a; letter-spacing: .3em; text-transform: uppercase; }
.receipt .sub { text-align: center; margin: 0 0 16px; font-size: 12px; opacity: .7; }
.receipt hr { border: 0; border-top: 2px dashed #9a9a9a; margin: 12px 0; }
.receipt dl { margin: 0; }
.receipt .ln { display: flex; gap: 6px; align-items: baseline; }
.receipt .ln dt { white-space: nowrap; }
.receipt .ln::after { content: none; }
.receipt .ln .dots { flex: 1; border-bottom: 2px dotted #b7b7b7; transform: translateY(-4px); }
.receipt .ln dd { margin: 0; white-space: nowrap; font-weight: 700; }
.receipt .total { font-size: 17px; font-weight: 800; }
.receipt nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.receipt nav a { text-decoration: none; border-bottom: 2px solid #2a2a2a; padding-bottom: 1px; }
.receipt nav a:hover { color: var(--dymo); border-color: var(--dymo); }
.receipt .thanks { text-align: center; margin: 18px 0 8px; font-family: "Caveat", cursive; font-size: 24px; text-transform: none; letter-spacing: 0; color: var(--sd-ink); transform: rotate(-3deg); }
.receipt .barcode { height: 38px; margin-top: 10px; background: repeating-linear-gradient(90deg, #222 0 2px, transparent 2px 4px, #222 4px 5px, transparent 5px 8px, #222 8px 11px, transparent 11px 12px, #222 12px 13px, transparent 13px 17px); }
.receipt small.fine { display: block; margin-top: 8px; text-align: center; font-size: 11px; opacity: .6; }
.receipt a.home { text-decoration: none; }

/* ---------------- objects that peek out from under the current one ---------------- */
.peek {
  position: fixed; z-index: 5;
  display: block; text-decoration: none;
  transition: transform .5s var(--ease-spring), filter .4s;
  cursor: pointer;
}
.peek:hover, .peek:focus-visible { filter: brightness(1.03); }
.peek .peek-hint {
  position: absolute; white-space: nowrap;
  font-family: "Caveat", cursive; font-weight: 700; font-size: 22px; color: #fff8e6;
  opacity: 0; transition: opacity .3s, transform .4s var(--ease-out);
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  pointer-events: none;
}
.peek:hover .peek-hint, .peek:focus-visible .peek-hint { opacity: 1; }

/* ---------------- page pull transition ---------------- */
.pull-veil { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0; transition: opacity .45s ease .25s; }
.pulling .pull-veil { opacity: 1; }
.is-pulled { z-index: 80 !important; transition: transform .7s cubic-bezier(.6, .05, .25, 1), filter .7s !important; }

@keyframes arrive {
  from { transform: translateY(70px) rotate(-1.6deg) scale(.97); opacity: 0; }
  60% { opacity: 1; }
  to { transform: none; opacity: 1; }
}

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(26px) rotate(var(--rv-rot, 0deg)); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: rotate(var(--rot, 0deg)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .rv { opacity: 1; transform: rotate(var(--rot, 0deg)); }
  .draw-on path { stroke-dashoffset: 0; }
}
