/* =====================================================================
   barberos.do — landing pública ("/")
   Standalone: no usa app.css (sus estilos globales de formulario y layout
   son del panel). Tokens tomados del panel para que sea la misma familia.
   ===================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --ink: #0A0A0B;
  --graphite: #131315;
  --graphite-2: #1B1B1E;
  --line: #27272A;
  --line-strong: #38383C;

  --text: #F2F0EC;
  --text-dim: #A8A49D;
  --text-faint: #8A867F;

  --gold: #D6BA8A;
  --gold-deep: #B89968;
  --gold-wash: rgba(214, 186, 138, 0.1);
  --on-gold: #0A0A0B;

  --success: #6FB88A;
  --danger: #E0927D;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;

  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(88px, 14vw, 168px);
  --radius: 14px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) var(--ink);
  scroll-padding-top: 24px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--on-gold); }
input, button, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), 1180px); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Tipografía ---------- */

.display, h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 87.5%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.65rem, 9.4vw, 4.9rem); line-height: 0.96; }
h2 { font-size: clamp(2.1rem, 6.4vw, 3.6rem); }
h3 { font-size: clamp(1.5rem, 3.6vw, 2rem); font-weight: 750; }
h1 em, h2 em { font-style: normal; color: var(--gold); }
.hero h1 em { display: block; }

.lead { font-size: clamp(1.06rem, 2.4vw, 1.25rem); color: var(--text-dim); max-width: 34em; margin: 0; text-wrap: pretty; }
.section-head { max-width: 44rem; margin-bottom: clamp(40px, 7vw, 72px); }
.section-head .lead { margin-top: 18px; }

.wordmark {
  font-family: var(--display); font-stretch: 87.5%; font-weight: 800;
  font-size: 22px; letter-spacing: -0.02em; text-decoration: none; color: var(--text);
}
.wordmark span { color: var(--gold); }
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { display: block; width: auto; }
select.field { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A8A49D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }

/* ---------- Botones y enlaces ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  background: var(--gold); color: var(--on-gold);
  border: 0; border-radius: 12px;
  font-family: var(--body); font-weight: 650; font-size: 16px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  touch-action: manipulation; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
/* Botones a ancho completo: el texto puede partirse en vez de desbordar en pantallas angostas. */
.price-card .btn, .form-card .btn, .thanks .btn { white-space: normal; text-align: center; padding-block: 12px; line-height: 1.25; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #E2C99C; }
  .btn-ghost:hover { background: var(--graphite-2); }
}

.text-link { color: var(--text-dim); text-decoration: underline; text-decoration-color: var(--line-strong); }
@media (hover: hover) and (pointer: fine) { .text-link:hover { color: var(--text); text-decoration-color: var(--gold); } }

/* ---------- Barra superior ---------- */

.topbar { padding-top: max(18px, env(safe-area-inset-top)); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.topbar nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.topbar .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }
.topbar .btn-desktop { display: none; }
@media (min-width: 760px) { .topbar .btn-desktop { display: inline-flex; } }

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

.hero { padding-block: clamp(36px, 7vw, 88px) clamp(64px, 10vw, 120px); }
.hero .wrap { display: grid; gap: clamp(48px, 8vw, 64px); align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; } }

.hero h1 { max-width: 13ch; }
.hero .lead { margin-top: 24px; }

.claim-form { margin-top: clamp(32px, 5vw, 44px); max-width: 30rem; }
.claim-form label { display: block; font-size: 15px; color: var(--text-dim); margin-bottom: 10px; }
.claim-row { display: grid; gap: 10px; }
@media (min-width: 520px) { .claim-row { grid-template-columns: minmax(0, 1fr) auto; } }
.claim-note { margin: 14px 0 0; font-size: 14px; color: var(--text-faint); }
.claim-note a { color: var(--text-dim); }

.field {
  width: 100%; min-height: 52px; padding: 0 16px;
  background: var(--graphite); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 12px;
  font-size: 16px; /* 16px evita el zoom de iOS al enfocar */
  caret-color: var(--gold);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.field::placeholder { color: var(--text-faint); }
.field:focus { outline: none; border-color: var(--gold); background: var(--graphite-2); }
.field[aria-invalid="true"] { border-color: var(--danger); }

/* ---------- Teléfono (vista de reserva en vivo) ---------- */

.phone-stage { display: grid; justify-items: center; gap: 16px; }
.phone {
  position: relative;
  width: min(300px, 82vw);
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(160deg, #26262A, #141416 60%);
  box-shadow:
    inset 0 0 0 1px #3A3A3F,
    0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 48px -28px rgba(0, 0, 0, 0.7);
}
@media (min-width: 960px) {
  .phone { width: 320px; transform: rotate(2.2deg); }
}
.phone-screen {
  position: relative; overflow: hidden;
  border-radius: 36px; background: var(--ink);
  aspect-ratio: 390 / 844;
  container-type: inline-size;
}
/* Teléfonos muy angostos (~320px): la mini reserva omite "Tus datos" para no desbordar la pantalla. */
@container (max-width: 260px) { .bk-optional { display: none; } .phone-screen .bk { gap: 7px; padding-top: 42px; } }
.phone-screen::before { /* isla */
  content: ""; position: absolute; top: 10px; left: 50%; translate: -50% 0;
  width: 86px; height: 24px; border-radius: 99px; background: #000; z-index: 2;
}
.phone-caption { font-size: 13px; color: var(--text-faint); margin: 0; text-align: center; }

/* Mini página de reserva: misma gramática que /reservar/{slug} */
.bk { position: absolute; inset: 0; padding: 48px 16px 18px; display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.bk > * { flex-shrink: 0; } /* si falta alto, que se note en la medición, no que se aplaste */
.bk-url {
  align-self: center; max-width: 100%;
  padding: 4px 10px; border-radius: 99px; background: var(--graphite-2);
  color: var(--text-faint); font-size: 10.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bk-name { font-family: var(--display); font-stretch: 87.5%; font-weight: 800; font-size: 21px; letter-spacing: -0.01em; line-height: 1.05; margin: 4px 0 0; overflow-wrap: anywhere; }
.bk-sub { color: var(--text-dim); margin: -6px 0 0; font-size: 11.5px; }
.bk-label { color: var(--text-faint); font-size: 10.5px; margin: 0 0 -6px; }
.bk-list { display: grid; gap: 6px; }
.bk-svc {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: 10px;
  background: var(--graphite-2); border: 1px solid var(--line);
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out), color 240ms var(--ease-out);
}
.bk-svc b { font-weight: 600; }
.bk-svc span { color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; transition: color 240ms var(--ease-out); }
.bk-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.bk-day {
  display: grid; justify-items: center; padding: 6px 0; border-radius: 9px;
  border: 1px solid var(--line); color: var(--text-dim); font-size: 10px; line-height: 1.2;
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out), color 240ms var(--ease-out);
}
.bk-day b { font-size: 14px; color: var(--text); font-weight: 650; transition: color 240ms var(--ease-out); }
.bk-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.bk-time {
  padding: 7px 0; text-align: center; border-radius: 8px;
  background: var(--graphite-2); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums; font-size: 11px;
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out), color 240ms var(--ease-out);
}
.bk-time.is-taken { color: var(--text-faint); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.bk-input {
  padding: 8px 10px; border-radius: 8px; background: var(--graphite-2); border: 1px solid var(--line);
  color: var(--text-faint); font-size: 11px;
}
.bk-confirm {
  margin-top: auto; padding: 11px; border-radius: 10px; text-align: center;
  background: var(--gold); color: var(--on-gold); font-weight: 700; font-size: 12.5px;
  opacity: 0.4; transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
.bk-svc.is-on, .bk-time.is-on { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.bk-svc.is-on span { color: var(--on-gold); }
.bk-day.is-on { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.bk-day.is-on b { color: var(--on-gold); }
.bk-confirm.is-on { opacity: 1; }

/* ---------- Funcionalidades ---------- */

.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.rule { border-top: 1px solid var(--line); }

.features {
  display: grid; grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}
.feature { padding: 32px 0; border-bottom: 1px solid var(--line); display: grid; align-content: start; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 16px; }
.feature svg { width: 26px; height: 26px; color: var(--gold); grid-row: span 2; margin-top: 2px; }
.feature h3 { font-size: 21px; font-weight: 750; letter-spacing: 0; line-height: 1.15; }
.feature p { margin: 6px 0 0; color: var(--text-dim); font-size: 16px; max-width: 32em; }
@media (min-width: 680px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid var(--line); }
  .feature { padding: 36px 32px; border-right: 1px solid var(--line); grid-template-columns: 1fr; gap: 0; }
  .feature svg { grid-row: auto; margin: 0 0 22px; }
}
@media (min-width: 1040px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature { padding: 44px 36px; }
}

/* ---------- Capturas alternadas ---------- */

.showcase { display: grid; gap: clamp(72px, 12vw, 136px); }
.show { display: grid; gap: 36px; align-items: center; }
@media (min-width: 860px) {
  .show { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
  .show:nth-child(even) .show-media { order: 2; }
}
.show-media { display: grid; justify-items: center; }
.show-media .phone { width: min(280px, 74vw); transform: none; }
.show-text h3 { max-width: 18ch; }
.show-text p { margin: 18px 0 0; color: var(--text-dim); max-width: 30em; }
.show-text ul { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; color: var(--text); font-size: 16px; }
.show-text li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; }
.show-text li svg { width: 18px; height: 18px; color: var(--gold); margin-top: 3px; }

/* La pantalla ya tiene la proporción de la captura (style inline desde el controlador),
   así que contain no deja franjas; si algo no cuadra, se ve entera en vez de recortarse. */
.shot { width: 100%; height: 100%; object-fit: contain; object-position: center top; }
/* Con captura real no se dibuja la isla: taparía la cabecera de la app. */
.phone-screen.has-shot::before { display: none; }
.shot-placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; padding: 24px;
  text-align: center; color: var(--text-faint); font-size: 13px;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255, 255, 255, 0.018) 14px 15px),
    var(--graphite);
  outline: 1.5px dashed var(--line-strong); outline-offset: -14px; border-radius: 36px;
}
.shot-placeholder strong { color: var(--text-dim); font-weight: 600; font-size: 14px; letter-spacing: 0.01em; }

/* ---------- Precio ---------- */

.pricing { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .pricing { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } }
.price-card {
  border: 1px solid var(--line-strong); border-radius: 22px;
  padding: clamp(28px, 5vw, 44px);
  background: linear-gradient(180deg, var(--graphite), var(--ink));
}
.price-plan { font-family: var(--display); font-stretch: 87.5%; font-weight: 800; font-size: 18px; color: var(--text-dim); margin: 0; letter-spacing: 0; }
.price-amount { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 0; flex-wrap: wrap; }
.price-amount strong {
  font-family: var(--display); font-stretch: 87.5%; font-weight: 900;
  font-size: clamp(3.6rem, 13vw, 5.4rem); line-height: 0.9; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; color: var(--gold);
}
.price-amount span { color: var(--text-dim); font-size: 18px; }
.price-setup { margin: 16px 0 0; color: var(--text); font-size: 17px; font-variant-numeric: tabular-nums; }
.price-features { list-style: none; margin: 28px 0; padding: 26px 0 0; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.price-features li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: start; font-size: 16px; }
.price-features svg { width: 18px; height: 18px; color: var(--gold); margin-top: 3px; }
.price-features li.is-upcoming { color: var(--text-dim); }
.price-features li.is-upcoming svg { color: var(--text-faint); }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--graphite-2); color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--line-strong); white-space: nowrap; }
.price-card .btn { width: 100%; }
.price-foot { margin: 14px 0 0; font-size: 14px; color: var(--text-faint); text-align: center; }

/* ---------- Registro ---------- */

.signup { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .signup { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; } }
.signup-steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 18px; counter-reset: step; }
.signup-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; color: var(--text-dim); counter-increment: step; }
.signup-steps li::before {
  content: counter(step); width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--gold); font-weight: 650; font-size: 14px; font-variant-numeric: tabular-nums;
}
.signup-steps strong { color: var(--text); font-weight: 600; display: block; }

.form-card { border: 1px solid var(--line-strong); border-radius: 22px; padding: clamp(24px, 5vw, 40px); background: var(--graphite); }
.form-card .row { margin-bottom: 18px; }
.form-card label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.form-card label small { color: var(--text-faint); font-weight: 400; font-size: 14px; }
.form-card .field { background: var(--ink); }
.form-card .btn { width: 100%; margin-top: 6px; }
.error { color: var(--danger); font-size: 14px; margin: 8px 0 0; }
.form-legal { font-size: 13px; color: var(--text-faint); margin: 14px 0 0; text-align: center; }

.thanks { display: grid; gap: 18px; justify-items: start; }
.thanks-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); }
.thanks-icon svg { width: 26px; height: 26px; }
.thanks h3 { font-size: clamp(1.7rem, 4.6vw, 2.2rem); }
.thanks p { margin: 0; color: var(--text-dim); }
.thanks .btn { width: 100%; }
.thanks .btn svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); padding-block: 48px max(40px, env(safe-area-inset-bottom)); }
.footer .wrap { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.footer p { margin: 8px 0 0; color: var(--text-faint); font-size: 14px; }
.footer .credit { margin-top: 4px; font-size: 12px; } /* crédito en texto plano, sin enlace */
.footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 15px; }

/* Sin animación de entrada: el teléfono está visible desde el primer frame y el único
   momento animado es la secuencia de la reserva de ejemplo (.bk-*.is-on). */
