/* ═══════════════════════════════════════════
   BICYCLE FOR THE MIND — Magazine Art Direction
   ═══════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette — warm editorial: deep ink, warm paper, burnt accent */
  --ink:        #1a1714;
  --paper:      #faf6f0;
  --paper-warm: #f3ece1;
  --accent:     #b84c2a;
  --accent-dim: #d4956e;
  --muted:      #6b6560;
  --rule:       #d1c8ba;
  --primer-bg:  #eef4ee;
  --primer-bdr: #8cb88c;
  --mcp-bg:     #eef0f5;
  --mcp-bdr:    #7a8fb5;

  /* Type scale */
  --fs-hero:    clamp(3rem, 7vw, 6.5rem);
  --fs-dek:     clamp(1.15rem, 2.2vw, 1.6rem);
  --fs-h2:      clamp(1.4rem, 2.8vw, 2rem);
  --fs-body:    clamp(1rem, 1.1vw + 0.6rem, 1.2rem);
  --fs-small:   clamp(0.82rem, 0.9vw + 0.4rem, 0.95rem);
  --fs-caption: 0.85rem;
  --fs-aside:   0.88rem;
  --fs-pull:    clamp(1.35rem, 2.5vw + 0.4rem, 1.9rem);

  /* Measure — the reading column */
  --measure: 38rem;
  --measure-wide: 48rem;

  /* Spacing */
  --gap: clamp(1.5rem, 4vw, 3rem);
  --gap-xl: clamp(3rem, 6vw, 5rem);
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.72;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover { color: #8a3518; text-decoration-thickness: 2px; }

/* ══════════════════════════════════════
   HERO — Photo with overlaid type
   ══════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  min-height: 65vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--ink);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero__tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(26,23,20,0) 0%,
      rgba(26,23,20,0.10) 30%,
      rgba(26,23,20,0.65) 70%,
      rgba(26,23,20,0.92) 100%
    );
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--measure-wide);
  padding: 0 var(--gap) var(--gap-xl);
  color: #fff;
}

.hero__kicker {
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 1.2rem;
}

.hero__title {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: var(--fs-hero);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__subtitle {
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--fs-dek);
  font-weight: 300;
  line-height: 1.45;
  margin-top: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

/* ══════════════════════════════════════
   ARTICLE
   ══════════════════════════════════════ */
.article {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--gap-xl) var(--gap);
}

.article > p,
.article > .story,
.article > .aside,
.article > .figure,
.article > .pullquote,
.article > .takeaways,
.article > .stories-divider {
  margin-bottom: 1.4em;
}

/* ── Drop Cap ── */
.dropcap::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 4.2em;
  float: left;
  line-height: 0.82;
  margin: 0.06em 0.12em 0 -0.02em;
  color: var(--accent);
}

/* ══════════════════════════════════════
   ASIDES — In-flow companion boxes
   No float, no grid, no overlap risk.
   Always sits in the normal document flow
   as a distinct block between paragraphs.
   ══════════════════════════════════════ */
.aside {
  background: var(--primer-bg);
  border-left: 4px solid var(--primer-bdr);
  border-radius: 5px;
  padding: 1.2rem 1.4rem;
  font-size: var(--fs-aside);
  line-height: 1.55;
  max-width: 100%;
}

.aside--mcp {
  background: var(--mcp-bg);
  border-left-color: var(--mcp-bdr);
}

.aside__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.aside__lead {
  font-weight: 600;
  margin-bottom: 0.5em;
}

.aside p + p { margin-top: 0.6em; }

.aside a { color: var(--accent); }

/* ══════════════════════════════════════
   FIGURES — varied rhythm
   ══════════════════════════════════════ */
.figure {
  margin: 0;
}

.figure img {
  border-radius: 4px;
}

.figure figcaption {
  font-size: var(--fs-caption);
  color: var(--muted);
  margin-top: 0.45rem;
  line-height: 1.5;
  font-style: italic;
}

/* ── Full-bleed section breaks ── */
.figure--full-bleed {
  margin-left: calc(-1 * var(--gap));
  margin-right: calc(-1 * var(--gap));
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.figure--full-bleed img {
  width: 100%;
  border-radius: 0;
  border: none;
}

.figure--full-bleed figcaption {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gap);
}

/* ── Floating figures ── */
.figure--float-left {
  float: left;
  margin-right: 1.4rem;
  margin-bottom: 0.8rem;
  margin-top: 0.3rem;
}

.figure--float-right {
  float: right;
  margin-left: 1.4rem;
  margin-bottom: 0.8rem;
  margin-top: 0.3rem;
}

/* ── Story figures: no two same-width centered images in a row ── */
.figure--story-1 {
  width: 55%;
}

.figure--story-2 {
  width: 42%;
}

.figure--narrow {
  width: 10rem;
  margin-top: 0.2rem;
}

.figure--narrow img {
  border-radius: 4px;
}

/* ── Video embed ── */
.figure--video {
  clear: both;
  max-width: 100%;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 5px;
  border: 1px solid var(--rule);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ══════════════════════════════════════
   STORIES — section breaks + italic subheads
   ══════════════════════════════════════ */
.stories-divider {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 3rem 0 2.5rem;
  clear: both;
}

.stories-divider__rule {
  flex: 1;
  border: none;
  border-top: 1px solid var(--rule);
}

.stories-divider__label {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.story {
  margin-bottom: 2.5rem;
}

.story__heading {
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  margin-bottom: 0.6rem;
}

.story__italic-head {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.28;
  display: block;
  color: var(--ink);
}

.story p { margin-bottom: 1.3em; }

.story__pr-link {
  font-size: var(--fs-small);
  color: var(--muted);
}

/* ══════════════════════════════════════
   PULL QUOTES — break out of the measure
   ══════════════════════════════════════ */
.pullquote {
  position: relative;
  clear: both;
  margin: 3rem calc(-1 * var(--gap));
  padding: 2.5rem calc(var(--gap) + 1rem) 2.5rem calc(var(--gap) + 1.5rem);
  max-width: none;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--fs-pull);
  font-weight: 700;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
  border-left: 5px solid var(--accent);
  background: linear-gradient(135deg, var(--paper-warm) 0%, var(--paper) 100%);
}

.pullquote::before {
  content: '\201C';
  position: absolute;
  top: 0.5rem;
  left: 0.8rem;
  font-size: 5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.2;
  font-style: normal;
}

.pullquote p { margin: 0; }

.pullquote--accent {
  border-left: none;
  border-top: 3px solid var(--accent-dim);
  border-bottom: 3px solid var(--accent-dim);
  text-align: center;
  padding: 2rem var(--gap);
  background: transparent;
}

.pullquote--accent::before { display: none; }

/* ══════════════════════════════════════
   KEY TAKEAWAYS
   ══════════════════════════════════════ */
.takeaways {
  clear: both;
  margin: 3rem 0 2rem;
  padding: 2.2rem 2rem;
  background: var(--paper-warm);
  border-radius: 8px;
  border: 1px solid var(--rule);
}

.takeaways__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--fs-h2);
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.takeaways__list {
  list-style: none;
  counter-reset: takeaway;
}

.takeaways__list li {
  counter-increment: takeaway;
  position: relative;
  padding-left: 2.8rem;
  margin-bottom: 0.9rem;
  font-size: var(--fs-body);
  line-height: 1.6;
}

.takeaways__list li::before {
  content: counter(takeaway);
  position: absolute;
  left: 0;
  top: 0.08em;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--accent);
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 2.5rem var(--gap);
  font-size: var(--fs-caption);
  color: var(--muted);
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
  margin: 0 auto;
}

/* ══════════════════════════════════════
   RESPONSIVE — Mobile: asides stack, floats drop
   ══════════════════════════════════════ */
@media (max-width: 1080px) {
  .figure--story-1 { width: 50%; }
  .figure--story-2 { width: 45%; }
}

@media (max-width: 768px) {
  .hero { min-height: 50vh; }

  .figure--float-left,
  .figure--float-right {
    float: none;
    width: 100%;
    margin: 1.5rem 0;
  }

  .figure--story-1,
  .figure--story-2 {
    width: 100%;
    float: none;
    margin: 1.5rem 0;
  }

  .figure--full-bleed {
    margin-left: calc(-1 * var(--gap));
    margin-right: calc(-1 * var(--gap));
  }

  .pullquote {
    margin-left: 0;
    margin-right: 0;
    padding-left: 1.8rem;
    padding-right: 1.2rem;
  }

  .story__italic-head { font-size: 1.2rem; }

  .takeaways__list li { padding-left: 2.4rem; }
  .takeaways__list li::before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero { min-height: 40vh; }
  .hero__title { font-size: 2.4rem; }
  .article { padding: 1.5rem 1rem; }
  .dropcap::first-letter { font-size: 3.2em; }
  .figure--narrow { width: 8rem; }
}

/* ══════════════════════════════════════
   PRINT — clean B&W, page-break controls
   ══════════════════════════════════════ */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }

  .hero {
    min-height: auto;
    background: #fff;
    color: #000;
    break-after: page;
  }
  .hero__img { position: static; height: auto; max-height: 50vh; }
  .hero__tint { display: none; }
  .hero__kicker { color: #555; }
  .hero__subtitle { color: #333; }

  .article { max-width: 100%; padding: 0; }

  .aside {
    border: 1px solid #999;
    background: #f5f5f5;
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }

  .figure--full-bleed {
    margin-left: 0;
    margin-right: 0;
  }
  .figure--full-bleed img { max-height: 45vh; object-fit: contain; }

  .figure--float-left,
  .figure--float-right {
    float: none;
    width: 60%;
    margin: 1rem auto;
  }

  .video-wrapper { display: none; }

  .pullquote {
    margin-left: 0;
    margin-right: 0;
    border-left-color: #000;
    background: transparent;
    page-break-inside: avoid;
  }

  .takeaways {
    border: 1px solid #999;
    background: #f5f5f5;
    page-break-inside: avoid;
  }
  .takeaways__list li::before { background: #000; color: #fff; }

  a { color: #000; text-decoration: underline; }
  a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
  .video-wrapper + figcaption::after { content: " [video: https://www.youtube.com/watch?v=ob_GX50Za6c]"; }

  .story { page-break-inside: avoid; }
  .site-footer { border-top: 1px solid #ccc; }
}
