/* As Duas Vidas do Padre Manuel da Nóbrega — Hugo Vilela
   Lema d'Origem, 2026 · www.manueldanobrega.com
   Landing page simples. Contrastes verificados para WCAG AA. */

:root {
  --bg: #ebe1cc;        /* pergaminho */
  --paper: #f5eedf;     /* superfícies */
  --field: #fdfaf3;     /* campos do formulário */
  --ink: #241c12;       /* texto · 12,9:1 sobre --bg */
  --ink2: #45382a;      /* texto secundário · 8,7:1 */
  --muted: #5c4b36;     /* notas · 6,4:1 */
  --line: #6b5a43;      /* contorno dos campos · 5,1:1 */
  --rule: #c4ae88;      /* filetes decorativos (sem função de informação) */
  --red: #8c3122;       /* o vermelho da rubrica · 6,3:1 */
  --red-d: #6e2318;
  --on-red: #fbf5e9;
  --err-bg: #fbece7;

  --serif: "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
  --fell: "IM Fell English", "EB Garamond", Georgia, serif;
  --fellsc: "IM Fell English SC", "IM Fell English", "EB Garamond", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.25rem/1.6 var(--serif);       /* 20px */
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
p { margin: 0 0 1em; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
main:focus { outline: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 10;
  padding: 12px 18px; background: var(--ink); color: var(--paper);
  font-weight: 500; text-decoration: none; border-radius: 4px;
}
.skip:focus { top: 12px; }

/* IM Fell não tem negrito: a hierarquia faz-se por corpo, versalete e cor */
h1, h2, h3, legend, .brand, .menu a, .btn, .eyebrow, .kicker, .ficha dt, .steps strong, .foot__t {
  font-weight: 400;
}

/* ── cabeçalho ───────────────────────────────── */
.top { border-bottom: 1px solid var(--rule); }
.top__in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 28px; padding-top: 12px; padding-bottom: 12px;
}
.brand {
  font-family: var(--fellsc); font-size: 1.3rem; letter-spacing: .02em;
  color: var(--ink); text-decoration: none; padding: 6px 0;
}
.menu { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.menu a {
  display: inline-block; padding: 10px 0 8px;
  font-family: var(--fellsc); font-size: 1.2rem; color: var(--ink);
  text-decoration: none; border-bottom: 2px solid transparent;
}
.menu a:hover { border-bottom-color: var(--rule); }
.menu .menu__cta { color: var(--red); }
.brand { line-height: 1.25; }
@media (max-width: 599px) {
  .brand { font-size: 1.15rem; }
  .menu { gap: 0 16px; }
  .menu a { font-size: 1.1rem; }
}

/* ── capa ────────────────────────────────────── */
.hero { padding: 36px 0 64px; }
.hero__in { display: grid; gap: 36px; align-items: center; }
.hero__capa {
  width: 100%; max-width: 230px; margin: 0 auto;
  box-shadow: 0 1px 2px rgba(36, 28, 18, .25), 0 22px 44px -18px rgba(36, 28, 18, .55);
}
.kicker {
  margin: 0 0 10px; font-family: var(--fellsc); font-size: 1.25rem;
  letter-spacing: .08em; color: var(--muted);
}
h1 {
  margin: 0 0 14px; font-family: var(--fellsc);
  font-size: clamp(2.3rem, 6vw, 3.7rem); line-height: 1.06; letter-spacing: .005em;
}
h1 span { display: block; }
h1, h2, .lede { text-wrap: balance; }
h1 .h1a { font-size: .58em; color: var(--ink2); margin-bottom: 4px; }
.sub {
  margin: 0 0 20px; font-family: var(--fell); font-style: italic;
  font-size: 1.4rem; line-height: 1.35; color: var(--ink2);
}
.intro { max-width: 33em; margin-bottom: 28px; }
.meta { margin: 24px 0 0; font-size: 1.05rem; color: var(--muted); }

@media (min-width: 820px) {
  .hero { padding: 64px 0 88px; }
  .hero__in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
  .hero__capa { max-width: 400px; }
}

/* ── botões ──────────────────────────────────── */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 28px; border: 2px solid var(--ink); border-radius: 4px;
  background: transparent; color: var(--ink);
  font-family: var(--fellsc); font-size: 1.25rem; letter-spacing: .03em; line-height: 1.1;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--red { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn--red:hover { background: var(--red-d); border-color: var(--red-d); color: var(--on-red); }
.btn--full { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ── secções ─────────────────────────────────── */
.sec { padding: 64px 0; border-top: 1px solid var(--rule); }
.sec--paper { background: var(--paper); }
@media (min-width: 820px) { .sec { padding: 88px 0; } }

h2 {
  margin: 0 0 22px; font-family: var(--fellsc);
  font-size: clamp(2.1rem, 4.4vw, 2.9rem); line-height: 1.08;
}
.eyebrow {
  margin: 0 0 6px; font-family: var(--fellsc); font-size: 1.2rem;
  letter-spacing: .08em; color: var(--red);
}
.prose { max-width: 36em; }
.lede { max-width: 33em; font-size: 1.4rem; line-height: 1.5; }

/* ── o livro ─────────────────────────────────── */
.livro { display: grid; gap: 36px; }
@media (min-width: 900px) {
  .livro { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
  .ficha { margin-top: 74px; }
}
.ficha {
  margin: 0; padding: 10px 24px; background: var(--paper);
  border: 1px solid var(--rule); border-radius: 4px;
}
.ficha div {
  display: grid; grid-template-columns: 7.5em 1fr; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid #ddcdb0;
}
.ficha div:last-child { border-bottom: 0; }
.ficha dt { font-family: var(--fellsc); font-size: 1.15rem; color: var(--muted); }
.ficha dd { margin: 0; }
@media (max-width: 420px) { .ficha div { grid-template-columns: 1fr; gap: 0; } }

/* ── o desafio ───────────────────────────────── */
.cena { margin: 0 0 44px; }
.cena img {
  width: 100%; border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(36, 28, 18, .15), 0 26px 50px -30px rgba(36, 28, 18, .5);
}
.cena figcaption {
  margin-top: 14px; max-width: 46em;
  font-family: var(--fell); font-style: italic; font-size: 1.15rem; line-height: 1.45; color: var(--ink2);
}
@media (min-width: 820px) { .cena { margin-bottom: 64px; } }

.steps {
  display: grid; gap: 14px; margin: 32px 0 14px; padding: 0;
  list-style: none; counter-reset: passo;
}
.steps li {
  position: relative; counter-increment: passo;
  padding: 20px 22px 20px 74px;
  background: var(--bg); border: 1px solid var(--rule); border-radius: 4px;
}
.steps li::before {
  content: counter(passo, upper-roman);
  position: absolute; left: 20px; top: 15px; width: 40px; text-align: center;
  font-family: var(--fellsc); font-size: 2rem; line-height: 1; color: var(--red);
}
.steps strong { display: block; margin-bottom: 4px; font-family: var(--fellsc); font-size: 1.35rem; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.note { font-style: italic; color: var(--muted); }

.desafio__grid { margin-top: 40px; }

/* ── reservar ────────────────────────────────── */
.form--top { margin-top: 36px; }
.radios { display: grid; gap: 10px; }
.radio {
  display: flex; gap: 14px; align-items: flex-start;
  min-height: 52px; padding: 12px 16px;
  background: #fff; border: 2px solid var(--rule); border-radius: 4px; cursor: pointer;
}
.radio input { flex: none; width: 24px; height: 24px; margin: 3px 0 0; accent-color: var(--red); }
.radio:hover { border-color: var(--line); }
.radio:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.radio:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.radio input:focus-visible { outline: none; }
.radio:has(input[aria-invalid="true"]) { border-color: var(--red); background: var(--err-bg); }
.morada { margin: 0 0 24px; padding: 4px 0 0 20px; border-left: 3px solid var(--rule); }
.morada .hint { margin-top: -2px; }

/* ── formulário ──────────────────────────────── */
.form {
  padding: 28px 20px; background: var(--field);
  border: 1px solid var(--rule); border-radius: 6px;
  box-shadow: 0 18px 40px -28px rgba(36, 28, 18, .45);
}
@media (min-width: 600px) { .form { padding: 40px 44px; } }
@media (min-width: 900px) { .form { padding: 52px 64px; } }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; font-family: var(--fellsc); font-size: 1.75rem; line-height: 1.2; }
/* grupos dentro do formulário: a legenda faz de rótulo */
.f > legend { margin-bottom: 8px; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.6; }
.req { margin: 0 0 26px; font-size: 1.05rem; color: var(--muted); }

.f { margin: 0 0 24px; }
.f > label { display: block; margin-bottom: 2px; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); }
.hint { display: block; margin-bottom: 8px; font-size: 1.05rem; line-height: 1.45; color: var(--muted); }
.f2 { display: grid; gap: 0 20px; }
@media (min-width: 600px) {
  .f2 { grid-template-columns: 1fr 1fr; }
  .f2 .f { display: flex; flex-direction: column; }
  .f2 .f input { margin-top: auto; }
}

input[type="text"], input[type="email"], input[type="date"], input[type="tel"], input[type="number"], textarea {
  display: block; width: 100%; min-height: 52px; padding: 10px 14px;
  font: inherit; font-size: 1.2rem; line-height: 1.4; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 4px;
}
textarea { min-height: 112px; resize: vertical; }
input:focus, textarea:focus { outline: 3px solid var(--red); outline-offset: 2px; border-color: var(--ink); }
[aria-invalid="true"] { border-color: var(--red) !important; background: var(--err-bg) !important; }

.err { display: block; margin-top: 6px; font-weight: 600; color: var(--red); }
.err:empty { display: none; }

.chk { display: flex; gap: 14px; align-items: flex-start; }
.chk input { flex: none; width: 26px; height: 26px; margin: 3px 0 0; accent-color: var(--red); }
.chk label { font-weight: 400; }

.summary {
  margin: 0 0 28px; padding: 18px 22px;
  background: var(--err-bg); border: 2px solid var(--red); border-radius: 4px;
}
.summary h3 { margin: 0 0 8px; font-family: var(--fellsc); font-size: 1.4rem; color: var(--red); }
.summary ul { margin: 0; padding-left: 1.2em; }
.summary li { margin: 4px 0; }
.summary a { font-weight: 500; }

.privacy { margin: 18px 0 0; font-size: 1rem; line-height: 1.5; color: var(--muted); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }


/* ── rodapé ──────────────────────────────────── */
.foot { padding: 48px 0 32px; background: var(--ink); color: #e9dfcb; font-size: 1.05rem; }
.foot__in { display: grid; gap: 28px; }
@media (min-width: 760px) { .foot__in { grid-template-columns: 2fr 1fr; } }
.foot p { margin: 0 0 6px; }
.foot__t { margin-bottom: 10px !important; font-family: var(--fellsc); font-size: 1.3rem; color: #f5eedf; }
.foot a { color: #f5eedf; }
.foot a:focus-visible { outline-color: #f5eedf; }
.foot__c { margin-top: 28px !important; padding-top: 18px; border-top: 1px solid #4a3d2c; color: #cfc2a8; }

/* ── página de agradecimento ─────────────────── */
.ty { min-height: 100vh; display: grid; place-items: center; padding: 48px 0; text-align: center; }
.ty .wrap { max-width: 640px; }
.ty__orn { width: 96px; margin: 0 auto 28px; opacity: .45; }
.ty__sig { width: 200px; margin: 40px auto 0; opacity: .7; }
.ty .btns { justify-content: center; }

@media (forced-colors: active) {
  .btn, input, textarea, .summary, .steps li, .radio { border: 2px solid CanvasText; }
}
