/* mesa — the platform host: landing, características, contacto, the legal pages, sign-in and the
   error page. Builds on base.css (tokens and shared components: nothing here restyles them;
   the few scoped exceptions are marked). Design system "Azulejo", docs/DESIGN.md. */

/* 1. Landing: hero ------------------------------------------------------------ */
.hero { display: grid; gap: 40px; align-items: center; padding-block: 40px 48px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; padding-block: 64px 72px; }
}
.hero h1 { margin-bottom: 20px; max-width: 14ch; font-size: var(--fs-5); font-weight: 800; line-height: 1.08; }
.hero .lead { max-width: 38ch; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero-more { display: inline-flex; align-items: center; min-height: 48px; font-weight: 500; }
.hero-note { margin: 16px 0 0; font-size: var(--fs-sm); color: var(--muted); }

/* The tile wall and the demo booking card on it (inert: it only shows what a guest sees). The tiles
   are there from the first frame; the card is narrow enough to leave a frame of tiles around it
   (32px on a phone, 56px from 900px). Scoped exception: the pattern is centred so the frame is
   symmetric. */
.hero-wall { padding: 32px; min-height: 520px; background-position: center; }
@media (min-width: 900px) { .hero-wall { padding: 56px; } }
.hero-wall > .demo { max-width: 340px; }
.demo { pointer-events: none; user-select: none; }
.demo-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.demo-head strong { display: block; font-size: var(--fs-1); line-height: 1.2; }
.demo-sub { display: block; font-size: var(--fs-sm); color: var(--muted); }
.demo-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--cobalt);
  color: var(--on-cobalt);
  font-size: var(--fs-1);
  font-weight: 700;
}
.demo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 16px; }
.demo-row .label { margin: 0; }
.demo-field { margin-bottom: 16px; }
.demo-field .label { margin: 0 0 8px; }
.demo-times { display: grid; grid-template-columns: repeat(2, max-content); } /* the four times as two rows of two, at every card width */

/* The only page-load motion on the site (docs/DESIGN.md §2): the demo card fades in over the tiles
   once, 400ms, CSS only. The wall itself never animates, so frame 0 already shows the tiles. */
@media (prefers-reduced-motion: no-preference) {
  .hero-wall > .demo { animation: demo-in 400ms ease-out both; }
}
@keyframes demo-in { from { opacity: 0; } to { opacity: 1; } }

/* 2. Landing: how it works (a sequence, so a numbered list) ------------------------ */
.steps { display: grid; gap: 32px; margin: 8px 0 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.steps li { margin: 0; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: var(--r-pill);
  background: var(--cobalt-soft);
  color: var(--cobalt);
  font-size: var(--fs-1);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; color: var(--ink-soft); }

/* With or without a website: two short paragraphs side by side */
.two-ways { display: grid; gap: 24px; }
@media (min-width: 760px) { .two-ways { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; } }
.two-ways p { margin: 0; font-size: var(--fs-1); line-height: 1.5; }

/* 3. Definition lists: "Lo que decides tú" and the features page ------------------- */
.controls { display: grid; gap: 0 48px; margin: 0; }
@media (min-width: 760px) { .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.controls > div { min-width: 0; padding: 16px 0; border-top: 1px solid var(--line); }
.controls dt { margin-bottom: 4px; font-weight: 700; }
.controls dd { max-width: var(--measure); color: var(--ink-soft); }

/* 4. Landing: plans (Básico first and largest) --------------------------------------- */
.plans { display: grid; gap: 24px; margin-top: 32px; }
@media (min-width: 760px) {
  .plans { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.plan {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
.plan-free { border: 2px solid var(--cobalt); }
@media (min-width: 760px) { .plan-free { padding: 32px; } }
.plan h3 { margin-bottom: 4px; }
.plan .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 0 16px; }
.plan .price .num { font-size: var(--fs-3); line-height: 1.1; }
.plan-free .price .num { font-size: var(--fs-4); }
.plan .price small { color: var(--muted); }
.plan ul { flex: 1 1 auto; margin: 0 0 24px; padding-left: 1.2em; }
.plan li { margin: 0 0 8px; }
/* Scoped exception: "Empezar gratis y mejorar después" does not fit one line in a phone-wide panel */
.plan .btn { height: auto; padding-block: 10px; white-space: normal; }
.plans-note { margin: 16px 0 0; color: var(--ink-soft); }

/* 5. Landing: questions ------------------------------------------------------------ */
.faq { max-width: var(--measure); padding: 8px 0; border-top: 1px solid var(--line); }
.faq:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { padding: 12px 0; font-size: var(--fs-1); }
.faq p { margin: 0 0 12px; color: var(--ink-soft); }

/* 6. Landing: the final band (the one centred block); the tile row stands apart below it ------ */
.band {
  margin-top: 24px;
  padding: 56px var(--gutter);
  text-align: center;
  background: var(--cobalt-soft);
  border-radius: var(--r-panel);
}
.band h2 { margin-bottom: 24px; font-size: var(--fs-4); }
.band p { max-width: none; margin: 0 auto; }
.band-contact { margin-top: 24px; color: var(--ink-soft); }
.band + .tiles-row { margin-top: 48px; }

/* 7. Características, contacto, legal ------------------------------------------------- */
.page-head { padding-block: 40px 8px; }
.page-head h1 { margin-bottom: 16px; }
.feature-group { padding-block: 24px 16px; }
.feature-group h2 { margin-bottom: 8px; }
.page-end { padding-block: 40px 56px; }

.contact { max-width: var(--measure); padding-block: 40px 56px; }
/* The address is the page: as big as fits on one line of a phone (--fs-3 breaks "mesamanager" at 360) */
.contact-mail { margin: 0 0 24px; font-size: var(--fs-2); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
@media (min-width: 480px) { .contact-mail { font-size: var(--fs-3); } }
.contact-mail a { text-decoration-thickness: 2px; }
.contact h2 { margin-top: 48px; font-size: var(--fs-2); }

.legal { max-width: var(--measure); padding-block: 40px 56px; }
.legal h2 { margin-top: 40px; font-size: var(--fs-2); }

.identity { display: grid; gap: 8px; margin: 0 0 1em; }
.identity > div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 2px 16px; }
.identity dt { font-weight: 500; color: var(--ink-soft); }
.identity dd { overflow-wrap: anywhere; }
@media (max-width: 479px) { .identity > div { grid-template-columns: minmax(0, 1fr); } }

@media (min-width: 760px) {
  .page-head, .contact, .legal { padding-block: 64px 24px; }
  .contact, .legal { padding-bottom: 80px; }
  .page-end { padding-block: 48px 80px; }
}

/* 8. Sign-in pages: the form panel, the tile panel ---------------------------------- */
.auth { display: grid; gap: 32px; padding-block: 32px 48px; }
@media (min-width: 900px) {
  .auth { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 48px; align-items: stretch; padding-block: 48px 64px; }
}
.auth-form {
  width: 100%;
  max-width: 460px;
  min-width: 0;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}
@media (min-width: 600px) { .auth-form { padding: 32px; } }
.auth-form h1 { margin-bottom: 16px; font-size: var(--fs-3); }
.auth-lead { margin: -8px 0 20px; color: var(--ink-soft); }
.auth-form form { margin: 0; }
.auth-form .btn-block { margin-top: 8px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 20px; }
.auth-links span { color: var(--ink-soft); }
.auth-side { display: none; }
@media (min-width: 900px) {
  .auth-side { display: grid; place-items: center; padding: 48px 32px; border: 1px solid var(--line); border-radius: var(--r-panel); }
}
.auth-plate { max-width: 300px; padding: 24px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.auth-plate p { margin: 12px 0 0; color: var(--ink-soft); }

/* 9. Error page ------------------------------------------------------------------- */
.error-page { padding-block: 48px 64px; }
.error-page .wordmark { margin-bottom: 32px; }
.error-code { margin: 0 0 8px; font-size: var(--fs-4); line-height: 1; color: var(--muted); }
.error-page h1 { font-size: var(--fs-3); }
