/* GENTE ESSENCE launch layer: visibility by phase, countdown stage, shop section, cart drawer. Tokens come from gente.css.
   html[data-grp] = pre | soon | live (set before the first paint by launch-config.js); html[data-phase] = pre | countdown | gate | open | normal. */

/* ---- visibility by group (one exact token per element) ---- */
html[data-grp="soon"] [data-ph="pre"], html[data-grp="live"] [data-ph="pre"], html[data-grp="soon"] [data-ph="prelive"],
html[data-grp="pre"] [data-ph="soon"], html[data-grp="live"] [data-ph="soon"], html:not([data-grp]) [data-ph="soon"],
html[data-grp="pre"] [data-ph="live"], html[data-grp="soon"] [data-ph="live"], html:not([data-grp]) [data-ph="live"],
html[data-grp="live"] [data-ph="presoon"],
html[data-grp="pre"] [data-ph="soonlive"], html:not([data-grp]) [data-ph="soonlive"],
html:not([data-shop]) [data-ph="shop"] { display: none !important; }
html:not([data-phase="countdown"]) [data-st="countdown"], html:not([data-phase="gate"]) [data-st="gate"],
html:not([data-phase="open"]) [data-st="open"], html:not([data-phase="normal"]) [data-st="normal"] { display: none !important; }
[hidden] { display: none !important; }

/* ---- stage: countdown, gate, "shop is open" ---- */
.lstage { position: relative; background: var(--bg); padding-top: calc(var(--nav-h) + 8px); overflow: hidden; }
.lstage-in { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.lstage-copy { position: relative; z-index: 2; width: 100%; max-width: 1040px; padding: clamp(20px, 5vh, 56px) var(--pad) 0; }
.lstage-eye { color: var(--ink2); letter-spacing: normal; text-transform:none; font-size: 12px; }
.lstage-h { font: 200 clamp(38px, 6.4vw, 100px)/1.04 var(--f-d); letter-spacing: 0; margin: 16px auto clamp(18px, 3.4vh, 40px); text-wrap: balance; }
.lstage-h b { font-weight: 600; }
.lstage-sub { font-size: clamp(16px, 1.1vw + 11px, 20px); line-height: 1.6; color: var(--ink2); max-width: 56ch; margin: clamp(16px, 2.6vh, 28px) auto 0; }
.lstage-sub b { color: var(--ink); font-weight: 500; }
.lstage-cta, .lstage-form { margin-top: clamp(18px, 3vh, 30px); }
.lstage-note { margin: 18px auto 0; max-width: 52ch; padding: 12px 16px; border: 1px solid var(--foil); font-size: 15px; line-height: 1.55; }
.lstage-pic { display: block; width: 100%; margin-top: clamp(-216px, -15vw, -70px); position: relative; z-index: 1;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36%); mask-image: linear-gradient(to bottom, transparent 0, #000 36%); pointer-events: none; }
.lstage-pic img { display: block; width: 100%; height: auto; }

.lcd { display: flex; justify-content: center; align-items: flex-start; gap: clamp(6px, 1.6vw, 26px); font-variant-numeric: tabular-nums; }
.lcd-c { display: flex; flex-direction: column; align-items: center; min-width: 1.5ch; }
.lcd-c b { font: 200 clamp(56px, 12.5vw, 184px)/.98 var(--f-d); letter-spacing: 0; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.lcd-c span { font: 500 clamp(10px, .9vw, 12px)/1 var(--f-m); letter-spacing: normal; text-transform:none; color: var(--ink2); margin-top: 6px; padding-left: .24em; }
.lcd > i { font: 200 clamp(40px, 8.5vw, 124px)/1.04 var(--f-d); color: var(--foil); font-style: normal; }
.lcd-days { margin-right: clamp(4px, 1.4vw, 20px); }

.lgate { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 24px auto 0; max-width: 620px; }
.lgate input { flex: 1 1 260px; min-width: 0; font: 400 17px/1.3 var(--f-b); color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); padding: 14px 4px; border-radius: 0; text-align: center; letter-spacing: normal; }
.lgate input::placeholder { color: var(--ink2); opacity: .8; letter-spacing: 0; }
.lgate input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lgate-msg { flex: 1 0 100%; color: #8f2d1d; font-size: 15px; }

.lpromo { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: center; border: 1px solid var(--foil); padding: 14px 20px; max-width: 640px; margin: 22px auto 0; text-align: left; background: rgba(255, 255, 255, .35); }
.lpromo b { font: 600 14px/1.3 var(--f-d); letter-spacing: normal; text-transform:none; }
.lpromo span { font-size: 15px; line-height: 1.5; color: var(--ink2); flex: 1 1 260px; }
.lpromo span b { font: 500 15px/1.5 var(--f-b); letter-spacing: 0; text-transform: none; color: var(--ink); }

/* ---- shop section ---- */
.lshop { background: var(--bg); padding: clamp(56px, 8vw, 110px) var(--pad); scroll-margin-top: calc(var(--nav-h) + 8px); }
.lshop-head { max-width: 1296px; margin: 0 auto clamp(26px, 3.4vw, 44px); display: grid; gap: 14px; }
.lshop-head h2 { font: 200 clamp(36px, 4.8vw, 68px)/1.04 var(--f-d); letter-spacing: 0; }
.lshop-head h2 b { font-weight: 600; }
.lshop-head .lpromo { margin: 4px 0 0; justify-content: flex-start; }
.lgrid { max-width: 1296px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); }
.lcard { display: flex; flex-direction: column; min-width: 0; }
.lcard-img { display: block; overflow: hidden; background: var(--bg2); }
.lcard-img img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .8s var(--e1); }
.lcard:hover .lcard-img img { transform: scale(1.03); }
.lcard-meta { display: flex; flex-direction: column; gap: 8px; padding: 18px 2px 0; flex: 1; }
.lcard-meta .mono { color: var(--ink2); font-size: 11px; letter-spacing: normal; text-transform:none; }
.lcard-meta h3 { font: 200 clamp(26px, 2.4vw, 34px)/1.1 var(--f-d); letter-spacing: 0; }
.lcard-meta h3 a { text-decoration: none; }
.lcard-meta h3 b { font-weight: 600; }
.lcard-meta h3 i { font-style: normal; }
.lcard-meta p { color: var(--ink2); font-size: 16px; line-height: 1.5; }
.lcard-price { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--foil); margin-top: 6px; padding-top: 12px; font-size: 14px; color: var(--ink2); }
.lcard-price b { font: 500 22px/1 var(--f-d); color: var(--ink); }
.lcard-tax { font-size: 12.5px !important; line-height: 1.5 !important; }
.lcard-tax a { text-underline-offset: 2px; }
.lshop-note { max-width: 1296px; margin: clamp(26px, 3vw, 40px) auto 0; font-size: 13.5px; line-height: 1.6; color: var(--ink2); }

.lbuy { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.lbuy .btn { flex: 1; justify-content: center; min-height: 52px; }
.lbuy-step { display: inline-flex; align-items: center; border: 1px solid var(--ink); }
.lbuy-step button { width: 46px; height: 50px; font: 300 22px/1 var(--f-d); }
.lbuy-step button:hover { background: rgba(43, 40, 32, .08); }
.lbuy-step output { min-width: 46px; text-align: center; font: 500 17px/1 var(--f-d); }
.lbuy-page { margin: 22px 0 6px; }
.lbuy-page .btn { flex: 0 1 auto; padding-left: 34px; padding-right: 34px; }
.lbuy-note { flex: 1 0 100%; font-size: 14px; color: var(--ink2); margin: 4px 0 0; }

/* ---- nav cart button ---- */
.gcount { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--warm); color: #2B2820; font: 600 11px/1 var(--f-d); }

/* ---- cart drawer ---- */
.gecart-ov { position: fixed; inset: 0; z-index: 140; background: rgba(20, 16, 12, .42); opacity: 0; transition: opacity .25s ease; }
.gecart { position: fixed; top: 0; right: 0; bottom: 0; z-index: 150; width: min(460px, 100vw); background: var(--bg); color: var(--ink); display: flex; flex-direction: column; padding: 0 clamp(18px, 3vw, 30px) 24px; transform: translateX(100%); transition: transform .3s var(--e1); box-shadow: -20px 0 60px rgba(20, 16, 12, .18); overflow-y: auto; overscroll-behavior: contain; }
html.cart-open .gecart-ov { opacity: 1; }
html.cart-open .gecart { transform: none; }
html.cart-open { overflow: hidden; }
.gecart-h { display: flex; justify-content: space-between; align-items: center; padding: 22px 0 16px; border-bottom: 1px solid var(--foil); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.gecart-h h2 { font: 200 30px/1 var(--f-d); letter-spacing: 0; }
.gecart-h h2 b { font-weight: 600; }
.gecart-x { width: 44px; height: 44px; font: 200 34px/1 var(--f-d); margin-right: -10px; }
.gecart-empty { padding: 36px 0; color: var(--ink2); }
.gecart-list { list-style: none; margin: 0; padding: 0; }
.gecart-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.gl-img img { width: 64px; height: 85px; object-fit: cover; background: var(--bg2); }
.gl-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gl-t b { font: 500 16px/1.25 var(--f-d); } .gl-t b i { font-style: normal; font-weight: 300; }
.gl-t span { font-size: 13px; color: var(--ink2); }
.gl-step { align-self: flex-start; margin-top: 8px; } .gl-step button { width: 38px; height: 38px; font-size: 20px; } .gl-step output { min-width: 34px; font-size: 15px; }
.gl-p { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; } .gl-p b { font: 500 16px/1 var(--f-d); }
.gl-rm { font-size: 12.5px; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
.gecart-sum { margin: 18px 0 0; display: grid; gap: 8px; }
.gecart-sum div { display: flex; justify-content: space-between; gap: 14px; font-size: 15px; }
.gecart-sum dt { color: var(--ink2); } .gecart-sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.gecart-disc dd { color: #2f6b3c; }
.gecart-tot { border-top: 1px solid var(--foil); padding-top: 12px; margin-top: 4px; font-size: 18px !important; } .gecart-tot dt, .gecart-tot dd { color: var(--ink) !important; font-weight: 500; }
.gecart-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink2); }
.gecart-go { margin-top: 18px; width: 100%; justify-content: center; min-height: 56px; text-align: center; }

/* ---- phone ---- */
@media (max-width: 820px) {
  .lgrid { grid-template-columns: 1fr; max-width: 520px; }
  .lcard { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 16px; align-items: start; }
  .lcard-meta { padding-top: 0; }
  .lcard-img img { aspect-ratio: 3 / 4; }
  .lstage-pic { margin-top: clamp(-120px, -22vw, -50px); }
}
@media (max-width: 520px) {
  .lcd-c b { font-size: clamp(46px, 17vw, 84px); }
  .lcd { gap: 4px; }
  .lcd > i { font-size: clamp(30px, 11vw, 56px); }
  .lcard { grid-template-columns: 38% minmax(0, 1fr); }
  .lcard-meta h3 { font-size: 22px; } .lcard-meta p { display: none; }
  .lpromo { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .gecart, .gecart-ov, .lcard-img img { transition: none; } }

/* pages (Fork B): thank-you page, legal banner and company pages in the shop phases */
html[data-shop] .danke-page .nav .btn.mini, html[data-shop] .danke-page .menu-cta { display: inline-flex; }   /* the thank-you page hides the pre-sale button; the cart button stays useful while the shop is open */
.legal-page .stand + .note[data-ph] { margin-top: 12px; }
.st-qr [data-ph] ~ [data-ph] { margin-top: 12px; }

/* wide screens: the poster is 1440 px wide, fade its side edges into the page instead of a hard box */
@media (min-width: 1500px) {
  .lstage-pic { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36%), linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 36%), linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%);
    -webkit-mask-composite: source-in; mask-composite: intersect; }
}

/* ---- start page, phone view (below 768 px): one-screen hero with the offer, fixed buy bar, cart summary pinned to the bottom ---- */
.mh, .gebar { display: none; }
.gecart-foot { display: contents; }
.gecart-ship, .gecart-disc .gd-m { display: none; }
.gecart-disc.is-hint { display: none !important; }
@media (max-width: 767.98px) {
  #hero.hero-pre { height: 62vh; height: 62svh !important; background: var(--bg); }
  #hero.hero-pre .stage { position: relative !important; height: 100% !important; overflow: hidden !important; background: var(--bg) !important; }
  #hero.hero-pre .band, #hero.hero-pre .chev, #hero.hero-pre .ring, #hero.hero-pre canvas, #hero.hero-pre .scrim, #hero.hero-pre .hbottle { display: none !important; }
  #hero.hero-pre .stage .poster { position: absolute !important; inset: 0; height: auto; opacity: 1 !important; background-image: url(home-poster-m.webp) !important; background-size: cover; background-position: center 62% !important; }
  #hero .mh { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; padding: var(--nav-h) 0 8px; color: var(--ink); text-align: center; background: var(--bg); }
  .mh-track { display: flex; flex: 1; min-height: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .mh-track::-webkit-scrollbar { display: none; }
  .mh-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
  .mh-slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
  .mh-gallery-nav { display: flex; justify-content: center; align-items: center; gap: 8px; padding-top: 8px; }
  #hero .mh-thumb.btn { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--foil); background: var(--bg); overflow: hidden; }
  #hero .mh-thumb[aria-pressed="true"] { border-color: var(--ink); }
  .mh-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
  #hero .mh-arrow.btn { width: 44px; height: 44px; min-height: 44px; padding: 0; background: var(--bg); color: var(--ink); font-size: 28px; }
  #hero .mh::after { display: none; content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50%; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, rgba(234, 229, 219, 0) 0, var(--bg) 34%); }
  .mh-kick { font: 500 10.5px/1.4 var(--f-m); letter-spacing: normal; text-transform:none; color: var(--ink2); }
  .mh-h { font: 200 clamp(30px, 9.4vw, 42px)/1.02 var(--f-d); text-transform:none; letter-spacing: normal; margin: 10px auto 0; max-width: 13ch; }
  .mh-h b { font-weight: 800; }
  .mh-buy { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .mh-offer { font: 400 clamp(19px, 5.6vw, 23px)/1.25 var(--f-d); text-wrap: balance; }
  .mh-offer b { font-weight: 700; }
  .mh-offer s { font-weight: 300; opacity: .62; }
  .mh-small { font-size: 12.5px; line-height: 1.45; color: var(--ink2); text-wrap: balance; }
  .mh-cta { width: 100%; min-height: 54px; margin-top: 6px; }
  .mh-link { align-self: center; padding: 8px 10px 2px; font: 500 12px/1 var(--f-m); letter-spacing: normal; text-transform:none; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
  @media (max-height: 680px) { .mh-h { font-size: 27px; } .mh-small { font-size: 12px; } .mh-cta { min-height: 48px; } }

  .claude-home .gebar { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: var(--bg); color: var(--ink); border-top: 1px solid var(--foil); box-shadow: 0 -10px 30px rgba(20, 16, 12, .12); transform: translateY(110%); visibility: hidden; transition: transform .3s var(--e1), visibility 0s linear .3s; }
  .claude-home .gebar.is-on { transform: none; visibility: visible; transition: transform .3s var(--e1); }
  html.cart-open .claude-home .gebar, html.cart-open .gebar { transform: translateY(110%); visibility: hidden; }
  .gebar-t { flex: 1 1 auto; min-width: 0; font: 400 14px/1.3 var(--f-d); }
  .gebar-t b { font-weight: 700; }
  .gebar-t span { white-space: nowrap; }
  .gebar .gebar-btn { flex: 0 0 auto; width: auto; min-height: 46px; padding: 0 16px; }
  .claude-home footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

  body.claude-home .gecart { padding-bottom: 0; }
  body.claude-home .gecart-foot:not([hidden]) { display: block; position: sticky; bottom: 0; z-index: 1; margin-top: auto; padding: 4px 0 calc(14px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--foil); box-shadow: 0 -16px 22px -18px rgba(20, 16, 12, .35); }
  body.claude-home .gecart-foot .gecart-sum { margin-top: 10px; }
  body.claude-home .gecart-ship:not([hidden]) { display: block; margin: 8px 0 0; font-size: 13px; color: var(--ink2); }
  body.claude-home .gecart-disc .gd-d { display: none; }
  body.claude-home .gecart-disc .gd-m { display: inline; }
  body.claude-home .gecart-disc.is-hint { display: flex !important; }
  body.claude-home .gecart-disc.is-hint dd { color: var(--ink2); }
  body.claude-home .gecart-note { margin-top: 6px; font-size: 11.5px; }
  body.claude-home .gecart-go { margin-top: 12px; }
}
