/*
  Pop Soap Motion sketchboard website.
  Warm, personal, animation-first, full-video-production-ready.
  Static HTML/CSS/JS for Cloudflare Pages.
*/

:root {
  --paper: #a9bda7;
  --paper-dark: #90a38e;
  --ink: #11140f;
  --ink-soft: rgba(17, 20, 15, .72);
  --line: rgba(17, 20, 15, .38);
  --line-light: rgba(17, 20, 15, .13);
  --cream: #e9ead9;
  --cream2: #dfe4c8;
  --blue: #9dbfd2;
  --amber: #dbb975;
  --red: #d65b42;
  --max: 1180px;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 12%, rgba(255,255,255,.17), transparent 22rem),
    radial-gradient(circle at 78% 28%, rgba(38,58,39,.11), transparent 28rem),
    radial-gradient(circle at 35% 100%, rgba(219,185,117,.18), transparent 32rem),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.48;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .43;
  background-image:
    linear-gradient(var(--line-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a { color: inherit; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 99;
  transform: translateY(-180%);
  padding: .7rem .9rem;
  border: 2px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.page-border {
  position: fixed;
  inset: 14px;
  z-index: 20;
  pointer-events: none;
  border: 2px solid var(--ink);
}

.site-header,
.board,
.site-footer {
  width: min(var(--max), calc(100% - clamp(24px, 5vw, 72px)));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 18px;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  padding-top: 14px;
}

.stamp {
  position: relative;
  display: inline-grid;
  gap: .22rem;
  padding: .68rem .82rem;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: rgba(233,234,217,.44);
  text-decoration: none;
  transform: rotate(-1.2deg);
}
.logo-stamp span {
  font-weight: 950;
  letter-spacing: -.055em;
  line-height: .92;
  max-width: 9.5rem;
}
.logo-stamp small {
  font-family: var(--mono);
  font-size: .64rem;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-family: var(--mono);
}
.nav a {
  display: inline-block;
  padding: .55rem .7rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  text-decoration: none;
  font-size: .86rem;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .16s ease, box-shadow .16s ease;
}
.nav a:nth-child(2) { transform: rotate(1.5deg); }
.nav a:nth-child(3) { transform: rotate(-.8deg); }
.nav a:nth-child(4) { transform: rotate(.6deg); }
.nav a:nth-child(5) { transform: rotate(-1deg); }
.nav a:nth-child(6) { background: var(--amber); transform: rotate(1deg); }
.nav a:hover { transform: translate(2px, 2px) rotate(0deg); box-shadow: 2px 2px 0 var(--ink); }

.board { position: relative; border-top: 2px solid var(--ink); }

#reel { scroll-margin-top: 120px; }

.hero {
  min-height: auto;
  padding: clamp(54px, 7.5vh, 86px) 0 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
  grid-template-rows: auto auto auto;
  gap: 18px 32px;
  align-content: start;
  border-top: 0;
}

.hero-label {
  grid-column: 1 / -1;
  font-family: var(--mono);
  text-transform: uppercase;
}
.hero-label span {
  display: inline-block;
  padding: .38rem .5rem;
  border: 2px solid var(--ink);
  background: var(--cream);
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  grid-column: 1 / 2;
  margin: 0;
  max-width: 780px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(4.25rem, 8.8vw, 9.6rem);
  line-height: .80;
  letter-spacing: -.095em;
  text-transform: lowercase;
}
.lead {
  grid-column: 1 / 2;
  max-width: 620px;
  font-size: clamp(1.03rem, 1.55vw, 1.22rem);
  color: var(--ink-soft);
}
.note {
  position: relative;
  padding: 1rem;
  border: 2px solid var(--ink);
  background: rgba(233,234,217,.42);
  box-shadow: 8px 8px 0 rgba(17,20,15,.88);
}
.showreel-card {
  grid-column: 2 / 3;
  grid-row: 2 / span 2;
  align-self: center;
}

.taped-card {
  position: relative;
  display: grid;
  gap: .45rem;
  min-height: 235px;
  padding: 1.25rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  text-decoration: none;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(2.2deg);
  transition: transform .16s ease, box-shadow .16s ease;
}
.taped-card:hover { transform: rotate(.6deg) translate(2px, 2px); box-shadow: 5px 5px 0 var(--ink); }
.taped-card strong {
  align-self: end;
  max-width: 285px;
  font-family: var(--serif);
  font-size: clamp(1.95rem, 3.3vw, 3.3rem);
  line-height: .88;
  letter-spacing: -.06em;
  text-transform: lowercase;
}
.taped-card small { color: var(--ink-soft); font-family: var(--mono); }
.field-label {
  display: inline-block;
  margin-bottom: .55rem;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: lowercase;
}

.info-columns {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 2px solid var(--ink);
  background: rgba(233,234,217,.24);
}
.info-columns > div { padding: .9rem; min-height: 104px; border-right: 2px solid var(--ink); }
.info-columns > div:last-child { border-right: 0; }
.info-columns p { margin-bottom: 0; color: var(--ink-soft); }

.tape { position: absolute; z-index: 2; width: 54px; height: 13px; background: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,.14) inset; }
.tape-left { left: -11px; top: 22px; transform: rotate(-39deg); }
.tape-right { right: -12px; top: 34px; transform: rotate(43deg); }
.tape-top { top: -10px; left: 50%; transform: translateX(-50%) rotate(-2deg); }

.grid-ruler {
  position: absolute;
  pointer-events: none;
  opacity: .38;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 8px 8px;
  border: 1px solid var(--line);
}
.ruler-one { width: 250px; height: 170px; right: 84px; top: 34px; }
.ruler-two { width: 140px; height: 300px; left: 43%; top: 82px; transform: rotate(90deg); }

.work, .about, .contact, .process, .privacy-section { padding: 84px 0; }
.section-title {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 26px;
}
h2 {
  margin-bottom: 0;
  max-width: 980px;
  font-family: var(--serif);
  font-size: clamp(2.75rem, 7.2vw, 7.8rem);
  line-height: .80;
  letter-spacing: -.08em;
  text-transform: lowercase;
}

.work-wall { display: grid; gap: 34px; }
.piece { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: 34px; align-items: center; }
.piece:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); }
.piece:nth-child(even) .piece-image { grid-column: 2; grid-row: 1; }
.piece:nth-child(even) .piece-text { grid-column: 1; grid-row: 1; text-align: right; justify-self: end; }
.piece-image {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.38), transparent 8rem), var(--cream2);
  text-decoration: none;
  box-shadow: 9px 9px 0 var(--ink);
  transform: rotate(-1.8deg);
  transition: transform .16s ease, box-shadow .16s ease;
  isolation: isolate;
}
.piece-image.blue { background: radial-gradient(circle at 70% 24%, rgba(255,255,255,.4), transparent 8rem), var(--blue); transform: rotate(2deg); }
.piece-image.amber { background: radial-gradient(circle at 42% 76%, rgba(255,255,255,.4), transparent 8rem), var(--amber); transform: rotate(-.9deg); }
.piece-image::before { content: ""; position: absolute; inset: 22px; border: 2px solid var(--ink); z-index: -1; }
.piece-image::after { content: ""; position: absolute; width: 130px; height: 130px; border: 2px solid var(--ink); border-radius: 50%; z-index: -1; }
.piece-image:hover { transform: rotate(0deg) translate(2px, 2px); box-shadow: 5px 5px 0 var(--ink); }
.play-mark { width: 88px; height: 88px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--cream); font-size: 2rem; box-shadow: 4px 4px 0 var(--ink); }
.piece-code { position: absolute; left: 18px; bottom: 14px; font-family: var(--mono); font-weight: 900; }
.piece-text { max-width: 620px; }
h3 {
  margin-bottom: .65rem;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5vw, 5.1rem);
  line-height: .82;
  letter-spacing: -.075em;
  text-transform: lowercase;
}
.piece-text p, .big-note, .service-sheet, .legal, .process-footnote, .process-note p, .privacy-content p, .privacy-content li { color: var(--ink-soft); }
.watch-link { display: inline-block; margin-top: .4rem; font-family: var(--mono); font-weight: 900; text-decoration-thickness: 2px; text-underline-offset: .25em; }

.process-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.process-note {
  position: relative;
  min-height: 330px;
  padding: 1.25rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  box-shadow: 7px 7px 0 var(--ink);
}
.process-note:nth-child(1) { transform: rotate(-1.1deg); }
.process-note:nth-child(2) { transform: rotate(1.3deg); background: var(--cream2); }
.process-note:nth-child(3) { transform: rotate(-.4deg); background: var(--blue); }
.pin { position: absolute; top: 10px; right: 12px; width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 50%; background: var(--red); }
.process-footnote { max-width: 850px; margin: 2rem 0 0; padding: 1rem; border-left: 2px solid var(--ink); font-size: 1.08rem; }

.about-layout { display: grid; grid-template-columns: 1fr 385px; gap: 28px; align-items: start; }
.big-note { max-width: 780px; font-size: clamp(1.45rem, 3.5vw, 3.45rem); line-height: 1.04; letter-spacing: -.045em; }
.service-sheet {
  position: relative;
  padding: 1.2rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(1.2deg);
}
.service-sheet ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.service-sheet li + li { margin-top: .35rem; }

.contact { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
.email-note { min-height: 210px; }
.legal { grid-column: 1 / -1; font-family: var(--mono); }

.privacy-content {
  max-width: 820px;
  padding: 1.15rem;
  border: 2px solid var(--ink);
  background: rgba(233,234,217,.42);
  box-shadow: 8px 8px 0 var(--ink);
}
.privacy-content h2 {
  margin: 2rem 0 .75rem;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: .9;
}
.privacy-content h2:first-child { margin-top: 0; }
.privacy-content ul { padding-left: 1.2rem; }
.privacy-content li + li { margin-top: .35rem; }

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 42px;
  border-top: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: .88rem;
}
.site-footer a { font-weight: 900; }
.footer-links { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.footer-links a {
  display: inline-block;
  padding: .42rem .58rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .16s ease, box-shadow .16s ease;
}
.footer-links a:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}
.footer-links .footer-button {
  background: var(--amber);
}

@media (min-width: 1600px) and (max-height: 1150px) {
  .hero { padding-top: 50px; }
  h1 { font-size: clamp(4.25rem, 7.8vw, 9.1rem); }
  .taped-card { min-height: 220px; }
}

@media (orientation: portrait) and (min-width: 900px) {
  .hero { padding-top: clamp(64px, 7vh, 120px); align-content: start; }
}

@media (max-width: 980px) {
  .hero, .section-title, .about-layout, .contact, .piece, .piece:nth-child(even), .process-board { grid-template-columns: 1fr; }
  .showreel-card, .piece:nth-child(even) .piece-image, .piece:nth-child(even) .piece-text { grid-column: auto; grid-row: auto; }
  .piece:nth-child(even) .piece-text { text-align: left; justify-self: start; }
  .showreel-card { grid-row: auto; max-width: 360px; }
  .info-columns { grid-template-columns: 1fr; }
  .info-columns > div { border-right: 0; border-bottom: 2px solid var(--ink); }
  .info-columns > div:last-child { border-bottom: 0; }
  .ruler-one, .ruler-two { display: none; }
  .process-note { min-height: auto; transform: rotate(0deg) !important; }
}

@media (max-width: 600px) {
  .page-border { inset: 8px; }
  .site-header, .board, .site-footer { width: min(100% - 24px, var(--max)); }
  .site-header { position: relative; top: 0; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .nav a { font-size: .78rem; padding: .48rem .58rem; }
  .logo-stamp span { max-width: 8.6rem; }
  .hero { padding-top: 42px; gap: 16px; }
  h1 { font-size: clamp(3.35rem, 17.8vw, 5.8rem); line-height: .82; }
  h2 { font-size: clamp(2.45rem, 13vw, 4.7rem); }
  .work, .about, .contact, .process, .privacy-section { padding: 58px 0; }
  .piece-image { min-height: 220px; }
  .taped-card, .note, .piece-image, .service-sheet, .process-note, .privacy-content { box-shadow: 5px 5px 0 var(--ink); }
  .site-footer { flex-direction: column; }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* ==========================================================
   FINAL THEME: APRICOT CREAM + GIF PREVIEW CARDS
   The site keeps the sketchboard layout but warms the palette.
   ========================================================== */

:root {
  --paper: #efbd87;
  --paper-dark: #ce9563;
  --ink: #1b130d;
  --ink-soft: rgba(27, 19, 13, .74);
  --line: rgba(27, 19, 13, .38);
  --line-light: rgba(27, 19, 13, .13);
  --cream: #fff4e5;
  --cream2: #f4d7af;
  --blue: #92c0c9;
  --amber: #e9b84e;
  --red: #c94e37;
}

body {
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.25), transparent 22rem),
    radial-gradient(circle at 82% 22%, rgba(201,78,55,.12), transparent 27rem),
    radial-gradient(circle at 34% 100%, rgba(146,192,201,.13), transparent 34rem),
    var(--paper);
}

body::before { opacity: .31; }

.logo-stamp span {
  max-width: 10.8rem;
}

.work-frame {
  position: relative;
  padding: clamp(18px, 3vw, 32px);
  border: 2px solid var(--ink);
  background: rgba(255, 244, 229, .24);
  box-shadow: 9px 9px 0 var(--ink);
}

.work-frame::before {
  content: "preview board";
  position: absolute;
  top: -16px;
  left: clamp(18px, 4vw, 44px);
  padding: .36rem .55rem;
  border: 2px solid var(--ink);
  background: var(--amber);
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 900;
  transform: rotate(-1.6deg);
}

.work-frame::after {
  content: "youtube links ↗";
  position: absolute;
  right: clamp(18px, 4vw, 42px);
  bottom: -18px;
  padding: .36rem .55rem;
  border: 2px solid var(--ink);
  background: var(--blue);
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 900;
  transform: rotate(1.8deg);
}

.work-wall {
  gap: clamp(24px, 4vw, 48px);
}

.piece-image {
  overflow: visible;
  padding: 0;
  background: var(--cream2);
}

.piece-image.blue { background: var(--blue); }
.piece-image.amber { background: var(--amber); }

.piece-image::before {
  display: none;
}

.piece-image::after {
  width: 112px;
  height: 112px;
  background: rgba(255,244,229,.2);
  z-index: 2;
  opacity: .82;
  pointer-events: none;
}

.gif-window,
.card-gif {
  position: absolute;
  inset: 22px;
  overflow: hidden;
  border: 2px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), transparent 45%),
    var(--cream);
}

.gif-window::after,
.card-gif::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(27,19,13,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,19,13,.08) 1px, transparent 1px);
  background-size: 18px 18px;
  mix-blend-mode: multiply;
}

.gif-preview {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.play-mark {
  position: relative;
  z-index: 5;
  background: rgba(255, 244, 229, .94);
}

.piece-code {
  z-index: 6;
  left: 16px;
  bottom: 13px;
  padding: .22rem .42rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  transform: rotate(-1.5deg);
}

.preview-sticker {
  position: absolute;
  z-index: 7;
  display: inline-block;
  padding: .34rem .5rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--ink);
}

.preview-sticker.one {
  top: -13px;
  left: 24px;
  transform: rotate(-2.5deg);
  background: var(--amber);
}

.preview-sticker.two {
  right: -12px;
  bottom: 44px;
  transform: rotate(3deg);
  background: var(--blue);
}

.preview-sticker.three {
  left: -10px;
  bottom: 70px;
  transform: rotate(-4deg);
  background: var(--cream);
}

.preview-card {
  grid-template-rows: 150px auto auto auto;
  min-height: 360px;
  padding-top: 1.1rem;
}

.preview-card .card-gif {
  position: relative;
  inset: auto;
  min-height: 150px;
  margin-bottom: .7rem;
}

.preview-card .field-label,
.preview-card strong,
.preview-card small {
  position: relative;
  z-index: 2;
}

.preview-card .preview-sticker.one {
  top: 8px;
  left: -13px;
}

.preview-card .preview-sticker.two {
  right: -14px;
  bottom: 132px;
}

.privacy-content a,
.legal a,
.piece-text a,
.contact a {
  text-decoration-thickness: 2px;
  text-underline-offset: .25em;
}

@media (max-width: 980px) {
  .work-frame {
    padding: 22px;
  }
  .work-frame::before,
  .work-frame::after {
    position: static;
    display: inline-block;
    margin: 0 8px 18px 0;
  }
}

@media (max-width: 600px) {
  .work-frame {
    box-shadow: 5px 5px 0 var(--ink);
  }
  .gif-window {
    inset: 14px;
  }
  .preview-card {
    max-width: none;
    min-height: 320px;
  }
  .preview-sticker {
    font-size: .66rem;
  }
  .preview-sticker.two,
  .preview-sticker.three {
    display: none;
  }
}

/* ==========================================================
   MOBILE POLISH PATCH — uploaded preview QA
   Keeps desktop layout intact; improves phone nav and sticker placement.
   ========================================================== */

@media (max-width: 700px) {
  .site-header {
    gap: 16px;
    padding-top: 12px;
  }

  .nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 2px 4px 10px 0;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar { display: none; }

  .nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: clamp(.76rem, 3.4vw, .86rem);
    padding: .48rem .58rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .nav a:hover {
    transform: none;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .preview-sticker {
    font-size: clamp(.62rem, 2.9vw, .72rem);
    line-height: 1;
    padding: .32rem .46rem;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .preview-card {
    overflow: visible;
  }

  .preview-card .preview-sticker.one {
    top: 7px;
    left: -8px;
  }

  .preview-card .preview-sticker.two {
    display: inline-block;
    top: 128px;
    right: -8px;
    bottom: auto;
    left: auto;
    transform: rotate(2deg);
  }

  .piece-image {
    overflow: visible;
  }

  .piece-image .preview-sticker.one {
    top: -12px;
    left: 14px;
  }

  .piece-image .preview-sticker.two,
  .piece-image .preview-sticker.three {
    display: inline-block;
    right: 12px;
    bottom: 16px;
    left: auto;
    transform: rotate(2deg);
    background: var(--blue);
  }

  .piece-code {
    left: 13px;
    bottom: 13px;
  }

  .work-frame::before {
    position: static;
    display: inline-block;
    margin: 0 8px 20px 0;
  }

  .work-frame::after {
    display: none;
  }
}

@media (max-width: 420px) {
  .site-header, .board, .site-footer {
    width: min(100% - 20px, var(--max));
  }

  .logo-stamp {
    padding: .58rem .68rem;
  }

  .logo-stamp span {
    font-size: .98rem;
    letter-spacing: -.045em;
  }

  .logo-stamp small {
    font-size: .58rem;
  }

  .nav a {
    padding: .44rem .52rem;
  }

  .hero-label span {
    font-size: .82rem;
    line-height: 1.2;
  }

  .preview-card .preview-sticker.two {
    right: -5px;
  }

  .piece-image .preview-sticker.two,
  .piece-image .preview-sticker.three {
    right: 9px;
    bottom: 15px;
  }
}


/* ==========================================================
   MOBILE FINAL PATCH — nav behavior + email overflow
   Desktop remains sticky. Phone header scrolls away with page.
   ========================================================== */

@media (max-width: 700px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header {
    position: relative;
    top: auto;
    z-index: 10;
  }

  .nav {
    position: relative;
  }

  .email-note {
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .email-note strong {
    display: block;
    max-width: 100%;
    font-size: clamp(1.28rem, 7vw, 2rem);
    line-height: .95;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .email-note small {
    overflow-wrap: anywhere;
  }

  .contact {
    overflow-x: hidden;
  }

  .site-footer,
  .legal {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 420px) {
  .email-note strong {
    font-size: clamp(1.16rem, 6.4vw, 1.55rem);
    letter-spacing: -.035em;
  }
}


/* ==========================================================
   MOBILE NAV + FRAME + EMAIL PATCH
   - No horizontal nav on phones: all buttons are visible.
   - Fixed outer page border hidden on phones.
   - Email wraps safely on narrow desktop/portrait screens.
   ========================================================== */

/* Email safety at all sizes, especially narrow desktop/portrait windows. */
.email-note strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: none;
}

@media (max-width: 1180px) {
  .email-note strong {
    font-size: clamp(1.65rem, 4.2vw, 2.55rem);
    line-height: .92;
    letter-spacing: -.05em;
  }
}

/* Tablet/phone: visible two-row sticker menu, no hidden horizontal scroll. */
@media (max-width: 700px) {
  .page-border {
    display: none;
  }

  .site-header {
    position: relative;
    top: auto;
    z-index: 10;
    gap: 14px;
    padding-top: 12px;
  }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0;
  }

  .nav a {
    width: 100%;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    font-size: clamp(.72rem, 3.25vw, .84rem);
    padding: .48rem .36rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .nav a:hover {
    transform: none;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .contact {
    overflow-x: hidden;
  }

  .email-note {
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .email-note strong {
    display: block;
    max-width: 100%;
    font-size: clamp(1.24rem, 7vw, 1.85rem);
    line-height: .96;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .email-note small,
  .legal,
  .site-footer {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px) {
  .nav {
    gap: 7px;
  }

  .nav a {
    font-size: clamp(.66rem, 3.45vw, .78rem);
    padding: .44rem .25rem;
  }

  .email-note strong {
    font-size: clamp(1.08rem, 6.4vw, 1.45rem);
  }
}


/* ==========================================================
   MOBILE WORK-FRAME STICKER FINAL PATCH
   Keeps desktop as-is. On mobile, the section stickers stay visible
   and are anchored to the work board instead of floating awkwardly.
   ========================================================== */

@media (max-width: 700px) {
  .work-frame {
    position: relative;
    overflow: visible;
    padding-top: 34px;
    padding-bottom: 42px;
  }

  .work-frame::before {
    content: "preview board";
    position: absolute;
    display: inline-block;
    top: -14px;
    left: 14px;
    margin: 0;
    padding: .32rem .48rem;
    border: 2px solid var(--ink);
    background: var(--amber);
    font-family: var(--mono);
    font-size: clamp(.62rem, 2.75vw, .72rem);
    font-weight: 900;
    line-height: 1;
    transform: rotate(-1.6deg);
    box-shadow: 2px 2px 0 var(--ink);
    z-index: 8;
  }

  .work-frame::after {
    content: "youtube links ↗";
    position: absolute;
    display: inline-block;
    right: 14px;
    bottom: -14px;
    margin: 0;
    padding: .32rem .48rem;
    border: 2px solid var(--ink);
    background: var(--blue);
    font-family: var(--mono);
    font-size: clamp(.62rem, 2.75vw, .72rem);
    font-weight: 900;
    line-height: 1;
    transform: rotate(1.4deg);
    box-shadow: 2px 2px 0 var(--ink);
    z-index: 8;
  }
}

@media (max-width: 380px) {
  .work-frame {
    padding-top: 32px;
    padding-bottom: 40px;
  }

  .work-frame::before {
    left: 10px;
  }

  .work-frame::after {
    right: 10px;
  }
}


/* ==========================================================
   FINAL EMAIL + TOUCH-SCROLL PATCH
   - Email now splits intentionally: hello@ / popsoapmotion.com.
   - Contact section stacks earlier on narrow desktop/portrait screens.
   - Prevents ugly arbitrary email wrapping/cutting.
   ========================================================== */

.email-note {
  overflow: visible;
}

.email-note strong {
  display: block;
  max-width: none;
  overflow: visible;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  font-size: clamp(2.15rem, 3.25vw, 3.25rem);
  line-height: .82;
  letter-spacing: -.07em;
}

.email-note .email-local,
.email-note .email-domain {
  display: block;
  white-space: nowrap;
}

.email-note .email-domain {
  font-size: .72em;
  letter-spacing: -.055em;
}

@media (max-width: 1180px) {
  .contact {
    grid-template-columns: 1fr;
  }

  .email-note {
    justify-self: start;
    width: min(100%, 470px);
    min-height: 190px;
  }

  .email-note strong {
    font-size: clamp(2.35rem, 6.2vw, 4.3rem);
  }

  .email-note .email-domain {
    font-size: .58em;
  }
}

@media (max-width: 700px) {
  .email-note {
    width: 100%;
    min-height: 185px;
  }

  .email-note strong {
    font-size: clamp(2.5rem, 13.5vw, 4.15rem);
    line-height: .80;
    letter-spacing: -.075em;
  }

  .email-note .email-domain {
    font-size: .48em;
    letter-spacing: -.035em;
  }
}

@media (max-width: 380px) {
  .email-note strong {
    font-size: clamp(2.2rem, 12.2vw, 3.55rem);
  }

  .email-note .email-domain {
    font-size: .46em;
  }
}


/* ==========================================================
   TOUCH DESKTOP-MODE FALLBACK PATCH
   Chrome Android "Desktop site" can report a wider viewport, so
   max-width mobile rules may not run. This keeps touch devices sane
   without changing real desktop/laptop layout.
   ========================================================== */

@media (hover: none) and (pointer: coarse) and (max-width: 1180px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .page-border {
    display: none;
  }

  .site-header {
    position: relative;
    top: auto;
    z-index: 10;
    width: min(var(--max), calc(100% - 24px));
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 12px;
  }

  .logo-stamp {
    justify-self: start;
  }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    gap: 8px;
    overflow: visible;
    padding: 0;
  }

  .nav a {
    width: 100%;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    font-size: clamp(.74rem, 1.9vw, .92rem);
    padding: .48rem .36rem;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: clamp(42px, 7vh, 70px);
  }

  .hero-label,
  h1,
  .lead,
  .showreel-card,
  .info-columns {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: clamp(4.2rem, 12vw, 7.8rem);
    max-width: 720px;
  }

  .showreel-card {
    width: min(100%, 390px);
    justify-self: start;
  }

  .info-columns {
    grid-template-columns: 1fr;
  }

  .section-head h2 {
    font-size: clamp(3.2rem, 11vw, 6.8rem);
  }

  .work-frame {
    position: relative;
    overflow: visible;
    padding-top: 34px;
    padding-bottom: 42px;
  }

  .work-frame::before {
    content: "preview board";
    position: absolute;
    display: inline-block;
    top: -14px;
    left: 14px;
    margin: 0;
    padding: .32rem .48rem;
    border: 2px solid var(--ink);
    background: var(--amber);
    font-family: var(--mono);
    font-size: clamp(.62rem, 1.75vw, .76rem);
    font-weight: 900;
    line-height: 1;
    transform: rotate(-1.6deg);
    box-shadow: 2px 2px 0 var(--ink);
    z-index: 8;
  }

  .work-frame::after {
    content: "youtube links ↗";
    position: absolute;
    display: inline-block;
    right: 14px;
    bottom: -14px;
    margin: 0;
    padding: .32rem .48rem;
    border: 2px solid var(--ink);
    background: var(--blue);
    font-family: var(--mono);
    font-size: clamp(.62rem, 1.75vw, .76rem);
    font-weight: 900;
    line-height: 1;
    transform: rotate(1.4deg);
    box-shadow: 2px 2px 0 var(--ink);
    z-index: 8;
  }

  .piece,
  .piece:nth-child(even) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .piece-image,
  .piece:nth-child(even) .piece-image,
  .piece-text,
  .piece:nth-child(even) .piece-text {
    grid-column: 1 / -1;
    grid-row: auto;
    text-align: left;
    justify-self: stretch;
  }

  .piece-image {
    min-height: auto;
    aspect-ratio: 16 / 9;
    overflow: visible;
  }

  .piece-image .gif-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .piece-title,
  .piece:nth-child(even) .piece-title {
    font-size: clamp(2.6rem, 8vw, 4.8rem);
    text-align: left;
  }

  .contact {
    grid-template-columns: 1fr;
    overflow-x: hidden;
  }

  .email-note {
    justify-self: start;
    width: min(100%, 470px);
    min-height: 185px;
  }

  .email-note strong {
    font-size: clamp(2.35rem, 7vw, 4rem);
  }

  .email-note .email-domain {
    font-size: .5em;
  }
}


/* ==========================================================
   PRIVACY TITLE + TOUCH DESKTOP-SITE FINAL PATCH
   - Dutch Privacyverklaring gets a deliberate break point.
   - Touch devices keep a usable layout even in browser "Desktop site" mode.
   ========================================================== */

.privacy-section .section-title h1 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

@media (max-width: 700px) {
  .privacy-section .section-title h1 {
    font-size: clamp(2.45rem, 11.5vw, 4.25rem);
    line-height: .84;
    letter-spacing: -.07em;
  }

  .privacy-content {
    max-width: 100%;
    overflow-wrap: break-word;
  }
}

@media (max-width: 380px) {
  .privacy-section .section-title h1 {
    font-size: clamp(2.15rem, 10.8vw, 3.25rem);
  }
}

/* Stronger fallback for Chrome/Android "Desktop site" mode.
   Real desktop/laptop is unaffected because this only targets touch devices. */
@media (hover: none) and (pointer: coarse) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .page-border {
    display: none;
  }

  .site-header {
    position: relative;
    top: auto;
    width: min(var(--max), calc(100% - 24px));
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .logo-stamp {
    justify-self: start;
  }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
    gap: 8px;
    overflow: visible;
    padding: 0;
  }

  .nav a {
    width: 100%;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .hero,
  .section-title,
  .about-layout,
  .contact,
  .process-board,
  .piece,
  .piece:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .hero-label,
  h1,
  .lead,
  .showreel-card,
  .info-columns,
  .piece-image,
  .piece:nth-child(even) .piece-image,
  .piece-text,
  .piece:nth-child(even) .piece-text {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .piece:nth-child(even) .piece-text {
    text-align: left;
    justify-self: start;
  }

  .showreel-card {
    width: min(100%, 390px);
    justify-self: start;
  }

  .info-columns {
    grid-template-columns: 1fr;
  }

  .piece-image {
    min-height: auto;
    aspect-ratio: 16 / 9;
    overflow: visible;
  }

  .piece-image .gif-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .piece-title,
  .piece:nth-child(even) .piece-title {
    text-align: left;
  }

  .privacy-section .section-title h1 {
    font-size: clamp(2.45rem, 11.5vw, 5rem);
    line-height: .84;
    letter-spacing: -.07em;
  }

  .email-note {
    justify-self: start;
    width: min(100%, 470px);
  }
}


/* ==========================================================
   FINAL MOBILE EMAIL PAPER FIT PATCH
   Keeps the email card bold, but prevents the rotated paper,
   tapes and shadow from being clipped on phone screens.
   ========================================================== */

@media (max-width: 1180px) {
  .email-note.taped-card {
    box-sizing: border-box;
    max-width: min(470px, calc(100vw - 64px));
  }
}

@media (max-width: 700px) {
  .email-note.taped-card {
    width: min(92vw, 430px);
    max-width: calc(100vw - 34px);
    justify-self: center;
    margin-inline: auto;
    box-sizing: border-box;
    transform: rotate(1.15deg);
    box-shadow: 5px 5px 0 var(--ink);
    padding: clamp(1.05rem, 4.5vw, 1.35rem);
  }

  .email-note .tape-left {
    left: -7px;
  }

  .email-note .tape-right {
    right: -7px;
  }

  .email-note strong {
    font-size: clamp(2.35rem, 12.6vw, 3.95rem);
    line-height: .80;
  }

  .email-note .email-domain {
    font-size: .49em;
    letter-spacing: -.04em;
  }

  .email-note small {
    display: block;
    max-width: 100%;
    font-size: clamp(.82rem, 3.7vw, 1rem);
    line-height: 1.15;
  }
}

@media (max-width: 380px) {
  .email-note.taped-card {
    width: min(91vw, 380px);
    max-width: calc(100vw - 30px);
    padding: 1rem;
  }

  .email-note strong {
    font-size: clamp(2.05rem, 11.7vw, 3.35rem);
  }

  .email-note .email-domain {
    font-size: .48em;
  }
}


/* ==========================================================
   FINAL PRIVACY DESKTOP HEADING FIX
   Restores normal wide privacy headings on desktop while keeping
   safe mobile wrapping for long Dutch text.
   ========================================================== */

.privacy-section .section-title {
  display: block;
  max-width: min(980px, 100%);
}

.privacy-section .section-title h1 {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: normal;
}

@media (min-width: 701px) {
  .privacy-section .section-title h1 {
    font-size: clamp(6.5rem, 12vw, 12rem);
    line-height: .78;
    letter-spacing: -.08em;
  }
}

@media (max-width: 700px) {
  .privacy-section .section-title {
    max-width: 100%;
  }

  .privacy-section .section-title h1 {
    font-size: clamp(2.45rem, 11.5vw, 4.25rem);
    line-height: .84;
    letter-spacing: -.07em;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
  }
}


/* ==========================================================
   FINAL PRIVACY PAGE TOP-LINE REMOVAL
   The homepage intentionally has no top border under the header.
   Privacy pages now match that behavior.
   ========================================================== */

.privacy-section.board {
  border-top: 0;
}
