/* ============ TD STUDIOS — Halo Hues-inspired storefront ============ */
:root {
  --cream: #FBF6EC;
  --paper: #FFFDF7;
  --ink: #171411;
  --red: #E2422B;
  --red-deep: #C3331F;
  --butter: #F3B62B;
  --pink: #F6C8D3;
  --pink-hot: #E85A8B;
  --sky: #BFE0F0;
  --mint: #CFE9D6;
  --lime: #DCEF4E;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "Space Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }

/* ---------- Announcement ---------- */
.announce {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--pink); padding: 8px 20px; gap: 12px;
  border-bottom: 1.5px solid var(--ink);
}
.announce a { text-decoration: underline; text-underline-offset: 3px; }
.announce-right { display: flex; gap: 18px; }
@media (max-width: 700px) { .announce-right { display: none; } }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: var(--cream);
  border-bottom: 1.5px solid var(--ink);
}
.wordmark {
  font-family: var(--serif); font-size: 30px; letter-spacing: .01em;
  font-style: italic;
}
.nav { display: flex; gap: 26px; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.nav a { position: relative; padding: 4px 0; }
.nav a:hover { color: var(--red); }
.nav-accent { color: var(--red); }
.header-icons { display: flex; gap: 6px; align-items: center; }
.icon-btn {
  background: none; border: none; padding: 8px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
}
.icon-btn:hover { background: var(--lime); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.cart-count {
  position: absolute; top: 0; right: 0;
  background: var(--red); color: var(--paper);
  font-family: var(--mono); font-size: 10px;
  min-width: 17px; height: 17px; border-radius: 9px;
  display: grid; place-items: center; padding: 0 4px;
}
@media (max-width: 880px) { .nav { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 30px 28px 0; position: relative; overflow: hidden; }
.hero-giant {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 9vw, 132px);
  text-align: center; line-height: 1; white-space: nowrap;
  letter-spacing: .02em; margin-bottom: 18px;
  transition: color .15s ease;
}
.hero-giant:hover { color: var(--red); font-style: italic; }
.hero-giant-arrow { display: inline-block; transition: transform .15s ease; }
.hero-giant:hover .hero-giant-arrow { transform: translateY(.08em); }
.hero-meta {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.hero-stat {
  background: var(--lime); border: 1.5px solid var(--ink);
  padding: 6px 14px; border-radius: 4px; font-weight: 700;
}
.hero-panels {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 1fr 1fr;
  gap: 0; border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden;
  min-height: 470px; background: var(--paper);
}
.hero-panel { position: relative; display: flex; flex-direction: column; }
.hero-panel + .hero-panel { border-left: 1.5px solid var(--ink); }
.panel-sky { background: var(--sky); padding: 48px 36px; justify-content: center; gap: 18px; }
.panel-butter { background: var(--butter); }
.panel-red { background: var(--red); }
.panel-butter img, .panel-red img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-headline {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 4.6vw, 68px); line-height: .95;
}
.hero-sub { max-width: 300px; line-height: 1.6; }
.hero-doodles { opacity: .55; font-style: italic; }
.panel-chip {
  position: absolute; bottom: 16px; left: 16px;
  background: var(--lime); border: 1.5px solid var(--ink);
  padding: 5px 10px; border-radius: 4px; font-weight: 700;
}
.side-tag {
  position: absolute; z-index: 2; top: 50%;
  background: var(--lime); border: 1.5px solid var(--ink);
  padding: 6px 10px; font-weight: 700; white-space: nowrap;
}
.side-tag-left { left: 0; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; border-left: none; }
.side-tag-right { right: 0; transform: translateY(-50%); writing-mode: vertical-rl; border-right: none; }
@media (max-width: 880px) {
  .hero { padding: 18px 16px 0; }
  .hero-panels { grid-template-columns: 1fr; min-height: 0; }
  .hero-panel + .hero-panel { border-left: none; border-top: 1.5px solid var(--ink); }
  .panel-butter img, .panel-red img { max-height: 300px; }
  .side-tag { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 1.5px solid var(--ink);
  background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  padding: 13px 24px; border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
  width: fit-content;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { box-shadow: 3px 3px 0 var(--red); }
.btn-lime { background: var(--lime); }
.btn-wide { width: 100%; text-align: center; }

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); overflow: hidden; padding: 10px 0; margin-top: 34px; }
.marquee-track { display: flex; white-space: nowrap; animation: scroll 22s linear infinite; }
.marquee-track span { color: var(--lime); font-size: 14px; padding-right: 0; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Shop ---------- */
.shop { padding: 70px 28px; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 60px); }
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.shop-kicker { color: var(--red); margin-bottom: 8px; }
.coming-soon {
  margin-top: 34px; padding: 16px 20px; text-align: center;
  border: 1.5px dashed var(--ink); border-radius: 999px; background: var(--mint);
}
.coming-soon a { text-decoration: underline; text-underline-offset: 3px; }
.coming-soon a:hover { color: var(--red); }
.pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.pill {
  border: 1.5px solid var(--ink); background: var(--paper);
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  padding: 8px 16px; border-radius: 999px; transition: all .12s;
}
.pill:hover { background: var(--lime); }
.pill.active { background: var(--ink); color: var(--paper); }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 22px;
}
.card {
  border: 1.5px solid var(--ink); border-radius: 16px; overflow: hidden;
  background: var(--paper); display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }
.card-img { position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.badge {
  background: var(--lime); border: 1.5px solid var(--ink);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; width: fit-content;
}
.badge-red { background: var(--red); color: var(--paper); }
.badge-pink { background: var(--pink); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-family: var(--serif); font-size: 21px; line-height: 1.1; cursor: pointer; }
.card-title:hover { color: var(--red); }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.card-price { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.card-add {
  border: 1.5px solid var(--ink); background: var(--paper);
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; transition: all .12s;
}
.card-add:hover { background: var(--ink); color: var(--lime); }

/* ---------- Editorial ---------- */
.editorial {
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
}
.edit-left { background: var(--ink); color: var(--cream); padding: 80px 56px; display: flex; flex-direction: column; gap: 22px; }
.edit-kicker { color: var(--lime); }
.edit-headline { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 5.5vw, 84px); line-height: .95; }
.edit-headline em { color: var(--pink); }
.edit-copy { max-width: 420px; line-height: 1.7; opacity: .85; }
.edit-list { color: var(--butter); }
.edit-right { background: var(--mint); display: grid; place-items: center; padding: 56px; }
.edit-img-wrap { position: relative; max-width: 440px; }
.edit-img-wrap img { border: 1.5px solid var(--ink); border-radius: 16px; }
.sticker {
  position: absolute; background: var(--paper); border: 1.5px solid var(--ink);
  padding: 6px 12px; border-radius: 999px; font-weight: 700;
}
.sticker-1 { top: -14px; right: -10px; transform: rotate(6deg); background: var(--pink); }
.sticker-2 { bottom: -12px; left: -14px; transform: rotate(-5deg); background: var(--lime); }
@media (max-width: 880px) {
  .editorial { grid-template-columns: 1fr; }
  .edit-left { padding: 56px 28px; }
  .edit-right { padding: 40px 28px; }
}

/* ---------- Custom builder ---------- */
.custom { padding: 80px 28px; text-align: center; background: var(--cream); }
.custom-kicker { color: var(--red); margin-bottom: 10px; }
.custom-sub { margin: 12px 0 36px; font-size: 16px; }
.builder {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  max-width: 860px; margin: 0 auto;
  border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden;
  text-align: left; background: var(--paper);
}
.builder-preview {
  position: relative; display: grid; place-items: center;
  padding: 16px; border-right: 1.5px solid var(--ink);
  min-width: 0; /* let the column honor 1fr so the canvas can't force overflow */
  overflow: hidden;
}
#sign3d { width: 100%; height: clamp(300px, 34vw, 400px); }
#sign3d canvas { display: block; max-width: 100%; }
.spin-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  opacity: .55; pointer-events: none; white-space: nowrap;
}
.builder-controls { padding: 36px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.builder-controls label { font-weight: 700; margin-top: 8px; }
.builder-controls input,
.builder-controls textarea {
  width: 100%; min-width: 0;
  font-family: var(--mono); font-size: 15px; padding: 13px 16px;
  border: 1.5px solid var(--ink); border-radius: 10px; background: var(--cream);
  outline: none; text-transform: uppercase;
}
.builder-controls textarea { resize: vertical; line-height: 1.4; min-height: 52px; }
.builder-controls input:focus,
.builder-controls textarea:focus { background: var(--paper); box-shadow: 3px 3px 0 var(--lime); }
.builder-warn {
  color: var(--red-deep); background: #FCE7E2;
  border: 1.5px solid var(--red); border-radius: 8px;
  padding: 8px 12px; line-height: 1.4; margin-top: -4px;
}
.swatches { display: flex; gap: 10px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--ink); transition: transform .12s; }
.swatch:hover { transform: scale(1.12); }
.swatch.active { outline: 3px solid var(--lime); outline-offset: 2px; }
.sw-red { background: var(--red); }
.sw-yellow { background: var(--butter); }
.sw-pink { background: var(--pink); }
.sw-green { background: #46B45A; }
.sw-black { background: var(--ink); }
.sw-text-black { background: var(--ink); }
.sw-text-white { background: #FFFFFF; }
.builder-hint { opacity: .5; margin-top: -4px; display: block; }

/* size selector */
.sizes { display: flex; gap: 8px; }
.size-btn {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px;
  align-items: center; padding: 10px 6px; background: var(--cream);
  border: 1.5px solid var(--ink); border-radius: 10px;
  font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: .04em;
  transition: transform .1s, background .1s;
}
.size-btn span { font-size: 11px; font-weight: 400; opacity: .65; }
.size-btn:hover { transform: translateY(-2px); }
.size-btn.active { background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }

/* quantity stepper */
.qty-stepper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qty-stepper button {
  width: 40px; height: 40px; font-size: 22px; line-height: 1;
  border: 1.5px solid var(--ink); border-radius: 10px; background: var(--cream);
  display: grid; place-items: center; transition: background .1s;
}
.qty-stepper button:hover { background: var(--lime); }
#customQty {
  width: 64px; text-align: center; font-family: var(--mono); font-size: 16px;
  padding: 10px 6px; border: 1.5px solid var(--ink); border-radius: 10px;
  background: var(--cream); outline: none;
  -moz-appearance: textfield;
}
#customQty::-webkit-outer-spin-button,
#customQty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-tier { opacity: .6; margin-left: 2px; }

/* live price */
.price-line { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.unit-price { font-family: var(--serif); font-size: 28px; }

.builder-note { opacity: .6; }
@media (max-width: 760px) {
  .builder { grid-template-columns: 1fr; }
  .builder-preview { border-right: none; border-bottom: 1.5px solid var(--ink); }
  #sign3d { height: clamp(280px, 72vw, 380px); }
  .builder-controls { padding: 26px 22px; }
}

/* ---------- Reviews ---------- */
.reviews { padding: 80px 28px; background: var(--butter); border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.reviews-head { text-align: center; margin-bottom: 40px; display: flex; flex-direction: column; gap: 8px; }
.review-row { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; }
.review-card {
  min-width: 290px; flex: 1; border: 1.5px solid var(--ink); border-radius: 16px;
  padding: 26px 24px; display: flex; flex-direction: column; gap: 16px; justify-content: space-between;
}
.review-card blockquote { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.rc-pink { background: var(--pink); transform: rotate(-.6deg); }
.rc-mint { background: var(--mint); transform: rotate(.5deg); }
.rc-butter { background: var(--paper); transform: rotate(-.4deg); }
.rc-sky { background: var(--sky); transform: rotate(.6deg); }

/* ---------- Story ---------- */
.story { padding: 90px 28px; }
.story-inner { max-width: 820px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 22px; }
.story-kicker { color: var(--red); }
.story-quote { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.15; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--cream); padding: 70px 28px 20px; overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; max-width: 1200px; margin: 0 auto 60px; }
.foot-headline { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 46px); margin-bottom: 22px; }
.news-form { display: flex; gap: 10px; max-width: 440px; }
.news-form input {
  flex: 1; font-family: var(--mono); font-size: 13px; padding: 13px 16px;
  border: 1.5px solid var(--cream); border-radius: 999px; background: transparent; color: var(--cream); outline: none;
}
.news-form input::placeholder { color: rgba(251,246,236,.5); }
.foot-links { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-links h4 { color: var(--lime); margin-bottom: 14px; font-size: 12px; }
.foot-links a { display: block; margin-bottom: 10px; opacity: .8; }
.foot-links a:hover { opacity: 1; color: var(--pink); }
.footer-giant {
  font-family: var(--serif); font-size: clamp(70px, 14vw, 220px); line-height: .8;
  text-align: center; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px rgba(251,246,236,.35);
  margin-bottom: 36px; user-select: none;
}
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid rgba(251,246,236,.2); padding-top: 18px; opacity: .7;
}
@media (max-width: 880px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(23,20,17,.45);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90;
}
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 100vw);
  background: var(--cream); border-left: 1.5px solid var(--ink); z-index: 100;
  transform: translateX(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
.drawer.show { transform: translateX(0); }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1.5px solid var(--ink);
}
.drawer-head h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; }
.ship-bar { padding: 14px 22px; background: var(--pink); border-bottom: 1.5px solid var(--ink); }
.ship-track { height: 8px; border: 1.5px solid var(--ink); border-radius: 99px; margin-top: 8px; background: var(--paper); overflow: hidden; }
.ship-fill { height: 100%; background: var(--lime); width: 0%; transition: width .3s; }
.drawer-items { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.drawer-empty { text-align: center; opacity: .6; margin-top: 40px; line-height: 2; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; }
.cart-item img, .cart-item .ci-swatch {
  width: 72px; height: 72px; object-fit: cover;
  border: 1.5px solid var(--ink); border-radius: 10px;
}
.ci-swatch { display: grid; place-items: center; font-size: 26px; }
.ci-title { font-family: var(--serif); font-size: 17px; line-height: 1.1; }
.ci-custom { font-size: 10px; opacity: .65; display: block; margin-top: 3px; }
.ci-controls { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn {
  width: 22px; height: 22px; border: 1.5px solid var(--ink); border-radius: 6px;
  background: var(--paper); font-family: var(--mono); font-size: 12px; line-height: 1;
}
.qty-btn:hover { background: var(--lime); }
.ci-remove { background: none; border: none; font-family: var(--mono); font-size: 10px; text-decoration: underline; opacity: .6; }
.ci-price { font-family: var(--mono); font-weight: 700; font-size: 13px; }
.drawer-foot { border-top: 1.5px solid var(--ink); padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.subtotal { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; }
.drawer-note { text-align: center; opacity: .55; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal.show { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--cream); border: 1.5px solid var(--ink); border-radius: 18px;
  max-width: 760px; width: 100%; max-height: 90dvh; overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr;
  transform: translateY(12px); transition: transform .2s;
}
.modal.show .modal-card { transform: translateY(0); }
.modal-img { position: relative; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; border-right: 1.5px solid var(--ink); }
.modal-body { padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 50%;
  width: 34px; height: 34px; display: grid; place-items: center;
}
.modal-close svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; }
.modal-title { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1; }
.modal-price { font-family: var(--mono); font-weight: 700; font-size: 18px; }
.modal-desc { line-height: 1.65; font-size: 14px; opacity: .85; }
@media (max-width: 700px) {
  .modal-card { grid-template-columns: 1fr; }
  .modal-img img { border-right: none; border-bottom: 1.5px solid var(--ink); max-height: 300px; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 80px);
  background: var(--ink); color: var(--lime); padding: 12px 24px; border-radius: 999px;
  z-index: 120; transition: transform .3s cubic-bezier(.2,.8,.2,1); font-weight: 700;
}
.toast.show { transform: translate(-50%, 0); }
