/*
 * ════════════════════════════════════════════════════
 *  BASE — Community Concierge × Casa Samba
 * ════════════════════════════════════════════════════
 */

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--ivory);
  overflow-x: hidden;
}

img    { max-width: 100%; display: block; }
a      { color: inherit; text-decoration: none; }
button { font-family: var(--sans); cursor: pointer; border: none; background: none; }
ul     { list-style: none; }
a, button, [role="button"], label[for], select { cursor: pointer; }

/* ── Skip link ──────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%; left: 16px;
  padding: 10px 18px;
  background: var(--charcoal);
  color: #fff;
  font-size: var(--t-sm);
  font-weight: 600;
  border-radius: 0 0 var(--r-md) var(--r-md);
  z-index: 9999;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; }

/* ── Screen reader ──────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Focus ──────────────────────────────────────── */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: var(--r-sm);
}
.btn-wa:focus-visible, .btn-view:focus-visible,
.btn-contact:focus-visible, .btn-reviews:focus-visible {
  box-shadow: var(--focus-ring); outline: none;
}
.modal-close:focus-visible { box-shadow: var(--focus-ring-dark); outline: none; }

/* ── Keyframes ──────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes kenBurns { from { transform: scale(1.05); } to { transform: scale(1); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .5; }
  50%       { transform: scale(1.3); opacity: 0; }
}
@keyframes scrollLine { 0% { top: -100%; } 100% { top: 100%; } }

/* ── Scroll reveal ──────────────────────────────── */
.r {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.68s var(--ease), transform 0.68s var(--ease);
}
.r.in { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; } .d4 { transition-delay: .32s; }

/* ── Display type ───────────────────────────────── */
.disp { font-family: var(--serif); font-weight: 400; line-height: var(--lh-tight); color: var(--charcoal); letter-spacing: -.012em; }
.disp em { font-style: italic; }
.disp-xl { font-size: clamp(36px, 7.5vw, 80px); }
.disp-lg { font-size: clamp(34px, 6.4vw, 68px); }
.disp-md { font-size: clamp(22px, 3.5vw, 36px); }

/* ── Eyebrow ────────────────────────────────────── */
.eye {
  font-family: var(--sans); font-size: var(--t-2xs); font-weight: 600;
  letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: var(--gold); display: block; margin-bottom: 14px;
}

/* ── Section header ─────────────────────────────── */
.sec-hd { margin-bottom: var(--sp-5); }

/* ── Icons ──────────────────────────────────────── */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ── Chips ──────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px; border-radius: var(--r-pill);
  font-size: var(--t-2xs); font-weight: 600;
  letter-spacing: var(--ls-base); text-transform: uppercase;
  background: rgba(0,0,0,.05); color: var(--charcoal); white-space: nowrap;
}
.chip--type { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(184,149,90,.2); }

/* ── Info chip ──────────────────────────────────── */
.info-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 400;
  letter-spacing: var(--ls-display); color: var(--charcoal);
  background: var(--ivory-2); border: 1px solid var(--border-md); white-space: nowrap;
}

/* ══ BUTTONS ════════════════════════════════════════
 *  T1: .btn-wa          — WhatsApp primary
 *  T2: .btn-view        — outline secondary
 *      .btn-contact     — header secondary
 *      .btn-reviews     — review secondary
 *  T3: .btn-form-link   — ghost tertiary
 * ═══════════════════════════════════════════════════ */

.btn-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--wa); color: #fff;
  padding: 14px 28px; border-radius: var(--r-pill);
  font-size: var(--t-sm); font-weight: 500; letter-spacing: var(--ls-display);
  border: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn-wa:hover { background: var(--wa-hover); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(37,211,102,.26); }
.btn-wa--lg { padding: 17px 34px; font-size: var(--t-md); }
.btn-wa--sm { padding:  9px 18px; font-size: var(--t-2xs); }
.btn-wa .icon { fill: #fff; stroke: none; }

.btn-view {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 20px; border-radius: var(--r-pill);
  font-size: var(--t-2xs); font-weight: 700;
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: #fff; border: none;
  background: var(--charcoal); cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-view:hover {
  background: var(--gold); color: #fff; transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(184,149,90,.32);
}

.btn-contact, .btn-reviews {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--r-pill);
  font-size: var(--t-2xs); font-weight: 600;
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--charcoal); border: 1px solid var(--border-md);
  background: transparent; cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn-reviews:hover {
  background: var(--charcoal); color: #fff; border-color: var(--charcoal);
}
.btn-contact { color: var(--charcoal); background: #fff; border-color: transparent; }
.btn-contact:hover { background: var(--gold-l); border-color: transparent; color: var(--black); }

.btn-form-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: var(--t-xs); font-weight: 400; letter-spacing: var(--ls-display);
  color: var(--muted); background: none; border: none; cursor: pointer;
  padding: 10px; width: 100%;
  transition: color var(--dur) var(--ease);
}
.btn-form-link:hover { color: var(--charcoal); }

/* ── Form ───────────────────────────────────────── */
.form-label {
  display: block; font-size: var(--t-2xs); font-weight: 600;
  letter-spacing: var(--ls-caps); text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--r-md);
  border: 1px solid var(--border-md); background: var(--white);
  font-family: var(--sans); font-size: var(--t-sm); font-weight: 300; color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  appearance: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,149,90,.12);
}
.form-textarea { resize: vertical; min-height: 96px; line-height: var(--lh-body); }
.form-group { margin-bottom: 0; }

/* ── Ghost link ─────────────────────────────────── */
.ghost-link {
  font-size: var(--t-2xs); letter-spacing: var(--ls-base);
  color: rgba(255,255,255,.38); border-bottom: 1px solid rgba(255,255,255,.18); padding-bottom: 2px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ghost-link:hover { color: #fff; border-color: rgba(255,255,255,.55); }

/* ── Floating WhatsApp ──────────────────────────── */
.wa-float {
  position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); right: 24px;
  z-index: 200; width: 52px; height: 52px; border-radius: 50%;
  background: var(--wa); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(37,211,102,.36);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 12px 36px rgba(37,211,102,.46); }
.wa-float .icon { fill: #fff; stroke: none; }
.wa-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  background: rgba(37,211,102,.2); animation: pulse 2.8s infinite; pointer-events: none;
}

/* ── Reduced motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .r, *  { transition-duration: .01ms !important; }
  .wa-ring { animation: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
