/*
 * MyTaskLists · landing.
 *
 * Mundo: la etiqueta de precio de góndola. Amarillo de etiqueta de fondo para
 * abrir, verde pino (la marca) para cerrar, tinta verde casi negra para el texto.
 * Mismos tokens que la app web (apps/frontend/src/styles/app.css).
 */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/archivo-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('./fonts/figtree-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --ground: #f1f3ef;
  --surface: #ffffff;
  --ink: #15201a;
  --ink-2: #55625a;
  --line: #dde3de;
  --line-strong: #c3ccc5;

  --pine: #1d5b45;
  --pine-press: #164a38;
  --pine-50: #e4efe9;
  --pine-100: #cfe2d8;

  --tag: #f6c945;
  --tag-ink: #4a4215;
  --tomato: #c8371f;
  --tomato-soft: #fcede9;
  --tomato-ink: #8e2a17;

  --font-display: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  --font-body: 'Figtree Variable', 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-pop: 0 2px 4px rgb(21 32 26 / 0.08), 0 28px 56px -18px rgb(21 32 26 / 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-strong) transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ground);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: var(--tag);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-wrap: balance;
}

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

/* ── Navegación ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand-mark {
  flex-shrink: 0;
}
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-text {
  padding: 0.5rem 0.8rem;
  border-radius: 0.625rem;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition:
    background-color 0.16s var(--ease),
    color 0.16s var(--ease);
}
.nav-text:hover {
  background: #eef1ed;
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: 0.625rem;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.16s var(--ease),
    border-color 0.16s var(--ease),
    transform 0.16s var(--ease);
}
.btn:active {
  transform: scale(0.98);
}
.btn-ghost {
  margin-left: 0.5rem;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.btn-ghost:hover {
  background: #eef1ed;
}

/* Selector de idioma ES / EN */
.lang {
  display: inline-flex;
  margin-left: 0.5rem;
  padding: 0.2rem;
  border-radius: 0.625rem;
  background: #e3e8e4;
}
.lang button {
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color 0.16s var(--ease),
    color 0.16s var(--ease);
}
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0 0.6rem;
  border-radius: 0.45rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.lang button:hover,
.lang a:hover {
  color: var(--ink);
}
.lang button[aria-pressed='true'],
.lang a[aria-current='page'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(21 32 26 / 0.16);
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  background: var(--tag);
  color: var(--ink);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3rem;
  align-items: end;
  padding-top: 4.5rem;
}
.hero-copy {
  padding-bottom: 5rem;
  align-self: center;
}
.hero h1 {
  margin: 0 0 1.4rem;
  font-weight: 800;
  font-size: clamp(2.6rem, 1.3rem + 5.2vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.hero h1 .hl {
  display: block;
  margin-top: 0.15em;
  color: var(--pine);
}
.lede {
  margin: 0 0 2rem;
  max-width: 44ch;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--tag-ink);
}
.hero-note {
  margin: 1.1rem 0 0;
  font-size: 0.9375rem;
  color: var(--tag-ink);
}
.hero-note a {
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.55rem 1.25rem 0.55rem 1rem;
  border-radius: 0.875rem;
  background: #0c1511;
  color: #fff;
  text-decoration: none;
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s var(--ease);
}
.store-btn:hover {
  transform: translateY(-2px);
  background: #000;
}
.store-btn small {
  display: block;
  font-size: 0.6875rem;
  opacity: 0.78;
  line-height: 1.1;
}
.store-btn strong {
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Teléfono: sube desde el borde de abajo del hero */
.phone {
  width: min(22rem, 100%);
  margin: 0 auto -3rem;
  border: 0.6rem solid #0c1511;
  border-bottom: 0;
  border-radius: 2.4rem 2.4rem 0 0;
  background: #0c1511;
  box-shadow: var(--shadow-pop);
}
.phone-screen {
  background: var(--surface);
  border-radius: 1.8rem 1.8rem 0 0;
  overflow: hidden;
  min-height: 27rem;
}
.phone-top {
  background: var(--pine);
  color: #fff;
  padding: 1.15rem 1.1rem 1rem;
}
.phone-top .title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.phone-top .sub {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--pine-100);
}
.live-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--tag);
}
.phone-body {
  padding: 0.35rem 0 1rem;
  background: var(--ground);
}
.section-label {
  margin: 0.8rem 1.1rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-2);
}
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background-color 0.4s var(--ease);
}
.row:last-child {
  border-bottom: 0;
}
.row .box {
  position: relative;
  flex-shrink: 0;
  width: 1.3rem;
  height: 1.3rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  transition:
    background-color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.row .box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E")
    center / 0.8rem no-repeat;
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.row .name {
  margin-right: auto;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 0 1.5px;
  transition:
    background-size 0.45s var(--ease),
    color 0.3s var(--ease);
}
.row.late {
  background: var(--tomato-soft);
  color: var(--tomato-ink);
}
.row.late .box {
  border-color: var(--tomato);
}
.row.done {
  color: #66736b;
}
.row.done .name,
.row.is-done .name {
  background-size: 100% 1.5px;
}
.row.done .box,
.row.is-done .box {
  background: var(--pine);
  border-color: var(--pine);
}
.row.done .box::after,
.row.is-done .box::after {
  opacity: 1;
  transform: none;
}
.row.is-done {
  color: #66736b;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
}
.chip.tag {
  background: var(--tag);
  color: var(--ink);
}
.chip.danger {
  background: var(--tomato);
  color: #fff;
}
.swap {
  display: inline-grid;
}
.swap > span {
  grid-area: 1 / 1;
  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease);
}
.swap-b {
  opacity: 0;
  transform: translateY(0.45em);
}
.is-done .swap-a {
  opacity: 0;
  transform: translateY(-0.45em);
}
.is-done .swap-b {
  opacity: 1;
  transform: none;
}

/* Entrada: una sola vez, al cargar */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
}
.hero-copy > * {
  animation: rise 0.7s var(--ease) both;
}
.hero-copy > *:nth-child(2) {
  animation-delay: 70ms;
}
.hero-copy > *:nth-child(3) {
  animation-delay: 140ms;
}
.hero-copy > *:nth-child(4) {
  animation-delay: 200ms;
}
.phone {
  animation: rise 0.9s 0.15s var(--ease) both;
}

/* ── Secciones ──────────────────────────────────────────────────────── */
.block {
  padding: 5.5rem 0;
}
.band {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: start;
}
.section-head {
  position: sticky;
  top: 6rem;
}
.section-head h2 {
  margin: 0 0 1rem;
  font-weight: 800;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.section-head p {
  margin: 0;
  max-width: 38ch;
  font-size: 1.125rem;
  color: var(--ink-2);
}

.features {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line-strong);
}
.feature {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line-strong);
}
.f-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--pine-50);
  color: var(--pine);
}
.f-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.feature p {
  margin: 0;
  max-width: 52ch;
  color: var(--ink-2);
}

/* Línea de tiempo del ejemplo */
.steps {
  position: relative;
  display: grid;
  gap: 2rem;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 1.25rem;
}
.step::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 1.45rem;
  bottom: -2.4rem;
  width: 2px;
  background: var(--line-strong);
}
.step:last-child::before {
  display: none;
}
.node {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.4rem;
  border: 3px solid var(--pine);
  border-radius: 50%;
  background: var(--surface);
  z-index: 1;
}
.step-late .node {
  border-color: var(--tomato);
  background: var(--tomato);
}
.step h3 {
  margin: 0 0 0.3rem;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.step p {
  margin: 0;
  max-width: 54ch;
  color: var(--ink-2);
}

/* ── Descarga ───────────────────────────────────────────────────────── */
.cta {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding: 3.5rem;
  border-radius: 1.75rem;
  background: var(--pine);
  color: #fff;
}
.cta h2 {
  margin: 0 0 0.9rem;
  font-weight: 800;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.045em;
}
.cta p {
  margin: 0;
  max-width: 42ch;
  font-size: 1.125rem;
  color: var(--pine-100);
}
.cta .store-buttons {
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 22rem);
  justify-self: end;
}
.cta .store-btn {
  border: 1px solid rgb(255 255 255 / 0.3);
}
.cta :focus-visible {
  outline-color: var(--tag);
}

/* ── Páginas legales ───────────────────────────────────────────────── */
.legal {
  padding: 3.5rem 0 4.5rem;
}
.legal-wrap {
  max-width: 46rem;
}
.legal-head h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.legal-date {
  margin: 0.75rem 0 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.legal-lede {
  margin: 1.5rem 0 0;
  font-size: 1.0625rem;
}
.legal a {
  color: var(--pine);
  text-underline-offset: 0.2em;
}
.legal-toc {
  margin: 2.5rem 0 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--surface);
}
.legal-toc h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.legal-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  columns: 2 14rem;
  column-gap: 2rem;
}
.legal-toc li {
  padding: 0.15rem 0;
  break-inside: avoid;
}
.legal-toc a {
  text-decoration: none;
}
.legal-toc a:hover {
  text-decoration: underline;
}
.legal section {
  padding-top: 1.5rem;
}
.legal section h2 {
  margin: 1rem 0 0.75rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.legal section h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.0625rem;
}
.legal p,
.legal li,
.legal dd {
  overflow-wrap: anywhere;
}
.legal ul {
  padding-left: 1.25rem;
}
.legal li + li {
  margin-top: 0.35rem;
}
.legal-list dt {
  margin-top: 1rem;
  font-weight: 700;
}
.legal-list dd {
  margin: 0.25rem 0 0;
  color: var(--ink-2);
}
.legal-list dd ul {
  margin: 0.5rem 0;
}
.legal code {
  padding: 0.05rem 0.3rem;
  border-radius: 0.3rem;
  background: var(--pine-50);
  font-size: 0.875em;
}
.legal-table {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
}
.legal-table table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.legal-table th,
.legal-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.legal-table th {
  background: var(--pine-50);
  font-family: var(--font-display);
}
.legal-table tr:last-child td {
  border-bottom: 0;
}

/* ── Pie ────────────────────────────────────────────────────────────── */
footer {
  padding: 0 0 3rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-strong);
}
footer a {
  text-decoration: none;
}
footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
  }
  .section-head {
    position: static;
  }
  .cta {
    grid-template-columns: minmax(0, 1fr);
    padding: 2.5rem 1.75rem;
  }
  .cta .store-buttons {
    flex-direction: row;
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding-top: 2.75rem;
  }
  .hero-copy {
    padding-bottom: 0;
  }
  .phone {
    margin-bottom: -6rem;
  }
  .nav-text {
    display: none;
  }
  .block {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .nav .wrap {
    gap: 0.5rem;
  }
  .brand span {
    display: none;
  }
  .btn-ghost {
    margin-left: auto;
    padding-inline: 0.9rem;
  }
  .lang {
    margin-left: 0;
  }
  .store-buttons {
    flex-direction: column;
  }
  .store-btn {
    justify-content: center;
  }
  .cta .store-buttons {
    flex-direction: column;
  }
}

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

/* ── Boletín ────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--pine);
  color: #fff;
}
.btn-primary:hover {
  background: var(--pine-press);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}
.newsletter {
  padding-top: 0;
}
.newsletter-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: center;
  padding-top: 3.5rem;
  border-top: 1px solid var(--line-strong);
}
.newsletter-grid .section-head {
  position: static;
}
.newsletter-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 0.9375rem;
}
.newsletter-row {
  display: flex;
  gap: 0.5rem;
}
.newsletter-row input {
  flex: 1;
  min-width: 0;
  min-height: 3rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.625rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  caret-color: var(--pine);
}
.newsletter-row input:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgb(29 91 69 / 0.2);
}
.newsletter-row .btn {
  min-height: 3rem;
}
.newsletter-msg {
  min-height: 1.5rem;
  margin: 0.6rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
}
.newsletter-msg[data-tone='ok'] {
  color: var(--pine);
}
.newsletter-msg[data-tone='error'] {
  color: var(--tomato);
}
@media (max-width: 960px) {
  .newsletter-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}
@media (max-width: 480px) {
  .newsletter-row {
    flex-direction: column;
  }
}
