/* Calculadora Bathhouse — same field-guide register as mapa.bathhouse.com.br. */

:root {
  color-scheme: dark;
  --paper: #131210;
  --paper-raised: #191815;
  --ink: #d9dcb0;
  --ink-faded: #9aa06e;
  --thermal: #b6b17d;
  --oxide: #b4633a;
  --rule: color-mix(in srgb, var(--ink-faded) 25%, transparent);
  --font-display: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-body: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-h: 3.25rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--ink-faded) 55%, transparent);
}
a:hover { color: var(--ink); text-decoration-color: var(--thermal); }

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.muted { color: var(--ink-faded); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  height: var(--topbar-h);
  padding: 0 1.1rem;
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
}
.topbar-sub {
  justify-self: start;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-faded);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  text-decoration: none;
}
.topbar-sub:hover,
.topbar-sub[aria-current="page"] { color: var(--ink); }
.brand {
  grid-column: 2;
  justify-self: center;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.menu-btn {
  grid-column: 3;
  justify-self: end;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-faded);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  cursor: pointer;
}
.menu-btn:hover,
.menu-btn[aria-expanded="true"] { color: var(--ink); }
body.menu-open .menu-btn { visibility: hidden; }

.wrap {
  width: min(1120px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.hero { padding: 4.5rem 0 3.2rem; }
.kicker {
  margin: 0 0 0.8rem;
  color: var(--thermal);
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  max-width: 18ch;
}
.lede {
  margin: 0;
  max-width: 38rem;
  font-size: 1.15rem;
  color: var(--ink-faded);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--thermal);
  border-radius: 4px;
  background: var(--thermal);
  color: #131210;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn[disabled] { opacity: 0.55; cursor: wait; }

.calc-card {
  position: relative;
  margin-top: 2.2rem;
  padding: 1.4rem 1.3rem 1.5rem;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  max-width: 40rem;
}
.address-field {
  display: grid;
  gap: 0.4rem;
  position: relative;
}
.address-field span,
.specs label span {
  color: var(--ink-faded);
  text-transform: uppercase;
}
input, select {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
}
.geo-row { margin: 0.55rem 0 0; }
.specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-top: 1.1rem;
}
.specs label { display: grid; gap: 0.35rem; }

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 5;
  margin: 0;
  padding: 0.3rem 0;
  list-style: none;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.suggestions button {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.suggestions button:hover { background: color-mix(in srgb, var(--thermal) 12%, transparent); }

.results { padding: 2.4rem 0 1rem; }
.results h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.results h3 {
  margin: 2rem 0 0.8rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
}

.metrics {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.75rem;
  margin: 1.6rem 0 0.8rem;
}
.metric {
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
}
.metric--hero { border-color: color-mix(in srgb, var(--thermal) 45%, var(--rule)); }
.metric-label {
  margin: 0 0 0.35rem;
  color: var(--ink-faded);
  text-transform: uppercase;
}
.metric-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.1;
}
.metric .muted { margin: 0.4rem 0 0; font-size: 0.9rem; }
.model-notes {
  color: var(--ink-faded);
  font-size: 0.95rem;
}

.comps {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.comps th, .comps td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.comps th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faded);
  text-transform: uppercase;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.features h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
}
.features p { margin: 0; color: var(--ink-faded); }

.section { padding: 2.6rem 0 3.2rem; border-top: 1px solid var(--rule); }
.notes { max-width: 40rem; color: var(--ink-faded); }

.site-foot {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-faded);
  font-size: 0.88rem;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  backdrop-filter: blur(8px);
}
.gate[hidden] { display: none; }
.gate-card {
  width: min(32rem, 100%);
  padding: 1.6rem 1.4rem 1.5rem;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
}
.gate-card h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
}
.gate-form { margin-top: 1.2rem; }
.gate-form [data-step] {
  display: flex;
  gap: 0.5rem;
}
.gate-form [data-step][hidden] { display: none; }
.gate-status { min-height: 1.4em; color: var(--ink-faded); font-size: 0.92rem; }

@media (max-width: 860px) {
  .metrics, .features, .specs { grid-template-columns: 1fr; }
  .hero { padding-top: 2.4rem; }
}
