/* Our story (/our-story). Load after shop.css, home.css and pages.css; reuses
   their tokens, header, footer, buttons and eyebrows.

   Photos use one pattern, .story-photo, in four shapes (--wide, --landscape,
   --portrait, --square) and two placements (a full-width or column figure, or
   a tilted --inset "polaroid"). The frame holds its aspect ratio, so a photo
   dropped in never shifts the page. */

/* ---------- layout ---------- */

.story {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(3rem, 7vw, 5rem);
}

/* Headline on the left, photo beside it. */
.story-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
  max-width: 68rem;
  padding-bottom: clamp(1rem, 3vw, 2rem);
}
.story-hero h1 {
  max-width: none;
  font-size: clamp(2.2rem, 5.2vw, 3.7rem);
}
.story-hero .page-hero__lead {
  margin-bottom: 0;
}
@media (max-width: 820px) {
  .story-hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

.story-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  margin-top: clamp(3rem, 8vw, 6rem);
}
.story-block--photo-right .story-block__media {
  order: 2;
}
/* No photo beside the text: a single readable column. */
.story-block--text {
  display: block;
  max-width: 42rem;
}

.story-block__media {
  display: grid;
  gap: 1.25rem;
}
.story-block h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}
.story-block__text p {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Wide photo that breaks out of the text columns. */
.story-fullbleed {
  margin-top: clamp(3rem, 8vw, 6rem);
}

@media (max-width: 760px) {
  .story-block {
    grid-template-columns: minmax(0, 1fr);
  }
  .story-block--photo-right .story-block__media {
    order: 0;
  }
}

/* ---------- photos ---------- */

.story-photo {
  margin: 0;
}
.story-photo__frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tile);
  aspect-ratio: 3 / 2;
}
.story-photo--wide .story-photo__frame {
  aspect-ratio: 16 / 9;
}
.story-photo--landscape .story-photo__frame {
  aspect-ratio: 3 / 2;
}
.story-photo--portrait .story-photo__frame {
  aspect-ratio: 4 / 5;
}
.story-photo--square .story-photo__frame {
  aspect-ratio: 1 / 1;
}
.story-photo__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-photo figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Stand-in until a real photo is added. */
.story-photo__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 2px dashed var(--light-crimson);
  border-radius: inherit;
  background: var(--light-orange);
  color: var(--crimson-deep);
  font: 400 1rem/1.4 var(--sub);
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.story-photo--inset .story-photo__placeholder {
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

/* Polaroid-style inset: white border, slight tilt. */
.story-photo--inset {
  width: min(100%, 16rem);
  max-width: 17rem;
  padding: 0.6rem 0.6rem 0.9rem;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(31, 27, 29, 0.18);
  transform: rotate(-2.5deg);
}
.story-photo--inset .story-photo__frame {
  border-radius: 2px;
}
.story-photo--inset figcaption {
  margin-top: 0.7rem;
  font-family: "Chillink", cursive;
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--ink);
  text-align: center;
}
.story-photo--tilt-right {
  transform: rotate(2.5deg);
}
.story-photo--inset.story-photo--wide {
  width: min(100%, 22rem);
  max-width: 22rem;
}
.story-photo--inset.story-photo--end {
  justify-self: end;
}

/* ---------- unfilled details ---------- */

.story-todo {
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: var(--lemon);
  color: var(--ink);
}

/* ---------- closing ---------- */

.story-closing {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius);
  background: var(--lemon);
}
.story-closing h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}
.story-closing p {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  line-height: 1.7;
}
.story-closing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.story-sign {
  margin: 0;
  font-family: "Chillink", cursive;
  font-size: clamp(3rem, 9vw, 4.5rem);
  line-height: 1.1;
  color: var(--crimson-deep);
}
@media (max-width: 760px) {
  .story-closing {
    grid-template-columns: minmax(0, 1fr);
  }
  .story-closing .story-photo {
    max-width: 18rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .story-photo--inset {
    transition: transform 200ms ease;
  }
  .story-photo--inset:hover {
    transform: rotate(0deg);
  }
}
