/* Landing pensada primero para el móvil */

:root {
  --bg: #f7f9fa;
  --paper: #ffffff;
  --surface: #ecf0f2;
  --tone: #dbe3e7;
  --ink: #1f3038;
  --ink-2: #2a404a;
  --muted: #5d6b72;
  --on-dark: #c9d5da;
  --accent: #0d7480;
  --accent-ink: #ffffff;

  --font: "General Sans", system-ui, sans-serif;
  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --step-head: clamp(2rem, 1.4rem + 2.6vw, 3.5rem);
  --step-display: clamp(2.25rem, 9.6vw, 4.5rem);

  --side: 20px;
  --section: 72px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, figure, ul, ol, dl, dd, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
img { display: block; max-width: 100%; height: auto; background: var(--surface); }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; max-width: 62ch; }
:target { scroll-margin-top: 16px; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: var(--side); top: 12px; z-index: 30; padding: 0.75rem 1rem; background: var(--ink); color: var(--paper); clip-path: inset(50%); }
.skip:focus { clip-path: none; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--side); }
.display { font-size: var(--step-display); line-height: 1; letter-spacing: -0.035em; }
.head { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.025em; }
.lead { font-size: var(--step-lead); line-height: 1.35; }
.small { font-size: var(--step-small); line-height: 1.45; }

/* ---------- controles ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.5rem; padding: 0 1.75rem; background: var(--accent); color: var(--accent-ink); font-weight: 500; text-decoration: none; text-align: center; transition: transform 140ms var(--ease-out), background-color 180ms ease; }
.button:hover { background: var(--ink); }
.button:active { transform: scale(0.97); }
.button-small { min-height: 2.75rem; padding: 0 1rem; font-size: var(--step-small); }
.button-full { width: 100%; }
.button-big { min-height: 4rem; padding: 0 2.25rem; font-size: var(--step-lead); }
.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; text-decoration-thickness: 0.08em; transition: text-decoration-color 180ms ease; }
.link:hover { text-decoration-color: currentColor; }
.link-plain { text-decoration: underline; text-underline-offset: 0.2em; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.4em; min-height: 3rem; font-weight: 500; }
.link-arrow::after { content: "→"; transition: transform 240ms var(--ease-out); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- cabecera ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 1200px; margin-inline: auto; padding: 14px var(--side); }
.brand { display: inline-flex; color: var(--ink); transition: transform 240ms var(--ease-out); }
.brand:hover { transform: translateY(-2px); }
.logo { display: block; width: 36px; height: 36px; }
.footer-brand .logo { width: 48px; height: 48px; }
.top-nav { display: none; }

/* ---------- 1. el mensaje ---------- */
.hero { padding-top: 28px; padding-bottom: var(--section); }
.hero-sub { margin-top: 20px; font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; }
.hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 28px; }
.hero-actions .link-arrow { justify-content: center; }
.hero-note { margin-top: 12px; color: var(--muted); font-size: var(--step-small); text-align: center; }
.hero-visual { position: relative; margin-top: 40px; overflow: hidden; }
.hero-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-shots img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: 50% 0; }
.hero-caption { margin-top: 10px; color: var(--muted); font-size: var(--step-small); }

/* tarjeta de consulta: un fragmento real del CRM */
.notice { position: absolute; left: 14px; right: 14px; bottom: 14px; max-width: 340px; padding: 18px 20px; background: var(--paper); color: var(--ink); border-radius: 14px; box-shadow: 0 14px 40px rgba(31, 48, 56, 0.22); font-size: var(--step-body); } /* taste-skill-ignore: tarjeta flotante del CRM (data-ui) */
.notice p { line-height: 1.35; }
.notice-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--accent); font-size: var(--step-small); font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.notice-name { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.01em; }
.notice dl { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--tone); } /* taste-skill-ignore: separador interno de la tarjeta del CRM (data-ui) */
.notice dt { color: var(--muted); font-size: var(--step-small); }
.notice dd { font-weight: 500; }
.notice-foot { margin-top: 12px; color: var(--accent); font-size: var(--step-small); font-weight: 500; }

/* ---------- secciones ---------- */
.section { padding-block: var(--section); }
.band { background: var(--surface); }
.band-dark { background: var(--ink); color: var(--paper); }
.section-sub { margin-top: 16px; max-width: 40ch; }
.split { display: grid; gap: 28px; }

/* 2. el problema */
.pains { display: grid; gap: 22px; }
.pains li { font-size: var(--step-lead); line-height: 1.3; font-weight: 500; }

/* 3. cómo funciona */
.steps { display: grid; gap: 36px; margin-top: 40px; }
.steps h3, .timeline h3, .service h3 { font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.01em; }
.steps p, .timeline p, .service p { margin-top: 8px; max-width: 46ch; }

/* 4. pruébalo */
.demo { display: grid; gap: 40px; }
.demo-copy .lead { margin-top: 16px; color: var(--on-dark); }
.demo-form { display: grid; gap: 18px; margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; margin-bottom: 10px; font-weight: 500; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; background: var(--ink-2); transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out); }
.chips label:hover span { background: #36505b; }
.chips label:active span { transform: scale(0.97); }
.chips input:checked + span { background: var(--paper); color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--paper); outline-offset: 3px; }
.field-label { display: grid; gap: 8px; font-weight: 500; }
.field { width: 100%; min-height: 3.25rem; padding: 0.75rem 1rem; background: var(--ink-2); color: var(--paper); border: 0; border-radius: 0; font-size: max(1rem, var(--step-body)); transition: background-color 180ms ease; }
.field::placeholder { color: #8fa3ac; }
.field:focus { background: #36505b; outline: 2px solid var(--paper); outline-offset: 0; }
.demo-hint { color: var(--on-dark); }
.demo-label { margin-bottom: 14px; color: var(--on-dark); font-weight: 500; }
.notice-big { position: static; max-width: none; padding: 24px; box-shadow: none; } /* taste-skill-ignore: quita la sombra */
.notice-big.is-updated { animation: pop 700ms var(--ease-out); }
.demo-counts { margin-top: 14px; color: var(--on-dark); font-size: var(--step-small); font-variant-numeric: tabular-nums; }
@keyframes pop { 0% { transform: scale(0.97); opacity: 0.4; } 100% { transform: none; opacity: 1; } }

/* qué hacemos */
.services { display: grid; gap: 36px; margin-top: 40px; }
.service-main h3 { font-size: var(--step-head); line-height: 1.05; letter-spacing: -0.025em; }
.service-main p { font-size: var(--step-lead); line-height: 1.35; }
.not-sold { margin-top: 56px; padding: 24px; background: var(--surface); }
.not-sold h3 { font-size: var(--step-lead); line-height: 1.2; }
.not-sold p { margin-top: 8px; }

/* caso real */
.case { display: grid; gap: 20px; margin-top: 40px; }
.case-phone { display: none; }
.case figure { overflow: hidden; }
.case img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.case-desktop img { aspect-ratio: 16 / 10; }
.case-phone img { aspect-ratio: 9 / 16; }
.case-facts { display: grid; gap: 16px; align-content: start; }
.case-facts b { font-weight: 600; }
.case-link { margin-top: 24px; }

/* 6. cómo empezamos */
.timeline { display: grid; gap: 28px; }
.timeline li { padding-left: 20px; border-left: 4px solid var(--accent); }

/* fotos de Valencia */
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 48px; }
.photos figure { overflow: hidden; }
.photos figure:first-child { grid-column: 1 / -1; }
.photos img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; transition: transform 700ms var(--ease-out); }
.photos figure:first-child img { aspect-ratio: 16 / 10; }
.photos figure:hover img { transform: scale(1.04); }
/* 8. preguntas */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--paper); }
.faq summary { position: relative; display: flex; align-items: center; min-height: 64px; padding: 16px 56px 16px 20px; font-weight: 500; cursor: pointer; list-style: none; transition: color 180ms ease; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 16px; height: 2px; margin-top: -1px; background: currentColor; transition: transform 240ms var(--ease-out); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 20px 20px; max-width: 56ch; }

/* 9. contacto */
.final { display: flex; align-items: center; min-height: 88svh; text-align: center; padding-block: 96px; background: var(--accent); color: var(--accent-ink); }
.button-light { background: var(--paper); color: var(--ink); }
.button-light:hover { background: var(--ink); color: var(--paper); }
.final-title { max-width: 14ch; margin-inline: auto; }
.final .lead { max-width: 36ch; margin: 20px auto 0; }
.final-actions { display: grid; justify-items: center; gap: 16px; margin-top: 32px; }
.final-actions .button { width: 100%; max-width: 420px; }

/* pie */
.footer { display: grid; gap: 10px; padding-block: 40px 32px; color: var(--muted); }
.footer-brand { color: var(--ink); }
.credits { max-width: 70ch; }


/* ---------- movimiento (el contenido se ve sin JavaScript) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(18px); animation: rise 800ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 650ms var(--ease-out), transform 800ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .hero-visual .notice { opacity: 0; transform: translateY(24px); animation: rise 700ms var(--ease-out) 900ms forwards; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- a partir de tableta ---------- */
@media (min-width: 760px) {
  :root { --side: 32px; --section: 112px; }
  .hero-actions { flex-direction: row; align-items: center; gap: 24px; }
  .hero-note { text-align: left; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .services { grid-template-columns: 1fr 1fr; gap: 48px 40px; }
  .service-main { grid-column: 1 / -1; max-width: 46rem; }
  .case { grid-template-columns: 2fr 1fr; gap: 16px; }
  .case-phone { display: block; }
  .case-desktop { grid-column: 1 / -1; }
  .case-facts { grid-column: 2; grid-row: 2; font-size: var(--step-lead); line-height: 1.35; }
  .case-phone { grid-column: 1; grid-row: 2; max-width: 320px; }
  .photos { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 64px; }
  .photos figure:first-child { grid-column: auto; }
  .photos img, .photos figure:first-child img { aspect-ratio: 4 / 3; }
  .final-actions .button { width: auto; }
}

/* ---------- escritorio ---------- */
@media (min-width: 1040px) {
  .top-inner { padding-block: 18px; }
  .top-nav { display: flex; gap: 32px; }
  .hero { display: grid; grid-template-columns: 6fr 6fr; align-items: center; gap: 64px; min-height: calc(100svh - 80px); padding-top: 16px; padding-bottom: 64px; }
  .hero-visual { margin-top: 0; overflow: visible; }
  .hero-visual { justify-self: end; width: min(100%, 480px); }
  .case { grid-template-columns: 8fr 3fr; gap: 24px; align-items: start; }
  .case-desktop { grid-column: 1; grid-row: 1 / span 2; }
  .case-phone { grid-column: 2; grid-row: 1; max-width: none; }
  .case-facts { grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 16px; font-size: var(--step-body); }
  .split { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .demo { grid-template-columns: 6fr 5fr; gap: 72px; align-items: center; }
}
