/* ETAPA 03 — Nuestra historia + galería
   Inspiración: composición editorial de la referencia aprobada.
   Todas las reglas están aisladas bajo .story y .story-carousel. */

.story {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(65px, 10vw, 100px) 0 88px;
  overflow: hidden;
  text-align: center;
  color: #242424;
  background: #FFFCF9;
  box-shadow: 0 15px 35px rgba(70, 54, 48, .035);
  isolation: isolate;
}
.story__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 660px);
  margin: 0 auto;
}
.story__sprig {
  display: block;
  width: 70px;
  height: 33px;
  margin: 0 auto 15px;
  overflow: visible;
  color: var(--sage);
}
.story__sprig path { fill: none; stroke: #849D79; stroke-width: 1.8; stroke-linecap: round; }
.story__sprig ellipse { fill: #9CAF88; }
.story__title {
  margin: 0 auto 18px;
  padding: 0 20px;
  font: italic 500 clamp(40px, 9vw, 61px)/1.06 var(--font-serif);
  letter-spacing: -.015em;
}
.story__text {
  width: min(100% - 52px, 470px);
  margin: 0 auto 35px;
  font: 400 clamp(12px, 2.7vw, 14px)/1.95 var(--font-sans);
  color: #403E3B;
  text-wrap: pretty;
}
.story__text--placeholder { color: #5E5B56; }
.story__flower {
  position: absolute;
  z-index: 0;
  bottom: -34px;
  right: -46px;
  width: clamp(120px, 23vw, 172px);
  height: auto;
  transform: scaleX(-1) rotate(-12deg);
  opacity: .78;
  pointer-events: none;
}
.story-carousel {
  position: relative;
  width: min(100% - 42px, 630px);
  margin: 0 auto;
  -webkit-tap-highlight-color: transparent;
}
.story-carousel__viewport {
  overflow: hidden;
  border-radius: 13px;
  background: #E6E2DA;
  box-shadow: 0 6px 22px rgba(50, 45, 39, .07);
  touch-action: pan-y;
  cursor: grab;
}
.story-carousel__viewport:active { cursor: grabbing; }
.story-carousel__track {
  display: flex;
  width: 100%;
  padding: 0;
  margin: 0;
  gap: 0;
  list-style: none;
  transition: transform .65s cubic-bezier(.22,.65,.27,1);
  will-change: transform;
}
.story-carousel__slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  height: clamp(235px, 64vw, 395px);
  background: #E4DED6;
  overflow: hidden;
}
.story-carousel__slide:nth-child(2) { background: #E8E4DF; }
.story-carousel__slide:nth-child(3) { background: #E6DDD9; }
.story-carousel__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 43%;
  filter: grayscale(1);
  user-select: none;
  -webkit-user-drag: none;
}
.story-carousel__slide--empty .story-carousel__photo { display: none; }
.story-carousel__placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  color: #726A62;
  background: linear-gradient(125deg, #E9E4DD 0%, #F1EDE8 47%, #DBD4CC 100%);
}
.story-carousel__slide--empty .story-carousel__placeholder { display: flex; }
.story-carousel__placeholder svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #9CAF88;
  stroke-width: 1.2;
}
.story-carousel__placeholder span {
  font: 500 10px/1.8 var(--font-sans);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.story-carousel__arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .055);
  border-radius: 50%;
  color: #292827;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 2px 9px rgba(0, 0, 0, .14);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.story-carousel__arrow:hover { background: white; box-shadow: 0 4px 13px rgba(0,0,0,.18); }
.story-carousel__arrow--prev { left: -17px; }
.story-carousel__arrow--next { right: -17px; }
.story-carousel__arrow svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.story-carousel__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 17px 0 0;
}
.story-carousel__dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #DEDAD5;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.story-carousel__dot[aria-current="true"] { background: #83996F; transform: scale(1.12); }
.story-carousel__dot:focus-visible { outline: 2px solid #435C38; outline-offset: 4px; }
@media (min-width: 700px) {
  .story { padding-top: 93px; padding-bottom: 102px; }
  .story__text { margin-bottom: 40px; }
  .story-carousel__slide { height: 390px; }
  .story-carousel__arrow--prev { left: -21px; }
  .story-carousel__arrow--next { right: -21px; }
}
@media (max-width: 359px) {
  .story__title { font-size: 39px; }
  .story__text { width: calc(100% - 40px); }
  .story-carousel { width: calc(100% - 32px); }
  .story-carousel__arrow { width: 37px; height: 37px; }
  .story-carousel__arrow--prev { left: -12px; }
  .story-carousel__arrow--next { right: -12px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-carousel__track,
  .story-carousel__dot,
  .story-carousel__arrow { transition: none !important; }
}
