/* Embossed label-maker strip (Dymo Omega style, vintage), set in the real label font
   "Impact Label" by Tension Type (free for personal and commercial use, web embedding allowed;
   licence text: shared/fonts/Impact Label Licence.txt). Black and white only. Real text.
   Usage:
     <h2 class="dymo-set" aria-label="From Dusk Until Dawn"><span class="dymo">From Dusk</span> <span class="dymo">Until Dawn</span></h2>
   The font draws the black tape itself and cuts the letters out of it; the layers below add the
   whitened plastic showing through the letters, the gloss, the wear and the contact shadow. */
@font-face { font-family: "Impact Label"; font-display: swap;
  src: local("Impact Label"), local("ImpactLabel"), url("/assets/fieldnotes/fonts/Impact%20Label.ttf") format("truetype"); }
@font-face { font-family: "Impact Label Reversed"; font-display: swap;
  src: local("Impact Label Reversed"), local("ImpactLabelReversed"), url("/assets/fieldnotes/fonts/Impact%20Label%20Reversed.ttf") format("truetype"); }

.dymo-set { display: flex; flex-wrap: wrap; gap: .34em .5em; align-items: center; margin: 0; font-weight: 400; }
.dymo {
  --dymo-tilt: -1.2deg;
  --dymo-tape: #17130f;            /* aged black vinyl, slightly warm */
  --dymo-white: #f3eddd;           /* stressed plastic, a little yellowed with age */
  position: relative; isolation: isolate; display: inline-block; white-space: nowrap;
  font: 400 clamp(1.5rem, 1.15rem + 1.15vw, 2.25rem)/1 "Impact Label", "Share Tech Mono", ui-monospace, monospace;
  letter-spacing: 0; text-transform: uppercase; color: var(--dymo-tape);
  transform: rotate(var(--dymo-tilt));
  filter: drop-shadow(0 1px .5px rgba(0,0,0,.5)) drop-shadow(0 5px 5px rgba(0,0,0,.28));
}
.dymo:nth-of-type(2n) { --dymo-tilt: .9deg; }
.dymo:nth-of-type(3n) { --dymo-tilt: -.5deg; }
/* 1. tape ends: extra black tape left and right of the letters, like a real label.
      The white layer (stressed plastic seen through the cut-out letters) stays inside the letter area. */
.dymo {
  padding-inline: var(--dymo-pad, .62em);
  background:
    linear-gradient(180deg, #fffef8 0%, var(--dymo-white) 50%, #e4decd 100%) center / calc(100% - .2em) 68% no-repeat content-box,
    var(--dymo-tape) padding-box;
  border-radius: 1px;
  padding-block: .15em .09em;   /* the tape the font draws is taller than the line box */
}
/* 2. gloss on the vinyl and dust specks from the real film grain, kept inside the tape */
.dymo::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22) 0, rgba(255,255,255,.05) 14%, rgba(255,255,255,0) 30%, rgba(255,255,255,0) 72%, rgba(255,255,255,.07) 100%),
    linear-gradient(102deg, transparent 0 34%, rgba(255,255,255,.12) 42%, rgba(255,255,255,.02) 52%, transparent 62%),
    url("/assets/fieldnotes/label-wear.webp") 41px 13px / 240px auto;
  mix-blend-mode: screen; opacity: .62; }
/* 3. soft stress halo around each raised letter (dymo.js copies the text into data-halo) */
.dymo[data-halo] > .dymo-halo { position: absolute; left: var(--dymo-pad, .62em); top: .15em; z-index: 2; pointer-events: none;
  font-family: "Impact Label Reversed", "Impact Label", monospace; color: rgba(255,255,255,.4);
  filter: blur(1.1px); mix-blend-mode: screen; }
.dymo.on-dark { filter: drop-shadow(0 0 .7px rgba(255,255,255,.6)) drop-shadow(0 6px 7px rgba(0,0,0,.6)); }
.dymo.sm { font-size: clamp(1.05rem, .95rem + .45vw, 1.35rem); }

/* ---- Label strips as navigation and buttons -------------------------------------------
   <nav class="dymo-nav" aria-label="Site"><a class="dymo" href="…">All Films</a> … <a class="dymo red" href="…">Get the App</a></nav>
   Each link is its own strip of tape. Hover peels it up and straightens it; press pushes it back down. */
.dymo.red { --dymo-tape: #d40f09; }
/* the red strip glows, like the film-halation red of the titles */
.dymo.red, .dymo.red.on-dark { filter: drop-shadow(0 0 1px rgba(255,70,40,.9)) drop-shadow(0 0 9px rgba(255,40,20,.6)) drop-shadow(0 0 26px rgba(255,30,10,.42)) drop-shadow(0 5px 6px rgba(0,0,0,.4)); }
@media (hover: hover) { a.dymo.red:hover { filter: drop-shadow(0 0 1px rgba(255,90,60,1)) drop-shadow(0 0 13px rgba(255,50,25,.8)) drop-shadow(0 0 38px rgba(255,30,10,.55)) drop-shadow(0 12px 10px rgba(0,0,0,.4)); } }
a.dymo.red:active { filter: drop-shadow(0 0 1px rgba(255,70,40,.9)) drop-shadow(0 0 6px rgba(255,40,20,.6)); }                 /* red embossing tape, for the one main action */
a.dymo, button.dymo { text-decoration: none; cursor: pointer; border: 0; -webkit-tap-highlight-color: transparent;
  transition: translate .32s cubic-bezier(.34,1.56,.64,1), scale .32s cubic-bezier(.34,1.56,.64,1), rotate .32s cubic-bezier(.34,1.56,.64,1), filter .22s ease-out; }
@media (hover: hover) {
a.dymo:hover, button.dymo:hover { --dymo-tilt: 0deg; translate: 0 -3px; scale: 1.045;
  filter: drop-shadow(0 1px .5px rgba(0,0,0,.5)) drop-shadow(0 12px 10px rgba(0,0,0,.34)); }
}
a.dymo:active, button.dymo:active { translate: 0 1px; scale: .985; transition-duration: .08s;
  filter: drop-shadow(0 1px .5px rgba(0,0,0,.6)); }
a.dymo:focus-visible, button.dymo:focus-visible { outline: 2px solid #e40e08; outline-offset: 5px; --dymo-tilt: 0deg; }
.dymo-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem .8rem; }
.dymo-nav .dymo { font-size: clamp(1.05rem, .95rem + .42vw, 1.32rem); --dymo-pad: .55em; }
.dymo-nav .dymo:nth-child(1) { --dymo-tilt: -1.6deg; }
.dymo-nav .dymo:nth-child(2) { --dymo-tilt: 1.1deg; }
.dymo-nav .dymo:nth-child(3) { --dymo-tilt: -.7deg; }
@media (prefers-reduced-motion: no-preference) {
  /* on load each strip is stuck down in turn */
  .dymo-nav .dymo { animation: dymoStick .5s cubic-bezier(.22,1.3,.36,1) backwards; }
  .dymo-nav .dymo:nth-child(2) { animation-delay: .09s; }
  .dymo-nav .dymo:nth-child(3) { animation-delay: .18s; }
  @keyframes dymoStick { from { opacity: 0; translate: 0 -12px; rotate: -5deg; scale: 1.08; } }
}
@media (prefers-reduced-motion: reduce) { a.dymo, button.dymo { transition: none; } }
@media (max-width: 480px) { .dymo-nav { gap: .35rem .45rem; } .dymo-nav .dymo { font-size: .98rem; --dymo-pad: .4em; } }

/* Link and button strips get a finger-size hit area (at least 44px tall) without changing the look of the tape.
   Helps touch on phones and look-and-pinch on Apple Vision Pro. */
a.dymo::before, button.dymo::before { content: ""; position: absolute; left: -.3rem; right: -.3rem; top: 50%; height: max(100%, 2.75rem); translate: 0 -50%; }
