/* ============================================================
   CASE STUDY — Founders Story
   Apple-inspired editorial layout, hi-fi & minimal
============================================================ */

.case-study-page {
  background: var(--bg);
  overflow-x: hidden;
}

.case-study-page .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.case-study-page .reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ ARTICLE HERO ============ */
.article-hero {
  position: relative;
  padding: 180px 24px 120px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.article-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(255,122,26,0.16) 0%, transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(255,122,26,0.06) 0%, transparent 60%),
    linear-gradient(180deg, #0d0d0f 0%, #161618 60%, #0a0a0c 100%);
}

.article-hero-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 1px;
  mix-blend-mode: overlay;
}

.article-hero-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  color: #f5f5f7;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(245,245,247,0.62);
  margin-bottom: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.back-link:hover {
  color: #f5f5f7;
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
}
.arrow-back { transition: transform 0.2s ease; }
.back-link:hover .arrow-back { transform: translateX(-3px); }

.article-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 500;
  color: #f5f5f7;
  margin-bottom: 32px;
}
.article-pill .tag {
  background: var(--accent);
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-title.display {
  color: #f5f5f7;
  font-size: clamp(46px, 5rem, 76px);
  letter-spacing: -0.01em;
  margin: 0;
}
.article-title .serif {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
}

.article-lead {
  margin: 28px auto 0;
  max-width: 620px;
  font-size: clamp(16px, 1.15rem, 19px);
  line-height: 1.55;
  color: rgba(245,245,247,0.74);
}

/* Author / meta strip */
.article-meta {
  margin-top: 56px;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  flex-wrap: wrap;
  justify-content: center;
}
.article-meta-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.author-stack {
  display: inline-flex;
  align-items: center;
}
.author-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  border: 2px solid #161618;
  letter-spacing: 0;
}
.author-avatar + .author-avatar { margin-left: -10px; }
.avatar-1 {
  background: linear-gradient(135deg, #ff7a1a 0%, #e46300 100%);
}
.avatar-2 {
  background: linear-gradient(135deg, #6e6e73 0%, #2a2a2c 100%);
}
.author-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  font-size: 12px;
}
.author-info strong {
  font-weight: 500;
  color: #f5f5f7;
  font-size: 13px;
}
.author-info span {
  color: rgba(245,245,247,0.55);
}
.article-meta-divider {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,0.10);
}
.article-meta-stat {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  text-align: left;
}
.meta-label {
  color: rgba(245,245,247,0.5);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.meta-value {
  color: #f5f5f7;
  font-weight: 500;
  margin-top: 2px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .article-hero {
    padding: 118px 16px 66px;
    text-align: left;
  }

  .article-hero-inner {
    max-width: 100%;
  }

  .back-link {
    margin-bottom: 28px;
  }

  .article-pill {
    max-width: 100%;
    margin-bottom: 24px;
    font-size: 11px;
    line-height: 1.35;
  }

  .article-title.display {
    font-size: 42px;
    line-height: 1.04;
    letter-spacing: 0;
  }

  .article-lead {
    margin-top: 22px;
    font-size: 16px;
    line-height: 1.58;
  }

  .article-meta {
    width: 100%;
    margin-top: 34px;
    border-radius: 22px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
  }

  .article-meta-row {
    align-items: flex-start;
  }

  .author-info {
    min-width: 0;
  }

  .author-info strong,
  .author-info span {
    overflow-wrap: anywhere;
  }

  .article-meta-divider { display: none; }
}

@media (max-width: 420px) {
  .article-title.display {
    font-size: 38px;
  }
}

/* ============ COVER IMAGE ============ */
.article-cover {
  max-width: 1200px;
  margin: -80px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.article-cover-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 60px 120px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.04);
  background: #161618;
  aspect-ratio: 16 / 9;
}
.article-cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-cover-overlay {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px;
  padding: 14px 18px;
  color: var(--fg);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}
.cover-stat strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.cover-stat span {
  display: block;
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 4px;
}
.article-cover figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--fg-3);
  margin: 18px auto 0;
  max-width: 560px;
}

@media (max-width: 640px) {
  .article-cover {
    margin-top: -26px;
    padding: 0 16px;
  }

  .article-cover-frame {
    border-radius: 20px;
    aspect-ratio: 4 / 5;
  }

  .article-cover-frame img {
    object-position: center top;
  }

  .article-cover-overlay {
    bottom: 14px; left: 14px;
    padding: 10px 14px;
    max-width: calc(100% - 28px);
  }

  .cover-stat strong { font-size: 20px; }

  .article-cover figcaption {
    padding: 0 4px;
    font-size: 12px;
    line-height: 1.45;
  }
}

/* ============ ARTICLE BODY ============ */
.article-body {
  padding: 120px 24px 60px;
}
.article-shell {
  max-width: 740px;
  margin: 0 auto;
}

.article-section { margin-bottom: 96px; }
.article-section:last-child { margin-bottom: 0; }

.section-mark {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 24px;
}

.article-h2 {
  font-size: clamp(30px, 3rem, 46px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  color: var(--fg);
}
.article-h2 .serif {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
}

.article-h3 {
  font-size: clamp(22px, 2rem, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 14px;
  color: var(--fg);
}
.article-h3 .serif {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
}

.article-p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--fg-2);
  margin: 0 0 22px;
  font-weight: 400;
}
.article-p:last-child { margin-bottom: 0; }
.article-p em {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--fg);
  font-size: 1.06em;
}

/* ============ PULL QUOTE ============ */
.pull-quote {
  position: relative;
  margin: 88px -40px;
  padding: 56px 48px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.pull-quote.alt {
  background: linear-gradient(180deg, #1d1d1f 0%, #0d0d0f 100%);
  border-color: rgba(255,255,255,0.08);
  color: #f5f5f7;
}
.pull-quote.alt .quote-mark { color: rgba(255,255,255,0.28); }
.pull-quote.alt p { color: #f5f5f7; }
.pull-quote.alt cite strong,
.pull-quote.alt footer strong { color: #f5f5f7; }
.pull-quote.alt cite span,
.pull-quote.alt footer span { color: rgba(245,245,247,0.55); }

.quote-mark {
  position: absolute;
  top: 16px;
  left: 28px;
  font-family: 'Instrument Serif', serif;
  font-size: 110px;
  line-height: 1;
  color: rgba(29,29,31,0.10);
  pointer-events: none;
  user-select: none;
}
.pull-quote p {
  position: relative;
  font-size: clamp(20px, 2rem, 28px);
  line-height: 1.4;
  font-weight: 400;
  color: var(--fg);
  margin: 0 0 26px;
  letter-spacing: -0.005em;
}
.pull-quote p .serif {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
}
.pull-quote cite,
.pull-quote footer {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-style: normal;
}
.pull-quote cite strong,
.pull-quote footer strong {
  font-weight: 500;
  color: var(--fg);
  font-size: 14px;
}
.pull-quote cite span,
.pull-quote footer span {
  color: var(--fg-3);
  margin-top: 2px;
}

@media (max-width: 740px) {
  .pull-quote { margin: 64px 0; padding: 40px 28px; border-radius: 22px; }
  .quote-mark { font-size: 80px; left: 18px; top: 8px; }
}

@media (max-width: 480px) {
  .pull-quote {
    margin: 56px 0;
    padding: 36px 22px 28px;
    border-radius: 20px;
  }

  .pull-quote p {
    font-size: 21px;
  }
}

/* ============ YOUTUBE VIDEO ============ */
.article-video {
  margin: 88px -80px;
  padding: 56px 56px 48px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,122,26,0.05) 0%, transparent 70%),
    linear-gradient(180deg, #0d0d0f 0%, #161618 100%);
  border-radius: 32px;
  border: 1px solid rgba(255,255,255,0.06);
  color: #f5f5f7;
  position: relative;
  overflow: hidden;
}
.article-video::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 4px 4px;
  pointer-events: none;
  opacity: 0.5;
}
.video-head {
  position: relative;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 36px;
}
.video-head .eyebrow {
  color: rgba(245,245,247,0.55);
  display: inline-block;
  margin-bottom: 14px;
}
.video-head .article-h3 {
  color: #f5f5f7;
  margin-bottom: 12px;
}
.video-head p {
  font-size: 14px;
  color: rgba(245,245,247,0.62);
  line-height: 1.6;
  margin: 0;
}

.video-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 40px 90px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.04) inset;
}
.video-frame-inner {
  position: absolute;
  inset: 0;
}
.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, transparent 18%),
    linear-gradient(0deg, rgba(0,0,0,0.18) 0%, transparent 12%);
  mix-blend-mode: overlay;
  z-index: 2;
}

.video-meta {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 22px;
  font-size: 12px;
  color: rgba(245,245,247,0.55);
}
.video-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.video-meta .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(245,245,247,0.4);
}
.video-meta .dot.live {
  background: #6ee7a8;
  box-shadow: 0 0 0 4px rgba(110,231,168,0.16);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@media (max-width: 740px) {
  .article-video { margin: 64px 0; padding: 36px 20px 28px; border-radius: 24px; }
  .video-head { margin-bottom: 24px; }
}

@media (max-width: 480px) {
  .article-video {
    padding: 30px 14px 22px;
    border-radius: 22px;
  }

  .video-head {
    text-align: left;
  }

  .video-head p {
    font-size: 13px;
  }

  .video-frame {
    border-radius: 16px;
  }

  .video-meta {
    justify-content: flex-start;
    gap: 10px 18px;
  }
}

/* ============ FOUNDERS GRID ============ */
.founders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}
.founder-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.founder-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.founder-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.founder-meta { display: flex; flex-direction: column; }
.founder-role {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 6px;
}
.founder-card h4 {
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.founder-card p {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 640px) {
  .founders-grid { grid-template-columns: 1fr; }
  .founder-card {
    padding: 20px;
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .founder-card {
    flex-direction: column;
    gap: 14px;
  }
}

/* ============ STAT GRID ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 36px 0 0;
}
.stat-card {
  padding: 28px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: left;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.stat-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.stat-card .stat-num {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1;
}
.stat-card .stat-label {
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-3);
  line-height: 1.45;
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card {
    padding: 24px 20px;
    border-radius: 18px;
  }
}

/* ============ STORY TIMELINE ============ */
.story-timeline {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  position: relative;
}
.story-timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, var(--line-strong) 8%, var(--line-strong) 92%, transparent 100%);
}
.story-timeline li {
  position: relative;
  padding-left: 36px;
  padding-bottom: 28px;
}
.story-timeline li:last-child { padding-bottom: 0; }
.story-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 4px var(--bg);
}
.story-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(255,122,26,0.18);
}
.story-content {
  display: flex;
  flex-direction: column;
}
.story-date {
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.story-content h4 {
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.story-content p {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0;
}

/* ============ SIGNATURE ============ */
.article-signature {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 80px;
  padding-top: 0;
}
.signature-line {
  height: 1px;
  background: var(--line);
}
.signature-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--fg-3);
}
.signature-content .signature-by {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-4);
  margin-bottom: 4px;
}
.signature-content strong {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  color: var(--fg);
  margin-bottom: 4px;
}

/* ============ MEDIA QUERIES (general) ============ */
@media (max-width: 980px) {
  .article-video { margin-left: -24px; margin-right: -24px; }
  .pull-quote { margin-left: -16px; margin-right: -16px; }
}
@media (max-width: 740px) {
  .article-body { padding: 80px 20px 40px; }
  .article-section { margin-bottom: 64px; }
  .article-p { font-size: 17px; }
  .article-video { margin-left: 0; margin-right: 0; }
  .pull-quote { margin-left: 0; margin-right: 0; }
}

@media (max-width: 480px) {
  .article-body {
    padding: 68px 16px 36px;
  }

  .article-section {
    margin-bottom: 56px;
  }

  .section-mark {
    max-width: 100%;
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: 0.12em;
  }

  .article-h2 {
    font-size: 32px;
    line-height: 1.12;
    letter-spacing: 0;
    margin-bottom: 22px;
  }

  .article-h3 {
    font-size: 24px;
    line-height: 1.18;
  }

  .article-p {
    font-size: 16px;
    line-height: 1.65;
  }

  .story-timeline li {
    padding-left: 30px;
  }

  .article-signature {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 62px;
  }

  .signature-line {
    width: 100%;
  }
}
