:root {
  --carbon: #161513;
  --surface: #211f1c;
  --raised: #2b2824;
  --line: #49433b;
  --ivory: #f4ede1;
  --slate: #c2b9ac;
  --copper: #d3a47b;
  --copper-hover: #e0b690;
  --ink: #111111;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--carbon);
  color: var(--ivory);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

a { color: inherit; text-decoration: none; }

.skip {
  position: absolute;
  top: -5rem;
  left: 1.5rem;
  z-index: 3;
  padding: .6rem .9rem;
  border-radius: .5rem;
  background: var(--ivory);
  color: var(--ink);
}

.skip:focus { top: .75rem; }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 4px;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 40%;
  animation: drift 24s ease-out forwards;
}

/* Carbón sólido bajo el texto, foto limpia sobre el barbero. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--carbon) 0%, rgba(22, 21, 19, .92) 26%, rgba(22, 21, 19, .35) 52%, rgba(22, 21, 19, 0) 70%),
    linear-gradient(0deg, var(--carbon) 0%, rgba(22, 21, 19, 0) 34%),
    linear-gradient(180deg, rgba(22, 21, 19, .7) 0%, rgba(22, 21, 19, 0) 20%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -.01em;
}

.brand img {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  font-size: .95rem;
  color: var(--slate);
}

.nav-links a { transition: color .2s ease; }
.nav-links a:hover { color: var(--ivory); }

.nav-cta {
  padding: .6rem 1.15rem;
  border: 1px solid rgba(244, 237, 225, .35);
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.nav-cta:hover {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--ink);
}

.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem var(--gutter) 3rem;
  max-width: 46rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.5rem;
  color: var(--copper);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--copper);
}

h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(3rem, 7.4vw, 6.25rem);
  line-height: .95;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.lede {
  margin: 1.75rem 0 0;
  max-width: 31rem;
  color: var(--slate);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.4rem;
  padding: 0 1.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 600;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.button:active { transform: scale(.98); }

.button svg { transition: transform .2s ease; }
.button:hover svg { transform: translateX(3px); }

.button-primary {
  background: var(--copper);
  color: var(--ink);
}

.button-primary:hover { background: var(--copper-hover); }

.button-secondary {
  border-color: rgba(244, 237, 225, .45);
  background: rgba(22, 21, 19, .35);
  backdrop-filter: blur(8px);
}

.button-secondary:hover {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--ink);
}

.trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.25rem;
  margin-top: 2.25rem;
  color: var(--slate);
  font-size: .92rem;
}

.trust strong {
  color: var(--ivory);
  font-weight: 500;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  white-space: nowrap;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(33, 31, 28, .7);
  font-size: .8rem;
}

.store span { color: var(--copper); }

.proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0 var(--gutter);
  border-top: 1px solid rgba(244, 237, 225, .14);
  list-style: none;
}

.proof li {
  padding: 1.4rem 1.5rem 1.6rem 0;
}

.proof li + li {
  padding-left: 1.5rem;
  border-left: 1px solid rgba(244, 237, 225, .14);
}

.proof small {
  display: block;
  margin-bottom: .3rem;
  color: var(--copper);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.proof p {
  margin: 0;
  font-size: .98rem;
  color: var(--ivory);
}

.section {
  padding: clamp(4rem, 9vw, 7.5rem) var(--gutter);
}

.section-alt { background: var(--surface); }

.section-head { max-width: 40rem; }

.section-head .eyebrow { margin-bottom: 1rem; }

h2 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.section-head p:last-child {
  margin: 1.25rem 0 0;
  color: var(--slate);
  font-size: 1.1rem;
  line-height: 1.6;
}

.phone {
  width: 100%;
  max-width: 17rem;
  padding: .45rem;
  border: 1px solid var(--line);
  border-radius: 2.5rem;
  background: #0d0c0b;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .45);
}

.phone img {
  display: block;
  width: 100%;
  aspect-ratio: 1320 / 2868;
  object-fit: cover;
  border-radius: 2.05rem;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
}

.shots h3,
.features h3 {
  margin: 0 0 .4rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -.015em;
}

.shots h3 { margin-top: 1.5rem; }

.shots p,
.features p {
  margin: 0;
  max-width: 22rem;
  color: var(--slate);
  line-height: 1.55;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem clamp(1.5rem, 4vw, 3rem);
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
}

.features li {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--ivory);
  color: var(--ink);
}

.download p {
  margin: 1rem 0 0;
  max-width: 30rem;
  color: #4b463e;
  font-size: 1.1rem;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .85rem;
}

.button-dark {
  background: var(--ink);
  color: var(--ivory);
}

.button-dark:hover { background: var(--raised); }

.soon {
  display: inline-flex;
  align-items: center;
  min-height: 3.4rem;
  padding: 0 1.5rem;
  border: 1px dashed #a79d8d;
  border-radius: 999px;
  color: #4b463e;
  font-weight: 500;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 2rem var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: .92rem;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.75rem;
}

.footer a:hover { color: var(--ivory); }

a.store:hover { border-color: var(--copper); }

.rise {
  opacity: 0;
  animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--i) * 90ms + 120ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes drift {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@media (max-width: 820px) {
  .nav-links a:not(.nav-cta) { display: none; }

  .nav {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 1;
    padding-block: 1.1rem;
  }

  .hero-media {
    position: relative;
    inset: auto;
    height: 46svh;
    min-height: 17rem;
    flex: none;
  }

  .hero-media img { object-position: 74% 30%; }

  .hero-media::after {
    background:
      linear-gradient(0deg, var(--carbon) 0%, rgba(22, 21, 19, 0) 55%),
      linear-gradient(180deg, rgba(22, 21, 19, .75) 0%, rgba(22, 21, 19, 0) 30%);
  }

  .hero-body {
    justify-content: flex-start;
    margin-top: -3.5rem;
    padding-top: 0;
    padding-bottom: 2.25rem;
  }

  .eyebrow { margin-bottom: 1rem; }
  .lede { margin-top: 1.25rem; }

  .actions {
    flex-direction: column;
    margin-top: 1.75rem;
  }

  .button { width: 100%; }

  .trust { margin-top: 1.5rem; }

  .proof { grid-template-columns: 1fr; }

  .proof li,
  .proof li + li {
    padding: 1rem 0;
    border-left: 0;
  }

  .proof li + li { border-top: 1px solid rgba(244, 237, 225, .14); }
}

@media (max-width: 820px) {
  .shots,
  .features { grid-template-columns: 1fr; }

  .shots { gap: 3rem; }

  .phone { max-width: 15rem; }

  .download-actions,
  .download-actions .button,
  .soon { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .rise,
  .hero-media img {
    animation: none;
    opacity: 1;
  }

  .button,
  .button svg { transition: none; }

  html { scroll-behavior: auto; }
}

/* Portada: accesos a los módulos de cliente y barbero. */
.doors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 30rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: var(--surface);
  transition: border-color .25s ease, background .25s ease;
}

.door:hover {
  border-color: var(--copper);
  background: var(--raised);
}

.door .eyebrow { margin-bottom: 1rem; }

.door h2 {
  max-width: 11ch;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
}

.door p:not(.eyebrow) {
  margin: 1rem 0 0;
  max-width: 19rem;
  color: var(--slate);
  line-height: 1.55;
}

.door-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding-top: 1.75rem;
  color: var(--copper);
  font-weight: 600;
}

.door-link svg { transition: transform .25s ease; }
.door:hover .door-link svg { transform: translateX(4px); }

.door .phone {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: -9rem;
  width: 13.5rem;
  transform: rotate(4deg);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}

.door:hover .phone { transform: rotate(2deg) translateY(-1rem); }

/* Módulos: encabezado y recorrido guiado por scroll. */
.nav-links a[aria-current="page"] { color: var(--ivory); }

.story-step h2 { font-size: clamp(2rem, 4vw, 3.25rem); }

.story-step p {
  margin: 1.1rem 0 0;
  max-width: 26rem;
  color: var(--slate);
  font-size: 1.1rem;
  line-height: 1.6;
}

.story-count {
  display: block;
  margin-bottom: 1rem;
  color: var(--copper);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  font-variant-numeric: tabular-nums;
}

.story-screen {
  display: grid;
  overflow: hidden;
  border-radius: 2.05rem;
}

.story-screen img {
  grid-area: 1 / 1;
  border-radius: 0;
}

.story-dots { display: none; }

/* Sin JavaScript: pasos uno debajo del otro, cada uno con su captura. */
.story { padding: 0 var(--gutter) clamp(3rem, 7vw, 5rem); }

.story-steps {
  display: grid;
  gap: 3.5rem;
}

.story-device { display: none; }

.story-step > .phone {
  max-width: 15rem;
  margin-top: 1.75rem;
}

.js .story {
  height: calc(var(--steps) * 85svh + 100svh);
  padding: 0;
}

.js .story-step > .phone { display: none; }

.js .story-pin {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 30rem) auto;
  align-items: center;
  justify-content: center;
  gap: clamp(3rem, 10vw, 9rem);
  height: 100svh;
  padding: 2rem var(--gutter);
  overflow: hidden;
}

.js .story-steps {
  gap: 0;
  align-items: center;
}

.js .story-step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity .45s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  pointer-events: none;
}

.js .story-step.is-past { transform: translateY(-2.5rem); }

.js .story-step.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.js .story-device {
  display: block;
  justify-self: end;
}

.js .story-device .phone {
  width: auto;
  max-width: none;
  height: min(80svh, 42rem);
}

.js .story-screen {
  height: 100%;
  aspect-ratio: 1320 / 2868;
}

.js .story-screen img {
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(7%) scale(.97);
  transition: opacity .5s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}

.js .story-screen img.is-past { transform: translateY(-7%) scale(.97); }

.js .story-screen img.is-active {
  opacity: 1;
  transform: none;
}

.js .story-dots {
  display: flex;
  gap: .45rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.story-dots li {
  width: 1.75rem;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  transition: background .3s ease, width .3s ease;
}

.story-dots li.is-active {
  width: 3rem;
  background: var(--copper);
}

.other {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
}

.other h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }

@media (max-width: 820px) {
  .doors { grid-template-columns: 1fr; }

  .door { min-height: 27rem; }

  .door .phone {
    bottom: -8rem;
    width: 11.5rem;
  }

  .js .story-pin {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: start;
    align-content: start;
    gap: 1.25rem;
    padding-block: 1.25rem;
  }

  .js .story-device {
    grid-row: 1;
    justify-self: center;
  }

  .js .story-device .phone {
    height: 50svh;
    padding: .3rem;
    border-radius: 1.7rem;
  }

  .js .story-screen { border-radius: 1.4rem; }

  .js .story-steps { align-items: start; }

  .story-count { margin-bottom: .5rem; }

  .story-step h2 { font-size: clamp(1.6rem, 7vw, 2.1rem); }

  .story-step p {
    margin-top: .6rem;
    font-size: 1rem;
  }

  .js .story-dots { margin-top: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .js .story-step,
  .js .story-screen img,
  .door .phone,
  .door-link svg {
    transition: none;
    transform: none;
  }
}
