/* =========================================================
   Pilar Losada — Shared styles (producción)
   Paleta: azul. Tipografía: Cormorant Garamond + Inter.
========================================================= */

:root {
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-soft: 0 20px 60px -30px rgba(40, 50, 70, 0.25);
  --shadow-card: 0 2px 10px rgba(40, 50, 70, 0.05);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --bg: #F4EEE4;
  --bg-alt: #EAE1D2;
  --surface: #FBF7F0;
  --ink: #2A2A2A;
  --ink-soft: #5A5A5A;
  --ink-muted: #8B8B8B;
  --accent: #3C4A5E;
  --accent-soft: #B8C5D6;
  --accent-tint: #D6DEE8;
  --cta: #C97A5A;
  --cta-ink: #FFFFFF;
  --line: rgba(60, 74, 94, 0.14);

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --display-weight: 500;
  --display-tracking: -0.01em;
  --display-leading: 1.05;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
}

h1.display { font-size: clamp(42px, 6.2vw, 82px); margin: 0; }
h2.display { font-size: clamp(32px, 4.4vw, 58px); margin: 0; }
h3.display { font-size: clamp(24px, 2.6vw, 34px); margin: 0; }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}

.lede { font-size: 20px; color: var(--ink-soft); line-height: 1.55; text-wrap: pretty; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-decoration: none;
}
.btn-primary {
  background: var(--cta);
  color: #FFFFFF !important;
}
.btn-primary svg { color: #FFFFFF; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); text-decoration: none; filter: brightness(1.04); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); text-decoration: none; }

.btn svg { width: 16px; height: 16px; }

/* --------- Top bar --------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: 1180px;
  margin: 0 auto;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--surface);
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.04em;
}
.topbar-right { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.topbar a.page-link {
  font-size: 14px; color: var(--ink-soft); padding: 8px 14px; border-radius: var(--radius-pill);
  transition: background 0.2s;
}
.topbar a.page-link:hover { background: var(--surface); text-decoration: none; color: var(--ink); }
.topbar a.page-link.active { color: var(--ink); background: var(--surface); }

@media (max-width: 760px) {
  .topbar-inner { padding: 14px 18px; }
  .topbar a.page-link { display: none; }
  .brand { font-size: 19px; gap: 10px; }
  .brand-mark { width: 30px; height: 30px; font-size: 14px; }
  .topbar-right .btn { padding: 9px 16px; font-size: 13px; }
}

/* --------- Page shell --------- */
main { padding-top: 40px; padding-bottom: 120px; }
section { padding: 72px 0; }

/* --------- Image frame --------- */
.placeholder-portrait {
  background: linear-gradient(135deg, var(--accent-tint), var(--accent-soft)) !important;
  display: flex !important; align-items: flex-end; justify-content: flex-start;
  padding: 30px;
  font-family: var(--font-display);
  color: var(--accent);
}
.placeholder-portrait::before {
  content: "Pilar\A Losada";
  white-space: pre;
  font-size: 64px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background:
    radial-gradient(circle at 30% 30%, var(--accent-tint), var(--accent-soft)) no-repeat;
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s var(--ease);
}

/* --------- Sticker --------- */
.sticker {
  background: var(--surface);
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  font-family: var(--font-display);
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sticker .live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6aa87b;
  box-shadow: 0 0 0 4px rgba(106,168,123,0.18);
  animation: livePulse 2.4s var(--ease) infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(106,168,123,0.18); }
  50% { box-shadow: 0 0 0 8px rgba(106,168,123,0.05); }
}

/* --------- Quote --------- */
.quote-mark {
  font-family: var(--font-display);
  font-size: 80px;
  line-height: 0.8;
  color: var(--accent-soft);
  opacity: 0.8;
  display: block;
  margin-bottom: 8px;
}

/* --------- Utility --------- */
.grid { display: grid; gap: 28px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.stack-sm > * + * { margin-top: 8px; }
.stack-md > * + * { margin-top: 18px; }
.stack-lg > * + * { margin-top: 28px; }

@media (max-width: 860px) {
  .g-2, .g-3 { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  main { padding-bottom: 80px; }
  .site-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  .home-hero-grid, .home-sobre-grid {
    grid-template-columns: 1fr !important;
    gap: 50px !important;
  }
  .home-hero-grid > div:last-child,
  .home-sobre-grid > div:first-child,
  .hero-grid > div:last-child {
    /* width:100% es necesario: sin él, margin:auto en un grid item dispara
       shrink-to-fit y, como los hijos del hero son todos absolute, el
       intrinsic width queda en 0 y la foto desaparece. Mismo bug en
       .home-hero-grid (home) y .hero-grid (landings SEM). */
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }
  /* Landings: two-col también colapsan a 1 col. */
  .hero-grid, .two-col {
    grid-template-columns: 1fr !important;
    gap: 50px !important;
  }
  /* Sticker hero acercado al borde de la foto a partir de aquí; ≤560 se afina más abajo. */
  .hero-sticker { right: 8px !important; top: -14px !important; font-size: 12px !important; }
  /* CTA Reserva: reducir padding inline (80px 60px) para que el contenido respire */
  #reserva > .container > div { padding: 56px 28px !important; }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .site-footer-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  h1.display { font-size: clamp(36px, 11vw, 56px); }
  .lede { font-size: 17px; }
  .hero-sticker { right: 4px !important; top: -12px !important; font-size: 11px !important; padding: 9px 14px !important; }
  .hero-floating-quote {
    left: 12px !important;
    right: 12px !important;
    bottom: -18px !important;
    max-width: none !important;
    padding: 14px 16px !important;
  }
  .hero-floating-quote p {
    font-size: 15px !important;
  }
  #reserva > .container > div { padding: 48px 22px !important; }
}

/* Topbar muy compacto en pantallas estrechas: el botón "Llamada gratuita"
   no debe partirse en 2 líneas. */
@media (max-width: 400px) {
  .topbar-inner { padding: 12px 14px; gap: 10px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; font-size: 13px; }
  .topbar-right .btn { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
}

/* --------- Service card hover --------- */
.service-card { transition: all 0.3s var(--ease); }
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: var(--accent); }
.service-card a:hover { text-decoration: underline; text-underline-offset: 3px; }
