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

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

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.top.is-scrolled {
  border-bottom-color: var(--sage-line);
}

.top__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sage);
  font: 24px/1 var(--f-display);
  text-decoration: none;
}

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

.brand--small {
  font-size: 18px;
}

.top__nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.top__nav a,
.top__login {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.top__nav a:hover,
.top__login:hover {
  color: var(--clay-ink);
}

.top__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top__actions[hidden] {
  display: none;
}

@media (max-width: 820px) {
  .top__nav {
    display: none;
  }
  .top__actions {
    margin-left: auto;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 88px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin: 22px 0 22px;
  font-size: clamp(42px, 6.4vw, 76px);
}

.scribble {
  position: relative;
  color: var(--clay-ink);
  white-space: nowrap;
}

.scribble svg {
  position: absolute;
  left: -2%;
  bottom: -0.12em;
  width: 104%;
  height: 0.28em;
  overflow: visible;
}

.scribble path {
  fill: none;
  stroke: var(--clay);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: draw 0.9s 0.4s var(--ease) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.hero__lead {
  max-width: 34em;
  font-size: 19px;
  color: #46523f;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__fine {
  margin-top: 18px;
  font-size: 14px;
  color: var(--sage-2);
}

/* ---------- Demo ---------- */

.demo {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.demo__card {
  position: relative;
  padding: 18px 18px 14px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 27px, var(--sage-line) 27px 28px) 0 96px / 100% calc(100% - 96px) no-repeat,
    var(--card);
  border: var(--stroke);
  border-radius: 6px;
  box-shadow: var(--shadow-paper);
  transform: rotate(-1.2deg);
}

/* Línea de margen como en una ficha de recetas */
.demo__card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30px;
  border-left: 1.5px solid var(--clay-soft);
  pointer-events: none;
}

.demo__label {
  display: block;
  padding-left: 22px;
  font: 14px/1.2 var(--f-display);
  color: var(--sage);
}

.demo__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 12px 22px;
}

.chip {
  min-height: 32px;
  padding: 0 11px;
  border: 1.5px solid var(--sage-3);
  border-radius: 999px;
  background: var(--card);
  color: var(--sage-2);
  font: 600 13px/1 var(--f-body);
  cursor: pointer;
  transition: all 0.15s;
}

.chip.is-on {
  border-color: var(--sage);
  background: var(--sage);
  color: var(--card);
}

.demo__text {
  display: block;
  width: 100%;
  min-height: 336px;
  padding: 2px 0 0 22px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 15px/28px var(--f-body);
  resize: none;
}

.demo__text:focus {
  outline: none;
}

.demo__hint {
  padding-left: 22px;
  font-size: 12.5px;
  color: var(--sage-2);
}

.demo__arrow {
  position: absolute;
  left: calc(50% - 30px);
  top: -34px;
  width: 60px;
  transform: rotate(-70deg);
  pointer-events: none;
}

.demo__arrow path {
  fill: none;
  stroke: var(--clay);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo__ticket {
  margin-top: 26px;
  transform: rotate(1.4deg);
  font-size: 14px;
}

.demo__ticket .ticket__row {
  animation: print 0.35s var(--ease) both;
}

.demo__ticket .qty {
  white-space: nowrap;
  font-weight: 700;
}

.demo__ticket .tag {
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--clay-soft);
  color: var(--clay-ink);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.demo__total {
  font-size: 13px;
  color: var(--sage);
}

@keyframes print {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 32px 0 56px;
  }
  .demo {
    grid-template-columns: 1fr;
  }
  .demo__text {
    min-height: 240px;
  }
  .demo__arrow {
    display: none;
  }
  .demo__ticket {
    margin-top: 0;
  }
}

/* ---------- Datos ---------- */

.waste {
  padding: 88px 0;
  background: var(--sage);
  color: var(--card);
}

.waste h2 {
  color: var(--card);
  font-size: clamp(32px, 4.4vw, 50px);
}

.waste__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
}

.waste__intro p {
  color: #e3e8da;
  font-size: 18px;
}

.waste__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 56px 0 28px;
  border-top: 1.5px dashed rgba(255, 253, 248, 0.4);
}

.fact {
  margin: 0;
  padding: 28px 28px 8px 0;
}

.fact + .fact {
  padding-left: 28px;
  border-left: 1.5px dashed rgba(255, 253, 248, 0.4);
}

.fact__num {
  font: clamp(54px, 7vw, 92px) / 1 var(--f-display);
  color: var(--clay);
}

.fact__num span {
  margin-left: 6px;
  font: 700 18px/1 var(--f-mono);
  color: var(--clay-soft);
  letter-spacing: 0.04em;
}

.fact figcaption {
  margin-top: 14px;
  max-width: 22em;
  color: #eef1e8;
}

.source {
  font: 13px/1.5 var(--f-mono);
  color: #c9d1bf;
}

.source a {
  color: var(--card);
}

@media (max-width: 820px) {
  .waste__intro,
  .waste__grid {
    grid-template-columns: 1fr;
  }
  .fact + .fact {
    padding-left: 0;
    border-left: 0;
    border-top: 1.5px dashed rgba(255, 253, 248, 0.4);
  }
}

/* ---------- Cómo funciona ---------- */

.how {
  padding: 104px 0;
}

.how__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: start;
}

.how__recipe {
  position: sticky;
  top: 100px;
  padding: 30px;
  background: var(--card);
  border: var(--stroke);
  border-radius: 6px;
  box-shadow: var(--shadow-paper);
}

.how__recipe h2 {
  margin: 16px 0 18px;
  font-size: clamp(32px, 3.6vw, 44px);
}

.how__meta {
  display: flex;
  gap: 0;
  margin: 0 0 22px;
  border-block: 1.5px dashed var(--sage-3);
}

.how__meta div {
  flex: 1;
  padding: 10px 0;
}

.how__meta div + div {
  padding-left: 14px;
  border-left: 1.5px dashed var(--sage-3);
}

.how__meta dt {
  font: 700 11px/1.2 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-2);
}

.how__meta dd {
  margin: 4px 0 0;
  font: 18px/1.2 var(--f-display);
  color: var(--sage);
}

.how__sub {
  font-size: 20px;
  margin-bottom: 8px;
}

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

.how__ingredients li {
  padding: 8px 0 8px 26px;
  border-bottom: 1px solid var(--sage-line);
  background: radial-gradient(circle at 7px 50%, var(--clay) 0 4px, transparent 4.5px) no-repeat;
}

.how__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how__steps li {
  position: relative;
  padding: 0 0 48px 96px;
  counter-increment: step;
}

.how__steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -6px;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: var(--stroke);
  border-radius: 50%;
  font: 34px/1 var(--f-display);
  color: var(--sage);
  background: var(--clay-soft);
}

.how__steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 34px;
  top: 70px;
  bottom: 8px;
  border-left: 1.5px dashed var(--sage-3);
}

.how__steps h3 {
  margin-bottom: 10px;
  font-size: clamp(24px, 2.6vw, 30px);
}

.how__steps p {
  max-width: 36em;
  color: #46523f;
}

@media (max-width: 900px) {
  .how__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .how__recipe {
    position: static;
  }
  .how__steps li {
    padding-left: 76px;
  }
  .how__steps li::before {
    width: 54px;
    height: 54px;
    font-size: 26px;
  }
  .how__steps li:not(:last-child)::after {
    left: 27px;
    top: 56px;
  }
}

/* ---------- Funciones ---------- */

.features {
  padding: 96px 0 40px;
  background: var(--paper-deep);
}

.section-title {
  max-width: 16em;
  font-size: clamp(34px, 4.4vw, 54px);
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1.5px dashed var(--sage-3);
}

.feature:last-child {
  border-bottom: 0;
}

.feature--flip .feature__copy {
  order: 2;
}

.feature__copy h3 {
  margin: 14px 0 14px;
  font-size: clamp(28px, 3vw, 38px);
}

.feature__copy p {
  max-width: 32em;
  color: #46523f;
}

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

.mini-ticket {
  width: min(360px, 100%);
  transform: rotate(-1deg);
}

.mini-ticket .is-muted {
  color: var(--sage-2);
}

.budget {
  height: 10px;
  margin-top: 12px;
  border: 1.5px solid var(--sage);
  border-radius: 999px;
  overflow: hidden;
}

.budget span {
  display: block;
  height: 100%;
  background: var(--clay);
}

.budget__label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--sage-2);
}

.habit-card {
  width: min(380px, 100%);
  margin: 0;
  padding: 8px 22px;
  list-style: none;
  background: var(--card);
  border: var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
}

.habit-card li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 14px 0;
}

.habit-card li + li {
  border-top: 1px solid var(--sage-line);
}

.habit-card__name {
  font-weight: 600;
}

.habit-card__when {
  font: 13px/1.6 var(--f-mono);
  color: var(--sage-2);
}

.gauge {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: var(--sage-line);
  overflow: hidden;
}

.gauge span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--clay-ink);
}

.week {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(420px, 100%);
}

.week__day {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 100px;
  padding: 12px;
  background: var(--card);
  border: var(--stroke);
  border-radius: 10px;
}

.week__day b {
  font: 700 12px/1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-2);
}

.meal {
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--sage-line);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
}

.meal--clay {
  background: var(--clay-soft);
}

.week__day--cta {
  place-content: center;
  background: var(--sage);
  color: var(--card);
  font: 700 14px/1.2 var(--f-mono);
  text-align: center;
}

.family {
  width: min(420px, 100%);
  padding: 6px 20px;
  background: var(--card);
  border: var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
}

.family__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  font-size: 15px;
}

.family__row + .family__row {
  border-top: 1px solid var(--sage-line);
}

.family__row s {
  text-decoration-color: var(--clay-ink);
  text-decoration-thickness: 2px;
}

.family__row time {
  font: 12px/1 var(--f-mono);
  color: var(--sage-2);
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: var(--stroke);
  border-radius: 50%;
  background: var(--clay-soft);
  color: var(--sage);
  font: 16px/1 var(--f-display);
}

.avatar--sage {
  background: var(--sage-line);
}

.avatar--butter {
  background: var(--butter);
}

@media (max-width: 860px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0;
  }
  .feature--flip .feature__copy {
    order: 0;
  }
}

/* ---------- Precios ---------- */

.pricing {
  padding: 104px 0;
}

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

.pricing__lead {
  max-width: 34em;
  margin: 16px auto 0;
  text-align: center;
  color: #46523f;
}

.cycle {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 32px auto 44px;
  padding: 4px;
  border: var(--stroke);
  border-radius: 999px;
  background: var(--card);
}

.cycle__btn {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sage);
  font: 600 15px/1 var(--f-body);
  cursor: pointer;
}

.cycle__btn em {
  margin-left: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--clay-ink);
}

.cycle__btn.is-on {
  background: var(--sage);
  color: var(--card);
}

.cycle__btn.is-on em {
  color: var(--clay-soft);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}

.plan {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.plan:nth-child(1) {
  transform: rotate(-0.8deg);
}

.plan:nth-child(2) {
  transform: translateY(-14px);
}

.plan:nth-child(3) {
  transform: rotate(0.8deg);
}

.plan--featured {
  background: #fff8ef;
}

.plan__name {
  font: 30px/1 var(--f-display);
  color: var(--sage);
  text-align: center;
}

.plan__tag {
  margin-top: 8px;
  font-family: var(--f-body);
  font-size: 15px;
  text-align: center;
  color: var(--sage-2);
}

.plan__price {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  margin: 8px 0 2px;
  color: var(--ink);
}

.plan__price strong {
  font: 52px/1 var(--f-display);
  font-weight: 400;
}

.plan__price span {
  font-size: 14px;
  color: var(--sage-2);
}

.plan__note {
  min-height: 1.5em;
  font-size: 13px;
  text-align: center;
  color: var(--clay-ink);
}

.plan ul {
  flex: 1;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-family: var(--f-body);
  font-size: 15px;
}

.plan li {
  position: relative;
  padding: 7px 0 7px 26px;
}

.plan li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 13px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--clay-ink);
  border-bottom: 2px solid var(--clay-ink);
  transform: rotate(-45deg);
}

.plan .stamp {
  position: absolute;
  top: 16px;
  right: 14px;
  font-size: 10px;
  transform: rotate(6deg);
}

.pricing__fine {
  max-width: 50em;
  margin: 40px auto 0;
  font-size: 14px;
  text-align: center;
  color: var(--sage-2);
}

@media (max-width: 900px) {
  .plans {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }
  .plan:nth-child(n) {
    transform: none;
  }
}

/* ---------- Preguntas ---------- */

.faq {
  padding: 96px 0;
  border-top: 1.5px dashed var(--sage-3);
}

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 56px;
}

.faq h2 {
  font-size: clamp(34px, 4vw, 48px);
}

.faq details {
  border-bottom: 1.5px solid var(--sage-line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font: 21px/1.3 var(--f-display);
  color: var(--sage);
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: var(--stroke);
  border-radius: 50%;
  font: 20px/1 var(--f-body);
  transition: transform 0.2s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
  background: var(--clay-soft);
}

.faq details p {
  max-width: 40em;
  padding: 0 0 22px;
  color: #46523f;
}

@media (max-width: 860px) {
  .faq__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ---------- Cierre ---------- */

.closing {
  padding: 40px 0 96px;
}

.closing__inner {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 40px 48px;
  background: var(--card);
  border: var(--stroke);
  border-radius: 20px;
}

.closing img {
  flex: none;
  width: 200px;
  height: 200px;
  border-radius: 16px;
}

.closing h2 {
  font-size: clamp(30px, 3.6vw, 44px);
}

.closing p {
  margin: 12px 0 24px;
  color: #46523f;
}

@media (max-width: 700px) {
  .closing__inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 22px;
    gap: 16px;
  }
  .closing img {
    width: 150px;
    height: 150px;
  }
}

.foot {
  padding: 32px 0 40px;
  border-top: 1.5px solid var(--sage-line);
  font-size: 14px;
  color: var(--sage-2);
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

.foot__sources {
  margin-left: auto;
}

.foot a {
  color: var(--sage);
}
