/*
 * Didos · web pública (didos.es).
 * Identidad propia, distinta de la de cualquier cliente: ciruela (principal),
 * albaricoque (acento) y crema, con Fraunces para los títulos y DM Sans para
 * el texto. Las tipografías se sirven desde el propio dominio (sin terceros).
 */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/fraunces-latin-wght-normal.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/fraunces-latin-wght-italic.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url('/assets/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --plum: #4A1D3A;
  --plum-dark: #331328;
  --plum-soft: #6E2F57;
  --apricot: #F2A65A;
  --apricot-dark: #D9833A;
  --apricot-soft: #FBE3C6;
  --cream: #FBF5EC;
  --cream-2: #F4E8D8;
  --paper: #FFFDF9;
  --ink: #2B2027;
  --ink-2: #54474F;
  --ink-3: #85777F;
  --line: #E9DCCB;
  --wa: #1F8F5F;
  --wa-dark: #187550;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(74, 29, 58, 0.06), 0 12px 32px -12px rgba(74, 29, 58, 0.22);
  --shadow-lg: 0 30px 70px -30px rgba(51, 19, 40, 0.45);
  --container: 1160px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--plum-soft); }
a:hover { color: var(--plum); }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--plum);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-weight: 600;
  font-variation-settings: 'SOFT' 100, 'WONK' 0;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--apricot-dark); outline-offset: 3px; border-radius: 6px; }

.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;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--plum); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; color: #fff; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 780px); }
.center { text-align: center; }

.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--apricot-dark); margin-bottom: 0.9rem;
}

.lead { font-size: 1.15rem; color: var(--ink-2); }

/* --- Botones ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; border-radius: 999px; padding: 0.8rem 1.4rem;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.2em; height: 1.2em; flex-shrink: 0; }
.btn-lg { font-size: 1.05rem; padding: 1rem 1.7rem; }
.btn-sm { font-size: 0.92rem; padding: 0.55rem 1.05rem; }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 10px 24px -10px rgba(31, 143, 95, 0.7); }
.btn-wa:hover { background: var(--wa-dark); color: #fff; }
.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--plum-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--plum); border-color: rgba(74, 29, 58, 0.25); }
.btn-ghost:hover { border-color: var(--plum); color: var(--plum); }

.link-button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
}
.link-button:hover { text-decoration: underline; }

/* --- Cabecera ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 245, 236, 0.86);
  backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }

.brand {
  display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--plum);
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--plum); }
.brand-light, .brand-light:hover { color: #fff; }

.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.97rem; }
.nav a:hover { color: var(--plum); }
.header-cta { margin-left: 0.4rem; }

.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer;
}
.bars, .bars::before, .bars::after {
  display: block; width: 18px; height: 2px; background: var(--plum); border-radius: 2px;
  margin: 0 auto; position: relative; content: ''; transition: transform 0.2s ease;
}
.bars::before { position: absolute; top: -6px; }
.bars::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded='true'] .bars { background: transparent; }
.menu-toggle[aria-expanded='true'] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] .bars::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  display: grid; gap: 0.25rem; padding: 0.5rem 20px 1.25rem; border-top: 1px solid var(--line);
  background: var(--cream);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { padding: 0.75rem 0; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 0.9rem; }

/* --- Portada ------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; padding: 4.5rem 0 5.5rem;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(242, 166, 90, 0.28), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(110, 47, 87, 0.12), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center; }
.hero h1 em { font-style: italic; color: var(--plum-soft); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 2rem 0 1.6rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; padding: 0; margin: 0; list-style: none; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-points li::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: var(--apricot-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A1D3A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 8'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  width: min(100%, 360px); background: var(--paper); border-radius: 40px; padding: 14px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); transform: rotate(1.5deg);
}
.phone-top {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.phone-top strong { display: block; font-size: 0.95rem; line-height: 1.2; }
.phone-top small { color: var(--wa); font-weight: 600; font-size: 0.78rem; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--apricot); color: var(--plum-dark); font-family: var(--font-display); font-weight: 700;
}
.chat {
  display: flex; flex-direction: column; gap: 0.55rem; padding: 1rem 0.5rem 0.6rem;
  background: var(--cream-2); border-radius: 0 0 28px 28px; margin: 0 -14px -14px; padding-inline: 14px; padding-bottom: 18px;
}
.bubble {
  max-width: 86%; padding: 0.6rem 0.8rem; border-radius: 16px; font-size: 0.88rem; line-height: 1.45;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}
.bubble.in { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: #F7E1EC; border-bottom-right-radius: 4px; }
.card-preview { display: grid; gap: 0.2rem; background: #fff !important; border: 1px dashed var(--plum-soft); }
.card-chip { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--apricot-dark); }
.card-text { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--plum); }
.card-hint { font-size: 0.75rem; color: var(--ink-3); }
.pay { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 70%; font-weight: 700; }
.pay-btn { background: var(--plum); color: #fff; padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.8rem; }

.float-note {
  position: absolute; display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 0.6rem 0.9rem; border-radius: 14px; font-weight: 700; font-size: 0.85rem; color: var(--ink);
}
.note-1 { top: -18px; left: 2%; }
.note-2 { bottom: -18px; right: 4%; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wa); }
.dot-warm { background: var(--apricot-dark); }

/* --- Secciones ---------------------------------------------------------- */
.section { padding: 5.5rem 0; }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; }

.problem { background: var(--paper); border-block: 1px solid var(--line); }
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 3rem; }
.pain {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem;
}
.pain-n { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--plum); margin-bottom: 0.4rem; }
.pain p { margin: 0; color: var(--ink-2); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; padding: 0; margin: 0; list-style: none; counter-reset: step; }
.step {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.5rem 1.6rem; box-shadow: var(--shadow);
}
.step-n {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 1.1rem;
  background: var(--plum); color: var(--apricot); font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
}
.step p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }

.features { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.feature {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: var(--apricot-soft); color: var(--plum);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

.trust { background: var(--plum); color: #F6E9F0; }
.trust h2 { color: #fff; }
.trust .eyebrow { color: var(--apricot); }
.trust .lead { color: #E5D2DD; }
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.trust-list li {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; color: #E9D9E2;
}
.trust-list strong { color: var(--apricot); display: block; font-size: 1.05rem; margin-bottom: 0.15rem; }

.accordion { display: grid; gap: 0.8rem; }
.acc-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.acc-item h3 { margin: 0; font-size: 1.08rem; }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font: inherit; font-family: var(--font-sans); font-weight: 700; color: var(--plum); text-align: left;
  background: none; border: 0; padding: 1.2rem 1.4rem; cursor: pointer;
}
.acc-trigger::after {
  content: ''; width: 12px; height: 12px; flex-shrink: 0;
  border-right: 2.5px solid var(--apricot-dark); border-bottom: 2.5px solid var(--apricot-dark);
  transform: rotate(45deg) translateY(-3px); transition: transform 0.2s ease;
}
.acc-trigger[aria-expanded='true']::after { transform: rotate(-135deg) translateY(-3px); }
.acc-panel { padding: 0 1.4rem 1.2rem; color: var(--ink-2); }
.acc-panel p { margin: 0; }

.final-cta { padding-top: 2rem; }
.cta-box {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--apricot) 0%, #F7C289 100%);
  border-radius: var(--radius-lg); padding: 3rem 3.2rem; box-shadow: var(--shadow);
}
.cta-box h2 { color: var(--plum-dark); margin-bottom: 0.3rem; }
.cta-box p { color: var(--plum); margin: 0; font-weight: 500; }

/* --- Páginas legales ---------------------------------------------------- */
.legal { padding: 4rem 0 5rem; }
.legal h1 { margin-bottom: 0.3rem; }
.legal h2 { font-size: 1.5rem; margin-top: 2.4rem; }
/* Los enlaces directos (#cookies, #eliminacion-de-datos) no quedan bajo la cabecera fija. */
[id] { scroll-margin-top: 96px; }
.legal h3 { font-size: 1.1rem; margin-top: 1.4rem; font-family: var(--font-sans); font-weight: 700; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 1.2rem; }
.legal-updated { color: var(--ink-3); font-size: 0.95rem; margin-bottom: 2rem; }
.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.93rem; background: var(--paper); border-radius: 12px; overflow: hidden; }
.legal th, .legal td { text-align: left; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--cream-2); color: var(--plum); }
.legal code { white-space: nowrap; font-size: 0.88em; background: var(--cream-2); padding: 0.1em 0.35em; border-radius: 5px; }

/* --- Pie ---------------------------------------------------------------- */
.site-footer { background: var(--plum-dark); color: #D9C4D0; margin-top: 5rem; padding: 3.5rem 0 1.5rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; }
.footer-brand p { max-width: 320px; margin: 0.8rem 0 0; }
.footer-links { display: grid; gap: 0.55rem; align-content: start; }
.footer-links a, .footer-links .link-button { color: #F1E4EB; text-decoration: none; }
.footer-links a:hover, .footer-links .link-button:hover { color: var(--apricot); text-decoration: none; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.88rem;
}

/* --- Aviso de cookies ---------------------------------------------------- */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 60; margin-inline: auto; max-width: 720px;
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 1.1rem 1.3rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1 1 360px; font-size: 0.93rem; color: var(--ink-2); }
.cookie-banner strong { color: var(--plum); }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero-grid, .trust-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero { padding-top: 3rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav, .header-cta { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 4rem 0; }
  .pain-grid, .steps, .feature-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .cta-box { padding: 2.2rem 1.6rem; }
  .cta-box .btn { width: 100%; }
  .float-note { display: none; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 0.9rem 1rem; gap: 0.8rem; }
  .cookie-banner p { font-size: 0.86rem; flex-basis: 100%; }
  .phone { transform: none; }
}

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