/* ──────────────────────────────────────────
   Ángela Clair — base + componentes
   ──────────────────────────────────────── */
@import url("./tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--ac-canvas); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ac-sans);
  color: var(--ac-ink);
  background: var(--ac-paper);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--ac-line); margin: var(--ac-7) 0; }

/* ── Typography utilities ────────────────────────────── */
.ac-eyebrow {
  font-family: var(--ac-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ac-gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ac-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ac-gold);
}
.ac-eyebrow.no-rule::before { display: none; }

.ac-display {
  font-family: var(--ac-serif);
  font-weight: 500;
  letter-spacing: var(--ac-display-tight);
  line-height: 1.02;
  color: var(--ac-ink);
  font-size: clamp(40px, 6.5vw, 84px);
  margin: 0;
  text-wrap: balance;
}
.ac-display em {
  font-style: italic;
  font-weight: 400;
  color: var(--ac-olive);
}

h1.ac-h1, .ac-h1 {
  font-family: var(--ac-serif);
  font-weight: 500;
  letter-spacing: var(--ac-display-tight);
  line-height: 1.05;
  font-size: clamp(36px, 5vw, 64px);
  margin: 0;
  text-wrap: balance;
}
h2.ac-h2, .ac-h2 {
  font-family: var(--ac-serif);
  font-weight: 500;
  letter-spacing: var(--ac-display-tight-2);
  line-height: 1.1;
  font-size: clamp(28px, 3.4vw, 44px);
  margin: 0;
  text-wrap: balance;
}
h3.ac-h3, .ac-h3 {
  font-family: var(--ac-serif);
  font-weight: 500;
  line-height: 1.15;
  font-size: clamp(22px, 2vw, 28px);
  margin: 0;
}
h4.ac-h4, .ac-h4 {
  font-family: var(--ac-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  margin: 0;
}

.ac-lede {
  font-family: var(--ac-serif);
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.4;
  color: var(--ac-ink-2);
  font-weight: 400;
  text-wrap: pretty;
}
.ac-body { font-size: 16px; line-height: 1.65; color: var(--ac-ink-2); }
.ac-small { font-size: 13px; color: var(--ac-ink-3); }
.ac-label {
  font-family: var(--ac-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ac-ink-3);
}

/* ── Layout helpers ──────────────────────────────────── */
.ac-container {
  width: 100%;
  max-width: var(--ac-content-max);
  margin: 0 auto;
  padding-inline: var(--ac-gutter);
}
.ac-container.narrow { max-width: var(--ac-content-narrow); }
.ac-section { padding-block: clamp(56px, 9vw, 120px); }
.ac-section.tight { padding-block: clamp(36px, 5vw, 64px); }

/* ── Buttons ─────────────────────────────────────────── */
.ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--ac-r-pill);
  font-family: var(--ac-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .005em;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.ac-btn:active { transform: translateY(1px); }
.ac-btn.primary {
  background: var(--ac-olive);
  color: #FBF6EC;
}
.ac-btn.primary:hover { background: #1A2018; }
.ac-btn.secondary {
  background: transparent;
  border-color: var(--ac-ink);
  color: var(--ac-ink);
}
.ac-btn.secondary:hover { background: var(--ac-ink); color: var(--ac-paper); }
.ac-btn.ghost {
  background: transparent;
  color: var(--ac-ink);
  height: auto;
  padding: 6px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--ac-ink);
}
.ac-btn.gold {
  background: var(--ac-gold);
  color: #1A1714;
}
.ac-btn.gold:hover { background: #8E6F30; color: var(--ac-paper); }
.ac-btn.sm { height: 40px; padding: 0 16px; font-size: 13px; }
.ac-btn .arrow { width: 14px; height: 14px; transition: transform .2s ease; }
.ac-btn:hover .arrow { transform: translateX(3px); }

/* ── Tags / badges ───────────────────────────────────── */
.ac-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--ac-r-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid var(--ac-line);
  background: var(--ac-paper);
  color: var(--ac-ink-2);
}
.ac-tag.olive { background: var(--ac-olive); color: var(--ac-paper); border-color: var(--ac-olive); }
.ac-tag.gold  { background: var(--ac-gold); color: #1A1714; border-color: var(--ac-gold); }
.ac-tag.outline { background: transparent; }
.ac-tag .dot {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}

/* ── Cards genéricas ─────────────────────────────────── */
.ac-card {
  background: var(--ac-paper);
  border: 1px solid var(--ac-line-soft);
  border-radius: var(--ac-r-3);
  padding: var(--ac-5);
  display: flex;
  flex-direction: column;
  gap: var(--ac-4);
  transition: border-color .15s ease, transform .2s ease;
}
.ac-card:hover { border-color: var(--ac-ink); }

/* ── Form ────────────────────────────────────────────── */
.ac-field { display: flex; flex-direction: column; gap: 6px; }
.ac-field > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ac-ink-3);
  text-transform: uppercase;
}
.ac-input, .ac-select, .ac-textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ac-line);
  padding: 12px 0;
  font-size: 16px;
  color: var(--ac-ink);
  outline: none;
  transition: border-color .15s ease;
  border-radius: 0;
}
.ac-input:focus, .ac-select:focus, .ac-textarea:focus { border-color: var(--ac-ink); }
.ac-textarea { resize: vertical; min-height: 96px; }
.ac-input::placeholder, .ac-textarea::placeholder { color: var(--ac-ink-3); }
.ac-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--ac-ink-2);
  line-height: 1.5;
  cursor: pointer;
}
.ac-check input[type="checkbox"] {
  appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--ac-ink);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
}
.ac-check input[type="checkbox"]:checked { background: var(--ac-ink); }
.ac-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23FBF6EC' stroke-width='2.5'><path d='M3 8.5l3.5 3L13 4.5'/></svg>") center/12px no-repeat;
}

/* ── Hairlines ───────────────────────────────────────── */
.ac-hairline { border-top: 1px solid var(--ac-line); }
.ac-hairline-soft { border-top: 1px solid var(--ac-line-soft); }

/* ── Image-slot placeholder polish ───────────────────── */
.ac-photo-placeholder {
  background:
    linear-gradient(135deg, rgba(168,133,62,.07), rgba(42,51,36,.08)),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(26,23,20,.025) 8px 9px),
    var(--ac-paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ac-ink-3);
  font-family: var(--ac-sans);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
  border: 1px dashed var(--ac-line);
}

/* ── Header / nav ────────────────────────────────────── */
.ac-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: saturate(120%) blur(14px);
  border-bottom: 1px solid var(--ac-line-soft);
}
.ac-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.ac-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ac-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ac-ink);
}
.ac-brand .mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ac-olive);
  color: var(--ac-paper);
  font-size: 13px;
  font-family: var(--ac-sans);
  font-weight: 700;
  letter-spacing: .02em;
}
.ac-brand .mark-text { line-height: 1; }
.ac-brand .mark-text small {
  display: block;
  font-family: var(--ac-sans);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ac-ink-3);
  margin-top: 4px;
  font-weight: 500;
}
.ac-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.ac-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ac-ink);
  padding: 6px 0;
  position: relative;
  letter-spacing: .005em;
}
.ac-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ac-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.ac-nav a:hover::after, .ac-nav a.active::after { transform: scaleX(1); }
.ac-header-cta { display: flex; align-items: center; gap: 16px; }
.ac-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ac-ink-2);
}
.ac-lang button {
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--ac-ink-3);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .14em;
  transition: color .15s ease;
}
.ac-lang button.active { color: var(--ac-ink); }
.ac-lang button:hover { color: var(--ac-ink); }
.ac-lang .sep { color: var(--ac-line); }
.ac-burger { display: none; }

@media (max-width: 920px) {
  .ac-header-inner { height: 62px; }
  .ac-nav, .ac-header-cta .ac-btn { display: none; }
  .ac-burger { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--ac-line); border-radius: 50%; }
  .ac-brand { font-size: 20px; }
  .ac-brand .mono { width: 30px; height: 30px; font-size: 12px; }
}

/* ── Footer ──────────────────────────────────────────── */
.ac-footer {
  background: var(--ac-olive);
  color: #E7DDC6;
  padding: 80px 0 32px;
  margin-top: 80px;
}
.ac-footer a { color: #E7DDC6; }
.ac-footer h5 {
  font-family: var(--ac-sans);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #B2A77F;
  margin: 0 0 16px;
  font-weight: 600;
}
.ac-footer .grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}
.ac-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.ac-footer .legal {
  border-top: 1px solid rgba(231, 221, 198, .18);
  margin-top: 56px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: #B2A77F;
}
@media (max-width: 880px) {
  .ac-footer .grid { grid-template-columns: 1fr 1fr; }
}

/* ── Sticky mobile bar ───────────────────────────────── */
.ac-sticky-mobile {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--ac-paper);
  border-top: 1px solid var(--ac-line);
  padding: 10px 16px env(safe-area-inset-bottom);
  gap: 10px;
  z-index: 40;
}
.ac-sticky-mobile .ac-btn { flex: 1; height: 46px; font-size: 14px; }
@media (max-width: 720px) {
  .ac-sticky-mobile { display: flex; }
  body { padding-bottom: 80px; }
}

/* ── Property card ───────────────────────────────────── */
.ac-prop {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: transparent;
}
.ac-prop .photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--ac-paper-2);
  overflow: hidden;
  border-radius: var(--ac-r-3);
}
.ac-prop .photo .tag {
  position: absolute;
  top: 12px; left: 12px;
}
.ac-prop .photo .fav {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(251, 246, 236, .9);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ac-prop .body {
  display: flex; flex-direction: column; gap: 4px;
}
.ac-prop .price {
  font-family: var(--ac-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: var(--ac-display-tight-2);
}
.ac-prop .zone {
  font-size: 14px;
  color: var(--ac-ink-2);
}
.ac-prop .meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--ac-ink-3);
  letter-spacing: .02em;
  margin-top: 4px;
}
.ac-prop .meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ── Decorative serif rule ───────────────────────────── */
.ac-rule-serif {
  font-family: var(--ac-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ac-gold);
  text-align: center;
  margin: var(--ac-7) 0;
}

/* ── Reveal on scroll (subtle) ───────────────────────── */
.ac-reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.ac-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ac-reveal { opacity: 1; transform: none; transition: none; } }

/* ── AI Chat widget ──────────────────────────────────── */
.ac-chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; font-family: var(--ac-sans); }
.ac-chat .chat-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 0 14px;
  height: 56px;
  border-radius: var(--ac-r-pill);
  background: var(--ac-ink);
  color: var(--ac-paper);
  box-shadow: var(--ac-shadow-2);
  font-size: 14px;
  font-weight: 600;
}
.ac-chat .chat-fab.hidden { display: none; }
.ac-chat .chat-fab .badge {
  width: 32px; height: 32px;
  background: var(--ac-gold);
  color: #1A1714;
  border-radius: 50%;
  font-family: var(--ac-serif);
  font-size: 18px;
  font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
}
.ac-chat .chat-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 100px);
  background: var(--ac-paper);
  border: 1px solid var(--ac-line);
  border-radius: 16px;
  box-shadow: var(--ac-shadow-3);
  opacity: 0;
  transform: translateY(8px) scale(.98);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ac-chat .chat-panel.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.ac-chat .chat-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ac-line-soft);
  background: var(--ac-paper);
}
.ac-chat .chat-head .av {
  width: 36px; height: 36px;
  background: var(--ac-olive);
  color: var(--ac-paper);
  border-radius: 50%;
  font-family: var(--ac-serif);
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.ac-chat .chat-head h4 { font-size: 14px; font-weight: 600; margin: 0; }
.ac-chat .chat-head p { margin: 0; font-size: 11px; color: var(--ac-ink-3); display: flex; align-items: center; gap: 6px; }
.ac-chat .chat-head .dot { width: 6px; height: 6px; background: #4A9F4A; border-radius: 50%; box-shadow: 0 0 0 3px rgba(74,159,74,.18); }
.ac-chat .chat-close { margin-left: auto; padding: 6px; color: var(--ac-ink-3); }
.ac-chat .chat-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ac-chat .chat-msg { display: flex; }
.ac-chat .chat-msg.bot { justify-content: flex-start; }
.ac-chat .chat-msg.user { justify-content: flex-end; }
.ac-chat .bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}
.ac-chat .chat-msg.bot .bubble { background: var(--ac-paper-2); color: var(--ac-ink); border-bottom-left-radius: 4px; }
.ac-chat .chat-msg.user .bubble { background: var(--ac-olive); color: var(--ac-paper); border-bottom-right-radius: 4px; }
.ac-chat .chat-quick {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 4px 16px 12px;
}
.ac-chat .chat-quick button {
  padding: 6px 12px;
  border-radius: var(--ac-r-pill);
  border: 1px solid var(--ac-line);
  background: var(--ac-paper);
  font-size: 12px;
  color: var(--ac-ink-2);
}
.ac-chat .chat-quick button:hover { border-color: var(--ac-ink); color: var(--ac-ink); }
.ac-chat .chat-foot {
  border-top: 1px solid var(--ac-line-soft);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--ac-paper);
}
.ac-chat .chat-input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 8px;
  font-size: 14px;
  outline: none;
}
.ac-chat .chat-send {
  width: 36px; height: 36px;
  background: var(--ac-ink);
  color: var(--ac-paper);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.ac-chat .chat-disclaimer {
  text-align: center; font-size: 10px; color: var(--ac-ink-3);
  padding: 0 16px 8px; letter-spacing: .04em;
}

@media (max-width: 720px) {
  .ac-chat { right: 12px; bottom: 92px; }
  .ac-chat .chat-fab { height: 48px; font-size: 13px; }
  .ac-chat .chat-fab .badge { width: 28px; height: 28px; font-size: 15px; }
  .ac-chat .chat-panel { width: calc(100vw - 24px); height: 80vh; }
}

/* ── Cookie banner ───────────────────────────────────── */
.ac-cookie {
  position: fixed;
  left: 20px; bottom: 20px;
  z-index: 55;
  background: var(--ac-ink);
  color: #E7DDC6;
  padding: 20px;
  border-radius: 14px;
  max-width: 380px;
  box-shadow: var(--ac-shadow-3);
  font-size: 13px;
  line-height: 1.5;
}
.ac-cookie h5 { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--ac-paper); }
.ac-cookie .row { display: flex; gap: 8px; margin-top: 14px; }
.ac-cookie .ac-btn { height: 36px; padding: 0 14px; font-size: 12px; }
.ac-cookie .ac-btn.primary { background: var(--ac-gold); color: #1A1714; border-color: var(--ac-gold); }
.ac-cookie .ac-btn.secondary { border-color: #635a4a; color: #E7DDC6; }
@media (max-width: 720px) { .ac-cookie { left: 12px; right: 12px; max-width: none; bottom: 92px; } }

/* ── Print / pdf friendliness ────────────────────────── */
@media print { .ac-header, .ac-footer, .ac-sticky-mobile, .ac-chat, .ac-cookie { display: none; } }

/* ac-mobile-drawer v1 */
@media (max-width: 920px) {
  body.ac-menu-open { overflow: hidden; }
  body.ac-menu-open .ac-nav {
    display: flex !important;
    position: fixed;
    top: 62px;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--ac-cream, #FBF6EC);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px 48px;
    gap: 18px;
    z-index: 999;
    overflow-y: auto;
    border-top: 1px solid var(--ac-line, #e8e2d2);
  }
  body.ac-menu-open .ac-nav a {
    font-size: 22px;
    font-weight: 500;
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--ac-line, #e8e2d2);
  }
  .ac-burger[aria-expanded="true"] { background: var(--ac-ink, #2A3324); color: var(--ac-cream, #FBF6EC); }
}

/* ac-responsive-fixes v1 */
@media (max-width: 920px) {
  .ac-brand { gap: 8px; min-width: 0; align-items: center; }
  .ac-brand .mark-text { display: flex; flex-direction: column; line-height: 1.05; white-space: nowrap; font-size: 15px; }
  .ac-brand .mark-text small { font-size: 10px; letter-spacing: 0.1em; margin-top: 2px; white-space: nowrap; }
  .ac-container { padding-left: 20px; padding-right: 20px; box-sizing: border-box; }
  main > article.ac-container,
  main > .ac-container,
  main article.ac-container { padding-top: 32px; padding-bottom: 32px; }
}
@media (max-width: 560px) {
  .ac-brand .mark-text { font-size: 14px; }
  .ac-brand .mark-text small { font-size: 9px; }
}
