/* "La Puerta" landing page. Near-black, one thing on screen at a time, thumb-sized buttons. */
:root {
  --bg: #050307;
  --text: #efe9f5;
  --text-2: #b9aec6;
  --text-3: #85798f;
  --accent: #c58bff;
  --glow: #e7c9ff;
  --line: rgba(255, 255, 255, .14);
  --danger: #ff9aa8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
#stage { flex: 1; position: relative; display: flex; }
[hidden] { display: none !important; }        /* the hidden attribute always wins over a display rule below */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
  text-align: center;
  opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s;
}
.screen.is-on { opacity: 1; visibility: visible; transition: opacity .9s ease; }
.screen.is-cut { transition: none; opacity: 0; }

/* ---------- buttons */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 650;
  min-height: 52px; padding: 0 28px; border-radius: 999px; font-size: 17px; letter-spacing: .01em;
  color: var(--text); background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
  transition: transform .15s ease, background .2s ease, box-shadow .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--go { background: linear-gradient(180deg, #d9adff, #a66ef0); color: #160a24; border: 0; box-shadow: 0 0 34px rgba(197, 139, 255, .35); }
.btn--block { width: 100%; }
.btn--small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .link:focus-visible, input:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.link { appearance: none; background: none; border: 0; padding: 8px 4px; color: var(--text-3); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- 1. ritual */
.logo { width: 64px; height: 64px; opacity: .9; margin-bottom: 28px; }
.logo--sm { width: 44px; height: 44px; margin-bottom: 20px; }
.phones { width: 46px; height: 46px; fill: var(--text-2); opacity: .7; margin-bottom: 14px; }
.ritual-msg { font-family: var(--serif); font-size: clamp(30px, 8vw, 44px); margin: 0 0 36px; letter-spacing: .01em; }
.quiet-links { margin-top: 26px; color: var(--text-3); font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* ---------- 2–4. listening */
.orb {
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(231, 201, 255, .5), rgba(197, 139, 255, .12) 45%, transparent 70%);
  transform: scale(var(--s, .6)); opacity: var(--o, .35);
  transition: transform .12s linear, opacity .12s linear;
  filter: blur(2px);
}
.loading { color: var(--text-3); letter-spacing: .3em; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .3; } }
.choice { position: absolute; left: 22px; right: 22px; bottom: max(64px, calc(env(safe-area-inset-bottom) + 40px));
  display: grid; gap: 14px; max-width: 420px; margin: 0 auto; animation: rise 1.2s ease both; }
.choice--read { position: static; width: 100%; margin-top: 28px; }
.btn--door { min-height: 60px; font-family: var(--serif); font-size: 21px; font-weight: 500; background: rgba(255, 255, 255, .05); }
.btn--door:hover { background: rgba(197, 139, 255, .14); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.paused { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: rgba(5, 3, 7, .9); }
.paused p { font-family: var(--serif); font-size: 22px; margin: 0; }

/* ---------- reading */
#s-read { justify-content: flex-start; overflow-y: auto; padding-top: max(48px, env(safe-area-inset-top)); }
.tale { max-width: 560px; width: 100%; text-align: left; font-size: 18px; line-height: 1.65; }
.tale p { margin: 0 0 18px; animation: rise .9s ease both; }
.tale .sound { color: var(--text-3); font-style: italic; }
.tale .who { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
.tale .how { font-size: 13px; color: var(--text-3); font-style: italic; letter-spacing: 0; text-transform: none; }
.tale .line { font-family: var(--serif); font-size: 21px; }
.tale .next { display: block; margin: 8px auto 0; }

/* ---------- 5. form */
#s-form form { width: 100%; max-width: 420px; display: grid; gap: 14px; margin-top: 8px; }
.form-title { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 7vw, 36px); line-height: 1.2; margin: 0 0 10px; max-width: 520px; }
.form-sub { color: var(--text-2); font-size: 17px; margin: 0 0 22px; }
#email {
  width: 100%; height: 54px; padding: 0 18px; border-radius: 14px; font: inherit; font-size: 17px;
  color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
}
#email::placeholder { color: var(--text-3); }
.consent { display: flex; gap: 12px; text-align: left; font-size: 13px; line-height: 1.5; color: var(--text-2); cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--accent); }
.consent a { color: var(--glow); }
.form-err { color: var(--danger); font-size: 14px; margin: 0; text-align: left; }

/* ---------- 6. founder */
#s-founder { justify-content: center; gap: 4px; }
.founder-line { font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-2); margin: 0; }
.founder-no { font-family: var(--serif); font-size: clamp(64px, 22vw, 108px); line-height: 1; margin: 8px 0 18px; color: var(--glow); text-shadow: 0 0 40px rgba(197, 139, 255, .45); font-variant-numeric: tabular-nums; }
.founder-reward { color: var(--text-2); max-width: 440px; margin: 0 0 22px; line-height: 1.5; }
.countdown { font-variant-numeric: tabular-nums; color: var(--text); margin-bottom: 18px; letter-spacing: .06em; }
.share { width: 100%; max-width: 420px; display: grid; gap: 10px; margin-bottom: 28px; }
.share-title { margin: 0 0 2px; font-size: 14px; color: var(--text-3); }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border-radius: 12px; font: inherit; font-size: 14px; color: var(--text-2); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.goal { width: 100%; max-width: 420px; }
.goal-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.goal-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a66ef0, #e7c9ff); transition: width 1.6s ease; }
.goal-count { margin: 10px 0 4px; font-weight: 650; font-variant-numeric: tabular-nums; }
.goal-text { margin: 0; color: var(--text-3); font-size: 14px; line-height: 1.5; }

.foot { text-align: center; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); font-size: 12px; color: var(--text-3); opacity: 0; transition: opacity .6s; }
.foot.is-on { opacity: 1; }
.foot a { color: var(--text-3); }
.nojs { text-align: center; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  .screen, .orb, .choice, .tale p { transition: none !important; animation: none !important; }
}
.again { margin-top: 22px; }
