/* Web de Casa al Día: misma identidad que la app (violeta eléctrico, menta, Plus Jakarta Sans). */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/casa-al-dia/assets/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --violet: #5b4bff;
  --violet-2: #7b5cff;
  --pink: #b65cff;
  --ink: #17153a;
  --muted: #5f5b80;
  --bg: #f6f5ff;
  --surface: #ffffff;
  --surface-2: #efedff;
  --border: #e4e1f7;
  --ok: #0ca678;
  --soon: #e67700;
  --due: #e03131;
  --hero: linear-gradient(135deg, #5b4bff 0%, #7b5cff 52%, #b65cff 100%);
  --radius: 22px;
  --shadow: 0 1px 2px rgba(23, 21, 58, 0.05), 0 16px 36px -20px rgba(52, 40, 160, 0.35);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--violet);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 800;
}

h2 {
  font-size: clamp(28px, 4.4vw, 40px);
  margin: 0 0 14px;
}

h3 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.narrow {
  width: min(760px, 100% - 40px);
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--violet);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
}

/* ---------- Cabecera ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 245, 255, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(228, 225, 247, 0.7);
}

.nav .wrap {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  flex: 0 0 auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.nav__links {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: 15px;
  font-weight: 700;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
}

.nav__links a:hover {
  color: var(--violet);
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
  }

  .nav .btn {
    margin-left: auto;
    font-size: 13px;
    padding: 0 12px;
  }
}

@media (max-width: 400px) {
  .nav .btn {
    display: none;
  }
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 14px 30px -14px rgba(23, 21, 58, 0.6);
  transition: transform 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--light {
  background: #fff;
  color: #3f30d9;
}

.btn small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.7;
  line-height: 1.1;
}

.btn span {
  line-height: 1.15;
}

.btn--light small {
  opacity: 1;
  color: #4a3bea;
}

.btn--soon {
  cursor: default;
}

.btn--soon:hover {
  transform: none;
}

.nav .btn {
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
  border-radius: 12px;
  box-shadow: none;
}

/* ---------- Portada ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 0;
  color: #fff;
  background: var(--hero);
}

.hero::before {
  content: '';
  position: absolute;
  inset: auto -20% -40% auto;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: end;
}

.hero__text {
  padding-bottom: 72px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 64px);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #fff3bf, #ffd8f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
}

.hero__cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.trust {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust li {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 700;
}

.hero__phone {
  justify-self: center;
  /* El móvil «asoma» desde el borde inferior de la portada. */
  margin-bottom: -150px;
}

@media (max-width: 880px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero__text {
    padding-bottom: 8px;
  }

  .hero__phone {
    margin-bottom: -200px;
  }
}

/* ---------- Marco de móvil ---------- */

.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 390 / 844;
  padding: 10px;
  border-radius: 46px;
  background: #121127;
  box-shadow: 0 0 0 2px #2b2950, 0 40px 80px -30px rgba(20, 10, 90, 0.7);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
  background: var(--bg);
}

.phone--sm {
  width: min(250px, 70vw);
  border-radius: 40px;
  padding: 8px;
}

.phone--sm img {
  border-radius: 32px;
}

/* ---------- Secciones ---------- */

.section {
  padding: 96px 0;
}

.section--first {
  padding-top: 88px;
}

.section--alt {
  background: var(--surface);
}

.section__head {
  max-width: 720px;
  margin-bottom: 44px;
}

.center {
  text-align: center;
  margin-inline: auto;
}

/* Bloques de función: texto + móvil */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.feature + .feature {
  margin-top: 96px;
}

.feature--flip .feature__media {
  order: -1;
}

.feature__media {
  display: flex;
  justify-content: center;
}

.feature ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.feature li {
  position: relative;
  padding-left: 32px;
  margin: 10px 0;
}

.feature li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--violet);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 880px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature--flip .feature__media {
    order: 0;
  }
}

/* Pasos */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}

.step {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--hero);
  color: #fff;
  font-weight: 800;
}

.step p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 880px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Galería de capturas */
.gallery {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 10px 20px 30px;
  margin-inline: -20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.gallery figure {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: center;
}

.gallery figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

/* Tarjetas de ventajas */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card__icon {
  font-size: 28px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

@media (max-width: 880px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Guías */
.guides {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.guide {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease;
}

.guide:hover {
  transform: translateY(-3px);
}

.guide span {
  color: var(--violet);
  font-weight: 800;
  font-size: 15px;
}

.guide p {
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

@media (max-width: 880px) {
  .guides {
    grid-template-columns: 1fr;
  }
}

/* Preguntas frecuentes */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.faq summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--violet);
  font-size: 24px;
  line-height: 1;
}

.faq details[open] summary::after {
  content: '–';
}

.faq p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* Llamada final */
.cta-band {
  padding: 72px 0;
  text-align: center;
  color: #fff;
  background: var(--hero);
}

.cta-band h2 {
  margin-bottom: 10px;
}

.cta-band p {
  margin: 0 auto 26px;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Artículos (guías) ---------- */

.article-hero {
  padding: 56px 0 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.crumbs {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.crumbs li + li::before {
  content: '›';
  margin-right: 8px;
}

.crumbs a {
  color: var(--muted);
}

.article-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
}

.meta {
  font-size: 14px;
  color: var(--muted);
}

.article {
  padding: 48px 0 80px;
}

.article h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  margin-top: 48px;
}

.article h3 {
  margin-top: 30px;
}

.article p,
.article li {
  color: #2d2a52;
}

.article li {
  margin: 6px 0;
}

.toc {
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--surface-2);
}

.toc strong {
  display: block;
  margin-bottom: 6px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 15.5px;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.tip {
  margin: 26px 0;
  padding: 20px 22px;
  border-radius: 18px;
  background: #e6f8f1;
  color: #0b4f3b;
}

.tip strong {
  color: #08372a;
}

.app-box {
  margin: 40px 0;
  padding: 26px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  border-radius: var(--radius);
  background: var(--hero);
  color: #fff;
}

.app-box p {
  margin: 4px 0 14px;
  color: rgba(255, 255, 255, 0.9);
}

.app-box .phone {
  width: 150px;
  padding: 6px;
  border-radius: 28px;
}

.app-box .phone img {
  border-radius: 23px;
}


@media (max-width: 600px) {
  .app-box {
    grid-template-columns: 1fr;
  }

  .app-box .phone {
    display: none;
  }
}

.figure {
  margin: 28px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.figure figcaption {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Pie ---------- */

.footer {
  padding: 48px 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer li {
  margin: 6px 0;
}

.footer strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
