/* Tokens: espelham design/design.json */
:root {
  --primary: #005BC5;
  --primary-soft: #498BE6;
  --primary-strong: #066FDE;
  --secondary: #FFA230;
  --danger: #F8545D;
  --text: #111111;
  --text-strong: #000000;
  --text-muted: #4B5563;
  --bg: #FFFFFF;
  --surface: #F5F6F8;
  --surface-input: #FAFAFA;
  --border: #DDDDDD;
  --border-soft: #F1F1F1;
  --border-info: #E4EEF1;
  --border-focus: #777777;
  --placeholder: #828282;
  --track: #EBEBEB;
  --tooltip-bg: #2F2F2F;
  --success: #16A34A;
  --accent: #7C3AED;
  --accent-soft: #F3EEFF;

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Montserrat", system-ui, sans-serif;

  --col: 450px;
  --pad-x: 24px;
  --r: 16px;
  --r-card: 18px;
  --r-img: 25px;
  --r-input: 8px;

  --shadow-card: 0 8px 24px 0 rgba(0, 0, 0, .08);
  --shadow-info: 0 8px 22px 0 rgba(0, 91, 197, .06);
  --shadow-dialog: 0 0 50px 10px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button { font-family: inherit; }

.app { max-width: var(--col); margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }

/* Header */
.header { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 12px var(--pad-x) 0; }
.header-row { height: 32px; display: flex; align-items: center; justify-content: center; position: relative; }
.back { position: absolute; left: -6px; width: 36px; height: 36px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: #000; }
.back[hidden] { display: none; }
.logo { height: 24px; font-weight: 800; font-size: 19px; letter-spacing: -.3px; color: #0B3954; line-height: 24px; }
.logo span { color: var(--secondary); }
.progress { display: flex; gap: 8px; padding: 10px 0 6px; }
.progress .seg { flex: 1; height: 4px; border-radius: 1000px; background: var(--surface); overflow: hidden; }
.progress .fill { height: 100%; width: 0; background: var(--primary); border-radius: 1000px; transition: width .4s ease-in-out; }

/* Screen */
.screen { flex: 1; padding: 20px var(--pad-x) 24px; display: flex; flex-direction: column; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.hero { font-family: var(--font-display); font-size: 35px; font-weight: 700; line-height: 1.3; text-align: center; margin: 8px 0 32px; color: var(--primary); }
.h1 { font-size: 28px; font-weight: 700; line-height: 1.3; text-align: center; margin: 0; }
.h1.light { font-weight: 400; }
.h1.light b { font-weight: 700; }
.h1 em, .hero em, .accent { font-style: normal; color: var(--primary); }
.sub { font-size: 16px; line-height: 1.5; text-align: center; margin: 12px 0 0; }
.sub.small { font-size: 13px; color: var(--text-muted); }
.lines { font-size: 16px; line-height: 1.5; text-align: center; margin: 20px 0 0; }
.lines p { margin: 0 0 6px; }

/* Options */
.options { display: flex; flex-direction: column; gap: 8px; margin-top: 25px; }
.opt { width: 100%; min-height: 70px; background: var(--surface); border: 2px solid var(--surface); border-radius: var(--r); color: var(--text-strong); font-size: 16px; font-weight: 500; cursor: pointer; transition: all .1s ease-in-out; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px 20px; }
.opt.icon { min-height: 85px; justify-content: flex-start; text-align: left; gap: 20px; }
.opt .emoji { font-size: 34px; width: 40px; text-align: center; flex: none; line-height: 1; }
.opt .label { flex: 1; }
@media (hover: hover) { .opt:hover { background: #fff; border-color: var(--primary); } }
.opt.selected { background: #fff; border-color: var(--primary); }

.check { width: 22px; height: 22px; flex: none; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--border); display: grid; place-items: center; transition: all .1s ease-in-out; }
.check svg { opacity: 0; }
.opt.selected .check { background: var(--primary); box-shadow: none; }
.opt.selected .check svg { opacity: 1; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 25px; }
.tile { background: var(--primary); border: 2px solid var(--primary); border-radius: var(--r); overflow: hidden; cursor: pointer; padding: 0; display: flex; flex-direction: column; transition: transform .1s ease-in-out; }
.tile:active { transform: scale(.98); }
.tile .art { background: #fff; aspect-ratio: 1 / 1; display: grid; place-items: center; font-size: 76px; }
.tile .art img { width: 100%; height: 100%; object-fit: contain; }
.tile .cap { color: #fff; font-size: 16px; font-weight: 500; padding: 12px 8px; text-align: center; }

.legal { font-size: 11px; line-height: 1.5; text-align: center; color: var(--primary); margin-top: 28px; }
.legal a { color: inherit; font-weight: 700; }

/* Button */
.spacer { flex: 1; min-height: 24px; }
.cta-wrap { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0)); margin-top: 16px; }
.btn { width: 100%; height: 56px; border: 0; border-radius: var(--r); background: var(--primary); color: #fff; font-size: 18px; font-weight: 500; line-height: 1.5; text-transform: uppercase; cursor: pointer; transition: opacity .15s; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.pulse { animation: pulse 1.4s cubic-bezier(.75, 0, 0, 1) infinite; box-shadow: 0 0 0 0 var(--primary); }
@keyframes pulse { to { box-shadow: 0 0 0 8px transparent; transform: scale(1.01); } }

/* Cards */
.card { background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 24px; margin-top: 24px; }
.card h3 { margin: 0 0 14px; font-size: 18px; }
.info-row { background: var(--surface); border-radius: var(--r); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; font-size: 15px; line-height: 1.4; }
.info-row .ico { color: var(--primary); flex: none; font-size: 18px; line-height: 1.3; }
.info-row b { display: block; font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 2px; }
.pill { display: inline-block; background: #EFEFEF; border-radius: 1000px; font-size: 11px; padding: 4px 10px; }
.urgency { text-align: center; font-size: 15px; margin-top: 20px; }

.method { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.method div { background: var(--surface); border-radius: var(--r); padding: 16px 18px; font-size: 16px; font-weight: 500; text-align: left; display: flex; gap: 14px; align-items: center; }
.method span { font-size: 26px; }

/* Loader */
.loader { margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.lrow .top { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 500; color: var(--text-strong); margin-bottom: 8px; gap: 12px; }
.lrow .pct { display: flex; align-items: center; gap: 6px; flex: none; }
.lrow .track { height: 10px; border-radius: 16px; background: var(--track); overflow: hidden; }
.lrow .bar { height: 100%; width: 0; background: linear-gradient(to right, var(--danger), var(--secondary)); }
.done-ico { width: 16px; height: 16px; border-radius: 4px; background: var(--success); display: grid; place-items: center; }
.spin { width: 14px; height: 14px; border: 2px solid #ccc; border-top-color: transparent; border-radius: 50%; animation: rot .75s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* Dialog */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 20; padding: var(--pad-x); animation: fade .3s ease; }
.dialog { background: #fff; border-radius: var(--r); padding: 22px 20px 20px; width: 100%; max-width: 360px; box-shadow: var(--shadow-dialog); text-align: center; animation: up .3s ease; }
@keyframes up { from { transform: translateY(40px); } to { transform: translateY(0); } }
.dialog p { margin: 0 0 16px; font-size: 16px; }
.dialog .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog button { height: 50px; border-radius: 10px; border: 2px solid transparent; color: #fff; font-size: 16px; cursor: pointer; }
.dialog .no { background: var(--primary-strong); }
.dialog .yes { background: var(--primary-soft); }
.dialog .yes:focus-visible { border-color: var(--danger); outline: none; }

/* Email */
.field { margin-top: 28px; }
.input { width: 100%; height: 48px; border-radius: var(--r-input); border: 2px solid var(--border); background: var(--surface-input); padding: 10px 14px; font: 500 16px var(--font); color: var(--text); outline: none; }
.input::placeholder { color: var(--placeholder); }
.input:focus { border-color: var(--border-focus); }
.input.invalid { border-color: var(--danger); }
.err { color: var(--danger); font-size: 14px; font-weight: 500; margin-top: 6px; min-height: 20px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--text-muted); margin-top: 14px; cursor: pointer; text-align: left; }
.consent input { width: 18px; height: 18px; accent-color: var(--primary); margin: 1px 0 0; flex: none; }
.consent a { color: var(--text-muted); }
.privacy { position: relative; background: #fff; border: 1px solid var(--border-info); border-radius: var(--r); box-shadow: var(--shadow-info); padding: 26px 22px 18px; margin-top: 36px; text-align: center; }
.privacy .lock { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 50%; background: #4FA3B5; display: grid; place-items: center; }
.privacy b { font-size: 13px; color: var(--text-muted); display: block; }
.privacy p { font-size: 11px; color: var(--text-muted); margin: 8px 0 0; line-height: 1.5; }

/* Scratch */
.scratch { position: relative; margin-top: 28px; border-radius: var(--r); overflow: hidden; height: 200px; background: var(--accent-soft); border: 1.5px dashed var(--accent); }
.scratch .prize { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px; }
.scratch .prize .code { font-size: 30px; font-weight: 800; letter-spacing: 3px; color: var(--accent); }
.scratch .prize p { margin: 6px 0 0; font-size: 15px; }
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.hint { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 10px; }

/* Paywall */
.timerbar { position: sticky; top: 64px; z-index: 4; margin: -20px calc(-1 * var(--pad-x)) 16px; background: var(--accent); color: #fff; text-align: center; font-size: 14px; font-weight: 600; padding: 10px; border-radius: 0 0 12px 12px; }
.timerbar.expired { background: #6B7280; }
.promo { background: #fff; border-radius: var(--r); box-shadow: var(--shadow-card); padding: 18px; margin-top: 20px; }
.promo .top { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.promo .gift { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; font-size: 20px; flex: none; }
.promo .ok { color: var(--success); font-weight: 700; }
.promo hr { border: 0; border-top: 1.5px dashed var(--accent); opacity: .35; margin: 14px 0; }
.promo .chips { display: flex; gap: 10px; }
.coupon { flex: 1; border: 1.5px dashed var(--accent); border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; letter-spacing: 2px; color: #374151; }
.clock { background: var(--accent); color: #fff; border-radius: 12px; padding: 8px 14px; display: flex; gap: 8px; align-items: center; }
.clock .u { text-align: center; }
.clock .n { font-size: 28px; font-weight: 800; line-height: 1; }
.clock .l { font-size: 9px; letter-spacing: .5px; margin-top: 3px; }
.clock .colon { font-size: 22px; font-weight: 800; }
.total { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.total .lbl { font-size: 24px; font-weight: 800; }
.total .vals { text-align: right; }
.total .old { color: #9CA3AF; text-decoration: line-through; font-size: 16px; margin-right: 8px; }
.total .now { font-size: 26px; font-weight: 800; }
.total .save { color: var(--success); font-size: 14px; font-weight: 600; }
.receive { margin-top: 22px; }
.receive h3 { font-size: 18px; margin: 0 0 10px; }
.receive li { margin: 0 0 8px; font-size: 15px; line-height: 1.45; list-style: none; padding-left: 26px; position: relative; }
.receive li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.receive ul { padding: 0; margin: 0; }
.bump { margin-top: 20px; border: 2px dashed var(--primary); border-radius: var(--r); padding: 16px; background: #F7FAFF; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; text-align: left; }
.bump input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; margin-top: 2px; }
.bump strong { display: block; font-size: 15px; margin-bottom: 4px; }
.bump p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.guarantee { margin-top: 20px; background: var(--surface); border-radius: var(--r); padding: 16px; display: flex; gap: 12px; font-size: 14px; line-height: 1.45; }
.guarantee span { font-size: 28px; }
.fine { font-size: 10px; color: var(--text-muted); text-align: center; line-height: 1.5; margin-top: 14px; }
.fine a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
