/* Layout: one light mobile column. The launch cyan stays on the button and the progress bar; text accents use a deep teal because cyan fails contrast on white. The photo and the Instagram image keep the dark launch look. Wide screens add a review rail. */
:root {
  --bg: #EDF4F4;
  --surface: #FFFFFF;
  --raised: #FFFFFF;
  --ink: #03181B;
  --ink-soft: #4B6468;
  --line: #C7DADC;
  --off: #DCE9EA;
  --off-ink: #5F787C;
  --cyan: #0A6B73;
  --cyan-rgb: 22, 224, 234;
  --action: #16E0EA;
  --mint: #C8F6EC;
  --on-cyan: #03181B;
  --glass: rgba(3, 24, 27, .06);
  --scrim: rgba(0, 6, 8, .8);
  --frame: #DCE9EA;
  --logo-env: #03181B;
  --logo-sun: #12C4CE;
  --env-back: #CFE8EA;
  --env-front: #FFFFFF;
  --env-flap: #DCEEF0;
  --env-shade: rgba(3, 24, 27, .1);
  --env-edge: rgba(10, 107, 115, .55);
  --env-line: rgba(3, 24, 27, .28);
  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "Archivo", "Segoe UI", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  color-scheme: light;
}

html, body { height: 100%; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.45 var(--body); overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.stage { height: 100%; display: flex; justify-content: center; }
.phone { position: relative; flex: 1 1 auto; min-width: 0; max-width: 520px; height: 100%; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }

/* Horizon */
.hero { --p: 0; --lit: 0; position: relative; flex: 0 0 auto; height: 64px; overflow: hidden; background: var(--bg); transition: height .5s ease; }
.glow { position: absolute; left: 50%; bottom: -190px; width: 150%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--cyan-rgb), .7), rgba(var(--cyan-rgb), .2) 45%, transparent 72%); opacity: calc(.15 + .4 * var(--lit)); transform: translateX(-50%) scale(calc(.6 + .5 * var(--lit))); transition: opacity .8s ease, transform .8s ease; }
.hero:not(.sent) .glow { display: none; }
.hero.sent { height: 170px; }
.hero.done .glow { animation: dawn 1.5s ease-out; }
@keyframes dawn { 40% { opacity: .75; transform: translateX(-50%) scale(1.3); } }

.hero-photo { position: absolute; inset: 0; z-index: 0; display: none; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5,15,18,.55), rgba(5,15,18,0) 24%); }
.hero.photo { --ink: #F2FBFB; --glass: rgba(3, 24, 27, .55); --logo-env: #FFFFFF; --logo-sun: #16E0EA; height: min(54%, 480px); }
.hero.photo.compact { height: min(26%, 220px); }
@media (max-height: 700px) {
  .hero.photo { height: 40%; }
  .hero.photo.compact { height: 22%; }
  .hero-photo img { object-position: 50% 14%; }
  .hero.sent { height: 136px; }
  .hero.sent .env { height: 74px; bottom: 8px; }
}
.hero.photo .hero-photo { display: block; }
.hero.photo + .progress { display: none; }

/* Envelope: open on welcome, closes on send. No seal here; that belongs to the letter in stage 3. */
.env { position: absolute; z-index: 1; left: 50%; bottom: 18px; height: calc(100% - 112px); max-width: 100%; aspect-ratio: 200 / 190; transform: translateX(-50%); transition: height .5s ease, bottom .5s ease; }
.hero.sent .env { height: 98px; bottom: 16px; }
.env svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 18px rgba(var(--cyan-rgb), .28)); }
.env text { font: 900 34px var(--display); font-stretch: 62%; letter-spacing: .02em; fill: var(--cyan); }
.env .flap-b, .env .flap-f { transform-origin: 100px 70px; }
.env .sheet { transform: translateY(0); }
.env .flap-b { transform: rotateX(180deg); }
.env .flap-f { transform: rotateX(90deg); }
.env[data-state="closed"] .sheet { transform: translateY(52px); }
.env[data-state="closed"] .flap-b { transform: rotateX(90deg); }
.env[data-state="closed"] .flap-f { transform: rotateX(0deg); }
.env[data-state="closing"] .sheet { animation: tuck .7s .55s ease-in-out forwards; }
.env[data-state="closing"] .flap-b { animation: fold-up .28s 1.3s ease-in forwards; }
.env[data-state="closing"] .flap-f { animation: fold-down .32s 1.58s ease-out forwards; }
@keyframes tuck { to { transform: translateY(52px); } }
@keyframes fold-up { to { transform: rotateX(90deg); } }
@keyframes fold-down { to { transform: rotateX(0deg); } }

.seal-note { display: none; position: absolute; z-index: 2; left: 0; right: 0; bottom: 21%; margin: 0; text-align: center; font-size: 26px; font-weight: 700; letter-spacing: -.02em; opacity: 0; }
.phone.sealing .hero { height: 100%; }
.phone.sealing .glow { bottom: 50%; translate: 0 50%; }
.phone.sealing .env { height: 36%; bottom: 33%; }
.phone.sealing .topbar, .phone.sealing .hero-logo { visibility: hidden; }
.phone.sealing main, .phone.sealing .foot, .phone.sealing .progress { display: none; }
.phone.sealing .seal-note { display: block; animation: note-in .4s 1.9s ease-out forwards; }
@keyframes note-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.topbar { position: absolute; z-index: 3; top: 12px; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.pill { height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: var(--glass); color: var(--ink); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.pill.icon { width: 40px; padding: 0; justify-content: center; }
.pill svg { width: 18px; height: 18px; }
.progress { flex: 0 0 auto; height: 3px; background: var(--off); }
.progress i { display: block; height: 100%; width: 0; background: var(--action); transition: width .5s ease; }

/* Screen */
main { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: var(--bg); }
.screen { display: flex; flex-direction: column; gap: 14px; padding-block: 18px 24px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); animation: enter .25s ease-out; }
@keyframes enter { from { opacity: .4; transform: translateY(6px); } }
h1, h2 { margin: 0; text-wrap: balance; }
/* Headings take focus by script for screen readers only, so they show no ring. */
h1:focus-visible, h2:focus-visible { outline: none; }
h1 { font: 900 clamp(52px, 15vw, 64px)/.98 var(--display); font-stretch: 62%; letter-spacing: -.005em; text-transform: uppercase; }
h2 { font: 700 clamp(27px, 7.4vw, 31px)/1.12 var(--body); letter-spacing: -.025em; }
.hint { margin: 0; color: var(--ink-soft); }
.lead { margin: 0; font-size: 20px; line-height: 1.38; color: var(--ink-soft); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { width: 16px; height: 16px; color: var(--cyan); }

/* Notebook field */
.note { --row: 36px; display: block; width: 100%; padding: 0 2px; border: 0; border-radius: 0; resize: none; overflow: hidden; background-color: transparent; background-image: repeating-linear-gradient(transparent 0 calc(var(--row) - 1px), var(--line) calc(var(--row) - 1px) var(--row)); background-attachment: local; font: 500 21px/var(--row) var(--body); letter-spacing: -.01em; color: var(--ink); }
.note::placeholder { color: var(--off-ink); }
.note:focus { outline: none; background-image: repeating-linear-gradient(transparent 0 calc(var(--row) - 1px), rgba(var(--cyan-rgb), .7) calc(var(--row) - 1px) var(--row)); }
.meta { display: flex; justify-content: space-between; align-items: center; min-height: 22px; font-size: 14px; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.saved { display: inline-flex; align-items: center; gap: 4px; color: var(--cyan); opacity: 0; transition: opacity .25s ease; }
.saved.on { opacity: 1; }
.saved svg { width: 15px; height: 15px; }
.count-limit { color: var(--cyan); }

/* Consent options */
.options { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; border: 0; }
.option { position: relative; display: grid; grid-template-columns: 1fr 26px; gap: 2px 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option strong { font-size: 18px; font-weight: 700; line-height: 1.2; }
.option span { grid-column: 1; font-size: 15px; color: var(--ink-soft); }
.tick { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 26px; height: 26px; border: 1.5px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: transparent; }
.tick svg { width: 16px; height: 16px; }
.option:has(input:checked) { border-color: var(--cyan); box-shadow: 0 0 18px rgba(var(--cyan-rgb), .22); }
.option:has(input:checked) .tick { background: var(--cyan); border-color: var(--cyan); color: #FFFFFF; }
.option:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.city { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.city small { font-weight: 400; font-size: 14px; color: var(--ink-soft); }
.city input { height: 52px; margin-top: 4px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 500; font-size: 18px; }
.fineprint { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* Share card */
/* Story format, 9:16. Sized in cqw so the preview scales like the exported image. */
.story { container-type: inline-size; position: relative; align-self: center; width: min(66%, 260px); max-width: 100%; aspect-ratio: 9 / 16; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(var(--cyan-rgb), .45); border-radius: 18px; background: linear-gradient(170deg, var(--card-top), var(--card-bottom) 72%); color: var(--ink); box-shadow: 0 0 34px rgba(var(--cyan-rgb), .18); animation: land .5s ease-out; }
@keyframes land { from { transform: translateY(10px); opacity: .4; } }
.story::before { content: ""; position: absolute; left: -20%; right: -20%; top: 4%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(var(--cyan-rgb), .42), transparent 72%); }
.story-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 6cqw 7cqw 5cqw; text-align: center; }
.story .logo { font-size: 5.6cqw; gap: 1.8cqw; }
.story .logo svg { width: 7.4cqw; height: 7.8cqw; }
.story-env { display: block; width: 62cqw; height: 38.4cqw; margin-top: 11cqw; overflow: visible; }
.story h3 { margin: 11cqw 0 0; white-space: nowrap; font: 900 17.4cqw/1 var(--display); font-stretch: 62%; text-transform: uppercase; text-wrap: balance; background: linear-gradient(100deg, var(--ink), var(--mint) 55%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story p { margin: 6cqw 0 0; font-size: 7.6cqw; font-weight: 500; line-height: 1.24; text-wrap: balance; }
.story p strong { font-weight: 800; color: var(--cyan); }
.who { margin-top: 4cqw; font-size: 5cqw; font-weight: 600; color: var(--ink-soft); overflow-wrap: anywhere; }
.story-foot { margin-top: auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 3cqw; padding-top: 3cqw; border-top: 1px solid var(--line); text-align: left; }
.story-foot b { font-size: 5.6cqw; font-weight: 700; letter-spacing: -.01em; color: var(--cyan); }
.story .destiny { width: 20cqw; height: 14.6cqw; }
.share { --ink: #F2FBFB; --ink-soft: #A7BFC2; --line: #27464E; --raised: #12292F; --cyan: #16E0EA; --card-top: #0E313A; --card-bottom: #061417; --logo-env: #FFFFFF; --logo-sun: #16E0EA; --env-back: #0A2329; --env-front: #12323A; --env-flap: #184650; --env-shade: rgba(0, 0, 0, .28); --env-edge: rgba(22, 224, 234, .55); color: var(--ink); position: absolute; z-index: 6; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; overflow-y: auto; padding-block: 24px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); background: var(--scrim); backdrop-filter: blur(6px); }
.share > :first-child { margin-top: auto; }
.share > :last-child { margin-bottom: auto; }
.share > p { margin: 0; max-width: 34ch; text-align: center; text-wrap: balance; font-size: 14px; color: var(--ink); }
.share .ghost { min-height: 44px; padding-inline: 24px; background: var(--raised); }
.locks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.locks li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: var(--surface); font-size: 14px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.locks svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--ink-soft); }
.section-label { margin: 8px 0 -4px; font-size: 15px; font-weight: 700; }

/* Letter: the goals and the P.S. share one sheet that grows with each answer. */
.letter .screen { min-height: 100%; gap: 10px; padding-block: 14px 6px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.guide { position: sticky; top: 0; z-index: 1; margin: -6px 0 0; padding-block: 6px; background: var(--bg); font-size: 15px; line-height: 1.35; color: var(--ink-soft); }
.guide b { font-weight: 700; color: var(--cyan); }
.sheet-paper { flex: 1 0 auto; display: flex; flex-direction: column; padding: 18px 20px 12px; border: 1px solid var(--line); border-radius: 6px; background: #FFFFFF; box-shadow: 0 10px 28px rgba(3, 24, 27, .07); font-family: var(--serif); }
.letter-date { margin: 0; text-align: right; font-size: 14px; color: var(--ink-soft); }
.letter-to { margin: 10px 0 12px; font-size: 21px; font-style: italic; }
.sheet-paper h2 { font: 500 21px/1.3 var(--serif); letter-spacing: 0; }
.sheet-paper .note { --row: 36px; margin-top: 2px; padding: 0; background-image: repeating-linear-gradient(transparent 0 calc(var(--row) - 1px), #E3ECED calc(var(--row) - 1px) var(--row)); font: 400 21px/var(--row) var(--serif); letter-spacing: 0; }
.sheet-paper .note:focus { background-image: repeating-linear-gradient(transparent 0 calc(var(--row) - 1px), rgba(22, 224, 234, .6) calc(var(--row) - 1px) var(--row)); }
.sheet-paper .meta { font-family: var(--body); }
.letter-said { margin: 0 0 14px; font-size: 21px; line-height: 1.32; overflow-wrap: anywhere; }
.letter-sign { margin: 4px 0 18px; font-size: 21px; font-style: italic; line-height: 1.32; }
.letter-said em { font-style: normal; color: var(--ink-soft); }
.letter #counter:not(.near) { visibility: hidden; }
.letter-head { margin-top: auto; padding-top: 10px; display: flex; justify-content: center; color: var(--ink-soft); }
.letter-head .destiny { width: 44px; height: 32px; color: inherit; }

/* Logos */
.logo { display: inline-flex; align-items: center; gap: 7px; font: 800 15px/1 var(--body); letter-spacing: -.02em; }
.logo b { margin-top: .3em; font-weight: inherit; }
.logo svg { width: 26px; height: 27px; flex: 0 0 auto; }
.hero-logo { position: absolute; z-index: 2; top: 12px; left: 0; right: 0; height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink); font-size: 16px; pointer-events: none; }
.hero-logo svg { width: 24px; height: 25px; }
.destiny { display: block; width: 66px; height: 48px; flex: 0 0 auto; color: var(--ink); }
.screen:has(.sign) { min-height: 100%; }
.endorse.sign { margin-top: auto; padding-top: 0; }
.sign .destiny { width: 62px; height: 46px; }
.endorse { display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 6px; font-size: 13px; color: var(--ink-soft); }


/* Single action */
.more { position: absolute; left: 0; right: 0; bottom: 100%; height: 84px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; background: linear-gradient(transparent, var(--bg) 78%); pointer-events: none; }
.more-btn { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); font-size: 14px; font-weight: 700; pointer-events: auto; }
.more-btn svg { width: 16px; height: 16px; color: var(--cyan); }
.more.scrolled .more-btn { display: none; }
.foot { position: relative; z-index: 2; flex: 0 0 auto; padding-block: 10px 18px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); background: var(--bg); }
.cta { display: block; width: 100%; min-height: 58px; border: 0; border-radius: 999px; background: var(--action); color: var(--on-cyan); font-size: 16px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; transition: transform .1s ease; }
.steps { display: flex; justify-content: center; gap: 18px; margin: 0 0 10px; padding: 0; list-style: none; font-size: 13px; font-weight: 700; color: var(--off-ink); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps i { width: 20px; height: 20px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 50%; font-style: normal; font-size: 11px; }
.steps .now { color: var(--ink); }
.steps .now i { border-color: var(--ink); }
.steps .done { color: var(--cyan); }
.steps .done i { border-color: var(--cyan); background: var(--cyan); color: #fff; }
.cal-help { margin: 0; font-size: 15px; line-height: 1.35; color: var(--ink-soft); }
.cal-help strong { color: var(--ink); font-weight: 700; }
.text-btn { display: inline; padding: 0; border: 0; background: none; color: var(--cyan); font-size: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.cta:active:not(:disabled) { transform: scale(.98); }
.cta:disabled { background: var(--off); color: var(--off-ink); box-shadow: none; cursor: not-allowed; }


.ghost { padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: transparent; font-weight: 700; font-size: 14px; }
.ghost:hover { background: var(--off); }

@media (min-width: 860px) {
  .stage { gap: 32px; align-items: center; padding-block: 20px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .phone { flex: 0 0 410px; max-height: 860px; border: 8px solid var(--frame); border-radius: 38px; }
  .stage { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Produção */
.notice { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-size: 15px; }
.form-error { margin: 0; font-size: 15px; font-weight: 700; color: #B42318; }
.fineprint a { color: var(--cyan); font-weight: 700; }
.story-img { display: block; width: min(66%, 260px); aspect-ratio: 9 / 16; border-radius: 18px; }
.share a.ghost { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
