/* =========================================================
   Smile & Sense — Colors & Type
   Source of truth for color tokens, type scale, semantic styles
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

/* ---------- Brand font: Galano Grotesque (provided) ---------- */
@font-face {
  font-family: 'Galano Grotesque';
  src: url('fonts/GalanoGrotesqueThin.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Galano Grotesque';
  src: url('fonts/GalanoGrotesqueThinItalic.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ---------- Brand Blues (from logo) ---------- */
  --ss-blue-deep:    #1C9BD9;   /* Left circle, deeper sky */
  --ss-blue:         #6FC2E8;   /* Brand primary, soft sky */
  --ss-blue-light:   #A9D9EE;   /* Right circle, lighter */
  --ss-blue-mist:    #E6F4FB;   /* Tint for backgrounds */
  --ss-blue-overlap: #4DAFD9;   /* Where the two circles overlap */

  /* ---------- Warm Accents (love / heart) ---------- */
  --ss-blush:        #F5C6CB;
  --ss-blush-soft:   #FBE6E8;
  --ss-coral:        #E89B97;

  /* ---------- Neutrals ---------- */
  --ss-ink:          #2C3640;   /* Primary text — soft slate, not pure black */
  --ss-ink-muted:    #6B7785;   /* Secondary text, taglines */
  --ss-ink-soft:     #707983;   /* Tertiary, captions, placeholders (contraste AA sobre blanco) */
  --ss-line:         #E4E8EC;   /* Hairline borders */
  --ss-line-strong:  #C9D2DA;   /* Hairline algo más marcada: campos de formulario */
  --ss-paper:        #FFFFFF;
  --ss-paper-warm:   #FBFAF7;   /* Off-white, warmer canvas */
  --ss-paper-cool:   #F6F9FB;   /* Off-white, cooler canvas */

  /* ---------- Semantic ---------- */
  --ss-success:      #7BB69A;
  --ss-warning:      #E0B86A;
  --ss-danger:       #D98C8C;
  --ss-info:         var(--ss-blue);

  /* ---------- Foreground / Background semantic ---------- */
  --fg-1: var(--ss-ink);
  --fg-2: var(--ss-ink-muted);
  --fg-3: var(--ss-ink-soft);
  --fg-brand: var(--ss-blue-deep);
  --bg-1: var(--ss-paper);
  --bg-2: var(--ss-paper-warm);
  --bg-3: var(--ss-paper-cool);
  --bg-brand-soft: var(--ss-blue-mist);
  --line-1: var(--ss-line);
  --line-2: var(--ss-line-strong);

  /* ---------- Type Families ---------- */
  --font-display: 'Galano Grotesque', 'Quicksand', 'Avenir Next', system-ui, -apple-system, sans-serif;
  --font-body:    'Quicksand', 'Galano Grotesque', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ---------- Type Scale ---------- */
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-base: 16px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  36px;
  --fs-3xl:  48px;
  --fs-4xl:  64px;
  --fs-5xl:  88px;

  /* ---------- Weights ---------- */
  --fw-thin: 300;      /* @kind font */
  --fw-regular: 400;   /* @kind font */
  --fw-medium: 500;    /* @kind font */
  --fw-semibold: 600;  /* @kind font */
  --fw-bold: 700;      /* @kind font */

  /* ---------- Line heights ---------- */
  --lh-tight: 1.1;   /* @kind font */
  --lh-snug:  1.25;  /* @kind font */
  --lh-base:  1.55;  /* @kind font */
  --lh-loose: 1.8;   /* @kind font */

  /* ---------- Tracking ---------- */
  --ls-tight:   -0.01em;  /* @kind font */
  --ls-normal:   0;       /* @kind font */
  --ls-wide:     0.06em;  /* @kind font */
  --ls-widest:   0.18em;  /* @kind font */

  /* ---------- Spacing ---------- */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;

  /* ---------- Radii (gentle, friendly, not sharp) ---------- */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  22px;
  --r-xl:  32px;
  --r-pill: 999px;
  --r-circle: 50%;

  /* ---------- Shadow system (soft, diffused — never harsh) ---------- */
  --shadow-xs: 0 1px 2px rgba(28, 155, 217, 0.06);
  --shadow-sm: 0 2px 8px rgba(44, 54, 64, 0.05);
  --shadow-md: 0 6px 20px rgba(44, 54, 64, 0.07);
  --shadow-lg: 0 18px 40px rgba(28, 155, 217, 0.10);
  --shadow-glow: 0 0 0 6px rgba(111, 194, 232, 0.18);

  /* ---------- Motion ---------- */
  --ease-soft:  cubic-bezier(0.25, 0.8, 0.4, 1);  /* @kind other */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);    /* @kind other */
  --dur-fast:   140ms;  /* @kind other */
  --dur-base:   240ms;  /* @kind other */
  --dur-slow:   420ms;  /* @kind other */
}

/* =========================================================
   Semantic element styles
   ========================================================= */

body, .ss-body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--fg-1);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ss-h1, h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-thin);
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
  margin: 0;
}

.ss-h2, h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-thin);
  font-size: var(--fs-3xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
  margin: 0;
}

.ss-h3, h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0;
}

.ss-h4, h4 {
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-normal);
  margin: 0;
}

.ss-eyebrow {
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: var(--fg-brand);
}

.ss-tagline {
  font-family: var(--font-body);
  font-weight: var(--fw-thin);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--fg-2);
  letter-spacing: var(--ls-wide);
}

.ss-display {
  font-family: var(--font-display);
  font-weight: var(--fw-thin);
  font-size: var(--fs-5xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  font-style: italic;
}

.ss-p, p {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--fg-1);
  margin: 0 0 var(--sp-4);
  text-wrap: pretty;
}

.ss-small, small {
  font-size: var(--fs-sm);
  color: var(--fg-2);
}

.ss-caption {
  font-size: var(--fs-xs);
  color: var(--fg-3);
  letter-spacing: var(--ls-wide);
}

.ss-code, code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: var(--r-xs);
  color: var(--ss-blue-deep);
}

a {
  color: var(--ss-blue-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(28,155,217,0.25);
  transition: border-color var(--dur-fast) var(--ease-soft),
              color    var(--dur-fast) var(--ease-soft);
}
a:hover { border-bottom-color: var(--ss-blue-deep); }

/* ---------- Accesibilidad ---------- */
:focus-visible {
  outline: 2px solid var(--ss-blue-deep);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip-link {
  position: fixed;
  top: -64px;
  left: 16px;
  z-index: 10000;
  background: var(--ss-blue-deep);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  border-bottom: none;
  box-shadow: 0 8px 24px rgba(28,155,217,.3);
  transition: top .2s var(--ease-soft);
}
.skip-link:focus { top: 16px; }
.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;
}

/* ---------- Menú móvil (hamburguesa) ---------- */
.nav-toggle { display: none; }
.mobile-menu { display: none; }
@media (max-width: 1024px) {
  .nav-toggle {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    background: transparent !important; border: none !important;
    color: var(--fg-1); cursor: pointer; padding: 8px !important;
  }
  .mobile-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(255,255,255,.98); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line-1);
    box-shadow: 0 14px 30px rgba(44,54,64,.10);
    flex-direction: column; padding: 8px 32px 20px;
  }
  .mobile-menu[data-open="false"] { display: none; }
  .mobile-menu[data-open="true"] { display: flex; }
  .mobile-menu .mm-link {
    all: unset; box-sizing: border-box; display: block; width: 100%;
    font-family: var(--font-body); font-size: 15px !important; font-weight: 500;
    color: var(--fg-1); padding: 15px 0 !important;
    border-top: 1px solid var(--line-1); cursor: pointer;
  }
  .mobile-menu .mm-link:first-child { border-top: none; }
  .mobile-menu .mm-phone {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-body); font-size: 14px; color: var(--fg-2);
    text-decoration: none; border-bottom: none;
    padding: 15px 0; border-top: 1px solid var(--line-1);
  }
  .mobile-menu .mm-cta {
    all: unset; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 14px; width: 100%;
    background: var(--ss-blue-deep); color: #fff;
    font-family: var(--font-body); font-weight: 500; font-size: 14px !important;
    padding: 15px 22px !important; border-radius: 999px; cursor: pointer;
  }
}
@media (max-width: 640px) {
  .header-phone { display: none !important; }
  .mobile-menu { padding: 8px 20px 18px; }
}


/* ---------------------------------------------------------------
   Contacto rápido (WhatsApp / Llamar) — añadido en la mejora
   Escritorio: burbuja flotante. Móvil (≤640): barra fija abajo.
   --------------------------------------------------------------- */
.ss-wa-bar{display:none}
@media (max-width:860px){
  .ss-wa-bubble{display:none !important}
  .ss-wa-bar{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:46;padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border-top:1px solid var(--line-1,#E4E8EC)}
  .ss-wa-bar a{display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;border-radius:999px;font-family:var(--font-body);font-size:15px;text-decoration:none;border-bottom:none}
  .ss-wa-bar__wa{background:#25D366;color:#fff !important}
  .ss-wa-bar__tel{background:var(--ss-blue-deep,#1C9BD9);color:#fff !important}
  /* El aviso de cookies no debe taparse con la barra */
  body:has(.ss-wa-bar) #cookie-banner{bottom:76px !important;right:12px !important;left:12px !important}
  /* La landing de carillas tiene su propia burbuja y barra: no la tocamos */
}

/* Bloque «Sigue leyendo» */
@media (max-width:1024px){.ss-related-grid{grid-template-columns:1fr 1fr !important}}
@media (max-width:700px){.ss-related-grid{grid-template-columns:1fr !important;gap:14px !important}}
