/* Identidad BackApps: papel crema, tinta casi negra y un verde bosque. */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
:root {
  --paper: #f2e9dc;
  --surface: #fbf7f0;
  --ink: #1d201e;
  --muted: #5d5a53;
  --line: #ddd2c2;
  --deep: #1d201e;
  --petrol: #3c5e48;
  --petrol-soft: #a9bfae;
  --amber: #3c5e48;
  --amber-soft: #cfd9cf;
  --amber-ink: #3c5e48;
  --sand: #cdc3b3;
  --ok: #1d7a4c;
  --danger: #b3261e;
  --radius: 6px;
  --font: Manrope, 'Segoe UI', Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  --wrap: 72rem;
}

* { box-sizing: border-box; }
html { font-size: 106.25%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.5; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: var(--petrol); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 0.75rem; z-index: 2; }

/* ---------- Cabecera y entrada ---------- */
.top { background: var(--deep); color: #fff; }
.top a { color: #fff; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 700; text-decoration: none; }
.brand-mark {
  width: 1.7rem; height: 1.1rem; flex: none;
  background: radial-gradient(circle at 0.42rem 50%, var(--deep) 0.13rem, transparent 0.15rem), var(--amber);
  clip-path: polygon(0.45rem 0, 100% 0, 100% 100%, 0.45rem 100%, 0 50%);
}
.menu { display: flex; gap: 0.25rem 1.5rem; flex-wrap: wrap; }
.menu a { text-decoration: none; color: #dbe8ea; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current='page'] { color: #fff; border-bottom-color: var(--amber); }

.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; align-items: center; padding-top: 3rem; padding-bottom: 4.5rem; }
.hero h1 { font-size: clamp(2.1rem, 4.7vw, 3.35rem); line-height: 1.06; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
.lede { margin-top: 1.25rem; font-size: 1.2rem; line-height: 1.45; color: #dbe8ea; max-width: 34rem; }
.hero-plain { grid-template-columns: minmax(0, 1fr); }
.hero-plain h1 { max-width: 46rem; }
.hero-about { padding-bottom: 3.5rem; }
.portrait { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 70% 40%; border-radius: 2.25rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28); }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin-top: 0.5rem; max-width: 42rem; }
.legal-date { margin-top: 2.5rem !important; color: var(--muted); font-size: 0.925rem; }
.about p + p { margin-top: 0.75rem; }
.cta { display: flex; align-items: center; gap: 0.9rem 1.5rem; flex-wrap: wrap; margin-top: 2rem; }

.btn {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: 0.75rem 1.25rem; border-radius: var(--radius); border: 2px solid transparent;
}
.btn-amber { background: var(--petrol); color: #fff; }
.btn-amber:hover { background: #2f4b39; }
.btn-petrol { background: var(--petrol); color: #fff; }
.btn-petrol:hover { background: #2f4b39; }
.top .btn-amber { color: #fff; }

/* ---------- La hoja de la entrada: cuenta de horas o venta repartida ---------- */
.slip { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.35rem; border-top: 5px solid var(--amber); }
.slip h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.slip-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; }
.slip-row label { flex: 1; }
.slip-row + .slip-row { border-top: 1px solid var(--line); }
.field { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.field input[type='number'] {
  font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink);
  width: 5.2rem; padding: 0.4rem 0.5rem; border: 1px solid #b3a793; border-radius: var(--radius); background: var(--paper);
}
.slip-result { margin-top: 1rem; padding-top: 1rem; border-top: 2px dashed var(--line); }
.slip-big { font-size: 1.75rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.slip-note { margin-top: 0.6rem; color: var(--muted); font-size: 0.925rem; }
.slip-note strong { color: var(--ink); }

.split { display: flex; height: 1.15rem; border-radius: 999px; overflow: hidden; margin: 1rem 0 0.9rem; background: var(--line); }
.split span { flex: 1 1 0; min-width: 0.4rem; }
.split-consignor { background: var(--petrol); }
.split-shop { background: var(--sand); }
.shares { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.shares dt { font-size: 0.925rem; font-weight: 700; }
.shares dd { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.for-consignor dt { color: var(--petrol); }
.for-shop dt { color: var(--muted); }
.slip input[type='range'] { width: 100%; accent-color: var(--petrol); margin: 0.2rem 0 0; }
.slip-stack { padding: 0.6rem 0 0.2rem; border-top: 1px solid var(--line); }
.slip-stack label { display: flex; justify-content: space-between; gap: 1rem; }
.fixed { color: var(--muted); font-size: 0.925rem; margin-bottom: 0.6rem; }

.langs { display: flex; gap: 0.15rem; }
.langs a { color: #dbe8ea; text-decoration: none; font-size: 0.875rem; font-weight: 700; padding: 0.2rem 0.45rem; border-radius: var(--radius); }
.langs a:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.langs a[aria-current='true'] { color: var(--deep); background: var(--amber); }

/* ---------- Secciones ---------- */
main > section { padding-top: 4.25rem; }
main > section:last-child { padding-bottom: 5rem; }
h2 { font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
.intro { margin-top: 0.75rem; font-size: 1.1rem; color: var(--muted); max-width: 40rem; }

.swap { margin-top: 2rem; border-top: 2px solid var(--ink); }
.swap-head, .swap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
.swap-head { padding: 0.6rem 0; font-weight: 700; }
.swap-head span:first-child { color: var(--muted); }
.swap-row { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.swap-row dt { color: var(--muted); }
.swap-row dd { font-weight: 600; }

.steps { margin-top: 2rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: paso; }
.steps li { counter-increment: paso; border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.steps li::before { content: counter(paso); display: block; font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--petrol); margin-bottom: 0.6rem; font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 1.1rem; line-height: 1.25; }
.steps p { margin-top: 0.4rem; color: var(--muted); }

.prices { margin-top: 2rem; border-top: 2px solid var(--ink); }
.prices > div { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 0.25rem 2.5rem; align-items: baseline; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.prices > div:first-child { border-top: 0; }
.prices dt { font-size: 1.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.prices dt small { display: block; font-size: 0.925rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.prices dd { max-width: 36rem; }
.prices .aside dt { font-size: 1.15rem; }

.demo { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 3rem; align-items: center; }
.demo p { margin-top: 0.9rem; max-width: 30rem; }
.demo .cta { margin-top: 1.5rem; }
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.shot figcaption { padding: 0.6rem 0.9rem; font-size: 0.875rem; color: var(--muted); border-top: 1px solid var(--line); }

.demo-group { margin-top: 2.5rem; }
.demo-group-title { font-size: 1.3rem; line-height: 1.2; }
.demo-group-intro { margin-top: 0.3rem; color: var(--muted); max-width: 40rem; }
.demo-list { margin-top: 1rem; border-top: 2px solid var(--ink); }
.demo-row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto; gap: 0.5rem 2.5rem; align-items: center; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.demo-row h4 { font-size: 1.1rem; line-height: 1.25; margin: 0; }
.demo-for { margin-top: 0.2rem; color: var(--muted); font-size: 0.925rem; }
.more-link { margin-top: 1rem; font-weight: 700; }
.case { margin-top: 4.25rem; padding-top: 2rem; padding-bottom: 2rem; border-left: 6px solid var(--amber); background: var(--surface); }
.case-quote { font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; max-width: 40rem; }
.case-note { margin-top: 0.6rem; color: var(--muted); }
.traits { margin-top: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; border-top: 2px solid var(--ink); }
.traits > div { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.traits dt { font-weight: 700; }
.traits dd { color: var(--muted); margin-top: 0.2rem; }

.about p { margin-top: 0.9rem; font-size: 1.1rem; max-width: 40rem; }
.band { margin-top: 4.25rem; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2rem 0; }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.band p { max-width: 38rem; }

.contact { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 3rem; margin-top: 2rem; }
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: 0.3rem; font-weight: 700; }
.form input, .form textarea {
  font: inherit; color: var(--ink); width: 100%; padding: 0.65rem 0.75rem; background: var(--surface);
  border: 1px solid #b3a793; border-radius: var(--radius);
}
.form textarea { min-height: 8.5rem; resize: vertical; }
.form .trap { position: absolute; left: -999rem; }
.form-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.form-foot { display: flex; align-items: center; gap: 0.75rem 1.25rem; flex-wrap: wrap; }
.form-foot small { color: var(--muted); font-size: 0.875rem; }
[data-status] { font-weight: 700; min-height: 1.5rem; }
[data-status][data-kind='ok'] { color: var(--ok); }
[data-status][data-kind='error'] { color: var(--danger); }
.direct { align-self: start; border-left: 4px solid var(--amber); padding-left: 1.25rem; }
.direct p + p { margin-top: 0.6rem; }
.direct a { font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; }

.foot { background: var(--deep); color: #dbe8ea; padding: 2rem 0; }
.foot .wrap { display: flex; justify-content: space-between; gap: 0.75rem 2rem; flex-wrap: wrap; }
.foot a { color: #fff; }
.foot nav { display: flex; gap: 0.25rem 1.5rem; flex-wrap: wrap; }

/* ---------- Pantallas estrechas ---------- */
@media (max-width: 58rem) {
  .hero, .demo, .contact { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .hero { padding-top: 2rem; padding-bottom: 3rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prices > div { grid-template-columns: minmax(0, 1fr); }
  .demo-row { grid-template-columns: minmax(0, 1fr) auto; }
  .demo-row > p { grid-column: 1 / -1; grid-row: 2; }
  main > section { padding-top: 3.25rem; }
  .band { margin-top: 3.25rem; }
}
@media (max-width: 36rem) {
  .wrap { padding-inline: 1.1rem; }
  .steps, .traits, .form-pair { grid-template-columns: minmax(0, 1fr); }
  .swap-head { display: none; }
  .swap-row { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .swap-row dt::before { content: 'Hoy: '; font-weight: 700; }
  .slip { padding: 1.2rem 1.1rem; }
  .shares dd { font-size: 1.3rem; }
}

/* Demos: compact cards, picture on the left, name first */
.demo-group { margin-top: 2.75rem; }
.demo-group-title { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--petrol); padding-left: 0.75rem; border-left: 4px solid var(--amber); }
.demo-group-intro { margin-top: 0.25rem; padding-left: calc(0.75rem + 4px); font-size: 0.95rem; }
.demo-grid { margin-top: 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(27rem, 1fr)); gap: 0.9rem; }
.demo-card { position: relative; display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 1rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem; transition: border-color 0.15s, box-shadow 0.15s; }
.demo-card:hover { border-color: var(--petrol-soft); box-shadow: 0 6px 18px rgba(29, 32, 30, 0.08); }
.demo-card > .demo-shot { grid-column: 1; grid-row: 1 / 5; align-self: stretch; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.demo-shot img { width: 100%; height: 100%; min-height: 6rem; object-fit: cover; object-position: top left; }
.demo-card > div { grid-column: 2; }
.demo-card h4 { font-size: 1.08rem; line-height: 1.2; margin: 0.1rem 0 0; }
.demo-card .demo-for { margin-top: 0.15rem; font-size: 0.82rem; font-weight: 600; color: var(--amber-ink); }
.demo-card > p { grid-column: 2; margin-top: 0.35rem; color: var(--muted); font-size: 0.9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.demo-card > .btn { grid-column: 2; justify-self: start; margin-top: 0.4rem; padding: 0; min-height: 0; background: none; border: 0; color: var(--petrol); font-weight: 700; font-size: 0.92rem; }
.demo-card > .btn::after { content: ' →'; }
.demo-card > .btn::before { content: ''; position: absolute; inset: 0; }
.demo-card > .btn:hover { text-decoration: underline; background: none; }
@media (max-width: 36rem) {
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .demo-card { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .demo-card > p { display: none; }
}

/* A real case, without quotation marks */
.case-label { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-ink); }

/* Who is behind it, with the photo */
.about-home { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 2rem; align-items: center; }
.avatar { width: 11rem; height: 11rem; border-radius: 50%; object-fit: cover; object-position: 78% 45%; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
.about-home p { max-width: 40rem; }
.about-home p + p { margin-top: 0.6rem; }

/* Alternating band to mark where a section starts */
main > section.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 4.25rem; padding: 3.5rem 0; }

@media (max-width: 46rem) {
  .about-home { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .avatar { width: 8rem; height: 8rem; }
  /* Menu in one line that scrolls sideways */
  .menu { flex-wrap: nowrap; overflow-x: auto; gap: 1.1rem; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 1.5rem; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { white-space: nowrap; }
  .menu { order: 3; width: 100%; }
}

/* ---------- Cabecera clara con la marca ---------- */
.top { background: var(--paper); color: var(--ink); }
.top a { color: var(--ink); }
.top > .bar { border-bottom: 1px solid var(--line); flex-wrap: nowrap; }
.brand { gap: 0.5rem; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.03em; }
.brand-mark { width: 1.35rem; height: auto; aspect-ratio: 282 / 305; background: none; clip-path: none; }
.menu { margin-left: auto; }
.menu a { color: var(--ink); font-weight: 500; }
.menu a:hover, .menu a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--petrol); }
.langs a { color: var(--muted); border-radius: 0; padding: 0.2rem 0.3rem; border-bottom: 2px solid transparent; }
.langs a:hover { color: var(--ink); background: none; }
.langs a[aria-current='true'] { color: var(--ink); background: none; border-bottom-color: var(--petrol); }
.btn-head { background: var(--petrol); color: #fff !important; border-radius: 999px; padding: 0.6rem 1.2rem; white-space: nowrap; font-size: 0.95rem; }
.btn-head:hover { background: #2f4b39; }
.hero h1 { font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
.top > .bar { padding-top: 0.9rem; padding-bottom: 0.9rem; }
.hero { padding-top: 2.75rem; padding-bottom: 3.5rem; }
.lede { font-size: 1.1rem; }
.btn-head { padding: 0.5rem 1rem; font-size: 0.9rem; }
.lede { color: var(--muted); }
.slip { border-top-color: var(--petrol); box-shadow: 0 1px 0 var(--line); border: 1px solid var(--line); border-top: 5px solid var(--petrol); }

.foot { background: var(--ink); color: #d9d2c5; }

@media (max-width: 75rem) {
  .top > .bar { flex-wrap: wrap; }
  .menu { order: 3; width: 100%; margin-left: 0; }
}
@media (max-width: 36rem) {
  .btn-head { display: none; }
}
@media (min-width: 75.01rem) {
  .menu { flex-wrap: nowrap; gap: 1.35rem; }
  .menu a { white-space: nowrap; font-size: 0.95rem; }
}

/* Alineación de la barra: marca a la izquierda, idiomas y botón a la derecha */
.top > .bar { justify-content: flex-start; column-gap: 1.25rem; }
.top .menu { margin-left: 1.5rem; }
.top .langs { margin-left: auto; }
.top .menu a { line-height: 1.2; }
@media (max-width: 75rem) {
  .top .menu { margin-left: 0; order: 3; width: 100%; }
}
/* La línea bajo la barra, del mismo ancho que el contenido */
.top > .bar { position: relative; border-bottom: 0; }
.top > .bar::after { content: ''; position: absolute; left: 1.5rem; right: 1.5rem; bottom: 0; border-bottom: 1px solid var(--line); }
@media (max-width: 36rem) { .top > .bar::after { left: 1.1rem; right: 1.1rem; } }
/* «Contacto» del menú solo en el móvil; en pantallas mayores lo hace el botón */
@media (min-width: 36.01rem) { .menu .menu-contact { display: none; } }
