/* ============================================================
   Ficha de Cliente · FINE•BLACK•TATTOOING
   Fontes servidas pelo próprio servidor (sem Google Fonts → nada
   de IP do cliente indo para terceiros, melhor para a LGPD).
   ============================================================ */
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/eb-garamond-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #0b0b0b;
  --bg-raised: #141413;
  --line: #2a2926;
  --line-strong: #44423d;
  --ink: #ece8df;
  --ink-soft: #b9b4a9;
  --mute: #8b867c;
  --accent: #d8cbb0;          /* bege-pergaminho, discreto */
  --error: #e08b7a;
  --ok: #a9c4a0;
  --radius: 10px;
  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(20px, 6vw, 36px);
}

*, *::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.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
[hidden] { display: none !important; }

/* textura sutil de papel/grão */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.shell {
  position: relative; z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: max(var(--pad), env(safe-area-inset-top)) var(--pad) max(40px, env(safe-area-inset-bottom));
}

/* ---------- telas ---------- */
.screen { display: none; }
.screen.is-active { display: block; animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen.is-active { animation: none; } }

/* ---------- tipografia ---------- */
.brand {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.brand span { color: var(--mute); padding: 0 .18em; }
.brand-sm { font-size: 10px; letter-spacing: .28em; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 11vw, 56px);
  line-height: 1.02;
  letter-spacing: -.01em;
  margin: 0 0 22px;
}
.display em { font-style: italic; color: var(--accent); }
.display-sm { font-size: clamp(34px, 9vw, 44px); margin-bottom: 6px; }

.lead {
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 18px;
}
p { margin: 0 0 16px; color: var(--ink-soft); }
.muted { color: var(--mute); }
.small { font-size: 13px; }

/* ---------- tela de idioma ---------- */
.lang-wrap {
  min-height: calc(100dvh - 2 * var(--pad));
  display: flex; flex-direction: column; justify-content: center;
  text-align: center;
}
.mark { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; }
.mark-line { width: 56px; height: 1px; background: var(--line-strong); }
.mark-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.lang-wrap .brand { margin-bottom: 40px; }
.lang-wrap .display { margin-bottom: 44px; }
.lang-hint { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 16px; }
.lang-buttons { display: grid; gap: 12px; }

/* ---------- botões ---------- */
.btn {
  -webkit-appearance: none; appearance: none;
  font: inherit; cursor: pointer;
  border-radius: var(--radius);
  transition: background .2s, border-color .2s, color .2s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.985); }
.btn:focus-visible, .link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-lang {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 20px 18px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-lang:hover { border-color: var(--accent); background: var(--bg-raised); }
.btn-lang-main { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.btn-lang-sub { font-size: 12px; color: var(--mute); letter-spacing: .04em; }

.btn-primary {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px;
  background: var(--ink); color: var(--bg);
  border: 1px solid var(--ink);
  font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}
.btn-primary:hover { background: #fff; }
.btn-primary[disabled] { opacity: .7; cursor: progress; }
.btn-block { width: 100%; }

.link-btn {
  -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 6px 0;
  font: inherit; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mute); cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 18px; margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

/* ---------- boas-vindas ---------- */
.welcome .display { margin-bottom: 26px; }
.note {
  border-left: 1px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: 28px 0 34px;
  font-size: 14px; color: var(--ink-soft);
}
.note strong { color: var(--accent); font-weight: 500; letter-spacing: .06em; margin-right: 4px; }
.age-note { font-size: 13px; color: var(--mute); text-align: center; margin: -10px 0 22px; letter-spacing: .02em; }
.warn { font-size: 13px; color: var(--accent); margin: 8px 0 0; padding-left: 10px; border-left: 1px solid var(--accent); }
.time-hint { text-align: center; font-size: 12px; color: var(--mute); margin-top: 14px; letter-spacing: .04em; }

/* ---------- formulário ---------- */
form { margin-top: 30px; }
.group { border: 0; padding: 0; margin: 0 0 40px; min-width: 0; }
.group legend {
  display: flex; align-items: baseline; gap: 12px; width: 100%;
  padding: 0 0 12px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif); font-size: 24px; color: var(--ink);
}
.group legend .num { font-family: var(--sans); font-size: 11px; letter-spacing: .2em; color: var(--accent); }

.field { margin-bottom: 20px; min-width: 0; }
.field label, .field .label {
  display: block; margin-bottom: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft);
}
.opt { color: var(--mute); text-transform: none; letter-spacing: 0; font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"], select {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 52px;
  padding: 13px 14px;
  font: inherit; font-size: 16px; /* 16px evita o zoom automático do iPhone */
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, background .2s;
}
input::placeholder { color: #5f5b54; }
input:focus, select:focus { outline: none; border-color: var(--accent); background: #181816; }
select { color-scheme: dark; }
select:invalid, select.is-empty { color: #8b867c; }
.field.has-error input, .field.has-error select { border-color: var(--error); }
.field.is-valid input { border-color: #3a4a37; }

.hint { font-size: 12.5px; color: var(--mute); margin: 7px 0 0; line-height: 1.45; }
.error { font-size: 13px; color: var(--error); margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }
.suggest { font-size: 13px; color: var(--ink-soft); margin: 7px 0 0; }
.suggest button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

.phone-row { display: flex; gap: 8px; }
.select-wrap { position: relative; flex: 0 0 auto; }
.select-wrap::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px;
  border-right: 1px solid var(--mute); border-bottom: 1px solid var(--mute);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.select-wrap select { width: 112px; padding-right: 28px; }
.select-full, .select-full select { width: 100%; }
.dob { display: grid; grid-template-columns: 70px 1fr 86px; gap: 8px; }
.dob .select-wrap, .dob select { width: 100%; }
.dob input { text-align: center; }
.ddi-other { flex: 0 0 76px; width: 76px !important; }
.phone-row #telefone_numero { flex: 1 1 auto; min-width: 0; }

.row-2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; align-items: start; }
.row-city { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 340px) { .row-2, .row-city { grid-template-columns: 1fr; gap: 0; } }

/* seletor segmentado */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-raised); }
.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg-opt { margin: 0 !important; position: relative; text-transform: none !important; letter-spacing: 0 !important; }
.seg-opt + .seg-opt { border-left: 1px solid var(--line); }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 8px 6px;
  font-size: 14px; font-weight: 400; color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.seg-opt input:checked + span { background: var(--ink); color: var(--bg); font-weight: 500; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }

.input-status { position: relative; }
.input-status .spinner { position: absolute; right: 14px; top: 50%; margin-top: -9px; }

.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 1.5px solid var(--line-strong); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.spinner-btn { border-color: rgba(0,0,0,.2); border-top-color: var(--bg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* honeypot */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- privacidade ---------- */
.privacy {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 14px; margin: 8px 0 24px;
  background: rgba(255,255,255,.015);
}
.privacy p { font-size: 13.5px; line-height: 1.55; }
.privacy-title { font-size: 11px !important; letter-spacing: .2em; text-transform: uppercase; color: var(--accent) !important; margin-bottom: 8px !important; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--ink); line-height: 1.45; padding: 4px 0; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box {
  flex: 0 0 22px; height: 22px; margin-top: 1px;
  border: 1px solid var(--line-strong); border-radius: 5px; background: var(--bg-raised);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.check input:checked + .box { background: var(--ink); border-color: var(--ink); }
.check input:checked + .box::after {
  content: ""; width: 6px; height: 11px; margin-top: -2px;
  border-right: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: rotate(45deg);
}
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check.has-error .box { border-color: var(--error); }

.form-error {
  border: 1px solid var(--error); color: var(--error);
  border-radius: var(--radius); padding: 12px 14px; font-size: 14px; margin-bottom: 16px;
}

/* ---------- obrigado ---------- */
.thanks {
  min-height: calc(100dvh - 2 * var(--pad));
  display: flex; flex-direction: column; justify-content: center; text-align: center;
}
.check-mark { width: 64px; height: 64px; margin: 0 auto 28px; }
.check-mark svg { width: 100%; height: 100%; fill: none; stroke: var(--accent); stroke-width: 1.2; }
.check-mark circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .9s ease forwards; }
.check-mark path { stroke-width: 1.6; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .7s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.thanks-brand { margin-top: 36px; }
