/* BADR launch list: badge and dialog. Motion: transform, opacity, clip-path. */
:root{
  --launch-ink:#6F5418; /* gold text on ivory, 6.2:1 */
  --launch-fg:#F4EFE4;
  --launch-soft:rgba(244,239,228,.86);
  --launch-edge:rgba(217,186,108,.62);
  --launch-line:rgba(217,186,108,.3);
  --launch-err:#FFC9B3;
}
.launch-dialog [hidden],.launch-badge [hidden]{display:none!important}

/* Badge: fixed height: a late count moves nothing */
.launch-strip{display:flex;padding-top:clamp(1.25rem,3vw,2rem)}
.launch-strip + .hero{padding-top:clamp(1.7rem,3.6vw,3rem)}
.launch-badge{display:inline-flex;align-items:center;gap:.6rem;max-inline-size:100%;block-size:2rem;padding-inline:.75rem .95rem;border:1px solid var(--line-gold);border-radius:999px;background:rgba(185,146,63,.12);color:var(--launch-ink);white-space:nowrap;font:600 .7rem/1 var(--f-sans);letter-spacing:.18em;text-transform:uppercase}
.launch-moon{inline-size:15px;block-size:15px;flex:none;fill:var(--gold);animation:launch-breathe 2.4s ease-in-out 2} /* two breaths: under 5 s */
.launch-badge-text{flex:none}
.launch-badge-count{min-inline-size:0;overflow:hidden;text-overflow:ellipsis;padding-inline-start:.7rem;border-inline-start:1px solid var(--line-gold);font-variant-numeric:tabular-nums lining-nums;letter-spacing:.08em}
[dir="rtl"] .launch-moon{transform:scaleX(-1)}
[dir="rtl"] .launch-badge{font-size:.84rem;letter-spacing:0;text-transform:none}
[dir="rtl"] .launch-badge-count{letter-spacing:0}
.btn[data-launch-open]{cursor:pointer}
.closing .launch-nojs{margin:1.4rem auto 0;font-size:.95rem}
@media (max-width:560px){.hero-actions .btn[data-launch-open]{inline-size:100%;justify-content:center;text-align:center}}

/* Dialog = the screen (vw/dvh, not the layout viewport) */
.launch-dialog{inline-size:100vw;block-size:100vh;block-size:100dvh;max-inline-size:none;max-block-size:none;margin:0;padding:0;border:0;background:transparent;color:var(--launch-fg);overflow:hidden}
.launch-dialog:not([open]){display:none}
.launch-dialog[open]{display:grid;place-items:center;padding:1rem}
.launch-dialog::backdrop{background:rgba(4,20,14,.58);backdrop-filter:blur(7px)}
.launch-panel{position:relative;isolation:isolate;display:flex;inline-size:min(100%,520px);max-block-size:calc(100vh - 2rem);max-block-size:calc(100dvh - 2rem);overflow:hidden;border:1px solid var(--launch-edge);border-radius:6px;background:#0A3024;box-shadow:0 44px 90px -34px rgba(0,0,0,.75),0 0 0 1px rgba(0,0,0,.25)}
@supports (backdrop-filter:blur(1px)){.launch-panel{background:linear-gradient(165deg,rgba(15,69,53,.93),rgba(8,36,27,.96));backdrop-filter:blur(20px) saturate(140%)}}
@media (forced-colors:active){.launch-panel{background:Canvas}.launch-panel::after{display:none}}
.launch-panel::before{content:"";position:absolute;inset:8px;z-index:-1;border:1px solid var(--launch-line);border-radius:3px;pointer-events:none}
.launch-panel::after{content:"";position:absolute;inset:0;z-index:-1;opacity:.16;pointer-events:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='112' height='112' viewBox='0 0 112 112'><g fill='none' stroke='%23D9BA6C'><rect x='34' y='34' width='44' height='44'/><rect x='34' y='34' width='44' height='44' transform='rotate(45 56 56)'/><path d='M0 56h34M78 56h34M56 0v34M56 78v34'/></g></svg>");-webkit-mask-image:radial-gradient(ellipse 90% 60% at 50% 0%,#000,transparent 78%);mask-image:radial-gradient(ellipse 90% 60% at 50% 0%,#000,transparent 78%)}
.launch-scroll{flex:1;min-inline-size:0;overflow:hidden auto;overscroll-behavior:contain;text-align:center;padding:clamp(1.9rem,5vw,2.6rem) clamp(1.5rem,5.5vw,2.8rem) clamp(1.7rem,4vw,2.2rem)}
.launch-close{position:absolute;inset-block-start:.7rem;inset-inline-end:.7rem;z-index:2;inline-size:44px;block-size:44px;display:grid;place-items:center;padding:0;cursor:pointer;color:var(--gold-2);background:rgba(5,26,19,.9);border:1px solid rgba(217,186,108,.45);border-radius:50%;box-shadow:0 6px 16px -8px rgba(0,0,0,.6);transition:background .3s var(--ease),border-color .3s var(--ease)}
.launch-close:hover{background:rgba(52,84,60,.96);border-color:var(--gold-2)}
.launch-close:focus-visible,.launch-ghost:focus-visible{outline:2px solid var(--gold-3);outline-offset:2px}
.launch-close svg{inline-size:16px;block-size:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}

/* Emblem: admin-managed square art, shown once decoded (.is-ready); never mirrored */
.launch-emblem{position:relative;inline-size:168px;aspect-ratio:1;margin:-.4rem auto .75rem}
.launch-emblem::before{content:"";position:absolute;inset:-24%;z-index:-1;border-radius:50%;background:radial-gradient(closest-side,rgba(217,186,108,.22),transparent);opacity:0}
.launch-emblem img{display:block;inline-size:100%;block-size:100%;object-fit:contain;opacity:0;filter:drop-shadow(0 6px 18px rgba(217,186,108,.28))}
.launch-emblem.is-ready::before,.launch-emblem.is-ready img{opacity:1}
.launch-emblem[hidden] + .launch-title{margin-top:1.75rem} /* no image: clear the close button */

.launch-title{font:500 clamp(1.85rem,6.2vw,2.5rem)/1.08 var(--f-serif);letter-spacing:-.015em;color:var(--launch-fg);text-wrap:balance;outline:none}
.launch-lead{margin-top:.7rem;font:italic 1.3rem var(--f-serif);color:var(--gold-3)}
.launch-body{margin:.6rem auto 0;max-inline-size:36ch;font-size:1.04rem;line-height:1.55;color:var(--launch-soft)}
[dir="rtl"] .launch-title{line-height:1.4;letter-spacing:0}
[dir="rtl"] .launch-lead{font-style:normal;font-size:1.5rem}
[dir="rtl"] .launch-body{font-size:1.2rem;line-height:1.75}

/* Countdown (valid launchAt only) */
.launch-countdown{margin-top:1.5rem}
.launch-count{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding-block:.85rem;border-block:1px solid var(--launch-line)}
.launch-count div{display:grid;justify-items:center;gap:.25rem;padding-inline:.2rem}
.launch-count div + div{border-inline-start:1px solid var(--launch-line)}
.launch-count b{font:500 clamp(1.6rem,6vw,2.15rem)/1 var(--f-serif);font-variant-numeric:tabular-nums lining-nums;color:var(--launch-fg)}
.launch-count span{font:600 .62rem/1.2 var(--f-sans);letter-spacing:.16em;text-transform:uppercase;color:var(--gold-2)}
.launch-when{margin-top:.75rem;font:.8rem/1.5 var(--f-sans);color:var(--launch-soft)}
.launch-when time{color:var(--launch-fg)}
.launch-reached{margin:1.5rem auto 0;max-inline-size:34ch;padding-block:.9rem;border-block:1px solid var(--launch-line);font:1.08rem var(--f-serif);color:var(--gold-3)}
[dir="rtl"] .launch-count span{font-size:.8rem;letter-spacing:0;text-transform:none}
@media (max-width:400px){.launch-count span{font-size:.56rem;letter-spacing:.06em}.launch-count b{font-size:1.4rem}}

/* Form */
.launch-form{display:grid;gap:1.05rem;margin-top:1.6rem;text-align:start}
.launch-field label{display:block;margin-bottom:.45rem;font:600 .74rem/1.3 var(--f-sans);letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2)}
.launch-field label small{font-size:inherit;font-weight:500;letter-spacing:.02em;text-transform:none;color:var(--launch-soft)}
.launch-field input{inline-size:100%;block-size:3rem;padding-inline:.95rem;border-radius:3px;text-align:start;font:500 max(1rem,16px)/1.2 var(--f-sans);color:var(--launch-fg);background:rgba(3,20,14,.55);border:1px solid rgba(240,220,163,.74);transition:border-color .25s var(--ease),background .25s var(--ease)}
.launch-field input:hover{background:rgba(3,20,14,.7)}
.launch-field input:focus-visible{outline:2px solid var(--gold-2);outline-offset:2px;border-color:var(--gold-2);background:rgba(3,20,14,.78)}
.launch-field input[aria-invalid="true"]{border-color:var(--launch-err);box-shadow:0 0 0 1px var(--launch-err);outline-color:var(--launch-err)}
/* Errors: live regions, always rendered */
.launch-error{margin-top:.5rem;font:500 .88rem/1.45 var(--f-sans);color:var(--launch-err)}
.launch-error:empty{margin:0}
.launch-error:not(:empty)::before{content:"";display:inline-block;inline-size:6px;block-size:6px;margin-inline-end:.5rem;vertical-align:.1em;border-radius:50%;background:currentColor}
[dir="rtl"] .launch-field label{font-size:.92rem;letter-spacing:0;text-transform:none}
[dir="rtl"] #launch-academy{text-align:right} /* empty, dir=auto is LTR */
.launch-submit{inline-size:100%;justify-content:center;min-block-size:3.1rem;margin-top:.3rem;cursor:pointer;color:#10261D;background:var(--gold-2);border-color:var(--gold-2)}
.launch-submit:hover:not(:disabled){background:var(--gold-3);border-color:var(--gold-3);box-shadow:0 14px 30px -14px rgba(217,186,108,.6);transform:translateY(-1px)}
.launch-submit:focus-visible{outline:2px solid var(--launch-fg);outline-offset:3px}
.launch-submit:disabled{opacity:.6;cursor:progress}
.launch-privacy{text-align:center;font:.8rem/1.55 var(--f-sans);color:var(--launch-soft)}
[dir="rtl"] .launch-privacy,[dir="rtl"] .launch-when{font-size:.9rem}
.launch-status{text-align:center;font:500 .88rem/1.45 var(--f-sans);color:var(--gold-3);outline:none}
.launch-status:empty{display:none}
.launch-status.is-error{color:var(--launch-err)}
.launch-body,.launch-privacy,.launch-status,.launch-reached,.launch-done p{text-wrap:balance}

/* Success */
.launch-done{display:grid;justify-items:center;gap:.7rem;margin-top:1.6rem}
.launch-check{inline-size:52px;block-size:52px;fill:none;stroke:var(--gold-2);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.launch-done h3{font:500 clamp(1.55rem,5vw,1.95rem)/1.2 var(--f-serif);letter-spacing:0;color:var(--gold-3);outline:none}
.launch-done p{max-inline-size:32ch;color:var(--launch-soft)}
.launch-ghost{margin-top:.6rem;min-block-size:44px;justify-content:center;cursor:pointer;color:var(--launch-fg);background:transparent;border-color:var(--launch-edge)}
.launch-ghost:hover{background:rgba(217,186,108,.14);border-color:var(--gold-2)}

/* Phones: bottom sheet */
@media (max-width:640px){.launch-dialog[open]{place-items:end center;padding:0 0 var(--launch-kb,0px)}.launch-panel{inline-size:100%;border-radius:22px 22px 0 0;border-bottom-width:0;max-block-size:calc(100vh - 12px - var(--launch-kb,0px));max-block-size:calc(100dvh - 12px - var(--launch-kb,0px))}.launch-panel::before{border-radius:16px 16px 0 0;border-bottom-width:0}.launch-scroll{padding-block-end:calc(1.7rem + env(safe-area-inset-bottom,0px))}.launch-emblem{inline-size:144px}}
@media (max-height:780px){.launch-emblem{inline-size:128px;margin-block:-.3rem .5rem}}
@media (max-height:560px){.launch-emblem{inline-size:96px}}
/* Scroll lock: padding replaces a classic scrollbar (launch.js measures it) */
html.launch-locked{padding-inline-end:var(--launch-gap,0px)}
[dir="rtl"].launch-locked{padding-inline:var(--launch-gap,0px) 0}
html.launch-locked body{overflow:hidden}
/* No showModal(): inline panel */
.launch-dialog.launch-inline[open]{position:relative;z-index:1;inline-size:auto;block-size:auto;padding:2.5rem 1rem;background:var(--paper-2)}
.launch-inline .launch-panel{max-block-size:none}

/* Entrance */
.launch-dialog[open] .launch-panel{animation:launch-pop .46s var(--ease) backwards}
.launch-dialog[open]::backdrop{animation:launch-fade .35s ease backwards}
.launch-dialog[open] .is-ready img{animation:launch-reveal .56s cubic-bezier(.4,.1,.2,1) .06s backwards}
.launch-dialog[open] .is-ready::before{animation:launch-halo .56s ease .06s backwards}
.launch-dialog[open] .launch-in{animation:launch-rise .4s var(--ease) calc(.16s + var(--i,0) * .05s) backwards}
.launch-dialog[open] .launch-check{animation:launch-star .5s var(--ease) backwards}
@keyframes launch-breathe{50%{opacity:.45}}
@keyframes launch-pop{from{opacity:0;transform:translateY(18px) scale(.985)}}
@keyframes launch-fade{from{opacity:0}}
@keyframes launch-rise{from{opacity:0;transform:translateY(10px)}}
/* circle(72%) covers the corners */
@keyframes launch-reveal{from{opacity:0;transform:scale(.88);clip-path:circle(0 at 50% 50%)}to{clip-path:circle(72% at 50% 50%)}}
@keyframes launch-halo{from{opacity:0;transform:scale(.55)}}
@keyframes launch-star{from{opacity:0;transform:scale(.3) rotate(-45deg)}}
@media (prefers-reduced-motion:reduce){.launch-dialog,.launch-dialog *,.launch-dialog ::before,.launch-dialog::backdrop,.launch-badge *{animation:none!important;transition:none!important}}

/* Share row (success view): plain links only, no third-party widgets */
.launch-share-title{font:600 .72rem/1.3 var(--f-sans);letter-spacing:.14em;text-transform:uppercase;color:var(--gold-2)}
.launch-share-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:.6rem;margin-top:.2rem}
.launch-share-note{font:500 .8rem/1.4 var(--f-sans);color:var(--gold-3);min-block-size:1em}
[dir="rtl"] .launch-share-title{font-size:.9rem;letter-spacing:0;text-transform:none}
