/* ─────────────────────────────────────────────────────────────
   SalesHub.Nepal — Entry gate (age verification + preloader)
   Pair with entry-gate.js.
   Self-contained — does not depend on the page's own stylesheet.

   Palette: brand orange #FF5C3A anchors both screens.
   Light-first: warm cream stage, orange card, orange pour.
   Dark theme re-tunes surfaces deliberately (warm espresso,
   never a plain inversion).
   ───────────────────────────────────────────────────────────── */

/* Hide the page body while the gate is up (FOUC prevention) */
html[data-gating="1"] body { visibility: hidden }

/* Overlay shell — background and text follow the active theme token */
.entry-overlay{
  position: fixed; inset: 0;
  z-index: 9999;
  display: grid; place-items: center;
  padding: clamp(20px, 5vw, 60px);
  background: var(--cream, #FFFFFF);
  color: var(--ink, #0B0B0D);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  visibility: visible !important; /* override gating */
  opacity: 0;
  transition: opacity .4s cubic-bezier(.2,.7,.2,1);
}
.entry-overlay.show{ opacity: 1 }
.entry-overlay.leave{ opacity: 0 }
/* Age gate is the tallest screen — on short viewports let it scroll & top-align
   safely instead of clipping the buttons (preloader/restricted stay centered). */
.entry-overlay[data-stage="age"]{ align-items: safe center; overflow-y: auto }

/* Animated background */
.entry-bg{
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
}
.entry-grid{
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(58,36,24,.08) 1px, transparent 0);
  background-size: 24px 24px;
  opacity: .5;
}
[data-theme="dark"] .entry-grid{
  background-image: radial-gradient(circle at 1px 1px, rgba(244,239,227,.06) 1px, transparent 0);
}

/* ═══════════════════════════════════════════════════════════════
   AGE-GATE CARD — split editorial
   Product photo on the left (seal badge + shelf caption), clean
   white question panel on the right: ink type, coral accents.
   Dark theme keeps the same layout on warm espresso.
   ═══════════════════════════════════════════════════════════════ */
.entry-card{
  position: relative;
  z-index: 2;
  isolation: isolate;
  background: #FFFFFF;
  color: #14141A;
  border-radius: 26px;
  padding: clamp(26px, 3vw, 36px) clamp(24px, 3.2vw, 38px);
  max-width: 430px; width: 100%;
  text-align: left;
  border: 0;
  box-shadow:
    0 40px 90px -24px rgba(30,15,8,.35),
    0 12px 26px rgba(30,15,8,.14);
  transform: translateY(40px) scale(.94);
  opacity: 0;
  transition: transform .55s cubic-bezier(.2,.7,.2,1.25), opacity .45s ease;
}
[data-theme="dark"] .entry-card{
  background: #1A120E;
  color: #F4EFE3;
  box-shadow:
    0 40px 80px -24px rgba(0,0,0,.7),
    0 12px 26px rgba(0,0,0,.4);
}
.entry-overlay.show .entry-card{
  transform: translateY(0) scale(1);
  opacity: 1;
}
.entry-overlay.leave .entry-card{
  transform: translateY(-20px) scale(.96);
  opacity: 0;
}

/* split variant (age gate): photo | panel */
.entry-card.entry-split{
  max-width: 780px;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 300px 1fr;
}
.entry-panel{ padding: clamp(26px, 3vw, 36px) clamp(24px, 3.2vw, 38px) }

/* ─── Branding column (age gate, left side) ─── */
.entry-brandside{
  position: relative;
  min-height: 100%;
  padding: clamp(26px, 3vw, 38px);
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 26px;
  color: #F4EFE3;
  overflow: hidden;
  background:
    linear-gradient(158deg, #241611 0%, #1A120E 55%, #120C09 100%);
}
/* faint dotted texture, matches the site's placeholder motif */
.entry-brandside::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 0);
  background-size: 16px 16px;
  opacity:.5;
}
.entry-brandside > *{ position: relative; z-index: 1 }
.bs-top{ display: flex; align-items: center; justify-content: space-between }
.entry-brandside .brand-logo{ width: 50px; height: 50px }
.bs-seal{
  width: 52px; height: 52px; border-radius: 999px;
  background: conic-gradient(from 220deg, #FF5C3A, #FF8260, #FF5C3A);
  box-shadow: 0 8px 18px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.5);
  display: grid; place-items: center;
}
.bs-seal span{
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 18px; color: #fff; line-height: 1;
}
.bs-name{
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: clamp(30px, 3.4vw, 40px); line-height: 1;
  letter-spacing: -.03em; color: #F4EFE3;
}
.bs-name .serif{
  font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400;
  color: #FF8E6B;
}
.bs-tag{
  margin: 14px 0 0;
  font-size: 14px; line-height: 1.55;
  color: rgba(244,239,227,.72); max-width: 30ch;
}
.bs-foot{
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(244,239,227,.55);
  display: flex; align-items: center; flex-wrap: wrap;
}
.bs-foot .sep{ color: rgba(255,92,58,.85); padding: 0 .55em }

/* ─── Brand + circular logo badge ─── */
.entry-brand{
  display: inline-flex; align-items: center;
  font-weight: 700; font-size: 18px; letter-spacing: -.01em;
  color: #14141A;
}
.entry-brand .dot{ color: #FF5C3A }
.brand-logo{
  width: 44px; height: 44px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(11,11,13,.10);
  box-shadow: 0 4px 12px rgba(11,11,13,.14);
}
[data-theme="dark"] .entry-card .entry-brand{ color: #F4EFE3 }
[data-theme="dark"] .entry-card .brand-logo{
  border-color: rgba(244,239,227,.22);
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}

/* ─── 18+ chip ─── */
.entry-badgerow{
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 4px;
}
.entry-agechip{
  display: inline-flex; align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500; letter-spacing: .12em;
  color: #FF5C3A;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,92,58,.08);
  border: 1px solid rgba(255,92,58,.24);
}
[data-theme="dark"] .entry-agechip{
  background: rgba(255,92,58,.14);
  border-color: rgba(255,92,58,.38);
  color: #FF8E6B;
}

/* ─── Eyebrow ─── */
.entry-eyebrow{
  margin: 18px 0 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase;
  color: #8A857A;
  display: inline-flex; align-items: center; gap: 10px;
}
.entry-eyebrow .dot{
  width: 8px; height: 8px; border-radius: 999px;
  background: #FF5C3A;
  box-shadow: 0 0 0 0 rgba(255,92,58,.6);
  animation: entryPulse 2s ease-out infinite;
}
@keyframes entryPulse{
  0%{ box-shadow: 0 0 0 0 rgba(255,92,58,.5) }
  100%{ box-shadow: 0 0 0 10px rgba(255,92,58,0) }
}
@media (prefers-reduced-motion: reduce) and (scripting: none){
  .entry-eyebrow .dot{ animation: none }
}

/* ─── Title ─── */
.entry-title{
  margin: 0 0 14px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 3.8vw, 42px);
  line-height: .98; letter-spacing: -.03em;
  color: #14141A;
  text-wrap: balance;
}
.entry-title .serif{
  font-family: 'Instrument Serif', serif;
  font-style: italic; font-weight: 400;
  color: #FF5C3A;
  padding: 0 .04em;
  font-size: 1.05em;
}
[data-theme="dark"] .entry-card .entry-title{ color: #F4EFE3 }

/* ─── Copy ─── */
.entry-copy{
  margin: 0 0 16px;
  font-size: 15px; line-height: 1.55;
  color: #55535A;
  max-width: 42ch;
}
[data-theme="dark"] .entry-card .entry-copy{ color: rgba(244,239,227,.72) }

/* ─── Meta row ─── */
.entry-meta{
  margin: 0 0 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: #9A958A;
}
.entry-meta .sep{ color: rgba(255,92,58,.75); padding: 0 .35em }

/* ─── Actions + buttons ─── */
.entry-actions{
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.entry-btn{
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 18px 12px 21px;
  border-radius: 16px; border: 0;
  background: #FF5C3A; color: #fff;
  font-family: inherit; font-weight: 600; font-size: 14.5px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255,92,58,.26);
  transition: transform .25s cubic-bezier(.2,.7,.2,1.4), background .2s, box-shadow .2s;
}
.entry-btn:hover{
  transform: translateY(-2px); background: #ff6e4f;
  box-shadow: 0 10px 22px rgba(255,92,58,.34);
}
.entry-btn .arr{
  width: 24px; height: 24px; border-radius: 10px;
  background: #14141A; color: #fff;
  display: grid; place-items: center; font-size: 12px;
  transition: transform .3s;
}
.entry-btn:hover .arr{ transform: rotate(-45deg) }

.entry-btn.ghost{
  background: transparent;
  color: #14141A;
  border: 1px solid rgba(11,11,13,.18);
  box-shadow: none;
}
.entry-btn.ghost:hover{
  background: rgba(11,11,13,.04);
  transform: translateY(-1px);
  box-shadow: none;
}
[data-theme="dark"] .entry-card .entry-btn.ghost{
  color: #F4EFE3;
  border-color: rgba(244,239,227,.26);
}
[data-theme="dark"] .entry-card .entry-btn.ghost:hover{
  background: rgba(244,239,227,.06);
  border-color: rgba(244,239,227,.45);
}
/* No outline on autofocus; keyboard users get a subtle ring */
.entry-btn:focus{ outline: none }
.entry-btn:focus-visible{ outline: 2px solid rgba(11,11,13,.55); outline-offset: 3px }
[data-theme="dark"] .entry-btn:focus-visible{ outline-color: rgba(244,239,227,.7) }

.entry-overlay.show .entry-btn{
  animation: btnIn .5s cubic-bezier(.2,.7,.2,1.4) backwards;
}
.entry-overlay.show .entry-btn:nth-child(1){ animation-delay: .3s }
.entry-overlay.show .entry-btn:nth-child(2){ animation-delay: .4s }
@keyframes btnIn{
  from{ opacity: 0; transform: translateY(14px) }
  to{ opacity: 1; transform: translateY(0) }
}

/* ─── Foot ─── */
.entry-foot{
  margin: 0; padding-top: 14px;
  border-top: 1px solid rgba(11,11,13,.10);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: #9A958A;
  line-height: 1.7;
}
.entry-foot a{
  color: #FF5C3A; text-decoration: none;
  border-bottom: 1px dashed rgba(255,92,58,.45);
}
.entry-foot a:hover{ color: #ff7252 }
[data-theme="dark"] .entry-card .entry-foot{
  border-top-color: rgba(244,239,227,.14);
  color: rgba(244,239,227,.55);
}

/* ─── Age gate — single centred card ─── */
.entry-overlay[data-stage="age"]{ background: var(--cream-2, #F8F6F1) }
[data-theme="dark"] .entry-overlay[data-stage="age"]{ background: var(--cream, #08080A) }

.age-card{
  max-width: 420px;
  padding: 40px 36px 32px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--line, rgba(11,11,13,.12));
  box-shadow:
    0 1px 2px rgba(11,11,13,.04),
    0 12px 32px rgba(11,11,13,.08);
}
[data-theme="dark"] .age-card{
  background: #141418;
  box-shadow: none;
}
.age-logo{
  display: block;
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--line, rgba(11,11,13,.12));
}
.age-brand{
  margin: 0 0 28px;
  font-weight: 600; font-size: 15px;
  letter-spacing: -.01em;
  color: var(--ink, #0B0B0D);
}
.age-title{
  margin: 0 0 10px;
  font-family: inherit;
  font-weight: 700; font-size: 28px;
  line-height: 1.2; letter-spacing: -.02em;
  color: var(--ink, #0B0B0D);
}
.age-copy{
  margin: 0 auto 28px;
  max-width: 34ch;
  font-size: 15px; line-height: 1.55;
  color: var(--mute, #6A6A6A);
  text-wrap: pretty;
}
.age-actions{
  display: flex; gap: 10px;
  margin-bottom: 24px;
}
.age-actions .entry-btn{
  flex: 1 1 0;
  box-sizing: border-box;
  justify-content: center;
  white-space: nowrap;
  padding: 14px 20px;
  font-size: 15px;
}
.age-foot{
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line, rgba(11,11,13,.12));
  font-size: 12.5px; line-height: 1.6;
  color: var(--mute, #6A6A6A);
}
.age-foot a{
  color: var(--ink, #0B0B0D);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Age-gate small screens ─── */
@media (max-width: 540px){
  .age-card{ padding: 32px 24px 26px }
  .age-title{ font-size: 24px }
  .entry-title{ font-size: clamp(28px, 8.5vw, 38px) }
  .entry-actions{ flex-direction: column; align-items: stretch }
  .entry-btn{ justify-content: center }
  .entry-meta{ font-size: 9px; letter-spacing: .16em }
}

/* ─── Age-gate reduced motion ─── */
@media (prefers-reduced-motion: reduce) and (scripting: none){
  .entry-card{ transition: opacity .3s ease }
  .entry-overlay.show .entry-btn{ animation: none }
}

/* ───────── Restricted screen (single white card, centred) ───────── */
.entry-restricted .entry-card{
  text-align: center;
}
.entry-restricted .entry-brand,
.entry-restricted .entry-badgerow{ justify-content: center }
.entry-restricted .entry-copy{ margin-left: auto; margin-right: auto }
.entry-restricted .entry-actions{ justify-content: center }

.restricted-emoji{
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 56px; line-height: 1; color: #FF5C3A;
  margin: 18px 0 14px;
}


/* ───────── Preloader — "The First Pour" ─────────
   Brand on top, then two columns: a tulip beer glass that fills on the left
   and the product list stepping through on the right. The condensation
   follows --t (set in JS). */
.entry-pre{
  background: #FFFFFF;
}
[data-theme="dark"] .entry-pre{
  background: #0B0B0D;
}

.entry-pre .pre-content{
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(20px, 3.4vh, 36px);
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.entry-pre.leave .pre-content{ transform: translateY(-14px) }

/* (1) The glass — the focal point */
.entry-pre .pint-stage{
  /* the tilted bottle reaches above the SVG — keep it clear of the brand */
  padding-top: clamp(80px, 15vh, 150px);
  opacity: 0;
  transform: translateY(14px);
}
.entry-pre.show .pint-stage{
  opacity: 1; transform: none;
  transition: opacity .5s ease .1s, transform .7s cubic-bezier(.16,1,.3,1) .1s;
}
.entry-pre .pint-svg{
  display: block;
  /* Sized by viewport HEIGHT so the glass and brand always fit on screen.
     Width follows the 240×420 viewBox. */
  height: clamp(300px, 54vh, 540px);
  width: auto;
  max-width: 80vw;
  overflow: visible;
}

/* glass edges — warm ink on the light stage, cream in dark theme */
.entry-pre .pint-line{ stroke: #6B4632 }
[data-theme="dark"] .entry-pre .pint-line{ stroke: #F4EFE3 }
[data-theme="dark"] .entry-pre .pint-body{ fill: url(#pintWallDark) }
[data-theme="dark"] .entry-pre .pint-base{ fill: url(#pintBaseDark) }
[data-theme="dark"] .entry-pre .pint-shadow{ opacity: 0 }

/* condensation beads on the cold glass, appearing as it fills */
.entry-pre .pint-drops ellipse{
  fill: rgba(255,255,255,.7);
  stroke: rgba(107,70,50,.28); stroke-width: .5;
}
[data-theme="dark"] .entry-pre .pint-drops ellipse{
  fill: rgba(244,239,227,.35);
  stroke: rgba(244,239,227,.25);
}
.entry-pre .pint-drops{ opacity: clamp(0, calc((var(--t, 0) - .35) * 1.6), 1) }

/* slow glint sweeping down the left wall = crystal life */
.entry-pre .pint-glint{
  transform: translateY(-120px);
  animation: prePintGlint 3.6s cubic-bezier(.4,0,.3,1) infinite;
}
@keyframes prePintGlint{
  0%   { transform: translateY(-130px); opacity: 0 }
  22%  { opacity: 1 }
  55%  { transform: translateY(170px); opacity: 0 }
  100% { transform: translateY(170px); opacity: 0 }
}

/* (2) Brand: logo with the name underneath, above both columns */
.entry-pre .pre-brand{
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-weight: 700; font-size: 24px; letter-spacing: -.01em;
  color: #0B0B0D;
  opacity: 0; transform: translateY(10px);
}
.entry-pre.show .pre-brand{
  opacity: 1; transform: none;
  transition: opacity .5s ease .25s, transform .6s cubic-bezier(.16,1,.3,1) .25s;
}
.entry-pre .pre-brand .brand-logo{ width: 72px; height: 72px; box-shadow: none }
[data-theme="dark"] .entry-pre .pre-brand{ color: #F4EFE3 }
[data-theme="dark"] .entry-pre .pre-brand .brand-logo{ border-color: rgba(244,239,227,.22) }

/* (3) Two columns: glass on the left, label list on the right.
   On narrow screens only the glass shows. */
.entry-pre .pre-layout{
  position: relative; z-index: 2;
  display: grid; grid-template-columns: auto auto;
  align-items: center; justify-items: center;
  gap: clamp(20px, 3vh, 32px) clamp(80px, 9vw, 130px);
}
.entry-pre .pre-labels{
  width: min(400px, 100%);
  opacity: 0; transform: translateY(10px);
}
.entry-pre.show .pre-labels{
  opacity: 1; transform: none;
  transition: opacity .5s ease .35s, transform .6s cubic-bezier(.16,1,.3,1) .35s;
}
.entry-pre .pre-labels-title,
.entry-pre .pre-label-num{
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  color: #6A6A6A;
}
.entry-pre .pre-labels-title{ margin: 0 0 14px }
.entry-pre .pre-label-list{ list-style: none; margin: 0; padding: 0 }
.entry-pre .pre-label{
  display: flex; align-items: baseline; gap: 18px;
  padding: 16px 0;
  border-top: 1px solid rgba(11,11,13,.10);
  opacity: .4;
  transition: opacity .3s ease;
}
.entry-pre .pre-label-name{
  font-weight: 600; font-size: 21px; color: #0B0B0D;
  transition: color .3s ease;
}
.entry-pre .pre-label-type{ margin-left: auto; font-size: 16px; color: #6A6A6A }
.entry-pre .pre-label.is-done,
.entry-pre .pre-label.is-active{ opacity: 1 }
.entry-pre .pre-label.is-active .pre-label-name,
.entry-pre .pre-label.is-active .pre-label-num{ color: #FF5C3A }

[data-theme="dark"] .entry-pre .pre-label-name{ color: #F4EFE3 }
[data-theme="dark"] .entry-pre .pre-label-type,
[data-theme="dark"] .entry-pre .pre-labels-title,
[data-theme="dark"] .entry-pre .pre-label-num{ color: #B3AB98 }
[data-theme="dark"] .entry-pre .pre-label{ border-top-color: rgba(244,239,227,.12) }

@media (max-width: 1020px){
  .entry-pre .pre-layout{ grid-template-columns: 1fr }
  .entry-pre .pre-labels{ display: none }
}

/* reduced motion: calm, still completes + dismisses per the lifecycle contract.
   JS renders the glass at ~96% with a flat surface, ~6 still beads,
   then adds .leave and dismisses. */
@media (prefers-reduced-motion: reduce) and (scripting: none){
  .entry-pre .pint-stage,
  .entry-pre.show .pint-stage,
  .entry-pre .pre-brand,
  .entry-pre.show .pre-brand{
    opacity: 1; transform: none; transition: none;
  }
  .entry-pre .pint-glint{ animation: none; opacity: 0 }
  .entry-pre .pre-content,
  .entry-pre.leave .pre-content{ transform: none; transition: none }
  .entry-pre .pre-labels{ opacity: 1; transform: none; transition: none }
}
