:root {
  --ink: #141816;
  --ink-soft: #2c322f;
  --mist: #eef1ee;
  --paper: #f7f8f6;
  --stone: #6e756f;
  --line: rgba(20, 24, 22, 0.09);
  --champagne: #8f8066;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.app {
  width: min(440px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: 64px;
}

.top {
  padding: 20px 24px 12px;
}

.top-back {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  transition: opacity 0.2s;
}
.top-back:hover { opacity: 0.7; color: var(--ink); }

.state-msg {
  padding: 72px 28px;
  text-align: center;
  color: var(--stone);
  font-size: 14px;
}

/* —— Hero —— */
.hero { position: relative; }

.hero-label {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 14px rgba(20, 24, 22, 0.4);
  pointer-events: none;
}

.gallery {
  position: relative;
  aspect-ratio: 3 / 4.1;
  background: #9aa39c;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }

.gallery-track figure {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  margin: 0;
}

.gallery-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-dots {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.gallery-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.gallery-dots span.on { background: #fff; }

/* —— Content —— */
.content {
  padding: 40px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.identity-meta {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 12px;
}

.identity h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(2.05rem, 7.5vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.identity-desc {
  margin-top: 16px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--stone);
  max-width: 34ch;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* —— Proposal (revelación Quiet Luxury) —— */
.proposal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin: 0;
  pointer-events: none;
  transition:
    grid-template-rows 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.proposal.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 8px;
  pointer-events: auto;
}

.proposal-reveal {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(18px);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.proposal.is-open .proposal-reveal {
  transform: translateY(0);
}

.proposal-kicker {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
}

.proposal-lead {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.card {
  background: #fff;
  box-shadow:
    0 1px 0 rgba(20, 24, 22, 0.03),
    0 22px 48px rgba(20, 24, 22, 0.07);
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .proposal,
  .proposal-reveal {
    transition: none;
  }
  .proposal-reveal {
    transform: none;
  }
}

.card-gallery {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--mist);
}
.card-gallery::-webkit-scrollbar { display: none; }

.card-gallery img {
  width: 86px;
  height: 114px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-body {
  padding: 26px 22px 28px;
}

.card-body h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.15;
  margin-bottom: 10px;
}

.card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--stone);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  line-height: 1.5;
}

.card-price {
  margin-top: 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--champagne);
}

.card-wa {
  margin-top: 12px;
  font-size: 12px;
  color: var(--stone);
  min-height: 1.2em;
}

/* —— Pricing stage (grande + centrado, +30%) —— */
.pricing {
  margin-top: 10px;
  padding: 36px 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 47px;
  text-align: center;
}

.margin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.margin-label {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--stone);
}

.margin-value {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4.15rem, 18vw, 5.2rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--ink);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.margin-value.is-animating {
  opacity: 0.35;
  transform: translateY(6px);
}

.margin-value.is-zero { color: var(--stone); }

.margin-signal {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--champagne);
  min-height: 1.25em;
  transition: opacity 0.3s ease;
}

.pricing-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 100%;
}

.pricing-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}

.pricing-label {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--stone);
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.pricing-hint {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--champagne);
  font-style: italic;
}

.pricing-value {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 9vw, 2.85rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.pricing-edit {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  border-bottom: 1px solid var(--ink);
  padding: 0 5px 8px;
  min-width: 208px;
}

.pricing-currency {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 9vw, 2.85rem);
  font-weight: 500;
  color: var(--ink);
}

.pricing-edit input {
  width: 182px;
  border: none;
  background: transparent;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 9vw, 2.85rem);
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
  letter-spacing: -0.01em;
}
.pricing-edit input::-webkit-outer-spin-button,
.pricing-edit input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* —— Close —— */
.close {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 8px;
}

/* CTA flotante: navegación siempre abierta al enviar */
.send-dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: min(440px, 100%);
  transform: translateX(-50%) translateY(110%);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(247, 248, 246, 0) 0%, var(--paper) 28%);
  pointer-events: none;
  opacity: 0;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease;
}

.send-dock.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.send-dock .btn-primary {
  box-shadow: 0 10px 28px rgba(20, 24, 22, 0.14);
}

body.proposal-open .app {
  padding-bottom: 108px;
}

body.proposal-open .close .btn-primary {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .send-dock {
    transition: none;
  }
}

.wa-field label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 10px;
}

.wa-field input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 12px 0;
  font-family: Manrope, sans-serif;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.wa-field input:focus {
  border-bottom-color: var(--champagne);
}

.btn-primary {
  appearance: none;
  border: none;
  min-height: 54px;
  width: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: Manrope, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, opacity 0.2s;
}
.btn-primary:hover { background: #1f2a24; }
.btn-primary:disabled { opacity: 0.5; cursor: wait; }

.fineprint {
  font-size: 11px;
  line-height: 1.5;
  color: var(--stone);
  text-align: center;
}

/* —— PDF (proporción celular, sin distorsión) —— */
.pdf-sheet {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 390px;
  background: #fff;
  color: var(--ink);
  font-family: Manrope, sans-serif;
}
.pdf-sheet .pdf-inner {
  width: 390px;
  padding: 0 0 24px;
  background: #fff;
}
.pdf-sheet .pdf-hero {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e8ebe8;
}
.pdf-sheet .pdf-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.pdf-sheet .pdf-hero-empty {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #e8ebe8;
}
.pdf-sheet .pdf-thumbs {
  display: flex;
  gap: 4px;
  padding: 8px 16px 0;
  overflow: hidden;
}
.pdf-sheet .pdf-thumb {
  flex: 1 1 0;
  max-width: 88px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #eef1ee;
}
.pdf-sheet .pdf-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.pdf-sheet .pdf-copy { padding: 18px 20px 0; }
.pdf-sheet .pdf-copy h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 8px;
}
.pdf-sheet .pdf-copy .d {
  font-size: 12px;
  color: var(--stone);
  line-height: 1.45;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.pdf-sheet .pdf-copy .m {
  font-size: 11px;
  line-height: 1.45;
  margin-bottom: 10px;
  color: var(--ink-soft);
}
.pdf-sheet .pdf-copy .pr {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  color: var(--champagne);
  margin-bottom: 8px;
}
.pdf-sheet .pdf-copy .wa {
  font-size: 12px;
  color: var(--ink-soft);
}
.pdf-sheet .pdf-note {
  margin: 16px 20px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--stone);
  line-height: 1.4;
}

@media (min-width: 480px) {
  .content { padding-inline: 28px; gap: 56px; }
}

@media print {
  body * { visibility: hidden; }
  .pdf-sheet, .pdf-sheet * { visibility: visible; }
  .pdf-sheet { position: absolute; left: 0; top: 0; }
}
