/* João Sol · Imóveis de alto padrão
   Galeria privada: a fotografia conduz, a interface fica em silêncio.
   Mobile-first: estilos base para o celular, @media (min-width) adiciona o resto. */
:root {
  /* Paleta da marca: o azul-marinho e o ponto dourado do logo de João Sol. */
  --cal: #f5f3ee;        /* fundo: areia clara */
  --papel: #ffffff;      /* superfícies */
  --grafite: #101b2b;    /* texto: marinho quase preto */
  --musgo: #5f6b7a;      /* texto secundário */
  --linha: #e1ded6;      /* divisores */
  --noite: #0c1726;      /* seções escuras: marinho profundo */
  --noite-2: #15243a;
  --acento: #1f3a5c;     /* marinho do logo: botões de ação */
  --acento-claro: #dfe6ef;
  --acento-fundo: #142a45;
  --ouro: #d9b65d;       /* o ponto dourado: só em detalhes */
  --erro: #a3271f;
  --ok: #2b6b4c;

  --f-display: 'Bodoni Moda', 'Didot', Georgia, serif;
  --f-texto: 'Geist', system-ui, sans-serif;

  /* Proporção áurea. φ = 1,618. Espaços na sequência de Fibonacci (cada passo é φ vezes o anterior)
     e tipografia na mesma escala: cada nível da hierarquia sobe na razão áurea. */
  --phi: 1.618;
  --e1: 8px;
  --e2: 13px;
  --e3: 21px;
  --e4: 34px;
  --e5: 55px;
  --e6: 89px;
  --e7: 144px;
  --secao: clamp(var(--e6), 6vw + 55px, var(--e7));     /* respiro entre seções: 89 → 144 */

  --t-xs: 0.8125rem;                                    /* 13 */
  --t-sm: 0.875rem;                                     /* 14 */
  --t-md: 1rem;                                         /* 16 */
  --t-lg: 1.3125rem;                                    /* 21 */
  --t-xl: clamp(2.125rem, 1.4rem + 3vw, 3.4375rem);     /* 34 → 55 */
  --t-xxl: clamp(3.4375rem, 2rem + 6vw, 5.5625rem);     /* 55 → 89 */

  --raio: 2px;
  --sombra: 0 24px 60px -24px rgb(12 23 38 / 0.35);
  --gutter: clamp(var(--e3), 5vw, var(--e6));          /* 21 → 89 */
  --max: 1320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cal);
  color: var(--grafite);
  font: 400 var(--t-md)/1.618 var(--f-texto);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
em { font-style: italic; }

:focus-visible { outline: 2px solid var(--grafite); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.rotulo {
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--musgo);
}

/* ---------- botões ---------- */
.btn {
  --bg: var(--grafite);
  --fg: var(--papel);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 52px; padding: 0 1.6em;
  border: 0; border-radius: var(--raio);
  background: var(--bg); color: var(--fg);
  font-weight: 500; font-size: var(--t-sm); letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn--acento { --bg: var(--acento); --fg: #f5f3ee; }
.btn--fantasma { --bg: transparent; --fg: var(--grafite); box-shadow: inset 0 0 0 1px currentColor; }
.btn--claro { --bg: #f5f3ee; --fg: var(--grafite); }
/* cores de hover só com mouse: no toque o hover "gruda" depois do toque */
@media (hover: hover) {
  .btn:hover { --bg: var(--acento); }
  .btn--acento:hover { --bg: var(--acento-fundo); }
  .btn--fantasma:hover { --bg: var(--grafite); --fg: var(--papel); }
  .btn--claro:hover { --bg: #ffffff; }
}
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- campos ---------- */
.campo { display: grid; gap: 8px; }
.campo > span { font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--musgo); }
.campo > span small { text-transform: none; letter-spacing: 0; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 50px; padding: 12px 0;
  border: 0; border-bottom: 1px solid var(--linha); border-radius: 0;
  background: transparent; font-size: var(--t-md);
  transition: border-color 0.25s;
}
.campo textarea { min-height: 84px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-bottom-color: var(--grafite); }
.campo small { color: var(--musgo); font-size: var(--t-xs); }
.honeypot { position: absolute; left: -9999px; }

.aviso { padding: 12px 14px; border-radius: var(--raio); font-size: var(--t-sm); }
.aviso--ok { background: var(--acento-claro); color: var(--acento-fundo); }
.aviso--erro { background: #f6e1de; color: var(--erro); }
.aviso[hidden] { display: none; }

/* ---------- orientação solar (painel) ---------- */
.dial { --tam: 64px; width: var(--tam); height: var(--tam); flex: none; }
.dial .dial-sol { transform-box: view-box; transform-origin: 50px 50px; }
.dial text { font: 600 9px var(--f-texto); fill: var(--musgo); }

/* ---------- entrada no scroll ---------- */
.revela { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--atraso, 0ms); }
.revela.visivel { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .revela { opacity: 1; transform: none; }
}
