/* Registro Dreamland - tema medieval/fantasia. Sem fontes ou imagens externas (LGPD + CSP). */
:root {
  --night-1: #07060d;
  --night-2: #151024;
  --night-3: #2a1b12;
  --leather: #1d140c;
  --leather-2: #241910;
  --parchment: #efe2c4;
  --text: #f1e6cf;
  --muted: #b9a886;
  --gold: #d9ad55;
  --gold-2: #f3d58c;
  --gold-dark: #8a6a2c;
  --ink: #1a1206;
  --input: #120c07;
  --input-border: #5c4520;
  --error: #ff8a7a;
  --ok: #8fd694;
  --warn: #f0c46a;
  --radius: 6px;
  --serif-title: "Cinzel", "Trajan Pro", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-1);
  color: var(--text);
  font: 17px/1.55 var(--serif);
}

/* Céu noturno com brilho de tocha ao fundo */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #fff9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 8%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 30%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 42%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 60% 26%, #fff8 50%, transparent 51%),
    radial-gradient(ellipse 70% 45% at 50% 105%, #7a3d1466 0%, transparent 70%),
    radial-gradient(ellipse 90% 60% at 50% -10%, #3b2a6655 0%, transparent 70%),
    linear-gradient(180deg, var(--night-2) 0%, var(--night-1) 55%, var(--night-3) 100%);
}

.shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}
.shell-wide { max-width: 780px; }

/* Marca */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 22px;
  color: var(--gold-2);
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 18px #d9ad5555, inset 0 0 0 4px var(--leather), inset 0 0 0 6px var(--gold-dark);
}
.brand-name {
  font: 600 30px/1 var(--serif-title);
  letter-spacing: .22em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #000, 0 0 22px #d9ad5544;
}

/* Cartão de couro com moldura dourada */
.card {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, #3a281655 0%, transparent 60%),
    linear-gradient(180deg, var(--leather-2), var(--leather));
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  padding: 30px 28px 26px;
  box-shadow:
    0 0 0 4px #0c0805,
    0 0 0 5px #6b5224,
    0 24px 60px #000c,
    inset 0 0 40px #0008;
}
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--gold);
  pointer-events: none;
}
.card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.card::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.card-head { text-align: center; margin-bottom: 20px; }

h1, h2, h3 {
  font-family: var(--serif-title);
  color: var(--gold-2);
  letter-spacing: .12em;
  margin: 0;
}
h1 { font-size: 26px; text-shadow: 0 2px 0 #000; }
h2 { font-size: 21px; }
.sub { margin: 6px 0 0; color: var(--muted); font-style: italic; font-size: 17px; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px auto 0;
  max-width: 260px;
  color: var(--gold);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

/* Formulário */
.field { margin-bottom: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-2 .field { margin-bottom: 4px; }

label {
  display: block;
  margin-bottom: 5px;
  font: 600 13px/1.3 var(--serif-title);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--parchment);
}

input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font: 17px/1.3 var(--serif);
  color: var(--text);
  background: var(--input);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  box-shadow: inset 0 2px 6px #0009;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #7d6d52; }
input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: inset 0 2px 6px #0009, 0 0 0 3px #d9ad5533;
}
input[aria-invalid="true"] { border-color: var(--error); }

.hint { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.hint-block { margin: 2px 0 15px; }
.err { display: block; margin-top: 5px; color: var(--error); font-size: 14.5px; line-height: 1.35; }
.err:empty { display: none; }

.check { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; margin-top: 6px; }
.check input {
  width: 20px; height: 20px; margin: 2px 0 0;
  accent-color: var(--gold);
}
.check label {
  font: 16px/1.45 var(--serif);
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  margin: 0;
}
.check .err { grid-column: 2; }

a { color: var(--gold-2); text-underline-offset: 3px; }
a:hover { color: #fff1c4; }

.captcha { margin: 6px 0 14px; min-height: 65px; }

.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  padding: 12px 18px;
  font: 700 17px/1 var(--serif-title);
  letter-spacing: .18em;
  color: var(--ink);
  background: linear-gradient(180deg, #f6d98f 0%, #d9ad55 45%, #a87a2c 100%);
  border: 1px solid #f3d58c;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #3a2810, 0 6px 18px #000a, inset 0 1px 0 #fff6;
  text-shadow: 0 1px 0 #fff5;
  cursor: pointer;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid #fff1c4; outline-offset: 3px; }
.btn[disabled] { filter: grayscale(.4) brightness(.8); cursor: wait; }

.note { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 15px; }

/* Alertas */
.alert { padding: 11px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 16px; border: 1px solid; }
.alert-error { background: #3a1410; border-color: #7a2e24; color: #ffd2cb; }
.alert-ok { background: #13301a; border-color: #2f6a3a; color: #d4f5d8; }
.notice { padding: 10px 14px; border-radius: 4px; background: #33270e; border: 1px solid #7a5c1c; color: #ffe7ad; font-size: 15px; }

/* Sucesso */
.done { text-align: center; padding: 6px 0 4px; }
.done h2 { margin: 6px 0 10px; }
.done p { margin: 0 0 14px; }
.seal {
  width: 64px; height: 64px; margin: 0 auto;
  display: grid; place-items: center;
  font-size: 26px; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #ffe7a3, #c8922f 60%, #7c561b);
  border-radius: 50%;
  box-shadow: 0 0 0 3px #3a2810, 0 0 24px #d9ad5577;
}
.info {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px;
  text-align: left; margin: 0 auto 14px; max-width: 360px;
  padding: 12px 16px; background: var(--input); border: 1px solid var(--input-border); border-radius: 4px;
}
.info dt { font: 600 13px/1.6 var(--serif-title); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.info dd { margin: 0; font-weight: 600; word-break: break-all; }

/* Páginas de texto (termos, privacidade) */
.doc h1 { font-size: 24px; text-align: center; }
.doc h2 { font-size: 17px; margin: 26px 0 8px; }
.doc p, .doc li { color: #eadfc7; }
.doc ul { padding-left: 22px; }
.doc .meta { text-align: center; color: var(--muted); font-style: italic; margin: 6px 0 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0; }
.doc th, .doc td { border: 1px solid var(--input-border); padding: 6px 8px; text-align: left; vertical-align: top; }
.doc th { color: var(--gold-2); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* Rodapé */
.site-foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.site-foot nav { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.site-foot nav span { color: var(--gold-dark); font-size: 10px; }

.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* Tablet e celular */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .shell { padding: 18px 12px 30px; }
  .card { padding: 24px 18px 20px; }
  .brand-name { font-size: 24px; }
  h1 { font-size: 22px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-2 .field { margin-bottom: 15px; }
  .hint-block { margin-top: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Captcha próprio */
.captcha-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.captcha-row img {
  display: block; width: 210px; max-width: calc(100% - 56px); height: auto;
  border: 1px solid var(--input-border); border-radius: 4px; background: #120c07;
}
.icon-btn {
  width: 46px; height: 46px; flex: none;
  font-size: 22px; line-height: 1; color: var(--gold-2);
  background: var(--input); border: 1px solid var(--input-border); border-radius: 4px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--gold); }
.icon-btn:focus-visible { outline: 3px solid #fff1c4; outline-offset: 2px; }
#captcha_code { text-transform: uppercase; letter-spacing: .3em; font-family: ui-monospace, Menlo, Consolas, monospace; }
