/* =====================================================================
   RentClair — Real Estate Lead Generation
   Design tokens + components. Plain CSS, no build step required.
   ===================================================================== */

:root {
  /* Palette — deep navy trust + warm brass accent */
  --c-bg: #ffffff;
  --c-surface: #f6f7f9;
  --c-surface-2: #eef1f5;
  --c-ink: #0f1b2d;
  --c-ink-2: #3d4a5c;
  --c-muted: #64748b;
  --c-line: #e2e6ec;
  --c-primary: #0f2f5c;
  --c-primary-600: #14406f;
  --c-primary-050: #eaf1fa;
  --c-accent: #b8862b;
  --c-accent-600: #9c711f;
  --c-success: #0f7a4f;
  --c-danger: #b42318;
  --c-whatsapp: #128c4a;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06), 0 1px 3px rgba(15, 27, 45, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 27, 45, 0.08);
  --container: 1140px;
  --header-h: 64px;

  --font-head: "Georgia", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  padding-bottom: 104px; /* space for sticky mobile bar */
}

@media (min-width: 900px) { body { padding-bottom: 0; } }

img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--c-ink); margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.15rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 14px; color: var(--c-ink-2); }

a { color: var(--c-primary); }

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 18px; }
.section { padding: 56px 0; }
.section--alt { background: var(--c-surface); }
.section__head { max-width: 720px; margin-bottom: 28px; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700; color: var(--c-accent-600); margin-bottom: 8px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--c-primary); color: #fff;
  padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600; font-family: var(--font-body);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-600); }
.btn--accent { background: var(--c-accent); color: #16130a; }
.btn--accent:hover { background: var(--c-accent-600); color: #fff; }
.btn--outline { background: transparent; color: var(--c-primary); border-color: var(--c-line); }
.btn--outline:hover { border-color: var(--c-primary); background: var(--c-primary-050); }
.btn--ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost-light:hover { background: rgba(255,255,255,.22); }
.btn--whatsapp { background: var(--c-whatsapp); color: #fff; }
.btn--whatsapp:hover { background: #0e7540; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: .92rem; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(150%) blur(6px); border-bottom: 1px solid var(--c-line);
}
.header__inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--c-primary); color: #fff;
  display: grid; place-items: center; font-family: var(--font-head); font-size: 1rem; font-weight: 700;
}
.brand__name { font-family: var(--font-head); font-size: 1.06rem; font-weight: 700; color: var(--c-ink); }
.brand__sub { display: none; font-size: .68rem; color: var(--c-muted); font-family: var(--font-body); letter-spacing: .04em; text-transform: uppercase; }

.nav { display: none; }
.nav a { color: var(--c-ink-2); text-decoration: none; font-size: .95rem; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--c-primary); background: var(--c-primary-050); }
.header__cta { display: none; }
.header__actions { display: flex; align-items: center; gap: 8px; }

.hamburger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--c-line); background: #fff;
  border-radius: 10px; cursor: pointer;
}
.hamburger span { display: block; width: 18px; height: 2px; background: var(--c-ink); position: relative; }
.hamburger span::before, .hamburger span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--c-ink);
}
.hamburger span::before { top: -6px; } .hamburger span::after { top: 6px; }

.mobile-nav { display: none; border-top: 1px solid var(--c-line); background: #fff; padding: 12px 0 18px; }
.mobile-nav.is-open { display: block; }
.mobile-nav a.mobile-nav__link {
  display: block; padding: 12px 4px; text-decoration: none; color: var(--c-ink);
  border-bottom: 1px solid var(--c-line); font-weight: 500;
}
.mobile-nav__ctas { display: grid; gap: 10px; margin-top: 14px; }

@media (min-width: 560px) { .brand__sub { display: block; } }

@media (min-width: 900px) {
  .nav { display: flex; align-items: center; gap: 2px; }
  .header__cta { display: inline-flex; }
  .hamburger { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--c-primary); color: #fff; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,22,42,.86) 0%, rgba(9,22,42,.72) 55%, rgba(9,22,42,.88) 100%);
}
.hero__inner { position: relative; padding-top: 44px; padding-bottom: 44px; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero__sub { color: #d9e2ee; font-size: 1.06rem; max-width: 56ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.hero__ctas .btn { flex: 1 1 220px; }
.hero__note { font-size: .84rem; color: #b9c6d6; margin: 10px 0 0; }

/* ---------- Requirement selector card ---------- */
.selector {
  background: #fff; color: var(--c-ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 18px; margin-top: 26px;
}
.selector h2 { font-size: 1.15rem; margin-bottom: 4px; }
.selector__hint { font-size: .88rem; color: var(--c-muted); margin-bottom: 14px; }
.selector__grid { display: grid; gap: 12px; }
@media (min-width: 760px) { .selector__grid { grid-template-columns: repeat(3, 1fr); align-items: end; } }

/* ---------- Form controls ---------- */
.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: .88rem; font-weight: 600; color: var(--c-ink); margin-bottom: 6px; }
.req { color: var(--c-danger); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 12px; font-size: 1rem; font-family: var(--font-body);
  color: var(--c-ink); background: #fff; border: 1px solid var(--c-line); border-radius: 10px;
}
.textarea { min-height: 96px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='%2364748b' d='M1.4 0 7 5.6 12.6 0 14 1.4 7 8.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--c-primary); outline: 3px solid rgba(15,47,92,.18); outline-offset: 0; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--c-danger); background: #fff7f6; }
.error { display: none; color: var(--c-danger); font-size: .82rem; margin-top: 5px; }
.error.is-visible { display: block; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chip { position: relative; }
.radio-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.radio-chip span {
  display: block; padding: 10px 14px; border: 1px solid var(--c-line); border-radius: 999px;
  font-size: .92rem; background: #fff; color: var(--c-ink-2);
}
.radio-chip input:checked + span { border-color: var(--c-primary); background: var(--c-primary-050); color: var(--c-primary); font-weight: 600; }
.radio-chip input:focus-visible + span { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 2px; }
.card p { font-size: .9rem; margin-bottom: 10px; }
.card .btn { margin-top: auto; align-self: flex-start; }
.card__icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--c-primary-050); color: var(--c-primary);
  display: grid; place-items: center; margin-bottom: 6px;
}
.card__icon svg { width: 22px; height: 22px; }

.chip-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  min-height: 52px; padding: 12px 14px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  font-size: .98rem; font-weight: 600; color: var(--c-ink); font-family: var(--font-body);
}
.chip-btn:hover { border-color: var(--c-primary); background: var(--c-primary-050); }
.chip-btn small { display: block; font-weight: 400; font-size: .8rem; color: var(--c-muted); }
.chip-btn__arrow { color: var(--c-accent-600); font-weight: 700; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 52px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--c-primary); color: #fff; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700;
}

/* ---------- Lead form block ---------- */
.leadform { background: var(--c-primary); color: #fff; }
.leadform h2 { color: #fff; }
.leadform__intro { color: #cfdae8; }
.leadform__panel {
  background: #fff; color: var(--c-ink); border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-md);
}
@media (min-width: 760px) { .leadform__panel { padding: 28px; } }
.form-grid { display: grid; gap: 0 16px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.form-consent { font-size: .82rem; color: var(--c-muted); margin: 8px 0 16px; }
.form-status { margin-top: 12px; font-size: .9rem; }
.form-status.is-error { color: var(--c-danger); font-weight: 600; }

.notice {
  border: 1px dashed var(--c-accent); background: #fdf8ec; color: #5c4408;
  padding: 12px 14px; border-radius: 10px; font-size: .86rem; margin-bottom: 16px;
}
.notice strong { color: #4a3606; }

/* HubSpot embed container — real form renders here once IDs are configured */
#hubspot-form-container:empty { display: none; }

/* ---------- Success state ---------- */
.success { display: none; text-align: center; padding: 18px 4px; }
.success.is-visible { display: block; }
.success__icon {
  width: 60px; height: 60px; border-radius: 50%; background: #e7f5ee; color: var(--c-success);
  display: grid; place-items: center; margin: 0 auto 14px;
}
.success__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 15px 16px; font-weight: 600; color: var(--c-ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--c-accent-600); line-height: 1; }
.faq[open] summary::after { content: "\2013"; }
.faq__body { padding: 0 16px 16px; }
.faq__body p { margin: 0; font-size: .94rem; }

/* ---------- Footer ---------- */
.footer { background: #0b1728; color: #b9c6d6; padding: 44px 0 24px; margin-top: 0; }
.footer h2, .footer h3 { color: #fff; font-size: 1rem; }
.footer a { color: #d4dde8; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 16px;
  font-size: .82rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}
.footer__disclaimer { font-size: .8rem; color: #93a3b6; margin-top: 14px; }

/* ---------- Sticky mobile CTA ---------- */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.98); border-top: 1px solid var(--c-line);
}
.mobile-bar .btn { flex: 1; line-height: 1.2; }
@media (min-width: 900px) { .mobile-bar { display: none; } }

/* ---------- Legal / simple pages ---------- */
.page { padding: 40px 0 56px; }
.page .container { max-width: 760px; }
.page h2 { font-size: 1.25rem; margin-top: 28px; }
.page ul { color: var(--c-ink-2); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
