:root {
  --white: #ffffff;
  --paper: #efefeb;     /* sketch paper color */
  --grey-mid: #8a8a8a;
  --grey-line: #e2e2e2;
  --black: #111111;
  --font: 'Gloria Hallelujah', 'DM Sans', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  overflow-x: hidden;
}
::selection { background: var(--black); color: var(--white); }
a { color: inherit; }
button { font-family: var(--font); }

/* iOS blocks even muted autoplay in Low Power Mode and paints a big native
   play glyph over the paused video — hide it everywhere; store.js resumes
   playback on the first touch instead */
video::-webkit-media-controls,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button {
  display: none !important; -webkit-appearance: none !important; opacity: 0 !important;
}

/* ---------- header ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 5vw;
}
header.solid { background: var(--white); border-bottom: 1px solid var(--grey-line); }
header .brand { font-weight: 700; font-size: 16px; letter-spacing: .04em; text-decoration: none; }
header nav { display: flex; gap: 26px; }
header nav a { font-size: 13px; letter-spacing: .06em; text-decoration: none; font-weight: 500; }
header nav a:hover { text-decoration: underline; }
@media (max-width: 480px) {
  header { padding: 14px 4vw; }
  header nav { gap: 13px; }
  header nav a { font-size: 11px; letter-spacing: .03em; }
}

/* ---------- full-viewport pages ---------- */
.page { min-height: 100vh; padding: 120px 5vw 80px; }
.page-title { font-size: 14px; font-weight: 700; letter-spacing: .08em; margin-bottom: 36px; }

/* soft looping sketch background on shop/contact pages */
.bg-loop {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  object-fit: cover; z-index: -2; opacity: .3;
}

/* ---------- shop (product list): products over the animation ----------
   The animation frame is a square scene with both products drawn in place
   (beanie worn top-left, tee on a hanger at right). The whole square is shown
   at its natural size, centered in the viewport: --side is the on-screen size
   of the square (as large as fits — min of viewport width/height) and
   --sq-left / --sq-top are the square's top-left corner. Each product spot
   sets --pl / --pt / --pw inline: the product's square placement as fractions
   of the frame (measured from the frames). The live Shopify image is placed at
   the same fractions of --side, so it sits exactly over the drawn product. */
/* square artwork anchored 70% down: crops mostly from the top so the
   bottom of the scene stays in frame (used by index.html) */
.bg-cover {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  object-fit: cover; object-position: center 70%; z-index: -2;
}
body.shop {
  overflow: hidden; height: 100vh;
  --side: min(100vw, 135vh);              /* a touch taller than the viewport so it runs flush top-to-bottom (no vertical white), but only ~1/4 of the dog's lower body crops off — not the whole figure. Capped at 100vw so portrait keeps both products in view */
  --drop: calc(var(--side) * 0.13);       /* lands the square flush with the top of the viewport (no top white); the empty dog-legs area is what falls off the bottom */
  --sq-left: calc(50vw - var(--side) / 2);
  --sq-top:  calc(50vh - var(--side) / 2 + var(--drop));
}
body.shop .bg-cover {
  inset: auto;
  left: var(--sq-left); top: var(--sq-top);
  width: var(--side); height: var(--side);
  object-fit: cover; object-position: center;
}
.product-spot {
  position: fixed; z-index: 5; display: none; cursor: pointer;
  left:   calc(var(--sq-left) + var(--pl) * var(--side));
  top:    calc(var(--sq-top)  + var(--pt) * var(--side));
  width:  calc(var(--pw) * var(--side));
  height: calc(var(--pw) * var(--side));
}
.product-spot.ready { display: block; }
.product-spot img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.product-spot img.back { visibility: hidden; transform: scale(1.04); /* covers the drawn edges */ }
.product-spot:hover img.back, .product-spot:focus-visible img.back { visibility: visible; }
/* product title floating just above its own product; one consistent size for
   every spot (a fraction of the scene --side) so both names match regardless
   of product width or name length */
.product-spot .spot-label {
  display: block; position: absolute; left: 50%; bottom: 100%;
  transform: translateX(-50%); margin-bottom: 10px;
  font-size: calc(min(100vw, 100vh) * 0.038); line-height: 1.15; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--black); white-space: nowrap; z-index: 6;
  text-shadow: 0 0 14px var(--white), 0 0 8px var(--white), 0 0 4px var(--white);
}

/* ---------- route transitions: door video (from home) + fade veil ---------- */
#route-transition {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  object-fit: cover; object-position: center 70%; z-index: 200; background: var(--white);
}
#fade-veil {
  position: fixed; inset: 0; background: var(--white);
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease; z-index: 200;
}
#fade-veil.on { opacity: 1; pointer-events: auto; }

/* ---------- buttons ---------- */
.buy {
  font-size: 11px; letter-spacing: .08em; font-weight: 700;
  padding: 12px 22px; background: var(--white); color: var(--black);
  border: 1px solid var(--black); cursor: pointer; white-space: nowrap;
}
.buy:hover { background: var(--black); color: var(--white); }
.buy:disabled, .buy:disabled:hover { background: var(--grey-line); border-color: var(--grey-line); color: var(--grey-mid); cursor: default; }

/* ---------- contact page ---------- */
#contact-page .legal { margin-top: 48px; font-size: 11px; color: var(--grey-mid); }
#contact-form { max-width: 560px; }
#contact-form label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  margin-bottom: 18px;
}
#contact-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 480px) { #contact-form .row2 { grid-template-columns: 1fr; } }
#contact-form input, #contact-form textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 12px 14px; font-family: var(--font); font-size: 14px;
  border: 1px solid var(--black); border-radius: 8px; outline: none;
  background: var(--white); resize: vertical;
}
#contact-form input:focus, #contact-form textarea:focus { box-shadow: 2px 3px 0 rgba(17,17,17,.15); }
#contact-form input.err, #contact-form textarea.err { border-color: #c0392b; border-width: 2px; }
#contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#contact-form .buy { font-size: 12px; padding: 14px 40px; }
#contact-msg { margin-top: 16px; font-size: 13px; min-height: 18px; }
#contact-msg.good { color: #1e7d32; }
#contact-msg.bad { color: #c0392b; }
#contact-page .mail-alt { margin-top: 26px; font-size: 12px; color: var(--grey-mid); }
#contact-page .mail-alt a { color: inherit; }

/* ---------- product detail ---------- */
#bg-video {
  position: fixed; top: 0; right: 0; bottom: 0; left: auto;
  width: 65vw; height: 100vh;
  object-fit: cover; z-index: -2;
}
#bg-wash { position: fixed; inset: 0; z-index: -1; background: rgba(255, 255, 255, 0.5); }
#pdp { padding: 140px 5vw 90px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
#pdp .media { border: 1px solid var(--grey-line); background: var(--white); }
#pdp .media img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; display: block; filter: grayscale(1); }
#pdp h1 { font-size: clamp(24px, 3vw, 38px); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
#pdp .price { font-size: 17px; color: var(--grey-mid); margin-top: 10px; }
#pdp .desc { font-size: 15px; line-height: 1.7; margin-top: 26px; max-width: 46ch; }
#pdp .buy { font-size: 12px; padding: 15px 38px; margin-top: 34px; }
#pdp .back { display: inline-block; font-size: 12px; margin-bottom: 22px; text-decoration: underline; }
#pdp-thumbs { display: flex; gap: 10px; margin-top: 10px; }
#pdp-thumbs img {
  width: 76px; height: 76px; object-fit: contain; display: block;
  background: var(--white); border: 1px solid var(--grey-line);
  cursor: pointer; filter: grayscale(1);
}
#pdp-thumbs img.active { border-color: var(--black); }
@media (max-width: 800px) { #pdp { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- home: locked scrub + hotspots ---------- */
body.home { overflow: hidden; height: 100vh; }
#frame-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2; }
#home-title {
  position: fixed; left: 50%; bottom: 9vh; transform: translateX(-50%);
  text-align: center; pointer-events: none;
}
#home-title h1 { font-size: clamp(40px, 7vw, 88px); font-weight: 700; letter-spacing: .02em; line-height: 1; }
#home-title .slogan { margin-top: 10px; font-size: clamp(13px, 1.5vw, 17px); letter-spacing: .06em; font-weight: 500; }
#home-title .hint { margin-top: 14px; font-size: 12px; color: var(--grey-mid); }
.hotspot { position: fixed; z-index: 5; cursor: pointer; }
/* cursor-following tooltip: no overlay, no dimming — just a small floating sign */
.hotspot .sign {
  display: none; position: fixed; left: 0; top: 0;
  background: var(--white); border: 2px solid var(--black); border-radius: 8px;
  padding: 5px 16px; font-size: 16px; font-weight: 400; white-space: nowrap;
  box-shadow: 2px 3px 0 rgba(17,17,17,.15);
  pointer-events: none; z-index: 30;
}
.hotspot:hover .sign { display: block; }

/* ---------- cart drawer ---------- */
#drawer-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(17,17,17,.45);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
body.drawer-open #drawer-overlay { opacity: 1; pointer-events: auto; }
#cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(430px, 94vw); background: var(--white);
  transform: translateX(105%); transition: transform .3s ease;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--grey-line);
}
body.drawer-open #cart-drawer { transform: none; }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 26px 18px;
}
.drawer-head h3 { font-size: 15px; font-weight: 700; letter-spacing: .08em; }
#drawer-close { background: none; border: none; cursor: pointer; font-size: 20px; line-height: 1; }
#drawer-body { flex: 1; overflow-y: auto; padding: 0 26px; }
.dline { display: flex; gap: 16px; padding: 20px 0; border-top: 1px solid var(--grey-line); }
.dline img {
  width: 84px; height: 84px; object-fit: contain; flex: none;
  background: var(--white); border: 1px solid var(--grey-line); filter: grayscale(1);
}
.dline .din { flex: 1; }
.dline .dname { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.dline .dprice { font-size: 12px; color: var(--grey-mid); margin: 3px 0 10px; }
.dline .drow { display: flex; align-items: center; gap: 16px; }
.qty-step { display: inline-flex; align-items: center; border: 1px solid var(--grey-line); }
.qty-step button {
  width: 30px; height: 30px; background: none; border: none; cursor: pointer;
  font-size: 15px; line-height: 1;
}
.qty-step span { min-width: 26px; text-align: center; font-size: 13px; }
.dline .rm {
  background: none; border: none; cursor: pointer;
  font-size: 12px; text-decoration: underline; color: var(--black);
}
.drawer-empty { padding: 30px 0; font-size: 13px; color: var(--grey-mid); border-top: 1px solid var(--grey-line); }
#drawer-upsell { padding: 22px 0; border-top: 1px solid var(--grey-line); }
#drawer-upsell .up-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; margin-bottom: 16px; }
#drawer-upsell .uline { display: flex; gap: 16px; align-items: center; }
#drawer-upsell img {
  width: 70px; height: 70px; object-fit: contain; flex: none;
  background: var(--white); border: 1px solid var(--grey-line); filter: grayscale(1);
}
#drawer-upsell .uname { font-size: 12px; font-weight: 700; text-transform: uppercase; }
#drawer-upsell .uprice { font-size: 12px; color: var(--grey-mid); margin: 2px 0 6px; }
#drawer-upsell .uadd { background: none; border: none; cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0; }
.drawer-foot { padding: 18px 26px 24px; border-top: 1px solid var(--grey-line); }
#drawer-checkout {
  width: 100%; padding: 17px 10px; background: var(--black); color: var(--white);
  border: 1px solid var(--black); cursor: pointer;
  font-size: 13px; letter-spacing: .1em; font-weight: 700;
}
#drawer-checkout:hover { background: var(--white); color: var(--black); }
#drawer-checkout:disabled { background: var(--grey-line); border-color: var(--grey-line); color: var(--grey-mid); cursor: default; }
.dline .oos { color: var(--grey-mid); font-size: 11px; }

/* ---------- email signup popup ---------- */
#signup-overlay {
  position: fixed; inset: 0; z-index: 120; background: rgba(17,17,17,.45);
  display: none; align-items: center; justify-content: center; padding: 5vw;
}
#signup-overlay.open { display: flex; }
#signup-pop {
  background: var(--white); border: 2px solid var(--black); border-radius: 14px;
  box-shadow: 3px 4px 0 rgba(17,17,17,.15);
  width: 100%; max-width: 430px; padding: 34px 32px 30px; position: relative;
  text-align: center;
}
#signup-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; cursor: pointer; font-size: 20px;
}
#signup-pop h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
#signup-pop p { font-size: 13px; color: var(--grey-mid); margin-bottom: 22px; }
#signup-form { display: flex; gap: 10px; flex-wrap: wrap; }
#signup-email {
  flex: 1; min-width: 180px; padding: 12px 14px; font-family: var(--font); font-size: 14px;
  border: 1px solid var(--black); border-radius: 8px; outline: none;
}
#signup-submit {
  padding: 12px 20px; background: var(--black); color: var(--white);
  border: 1px solid var(--black); border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
}
#signup-submit:hover { background: var(--white); color: var(--black); }
#signup-msg { margin-top: 14px; font-size: 13px; min-height: 18px; }

/* ---------- lock screen: COMING SOON over the main animation ---------- */
body.locked { overflow: hidden; height: 100vh; }
#lock-screen { position: fixed; inset: 0; z-index: 300; background: var(--white); }
#lock-screen video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 70%;
}
#lock-screen .lock-wash { position: absolute; inset: 0; background: rgba(255,255,255,.55); }
#lock-screen .lock-inner {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(430px, 88vw); text-align: center;
}
#lock-screen h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 700; letter-spacing: .02em; line-height: 1; }
#lock-screen .coming { margin-top: 8px; font-size: clamp(15px, 2vw, 20px); letter-spacing: .12em; font-weight: 700; }
#lock-screen p { margin: 20px 0 14px; font-size: 13px; color: var(--grey-mid); }
#lock-screen form { display: flex; gap: 10px; }
#lock-screen form input {
  flex: 1; min-width: 0; padding: 12px 14px; font-family: var(--font); font-size: 14px;
  border: 1px solid var(--black); border-radius: 8px; outline: none; background: var(--white);
}
#lock-screen form button {
  padding: 12px 20px; background: var(--black); color: var(--white);
  border: 1px solid var(--black); border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
}
#lock-screen form button:hover { background: var(--white); color: var(--black); }
#lock-screen #lock-pass { margin-top: 26px; }
#lock-screen #lock-pass input { border-color: var(--grey-mid); }
#lock-screen .lock-msg { margin-top: 10px; font-size: 13px; min-height: 18px; }
