/* ═══════════════════════════════════════════════════════════════
   THE PATTERN BISTRO — stories.css
   Styles for /stories/ index and individual story articles
═══════════════════════════════════════════════════════════════ */

/* ── STORIES INDEX PAGE ─────────────────────────────────────── */

.stories-header {
  background: var(--cream);
  padding-top: calc(68px + clamp(3rem, 7vw, 5rem));
  padding-bottom: clamp(2rem, 4vw, 3rem);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.stories-header-inner { max-width: var(--container); margin: 0 auto; }
.stories-header-inner h1 { margin-top: 0.5rem; margin-bottom: 0; }

.stories-header-desc {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--grey-500);
  margin-top: 1rem;
  max-width: 520px;
}

/* Grid — 2 columns, generous gap, equal height cards */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

/* ── STORY CARD — used on index and related sections ────────── */

.story-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1.5px solid var(--warm-200);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.25s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.story-card:hover {
  border-color: var(--warm-300);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(44,36,32,0.08);
}

.story-card-img {
  display: block;
  overflow: hidden;
  aspect-ratio: 3/2;
}

.story-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s var(--ease-out);
}

.story-card:hover .story-card-img img { transform: scale(1.04); }

.story-card-body {
  padding: clamp(1.2rem, 3vw, 2rem) clamp(1.2rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2.2rem);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.story-cat {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.6rem;
}

/* Smaller titles on cards — not full h2 size */
.story-card-body h2 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin-bottom: 0.7rem;
  line-height: 1.2;
  font-weight: 700;
}

.story-card-body h2 a,
.story-card-body h3 a {
  color: var(--dark);
  text-decoration: none;
  transition: color 0.2s;
}

.story-card-body h2 a:hover,
.story-card-body h3 a:hover { color: var(--red); }

.story-card-body h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.story-card-body p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--grey-700);
  flex: 1;
}

.story-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--red);
  text-decoration: none;
  transition: gap 0.2s;
}

.story-card:hover .story-read-more { gap: 0.5rem; }

/* ── STORY ARTICLE PAGE ─────────────────────────────────────── */

/* Header */
.story-header {
  padding: calc(68px + clamp(2.5rem, 6vw, 4rem)) 0 clamp(2rem, 4vw, 3rem);
  background: var(--cream);
}

.story-category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
  margin-top: 1rem;
  display: block;
}

.story-header h1 {
  max-width: 780px;
  margin-top: 0.3rem;
}

/* Featured image */
.story-featured-img {
  width: 100%;
  max-height: 580px;
  overflow: hidden;
}

.story-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 580px;
}

/* ── STORY BODY — reading column ────────────────────────────── */

.story-body {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

/* All story body elements are centred in a readable column */
.story-text,
.story-img,
.story-img-pair,
.story-quote {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Text blocks */
.story-text {
  margin-bottom: 2rem;
}

.story-text p {
  font-size: clamp(1rem, 2vw, 1.08rem);
  font-weight: 300;
  line-height: 1.9;
  color: var(--grey-700);
}

.story-text p + p { margin-top: 1.1rem; }

.story-text h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.story-text strong {
  font-weight: 500;
  color: var(--dark);
}

/* Single image */
.story-img {
  margin-bottom: 2.5rem;
  margin-top: 1rem;
}

/* Full bleed option — add class="story-img story-img--wide" for edge-to-edge */
.story-img--wide {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.story-img img {
  width: 100%;
  display: block;
}

figcaption {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--grey-500);
  margin-top: 0.6rem;
  font-style: italic;
}

/* Two images side by side */
.story-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  margin-bottom: 2.5rem;
  margin-top: 1rem;
}

.story-img-pair figure { margin: 0; }

.story-img-pair img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* Pull quote */
.story-quote {
  border-left: 3px solid var(--red);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  font-style: italic;
  color: var(--dark);
  line-height: 1.5;
}

/* ── RELATED STORIES ────────────────────────────────────────── */

.story-related {
  background: var(--warm-100);
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--warm-200);
}

.story-related .section-label { margin-bottom: 1.5rem; display: block; }

.story-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 640px) {
  .stories-grid       { grid-template-columns: 1fr; gap: 1.5rem; }
  .story-related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .story-header h1    { font-size: clamp(1.8rem, 7vw, 2.5rem); }
  .story-featured-img { max-height: 260px; }
  .story-img-pair     { grid-template-columns: 1fr; gap: 0.75rem; }
  .story-img-pair img { aspect-ratio: 3/2; }
  .story-body         { padding: 2rem 0; }
  .story-text,
  .story-img,
  .story-img-pair,
  .story-quote        { padding-left: 1.25rem; padding-right: 1.25rem; }
}
