/* SPION — Fase 0 · "A Revelação"
   Cores e tipos num só sítio: mudar aqui muda o site todo. */
:root {
  --bg: #0D0C0B;
  --ink: #EEEBE2;
  --muted: #B8B4AA;
  --line: #EEEBE2;
  --alert: #F0B9A0;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 5vw, 72px);
}

@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-wght-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--muted); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- ecrã principal ---------- */
.ask { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }

.hero { position: absolute; inset: 0; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 30%; display: block;
  opacity: 0.3; filter: grayscale(0.55) blur(14px) brightness(0.9); transform: scale(1.08);
  transition: opacity 0.9s ease, filter 0.9s ease, transform 0.9s ease;
  animation: breathe 7s ease-in-out infinite; }
[data-state="held"] .hero img { opacity: 1; filter: none; transform: scale(1); animation: none;
  transition: opacity 3.2s ease, filter 3.2s ease, transform 6s ease-out; }
.shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,12,11,0.6) 0%, rgba(13,12,11,0) 30%, rgba(13,12,11,0) 50%, rgba(13,12,11,0.9) 100%); }

.top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 36px var(--pad) 0; font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); animation: fade 1.6s ease-out 0.2s both; }
.top__logo { height: 18px; width: auto; display: block; }
.top__phase { font-family: var(--serif); font-size: 22px; letter-spacing: 0.1em; color: var(--ink); min-width: 7.5em; text-align: right; }
.top__meta { min-width: 7.5em; }

.hold { position: relative; display: flex; flex-direction: column; align-items: center; gap: 30px; padding: 0 20px; text-align: center; animation: fade 1.6s ease-out 0.9s both; -webkit-user-select: none; user-select: none; }
.hold__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5.6vw, 84px); line-height: 1; transition: opacity 1.2s ease; }
[data-state="held"] .hold__title { opacity: 0; }
.hold__btn { width: 116px; height: 116px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 500 11.5px/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; cursor: pointer;
  touch-action: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  transition: transform 3s ease, background-color 3s ease, color 0.6s ease; animation: pulse 2.6s ease-in-out infinite; }
[data-state="held"] .hold__btn { background: var(--ink); color: var(--bg); transform: scale(0.82); animation: none; }
.hold__hint { margin: 0; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); transition: opacity 0.8s ease; }
[data-state="held"] .hold__hint { opacity: 0; }
.hold__wrap { position: relative; display: grid; place-items: center; }
.hold__ring { position: absolute; width: 140px; height: 140px; transform: rotate(-90deg); pointer-events: none; }
.hold__ring circle { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 415; stroke-dashoffset: 415; opacity: 0; transition: stroke-dashoffset 0.5s ease, opacity 0.5s ease; }
[data-state="held"] .hold__ring circle { stroke-dashoffset: 0; opacity: 0.9; transition: stroke-dashoffset 4s linear, opacity 0.3s ease; }
.hold__secret { position: absolute; left: 0; right: 0; bottom: -4px; margin: 0; font-family: var(--serif); font-style: italic; font-size: 22px; letter-spacing: 0.02em; color: var(--ink); opacity: 0; transform: translateY(6px); transition: opacity 0.6s ease, transform 0.6s ease; pointer-events: none; }
[data-full="1"] .hold__secret { opacity: 1; transform: none; transition: opacity 1.4s ease, transform 1.4s ease; }

.join { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px; padding: 0 var(--pad) 34px; animation: fade 1.6s ease-out 1.5s both; }

.form { flex: 0 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.form__lead { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.form__lead em { color: var(--muted); }
.form__row { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.form__row input { flex: 1; min-width: 0; height: 50px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: 16px var(--sans); padding: 0; }
.form__row input::placeholder { color: var(--muted); opacity: 1; }
.form__row input:focus { outline: none; }
.form__row:focus-within { border-bottom-width: 2px; }
.form__send { height: 50px; padding: 0 0 0 14px; border: 0; background: transparent; color: var(--ink); font: 500 12.5px var(--sans); letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.form__send[disabled] { opacity: 0.5; cursor: progress; }
.form__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.form__consent input { margin: 1px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--ink); }
.form__error { margin: 0; min-height: 18px; font-size: 12.5px; color: var(--alert); }

.foot { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.foot a { text-decoration: none; padding: 6px 0; }
.foot { align-items: center; }
.foot__social { display: inline-flex; gap: 18px; margin-left: 6px; }
.foot__social a { display: inline-flex; padding: 6px 2px; color: var(--muted); transition: color 0.3s ease; }
.foot__social a:hover { color: var(--ink); }
.foot__social svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.foot__social svg .fill, .foot__social svg.solid { fill: currentColor; stroke: none; }

/* ---------- confirmação: a carta ---------- */
.done { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.top--plain { animation: none; }
.done__body { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(40px, 7vw, 120px); padding: 32px var(--pad) 40px; }
.letter { flex: 1 1 380px; max-width: 640px; display: flex; flex-direction: column; gap: 30px; }
.letter__text { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.5vw, 52px); line-height: 1.22; display: flex; flex-direction: column; align-items: flex-start; }
.letter__text span { white-space: nowrap; animation: type var(--t) steps(var(--n)) var(--d) both; }
.letter__note { margin: 0; max-width: 440px; font-size: 14px; line-height: 1.6; color: var(--muted); animation: rise 1.2s ease-out 9.6s both; }
.letter__sign { display: flex; align-items: center; gap: 16px; animation: rise 1.2s ease-out 10.2s both; }
.letter__sign span { width: 34px; height: 1px; background: var(--ink); }
.letter__sign img { height: 16px; width: auto; display: block; }
.arch { margin: 0; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.arch__frame { width: min(320px, 70vw); aspect-ratio: 2 / 3; border-radius: 999px 999px 0 0; overflow: hidden; background: #1E1C1A; }
.arch__frame img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; display: block; animation: develop 6s ease-out 1s both; }
.arch figcaption { font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); animation: rise 1.2s ease-out 7s both; }
.foot--done { padding: 20px var(--pad) 30px; justify-content: space-between; }

/* ---------- páginas de texto (privacidade, legal) ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 36px var(--pad) 80px; }
.doc__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 64px; }
.doc__top img { height: 18px; width: auto; display: block; }
.doc__top a { font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; }
.doc h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; margin: 0 0 12px; }
.doc h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 44px 0 10px; }
.doc p, .doc li { color: #D8D4CA; font-size: 16px; line-height: 1.65; }
.doc ul { padding-left: 20px; }
.doc .lang { margin-top: 80px; padding-top: 48px; border-top: 1px solid #2E2B28; }
.doc .small { font-size: 13px; color: var(--muted); }

/* ---------- movimento ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes breathe { 0%, 100% { opacity: 0.26; } 50% { opacity: 0.4; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(238,235,226,0.35); } 50% { box-shadow: 0 0 0 18px rgba(238,235,226,0); } }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -2% 0 0); } }
@keyframes develop { from { filter: grayscale(1) blur(16px); opacity: 0.2; } to { filter: none; opacity: 1; } }

@media (max-width: 700px) {
  .top { padding-top: 24px; font-size: 10px; }
  .top__logo { height: 14px; }
  .top__phase { font-size: 18px; min-width: 6.5em; }
  .top__meta { min-width: 6.5em; }
  .hero img { object-position: 60% 40%; }
  .hold { gap: 24px; }
  .hold__btn { width: 104px; height: 104px; }
  .hold__ring { width: 126px; height: 126px; }
  .form__lead { font-size: 20px; }
  .hold__secret { font-size: 19px; bottom: -4px; }
  .hold__hint { font-size: 11px; letter-spacing: 0.2em; }
  .join { padding-bottom: 24px; gap: 20px; }
  .form { flex-basis: 100%; }
  .foot { width: 100%; justify-content: flex-start; gap: 8px 22px; }
  .foot__copy { display: none; }
  .foot__social { margin-left: auto; }
  .done__body { padding-top: 24px; }
  .arch { order: -1; }
  .arch__frame { width: min(200px, 52vw); }
}

@media (max-width: 380px) {
  .top { gap: 10px; }
  .top__meta, .top__phase { min-width: 64px; }
  .top__meta { font-size: 9px; letter-spacing: 0.14em; white-space: nowrap; }
  .top__logo { height: 12px; }
  .top__phase { font-size: 17px; }
  .hold__title { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01s !important; }
  .hero img { filter: grayscale(0.55) blur(10px); opacity: 0.3; }
}
