@font-face{font-family:'HN';src:url(assets/fonts/hn-light.ttf) format('truetype');font-weight:300;font-display:swap}
@font-face{font-family:'HN';src:url(assets/fonts/hn-regular.ttf) format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:'HN';src:url(assets/fonts/hn-medium.ttf) format('truetype');font-weight:500 600;font-display:swap}
@font-face{font-family:'HN';src:url(assets/fonts/hn-bold.ttf) format('truetype');font-weight:700;font-display:swap}
@font-face{font-family:'HN Cond';src:url(assets/fonts/hn-cond-bold.ttf) format('truetype');font-weight:500 700;font-display:swap}
@font-face{font-family:'HN Cond';src:url(assets/fonts/hn-cond-black.ttf) format('truetype');font-weight:800 900;font-display:swap}

:root{
  --ink:#231d54;
  --ink-hover:#2f2870;
  --night:#15112f;
  --cream:#f8f6f1;
  --paper:#fbfaf7;
  --gold:#d3a862;
  --gold-hover:#dcb675;
  --bronze:#8a6a2f;
  --lilac:#e4e1f2;
  --muted:#5d5980;
  --body:#3b3664;
  --placeholder:#8f8ba6;
  --line:#e6e2d8;
  --error-dark:#b3261e;
  --error-light:#ffc2b8;
  --sans:'HN','Helvetica Neue',Helvetica,Arial,sans-serif;
  --cond:'HN Cond','Helvetica Neue',Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;background:var(--night);-webkit-font-smoothing:antialiased;overflow:hidden}
a{color:var(--ink);text-decoration:underline}
a:hover{color:var(--bronze)}
input,select,button{font-family:inherit}
input::placeholder{color:var(--placeholder)}
[hidden]{display:none !important}

@keyframes fbspin{to{transform:rotate(360deg)}}
@keyframes fbscan{0%{top:0}50%{top:calc(100% - 3px)}100%{top:0}}

.shell{height:100vh;height:100dvh;display:flex;justify-content:center;font-family:var(--sans);color:var(--ink);background:var(--night)}
.app{width:100%;max-width:480px;height:100%;background:var(--night);position:relative;overflow:hidden}

/* ---------- Pages & tablecloth-pull transition ---------- */
.page{display:none;position:absolute;inset:0;z-index:1;transform-origin:100% 0;transition:transform 900ms cubic-bezier(.2,.7,.2,1) 150ms}
.page.is-current,.page.is-leaving{display:block}
.app.is-transitioning .page.is-current{pointer-events:none}
.app.is-transitioning:not([data-phase="pull"]) .page.is-current{transform:scale(0.98)}
.page.is-leaving{z-index:5;pointer-events:none;transition:transform 950ms cubic-bezier(.7,0,.25,1)}
.app[data-phase="tug"] .page.is-leaving{transform:translateX(4%);transition:transform 200ms cubic-bezier(.3,0,.6,1);box-shadow:24px 0 60px rgba(0,0,0,0.45)}
.app[data-phase="pull"] .page.is-leaving{transform:translateX(-112%);box-shadow:24px 0 60px rgba(0,0,0,0.45)}

.fold{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity 500ms ease}
.fold--light{background:repeating-linear-gradient(100deg,rgba(0,0,0,0) 0px,rgba(0,0,0,0.12) 34px,rgba(255,255,255,0.18) 58px,rgba(0,0,0,0) 90px)}
.fold--dark{background:repeating-linear-gradient(100deg,rgba(0,0,0,0) 0px,rgba(0,0,0,0.2) 34px,rgba(255,255,255,0.1) 58px,rgba(0,0,0,0) 90px)}
.app[data-phase="tug"] .is-leaving .fold{opacity:0.5}
.app[data-phase="pull"] .is-leaving .fold{opacity:1}

@media (prefers-reduced-motion:reduce){
  .page,.page.is-leaving,.app[data-phase] .page.is-leaving{transition-duration:1ms !important}
  .hero__img{transition:none !important}
  .scan__line{animation:none}
}

.page--cream{background:var(--cream)}
.page--navy{background:var(--ink)}
.page--pattern{background-color:#211c50;background-image:url(assets/fb-pattern-blue-v.png);background-size:100% auto;background-position:center top;background-repeat:repeat-y}

.page__scroll{position:absolute;inset:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
.page__scroll--col{display:flex;flex-direction:column}

/* ---------- Shared bits ---------- */
.btn{border:0;border-radius:999px;cursor:pointer;transition:background-color 150ms ease,transform 100ms ease}
.btn:active{transform:scale(0.98)}
.btn--navy{background:var(--ink);color:#fff}
.btn--navy:hover{background:var(--ink-hover)}
.btn--gold{background:var(--gold);color:var(--ink)}
.btn--gold:hover{background:var(--gold-hover)}
.btn--white{background:#fff;color:var(--ink)}
.btn--white:hover{background:#f1efe9}
.btn:focus-visible,.back:focus-visible,.radio:focus-visible,.check:focus-visible,.link-btn:focus-visible,.text-btn:focus-visible,.close:focus-visible{outline:3px solid var(--gold);outline-offset:3px}

.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px}
.back{min-height:44px;padding:0 4px;border:0;background:none;color:var(--ink);font-size:15px;font-weight:600;cursor:pointer}
.back--light{color:var(--lilac)}
.step{font-size:13px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase}
.step--gold{color:var(--gold)}
.step--bronze{color:var(--bronze)}

.title{margin:0;font-weight:300;font-size:31px;line-height:1.1;text-align:center;letter-spacing:-0.3px}
.title--light{margin:4px 0 6px;color:#fff}

.full-img{display:block;width:100%;height:auto;flex:none}
.full-img--bottom{margin-top:auto}
.full-img--footer{margin-top:-1px}

/* ---------- Page 1 ---------- */
.hero{overflow:hidden;flex:none}
.hero__img{display:block;width:100%;height:auto;transform:scale(1.12);transition:transform 1800ms cubic-bezier(.2,.7,.2,1)}
.hero__img.is-in{transform:scale(1)}
.dates{padding:6px 24px 18px;text-align:center;display:flex;flex-direction:column;gap:2px}
.dates__range{font-family:var(--cond);font-weight:600;font-size:19px;letter-spacing:0.3px}
.dates__note{font-size:13px}
.cta-bar{position:sticky;bottom:0;margin-top:auto;padding:14px 24px 22px;padding-bottom:max(22px,env(safe-area-inset-bottom));background:linear-gradient(rgba(248,246,241,0),var(--cream) 38%)}
.btn--hero{width:100%;min-height:62px;font-family:var(--cond);font-weight:700;font-size:26px;letter-spacing:1px;text-transform:uppercase;box-shadow:0 8px 22px rgba(35,29,84,0.3)}

/* ---------- Page 2 ---------- */
.stack{display:flex;flex-direction:column}
.stack--details{padding:22px 24px 36px;gap:18px;margin:0}
.field{display:flex;flex-direction:column;gap:7px}
.field__label{font-family:var(--cond);font-weight:700;font-size:17px;color:#fff}
.field__input{height:50px;border:0;border-radius:10px;padding:0 14px;font-size:16px;background:var(--paper);color:var(--ink);outline-color:var(--gold);width:100%}
.field__input--id{letter-spacing:2px}
select.field__input{appearance:none;-webkit-appearance:none;padding-right:40px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23231d54' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center}
.field__error{font-size:13.5px;color:var(--error-light);font-weight:500}
.btn--continue{margin-top:10px;min-height:58px;font-family:var(--cond);font-weight:700;font-size:23px;letter-spacing:1px;text-transform:uppercase}

/* ---------- Page 3 ---------- */
.stack--upload{padding:22px 24px 36px;gap:24px;min-height:100%}
.card{display:flex;flex-direction:column;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 16px}
.card__q{margin:0;font-size:16px;line-height:1.4;text-align:center;font-weight:500;text-wrap:pretty}
.radios{display:flex;gap:28px;justify-content:center}
.radio{display:flex;align-items:center;gap:10px;background:none;border:0;padding:8px 4px;min-height:44px;cursor:pointer;font-size:16px;color:var(--ink)}
.radio__dot{width:24px;height:24px;border-radius:50%;border:2px solid var(--ink);display:flex;align-items:center;justify-content:center;background:#fff}
.radio[aria-checked="true"] .radio__dot::after{content:'';width:12px;height:12px;border-radius:50%;background:var(--ink)}
.inline-error{font-size:13.5px;color:var(--error-dark);font-weight:600}

.terms{display:flex;flex-direction:column;gap:8px;align-items:center}
.check{display:flex;align-items:flex-start;gap:12px;background:none;border:0;padding:6px 0;cursor:pointer;text-align:left;color:var(--ink);font-size:15px;line-height:1.4}
.check__box{flex:none;width:24px;height:24px;border-radius:6px;border:2px solid var(--ink);display:flex;align-items:center;justify-content:center;background:#fff;margin-top:1px}
.check[aria-checked="true"] .check__box::after{content:'';width:12px;height:7px;border-left:2.5px solid var(--ink);border-bottom:2.5px solid var(--ink);transform:rotate(-45deg) translate(1px,-1px)}
.link-btn{min-height:36px;border:0;background:none;padding:0 4px;font-size:13.5px;font-weight:600;color:var(--ink);text-decoration:underline;cursor:pointer}

.upload{margin-top:auto;display:flex;flex-direction:column;gap:10px}
.btn--upload{min-height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:10px 24px;box-shadow:0 8px 22px rgba(35,29,84,0.26)}
.btn--upload__main{font-family:var(--cond);font-weight:700;font-size:23px;letter-spacing:1px;text-transform:uppercase}
.btn--upload__sub{font-size:12.5px;color:var(--lilac)}
.upload__note{margin:0;font-size:12.5px;color:var(--muted);text-align:center}

/* ---------- Page 4 ---------- */
.thanks{display:flex;flex-direction:column;align-items:center;text-align:center;padding:52px 28px 28px;gap:16px;color:#fff}
.thanks__badge{width:72px;height:72px;border-radius:50%;background:var(--gold);display:flex;align-items:center;justify-content:center}
.tick{display:block}
.tick--lg{width:28px;height:15px;border-left:5px solid var(--ink);border-bottom:5px solid var(--ink);transform:rotate(-45deg) translate(2px,-3px)}
.tick--md{width:24px;height:12px;border-left:4px solid #fff;border-bottom:4px solid #fff;transform:rotate(-45deg) translate(2px,-2px)}
.thanks__title{margin:0;font-family:var(--cond);font-weight:700;font-size:46px;line-height:1;color:var(--gold)}
.thanks__body{margin:0;font-size:17px;line-height:1.5;max-width:340px;text-wrap:pretty}
.ref{display:flex;flex-direction:column;gap:4px;border:1.5px solid var(--gold);border-radius:14px;padding:12px 22px}
.ref__label{font-size:12.5px;letter-spacing:1px;text-transform:uppercase;color:var(--lilac)}
.ref__value{font-family:var(--cond);font-weight:600;font-size:24px;letter-spacing:1.5px}
.thanks__note{margin:0;font-size:14px;color:var(--lilac);max-width:320px;line-height:1.45}
.btn--another{margin-top:4px;min-height:54px;width:100%;max-width:340px;font-weight:700;font-size:17px}

/* ---------- Sheets ---------- */
.overlay{position:absolute;inset:0;background:rgba(21,17,47,0.62);display:flex;align-items:flex-end}
.overlay--scan{z-index:20}
.overlay--terms{z-index:25}
.sheet{width:100%;background:var(--cream);border-radius:24px 24px 0 0}
.sheet--terms{height:92%;display:flex;flex-direction:column;overflow:hidden}
.sheet--scan{max-height:92%;overflow:auto;padding:14px 22px 28px;padding-bottom:max(28px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:18px}
.sheet__head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 12px 10px 22px;border-bottom:1px solid var(--line)}
.sheet__title{font-family:var(--cond);font-weight:700;font-size:22px}
.close{width:44px;height:44px;border:0;background:none;cursor:pointer;font-size:26px;line-height:1;color:var(--ink)}
.sheet__body{flex:1;overflow-y:auto;padding:16px 22px 32px;display:flex;flex-direction:column;gap:10px}
.sheet__body p{margin:0;font-size:13.5px;font-weight:400;line-height:1.5;color:var(--ink);text-wrap:pretty}
.sheet__body p.is-heading{font-size:15px;font-weight:700}
.sheet__grip{width:44px;height:5px;border-radius:3px;background:#d8d4e6;align-self:center;flex:none}
.sheet__h{font-family:var(--cond);font-weight:700;font-size:26px;line-height:1.1}
.sheet__h--lg{font-size:28px;line-height:1.05}
.sheet__sub{font-size:14px;color:var(--muted)}

.sheet--scan > [data-stage]{display:none}
.sheet--scan[data-stage="scanning"] > [data-stage="scanning"],
.sheet--scan[data-stage="pass"] > [data-stage="pass"],
.sheet--scan[data-stage="fail"] > [data-stage="fail"]{display:flex}

.scan{flex-direction:column;gap:18px}
.scan__head{display:flex;flex-direction:column;gap:2px}
.scan__preview{position:relative;height:240px;border-radius:14px;overflow:hidden;background:#e9e6df}
.scan__slip{position:absolute;inset:0;background-size:contain;background-position:center;background-repeat:no-repeat}
.scan__line{position:absolute;left:0;right:0;height:3px;background:var(--gold);box-shadow:0 0 14px 4px rgba(211,168,98,0.55);animation:fbscan 2.2s ease-in-out infinite}
.scan__steps{display:flex;flex-direction:column;gap:10px}
.scan-step{display:flex;align-items:center;gap:12px;font-size:15px;color:var(--placeholder)}
.scan-step.is-active,.scan-step.is-done{color:var(--ink)}
.scan-step__icon{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex:none}
.scan-step__icon::before{content:'';width:8px;height:8px;border-radius:50%;background:#cfcbe0}
.scan-step.is-active .scan-step__icon::before{width:18px;height:18px;border-radius:50%;background:none;border:2.5px solid #d8d4e6;border-top-color:var(--ink);animation:fbspin 0.8s linear infinite}
.scan-step.is-done .scan-step__icon::before{width:22px;height:22px;background:var(--ink)}
.scan-step.is-done .scan-step__icon::after{content:'';position:absolute;width:9px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
.scan-step__icon{position:relative}

.result{flex-direction:column;gap:18px}
.result--fail{gap:16px}
.result__hero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:8px 0 4px}
.result__badge{width:60px;height:60px;border-radius:50%;background:var(--ink);display:flex;align-items:center;justify-content:center}
.result__body{font-size:16px;line-height:1.45;color:var(--body);max-width:320px;text-wrap:pretty}
.result__body--left{font-size:15px;max-width:none}
.result__copy{display:flex;flex-direction:column;gap:6px}
.tips{display:flex;flex-direction:column;gap:8px;background:#fff;border-radius:14px;padding:14px 16px;border:1px solid var(--line)}
.tip{display:flex;gap:10px;font-size:14.5px;line-height:1.4}
.tip::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--gold);flex:none;margin-top:8px}
.btn--sheet{min-height:56px;font-weight:700;font-size:17px}
.text-btn{min-height:44px;border:0;background:none;color:var(--ink);font-weight:600;font-size:15px;cursor:pointer;text-decoration:underline}
