/* ==========================================================================
   Casas D'Areia — Brevemente online (versão simples)
   Paleta Proposta A: Aço corten · Micro cimento · Areia
   ========================================================================== */

:root {
  --corten: #371A09;
  --corten-deep: #22100a;
  --cimento: #DED9D0;
  --areia: #C1B4A4;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "freight-neo-pro", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --line: rgba(193, 180, 164, .3);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--corten-deep);
  color: var(--cimento);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.label {
  font-size: 11px; font-weight: 400;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--areia);
}

/* Efeito "gravado a seco" do logótipo */
.deboss {
  color: rgba(222, 217, 208, .9);
  fill: currentColor;
  filter:
    drop-shadow(0 1px 0 rgba(255, 230, 205, .2))
    drop-shadow(0 -1px 0 rgba(0, 0, 0, .5));
}

.grain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 90; opacity: .07; mix-blend-mode: overlay;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--corten-deep);
}

/* ---------- Vídeo de fundo ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg__video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.bg__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(34, 16, 10, .28) 0%,
    rgba(34, 16, 10, 0) 16%,
    rgba(34, 16, 10, 0) 26%,
    rgba(34, 16, 10, .6) 48%,
    rgba(34, 16, 10, .85) 72%,
    rgba(34, 16, 10, .92) 100%);
}

/* ---------- Topo: logótipo pequeno centrado ---------- */
.top {
  position: relative; z-index: 101; /* acima do loader durante a intro */
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
  padding: clamp(24px, 4vw, 40px) var(--gutter) 0;
}
.top__place { grid-column: 1; justify-self: start; color: var(--cimento); }
.top__logo { grid-column: 2; width: clamp(88px, 9vw, 120px); transform-origin: 50% 0; }
.top__status {
  grid-column: 3; justify-self: end;
  display: inline-flex; align-items: center; gap: 12px; color: var(--cimento);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (max-width: 520px) {
  .top { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .top__logo { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .top__place { grid-column: 1; grid-row: 2; padding-top: 0; font-size: 9px; letter-spacing: .14em; white-space: nowrap; }
  .top__status { grid-column: 2; grid-row: 2; padding-top: 0; font-size: 9px; letter-spacing: .14em; white-space: nowrap; gap: 8px; }
}

/* ---------- Brevemente online + contactos ---------- */
.soon {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(64px, 12vh, 160px) var(--gutter) 0;
}

.wave {
  width: calc(100% + var(--gutter) * 2);
  margin: clamp(8px, 2vw, 24px) calc(var(--gutter) * -1) 0;
  height: clamp(48px, 7vw, 100px);
  fill: none; stroke: var(--areia); stroke-width: 1; opacity: .7;
}
.wave path { vector-effect: non-scaling-stroke; }

.contacts {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  position: relative;
  margin-top: clamp(8px, 2vw, 24px);
}
.contacts__rule {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--line); transform-origin: 0 50%;
}
.contact {
  display: flex; flex-direction: column; gap: 8px;
  padding: clamp(20px, 3vw, 36px) 0;
}
.contact + .contact { border-top: 1px solid var(--line); }
.contact__value {
  width: fit-content;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(22px, 2.4vw, 38px); line-height: 1.1;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .7s var(--ease);
}
.contact:hover .contact__value,
.contact:focus-visible .contact__value { background-size: 100% 1px; }
.contact__note { font-size: 12px; color: rgba(193, 180, 164, .7); }
.contact:focus-visible { outline: 1px solid var(--areia); outline-offset: 6px; }

/* ---------- Rodapé ---------- */
.foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  margin: 0 var(--gutter);
  padding: 24px 0 clamp(20px, 3vw, 32px);
  border-top: 1px solid var(--line);
  font-size: 12px; color: rgba(193, 180, 164, .7);
}
.foot__promoter { display: flex; align-items: center; gap: 16px; }
.foot__promoter img {
  width: clamp(140px, 14vw, 190px); height: auto;
  filter: brightness(0) invert(.9) sepia(.15); opacity: .9;
}
.foot__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.foot__credit { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.foot__credit a {
  color: var(--cimento);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease);
}
.foot__credit a:hover, .foot__credit a:focus-visible { background-size: 100% 1px; }

/* ---------- Responsivo ---------- */
@media (max-width: 760px) {
  .contacts { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
  .foot__meta { align-items: flex-start; text-align: left; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .loader { display: none; }
}

/* ---------- Estado inicial (antes da intro GSAP) ---------- */
.js .top__place,
.js .top__status,
.js .top__logo,
.js .contact,
.js .form,
.js .foot { opacity: 0; }
.js .contacts__rule { transform: scaleX(0); }
.js .wave path { opacity: 0; }
.js .bg { opacity: 0; }

/* ---------- Formulário ---------- */
.contacts__info { display: flex; flex-direction: column; }
.form {
  display: flex; flex-direction: column; gap: 22px;
  padding: clamp(20px, 3vw, 36px) 0 clamp(20px, 3vw, 36px) clamp(24px, 4vw, 56px);
  border-left: 1px solid var(--line);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px clamp(20px, 3vw, 40px); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input,
.field textarea {
  width: 100%;
  padding: 8px 0 10px;
  border: 0; border-bottom: 1px solid rgba(222, 217, 208, .45);
  border-radius: 0;
  background: transparent;
  color: var(--cimento);
  font: 300 16px/1.4 var(--sans); /* 16px evita zoom no iOS */
  transition: border-color .4s var(--ease);
}
.field textarea { resize: vertical; min-height: 72px; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--cimento); }
.field.is-invalid input,
.field.is-invalid textarea { border-bottom-color: #e3a07f; }
.field__error { min-height: 0; font-size: 12px; color: #f0b597; }
.field__error:empty { display: none; }

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

.form__foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: rgba(222, 217, 208, .85); cursor: pointer; }
.check input {
  appearance: none; flex: none;
  width: 16px; height: 16px; margin: 2px 0 0;
  border: 1px solid rgba(222, 217, 208, .6); border-radius: 2px;
  background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.check input::after { content: ""; width: 8px; height: 8px; background: var(--cimento); transform: scale(0); transition: transform .25s var(--ease); }
.check input:checked::after { transform: scale(1); }
.check input:focus-visible { outline: 1px solid var(--cimento); outline-offset: 3px; }
.check a { text-decoration: underline; text-underline-offset: 3px; }

.btn {
  position: relative; overflow: hidden;
  padding: 14px 34px;
  border: 1px solid var(--cimento); border-radius: 0;
  background: transparent; color: var(--cimento);
  font: 400 11px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase;
  cursor: pointer;
  transition: color .5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: var(--cimento);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .5s var(--ease);
}
.btn__label { position: relative; }
.btn:hover, .btn:focus-visible { color: var(--corten); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn:focus-visible { outline: 1px solid var(--cimento); outline-offset: 4px; }
.btn[disabled] { opacity: .5; cursor: wait; }

.form__status { margin: 0; font-size: 14px; color: var(--cimento); }
.form__status:empty { display: none; }
.form__status.is-error { color: #f0b597; }

@media (max-width: 760px) {
  .form { padding: 28px 0 32px; border-left: 0; border-top: 1px solid var(--line); }
  .form__row { grid-template-columns: 1fr; }
}

/* ---------- Rodapé: links legais ---------- */
.foot__links { font-size: 12px; }
.foot__links a {
  color: rgba(222, 217, 208, .85);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease);
}
.foot__links a:hover, .foot__links a:focus-visible { background-size: 100% 1px; }

/* ---------- Aviso de cookies ---------- */
.cookies {
  position: fixed; z-index: 95;
  left: var(--gutter); bottom: var(--gutter);
  width: min(420px, calc(100% - var(--gutter) * 2));
  padding: 22px 24px;
  background: rgba(34, 16, 10, .94);
  border: 1px solid var(--line);
  color: var(--cimento);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.cookies.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.cookies__text { margin: 0 0 18px; font-size: 13px; line-height: 1.55; color: rgba(222, 217, 208, .9); }
.cookies__text a { text-decoration: underline; text-underline-offset: 3px; }
.cookies__actions { display: flex; gap: 10px; }
.cookies__btn {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--cimento); border-radius: 0;
  background: transparent; color: var(--cimento);
  font: 400 11px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.cookies__btn:hover, .cookies__btn:focus-visible { background: var(--cimento); color: var(--corten); }
.cookies__btn:focus-visible { outline: 1px solid var(--cimento); outline-offset: 3px; }

/* ---------- Página de agradecimento ---------- */
.top__home { grid-column: 2; display: block; }
.page-thanks .top__logo { grid-column: auto; }
.thanks {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: clamp(64px, 12vh, 140px) var(--gutter) clamp(40px, 8vh, 80px);
}
.thanks__eyebrow { margin: 0 0 20px; }
.thanks__title {
  margin: 0;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(44px, 7.5vw, 120px); line-height: 1; letter-spacing: -.01em;
}
.thanks__title em { font-style: italic; color: var(--areia); }
.thanks__text { margin: 24px 0 0; max-width: 520px; font-size: clamp(16px, 1.3vw, 18px); color: rgba(222, 217, 208, .9); }
.thanks__wave { margin-top: clamp(24px, 4vw, 48px); }
.thanks__back { margin-top: clamp(8px, 2vw, 24px); display: inline-block; text-decoration: none; }
.page-thanks .bg__shade {
  background: linear-gradient(180deg,
    rgba(34, 16, 10, .3) 0%,
    rgba(34, 16, 10, .45) 40%,
    rgba(34, 16, 10, .85) 100%);
}
@media (max-width: 520px) {
  .top__home { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
}

/* ---------- Página: Política de Privacidade ---------- */
.page-legal {
  background:
    linear-gradient(rgba(28, 13, 8, .62), rgba(28, 13, 8, .62)),
    url("../assets/img/textura-papel.webp") center / cover fixed,
    var(--corten-deep);
}
.legal {
  position: relative; z-index: 2;
  flex: 1;
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: clamp(56px, 10vh, 120px) var(--gutter) clamp(56px, 8vw, 96px);
}
.legal__head { margin-bottom: clamp(40px, 6vw, 80px); }
.legal__back { display: inline-block; margin-bottom: 24px; }
.legal__back:hover { color: var(--cimento); }
.legal__title {
  margin: 0;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(44px, 7vw, 112px); line-height: 1; letter-spacing: -.01em;
}
.legal__title em { font-style: italic; color: var(--areia); }
.legal__layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.legal__toc { position: sticky; top: 32px; padding-top: 6px; border-top: 1px solid var(--line); }
.legal__toc .label { margin: 18px 0 14px; }
.legal__toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.legal__toc li { counter-increment: toc; margin: 0 0 10px; font-size: 13px; line-height: 1.4; }
.legal__toc li::before { content: counter(toc, decimal-leading-zero); margin-right: 10px; color: var(--areia); font-size: 11px; letter-spacing: .1em; }
.legal__toc a { color: #EDE9E2; transition: color .3s var(--ease); }
.legal__toc a:hover { color: var(--cimento); }
.legal__body { max-width: 720px; font-size: 17px; line-height: 1.7; color: #F5F2EC; }
.legal__body p { margin: 0 0 18px; }
.legal__body h2 {
  margin: clamp(48px, 6vw, 72px) 0 20px; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(28px, 3vw, 40px); line-height: 1.1; color: #FFFFFF;
  scroll-margin-top: 24px;
}
.legal__body h3 { margin: 36px 0 14px; font-size: 12px; font-weight: 400; letter-spacing: .26em; text-transform: uppercase; color: var(--areia); }
.legal__body ul { margin: 0 0 22px; padding: 0; list-style: none; }
.legal__body li { position: relative; margin: 0 0 10px; padding-left: 22px; }
.legal__body li::before { content: ""; position: absolute; left: 0; top: .78em; width: 10px; height: 1px; background: var(--areia); }
.legal__body li.sub { margin-left: 22px; }
.legal__body li.sub::before { width: 5px; }
.legal__body a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 3px; }
.legal__cookies {
  margin: clamp(56px, 8vw, 96px) 0 0 auto; max-width: 720px;
  padding: 28px 0 0; border-top: 1px solid var(--line);
  display: grid; gap: 14px; justify-items: start;
}
.legal__cookies p { margin: 0; color: #F5F2EC; }
@media (max-width: 900px) {
  .legal__layout { grid-template-columns: 1fr; }
  .legal__toc { position: static; }
  .legal__cookies { margin-left: 0; }
}

/* máscara mais forte em mobile (o conteúdo ocupa mais altura e passa por zonas claras do vídeo) */
@media (max-width: 760px) {
  body:not(.page-thanks) .bg__shade {
    background: linear-gradient(180deg,
      rgba(34, 16, 10, .45) 0%,
      rgba(34, 16, 10, .3) 20%,
      rgba(34, 16, 10, .7) 45%,
      rgba(34, 16, 10, .88) 100%);
  }
}

/* Título do formulário */
.form__title {
  margin: 0;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(26px, 2.4vw, 38px); line-height: 1.1;
  color: var(--cimento);
}
.form__title em { font-style: italic; color: var(--areia); }
.form__intro { margin: -12px 0 6px; font-size: 15px; color: rgba(222, 217, 208, .85); }
