/* Buy page (/buy) on the brand's tokens and glass (brand.css).
   Desktop: the buy card sits on the right and stays on screen; on the left the tee is sticky while the page
   scrolls past it, first as the product, then with the four facts around it; questions and the footer close.
   Phones: one column (tee, card, facts, questions) and a sticky buy bar. */
.ic-back { width: 8px; height: 13px; fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- header: back + logo on the left, EN + bag + menu on the right ---------- */
.page-buy .header { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border-bottom: 1px solid rgba(var(--ink), .08); }
.burger { position: relative; width: 18px; height: 12px; display: block; }
.burger i { position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: var(--fg); transition: transform .5s var(--ease), top .5s var(--ease); }
.burger i:first-child { top: 2.5px; } .burger i:last-child { top: 8px; }
#menuBtn.is-open .burger i:first-child { top: 5.25px; transform: rotate(45deg); }
#menuBtn.is-open .burger i:last-child { top: 5.25px; transform: rotate(-45deg); }

/* ---------- layout ---------- */
.shop { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 56px; padding: 88px var(--gutter) 0; }
.shop__left { min-width: 0; }
.shop__right { position: relative; }

/* the scene: one grid cell holds the sticky tee and, on top of it, the sections that scroll past */
.scene { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: calc(100vh - 88px) auto; }
.scene__stick { grid-area: 1 / 1 / 3 / 2; align-self: start; position: sticky; top: 88px; height: calc(100vh - 88px); display: flex; flex-direction: column; padding: 16px 0 24px; }
.scene__hero { grid-area: 1 / 1 / 2 / 2; pointer-events: none; position: relative; z-index: 2; }
/* back: under the header, so the logo sits where it does on every other page */
.back { position: absolute; left: 0; top: 16px; pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 18px 0 16px; border-radius: 500px; font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; transition: transform .5s var(--ease), box-shadow .5s; }
.back:hover { transform: translateY(-2px); box-shadow: var(--lg-edge), inset 0 0 22px rgba(var(--ink), .08), var(--lg-drop); }
.back:hover .ic-back { transform: translateX(-3px); }
.back .ic-back { transition: transform .5s var(--ease); }
.specs { grid-area: 2 / 1 / 3 / 2; position: relative; min-height: 100vh; padding-top: 88px; pointer-events: none; }   /* top 88 = under the header, like the sticky tee */

/* ---------- stage ---------- */
.stage { position: relative; flex: 1; min-height: 0; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform .9s var(--ease); }
.stage.is-drag { cursor: grabbing; }
.stage .turnable__view { position: absolute; inset: 0 0 34px; overflow: hidden; z-index: 1; }
.stage .spin { bottom: 34px; transform: translate(-50%, 50%); transition: opacity .4s var(--ease); }
.thumbs { display: flex; gap: 10px; justify-content: center; padding-top: 18px; transition: opacity .4s var(--ease), transform .6s var(--ease); }
.thumb-btn { position: relative; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--lg-fill); box-shadow: var(--lg-edge); transition: box-shadow .3s, transform .5s var(--ease); }
.thumb-btn:hover { transform: translateY(-2px); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: scale(1.9); }
.thumb-btn img.thumb-btn__spin { object-position: 50% 50%; transform: scale(.78); }
.thumb-btn__tag { position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 6px; font-size: 9px; font-weight: 700; letter-spacing: .04em; line-height: 1.4; background: rgba(var(--paper), .7); color: var(--fg); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.thumb-btn.is-on { box-shadow: inset 0 0 0 1.5px var(--fg), var(--lg-drop); }

/* specs in view: the tee steps back a little, the controls give way to the four facts */
.scene.is-specs .stage { transform: scale(.86) translateY(13%); }   /* thumbs and 360 are hidden here: the tee moves down into their room */
.scene.is-specs :is(.thumbs, .stage .spin) { opacity: 0; pointer-events: none; }
.scene.is-specs .thumbs { transform: translateY(12px); }

/* ---------- specs: title, then four facts around the tee ---------- */
/* the title lives in the sticky layer with the hotspots, so it stands still while the page scrolls under it */
.specs__title { position: absolute; left: 0; top: 24px; z-index: 2; display: flex; flex-direction: column; gap: 10px; text-transform: uppercase; font-weight: 400; opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.scene.is-specs .specs__title { opacity: 1; transform: none; }
.specs__line { font-size: clamp(24px, 2.4vw, 36px); line-height: 1.04; max-width: 16em; text-wrap: balance; }
/* the facts as the landing's hotspots: a glass orb on the tee, a leader line, icon + title + note.
   buy.js moves the layer into the sticky stage on desktop and places every dot on the front-facing tee */
.ht-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ht { position: absolute; left: 0; top: 0; }
.ht__dot { position: absolute; width: 72px; height: 72px; left: -36px; top: -36px; border-radius: 50%; display: grid; place-items: center; transform: scale(.3); opacity: 0; transition: transform .6s var(--ease), opacity .4s;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.45), rgba(255,255,255,.06) 42%, rgba(255,255,255,.02) 70%), rgba(20,20,22,.35);
  box-shadow: inset 1.4px 1.4px 0 rgba(255,255,255,.7), inset -1px -1px 0 rgba(255,255,255,.15), inset 0 0 18px rgba(255,255,255,.08), 0 10px 26px -8px rgba(0,0,0,.7);
  backdrop-filter: blur(6px) saturate(150%); -webkit-backdrop-filter: blur(6px) saturate(150%); }
.ht__dot::after { content: ""; width: 70%; height: 70%; border-radius: 50%; background: radial-gradient(circle at 38% 32%, rgba(255,255,255,.75), rgba(255,255,255,.25) 55%, rgba(255,255,255,.12)); box-shadow: inset 1px 1px 0 rgba(255,255,255,.8); }
html.is-white .ht__dot { background: radial-gradient(circle at 34% 28%, #fff, rgba(255,255,255,.55) 45%, rgba(230,230,232,.5)); box-shadow: inset 1.4px 1.4px 0 #fff, inset -1px -1px 0 rgba(0,0,0,.1), 0 10px 24px -8px rgba(0,0,0,.25); }
html.is-white .ht__dot::after { background: radial-gradient(circle at 38% 32%, #fff, rgba(235,235,235,.9) 55%, rgba(210,210,210,.9)); box-shadow: inset 1px 1px 0 #fff, 0 2px 6px rgba(0,0,0,.15); }
.ht__line { position: absolute; overflow: visible; pointer-events: none; }
.ht__line path { fill: none; stroke: rgba(var(--ink), .5); stroke-linecap: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 1.1s var(--ease) .1s; }
.ht__text { position: absolute; width: 260px; opacity: 0; transform: translateY(8px); transition: opacity .6s var(--ease) .35s, transform .6s var(--ease) .35s; text-shadow: 0 1px 12px rgba(var(--paper), .9); }
.ht__text h3 { font-weight: 500; font-size: 16px; line-height: 1.3; margin-bottom: 28px; white-space: nowrap; display: flex; align-items: center; gap: 12px; }
.ht__ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--ink), .06); box-shadow: inset 1.2px 1.2px 0 rgba(var(--ink), .45), inset -1px -1px 0 rgba(var(--ink), .1), inset 0 10px 14px -12px rgba(var(--ink), .4); }
.ht__ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ht__text p { color: var(--muted); font-size: 14px; line-height: 1.45; text-wrap: balance; }
.ht-layer.is-on .ht__dot { opacity: 1; transform: none; }
.ht-layer.is-on .ht__line path { stroke-dashoffset: 0; }
.ht-layer.is-on .ht__text { opacity: 1; transform: none; }
.ht:nth-of-type(2) * { transition-delay: .1s; } .ht:nth-of-type(3) * { transition-delay: .18s; } .ht:nth-of-type(4) * { transition-delay: .26s; }

/* ---------- questions ---------- */
.faq { display: flex; flex-direction: column; padding: 72px 0 120px; }   /* the full left column: the same lines as the tee above */
.faq > .k { margin-bottom: 8px; }
.faq details { border-top: 1px solid rgba(var(--ink), .14); }
.faq details:last-child { border-bottom: 1px solid rgba(var(--ink), .14); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-size: 18px; text-transform: uppercase; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--muted); transition: transform .4s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 0 18px; font-size: 15px; line-height: 1.45; color: var(--muted); max-width: 640px; text-wrap: pretty; }

/* ---------- the buy card: light glass, always on screen ---------- */
.card { position: sticky; top: var(--card-top, 104px); margin: calc(var(--card-top, 104px) - 88px) 0 48px; max-height: calc(100vh - var(--card-top, 104px) - 24px); overflow-y: auto; scrollbar-width: none;
  border: 0; border-radius: 24px; padding: 32px 30px 28px; display: flex; flex-direction: column; gap: 26px;
  /* the brand guide's mode cards: a solid panel with a lit top-left rim and a soft drop */
  background: #000; box-shadow: inset 1.2px 1.2px 0 rgba(255,255,255,.4), inset -1px -1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.06), 0 24px 50px -24px rgba(0,0,0,.9); }
html.is-white .card { background: #eaeaea; box-shadow: inset 1.2px 1.2px 0 #fff, inset -1px -1px 0 rgba(0,0,0,.1), 0 0 0 1px rgba(0,0,0,.06), 0 24px 50px -24px rgba(0,0,0,.35); }
.card::-webkit-scrollbar { display: none; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.card__head .k { margin-bottom: 10px; }
.card__title { font-weight: 400; font-size: 30px; line-height: 1.02; text-transform: uppercase; text-wrap: balance; }
.card__title em { font-style: normal; font-weight: 700; display: block; }
.card__price { font-size: 28px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; padding-top: 22px; }
.card__desc { font-size: 14px; line-height: 1.45; color: var(--muted); margin-top: -10px; text-wrap: pretty; }
.opt { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.opt legend { display: flex; align-items: baseline; gap: 10px; padding: 0; margin-bottom: 12px; width: 100%; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.opt legend > span:first-child { font-size: 10px; }
.opt legend b { color: var(--fg); font-weight: 500; letter-spacing: .04em; }
.opt__hint { margin-left: auto; letter-spacing: .04em; text-transform: none; font-size: 12px; }
.opt .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card .sw { width: 44px; height: 44px; }
.card .sw i { width: 28px; height: 28px; }
.card .seg { width: 100%; height: 46px; }
.card .seg button { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; }
.card .seg svg.tee { width: 20px; height: 17px; fill: currentColor; opacity: .85; }
.sizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sizes button { display: grid; place-items: center; text-align: center; height: 44px; border-radius: 12px; font-size: 15px; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(var(--ink), .16); transition: transform .5s var(--ease), box-shadow .3s, background .3s, color .3s; }
.sizes button:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(var(--ink), .4); }
.sizes button[aria-checked="true"] { background: var(--thumb); box-shadow: var(--thumb-edge); color: #fff; }
#sizeOpt.is-missing legend b { color: var(--fg); }
#sizeOpt.is-missing .sizes button { box-shadow: inset 0 0 0 1px rgba(var(--ink), .7); }
#sizeOpt.is-missing .sizes { animation: nudgeX .45s var(--ease); }
@keyframes nudgeX { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.buyrow { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.qty { display: flex; align-items: center; height: 56px; border-radius: 500px; padding: 0 6px; flex: none; box-shadow: inset 0 0 0 1px rgba(var(--ink), .16); }
.qty button { width: 38px; height: 38px; border-radius: 50%; font-size: 20px; display: grid; place-items: center; transition: background .25s; }
.qty button:hover { background: rgba(var(--ink), .1); }
.qty output { min-width: 20px; text-align: center; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.buy-cta { flex: 1; width: auto; justify-content: space-between; white-space: nowrap; font-size: 18px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 18px; border-top: 1px solid rgba(var(--ink), .1); }
.trust li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.trust svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* get both */
.both { height: 40px; padding: 0 16px 0 12px; border-radius: 500px; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(var(--ink), .16); transition: transform .5s var(--ease), box-shadow .3s; }
.both:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(var(--ink), .4); }
.both__dots { display: flex; }
.both__dots i { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(var(--ink), .4); }
.both__dots i:first-child { background: #000; } .both__dots i:last-child { background: #f4f4f4; margin-left: -5px; }

/* ---------- footer (the landing's, on brand tokens) ---------- */
.page-buy .footer { position: relative; z-index: 2; background: var(--bg); min-height: 210px; padding: 24px var(--gutter) 25px; display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 40px; border-top: 1px solid rgba(var(--ink), .08); font-size: 16px; }   /* brand.css has its own centred grid footer */
.page-buy .footer .logo { font-size: 24px; }
.page-buy .footer__top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; justify-self: auto; }
.page-buy .footer__top:hover { color: inherit; }
.footer__toggle { justify-self: center; }
.socials { justify-self: end; display: flex; gap: 12px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: transform .4s var(--ease); }
.socials a:hover { transform: translateY(-2px); }
.socials img { width: 17px; height: 17px; transform: scaleY(-1); opacity: .9; }
html.is-white .socials img { filter: invert(1); }
.footer__bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: var(--muted); font-size: 16px; line-height: 1.3; }
.footer__bottom p:last-child { justify-self: end; }
.footer__bottom b { color: var(--fg); font-weight: 400; margin-left: 8px; }
.footer__links { display: flex; gap: 40px; }
.page-buy .footer a:hover { color: var(--fg); }

/* ---------- sticky buy bar (phones only) ---------- */
.buybar { position: fixed; left: 50%; bottom: 18px; z-index: 40; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 20px; padding: 8px 8px 8px 22px; border-radius: 500px; width: min(560px, calc(100% - 24px)); justify-content: space-between; transition: transform .6s var(--ease); }
.buybar.is-on { transform: translate(-50%, 0); }
.buybar__info { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; min-width: 0; }
.buybar__info b { font-weight: 500; font-size: 15px; text-transform: uppercase; }
.buybar__info > span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar .cta { flex: none; }
@media (min-width: 1001px) { .buybar { display: none; } }

/* ---------- smaller desktops ---------- */
@media (max-width: 1200px) {
  .shop { grid-template-columns: minmax(0, 1fr) 360px; column-gap: 40px; }
  .card { padding: 26px 24px 22px; gap: 20px; }
  .card__title { font-size: 26px; }
}
@media (max-height: 760px) and (min-width: 1001px) {
  .card { gap: 14px; padding: 20px 22px; }
  .card__desc { display: none; }
}

/* ---------- one column: tee, card, facts, questions ---------- */
@media (max-width: 1000px) {
  .shop { grid-template-columns: minmax(0, 1fr); padding-top: 72px; }
  .shop__left, .scene { display: contents; }
  .scene__stick { order: 1; grid-area: auto; position: relative; top: auto; height: min(64vh, 600px); padding-top: 8px; }
  .shop__right { order: 2; }
  .specs { order: 3; grid-area: auto; min-height: 0; padding-top: 0; pointer-events: auto; padding-bottom: 8px; }
  .faq { order: 4; padding: 48px 0 120px; }
  .card { position: static; max-height: none; overflow: visible; margin: 8px 0 0; }
  .scene__hero { display: block; order: 0; grid-area: auto; height: 0; }
    .back { top: 4px; height: 36px; font-size: 13px; padding: 0 14px 0 12px; z-index: 3; }
  .specs__title { position: static; padding-top: 48px; opacity: 1; transform: none; }
  .specs { padding-bottom: 0; }
  /* phones: the hotspots become a list under the title */
  .ht-layer { position: static; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; pointer-events: auto; }
  .ht-layer .specs__title { margin-bottom: 6px; }
  .ht { position: static; transform: none !important; }
  .ht__dot, .ht__line { display: none; }
  .ht__text { position: static; width: auto !important; opacity: 1; transform: none; text-shadow: none; }
  .ht__text h3 { margin-bottom: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(var(--ink), .14); }
  .scene.is-specs .stage { transform: none; }
  .scene.is-specs :is(.thumbs, .stage .spin) { opacity: 1; pointer-events: auto; transform: none; }
}
@media (max-width: 760px) {
  .page-buy .header { column-gap: 8px; }
  .page-buy .header__right { gap: 8px; }
  .page-buy .header__right > .circle:first-child { display: none; }   /* EN, as on the landing */
  .page-buy .header .circle { width: 36px; height: 36px; }
  .page-buy .header #themeToggle { padding-right: 4px; gap: 6px; }
  .page-buy .header #themeToggle .bead { width: 26px; height: 26px; }
  .scene__stick { height: 54vh; }
  .thumb-btn { width: 56px; height: 56px; }
  .card { padding: 20px 18px; border-radius: 20px; }
    .buy-cta { font-size: 16px; padding-left: 18px; gap: 10px; }
  .qty { height: 52px; padding: 0 2px; }
  .qty button { width: 34px; }
  .page-buy .footer__top { grid-template-columns: 1fr auto; row-gap: 20px; }
  .footer__toggle { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .footer__bottom { grid-template-columns: 1fr; gap: 12px; }
  .page-buy .footer { gap: 32px; padding-bottom: 96px; }   /* room for the buy bar */
  .footer__bottom p:last-child { justify-self: start; }
  .footer__links { gap: 20px; flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .page-buy .logo { font-size: 16px; }
  .page-buy .header #themeToggle { padding-right: 14px; }
  .page-buy .header #themeToggle .bead { display: none; }
}

/* ---------- light theme: the landing configurator's rules, no dark pieces on the light page ---------- */
html.is-white .card .seg__thumb { background: var(--cta-bg); box-shadow: var(--cta-edge); }   /* the selected fit: the bright white bead */
html.is-white .card .seg button.is-on { color: #0c0c0c; }
html.is-white .sizes button[aria-checked="true"] { background: var(--cta-bg); box-shadow: var(--cta-edge); color: #0c0c0c; }
html.is-white .card .sw { background: var(--lg-fill); box-shadow: var(--lg-edge), var(--lg-drop); }
html.is-white .card .sw.is-on { background: var(--lg-fill); box-shadow: 0 0 0 1.5px #121214, 0 10px 24px -10px rgba(0,0,0,.35); }   /* a crisp dark ring */
html.is-white .sizes button, html.is-white :is(.qty, .both) { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
/* hotspot icons: glass beads as on the landing (dark: lit rim on smoked glass, light: white glass) */
.ht__ic { background: var(--lg-fill); box-shadow: var(--lg-edge), var(--lg-drop); backdrop-filter: var(--lg-blur); -webkit-backdrop-filter: var(--lg-blur); }
