: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); }

/* ---------- 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 grid: name-only tiles ---------- */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
.product { background: transparent; display: block; text-decoration: none; text-align: center; }
.product .media { aspect-ratio: 1 / 1; overflow: hidden; background: transparent; }
.product .media img { width: 100%; height: 100%; object-fit: contain; display: block; filter: grayscale(1); }
.product .media img.alt { display: none; }
.product:hover .media img.main { display: none; }
.product:hover .media img.alt { display: block; }
.product .name {
  font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 14px; line-height: 1.4;
}
.product.soldout .media img { opacity: .45; }
@media (max-width: 900px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .products { grid-template-columns: 1fr; } }

/* ---------- 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 .mail { font-size: clamp(22px, 3.4vw, 38px); font-weight: 500; text-decoration: none; }
#contact-page .mail:hover { text-decoration: underline; }
#contact-page .legal { margin-top: 48px; font-size: 11px; color: var(--grey-mid); }

/* ---------- product detail ---------- */
#bg-video {
  position: fixed; top: 0; right: 0; bottom: 0; left: auto;
  width: 50vw; 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; }
