@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../../assets/fonts/CormorantGaramond-Regular-500.ttf") format("truetype");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../../assets/fonts/CormorantGaramond-Italic-500.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../../assets/fonts/Inter-300.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../../assets/fonts/Inter-400.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --paper: #fbf9f4;
  --paper-soft: #f6f1f8;
  --ink: #15161b;
  --muted: #68707d;
  --line: #e7e0db;
  --purple: #642cba;
  --purple-soft: rgba(100, 44, 186, 0.1);
  --purple-line: rgba(100, 44, 186, 0.24);
  --shadow: 0 20px 58px rgba(34, 28, 22, 0.08);
  --content-width: 820px;
  --serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", Georgia, serif;
  --sans: "Inter", "PingFang SC", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(100, 44, 186, 0.07), transparent 32%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 300;
}

a {
  color: inherit;
  text-decoration: none;
}

.close-link {
  position: fixed;
  top: 26px;
  right: 34px;
  z-index: 10;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: #12161b;
  color: #fff;
  font-size: 22px;
  font-weight: 300;
  box-shadow: 0 12px 28px rgba(18, 20, 23, 0.18);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.close-link:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 34px rgba(18, 20, 23, 0.24);
}

.case-page {
  width: min(940px, calc(100vw - 160px));
  margin: 0 auto;
  padding: 120px 0 104px;
}

.case-hero {
  padding-bottom: 68px;
  border-bottom: 1px solid var(--line);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 60px;
  color: var(--purple);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-meta span:last-child {
  color: #16191e;
}

.case-hero h1 {
  max-width: 980px;
  margin: 0;
  color: #17181d;
  font-family: var(--serif);
  font-size: clamp(58px, 8vw, 118px);
  font-weight: 500;
  line-height: 0.92;
}

.case-hero h1 span {
  display: block;
  max-width: 760px;
  margin-top: 22px;
  color: #7d8592;
  font-size: clamp(32px, 4.4vw, 64px);
  line-height: 1.06;
}

.hero-subtitle {
  max-width: 720px;
  margin: 34px 0 0;
  color: #777f8b;
  font-size: 17px;
}

.case-hero blockquote {
  max-width: 760px;
  margin: 28px 0 0;
  color: rgba(40, 42, 48, 0.68);
  font-family: var(--serif);
  font-size: 25px;
  font-style: italic;
  line-height: 1.35;
}

.case-section {
  width: min(100%, var(--content-width));
  padding: 58px 0 0;
}

.section-heading {
  display: grid;
  grid-template-columns: auto auto minmax(80px, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.section-heading::after {
  content: "";
  height: 1px;
  background: var(--purple-line);
}

.section-index {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
}

.section-heading h2 {
  margin: 0;
  color: var(--purple);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-copy,
.process-copy {
  max-width: var(--content-width);
}

.section-copy p,
.section-intro,
.process-copy p,
.takeaway-grid p,
.product-grid p {
  color: #424851;
  font-size: 17px;
  line-height: 1.78;
}

.section-copy p,
.process-copy p {
  margin: 0 0 20px;
}

.section-copy strong,
.section-note {
  font-weight: 400;
}

.section-note {
  display: inline;
  background: linear-gradient(transparent 58%, rgba(100, 44, 186, 0.15) 58%);
  color: #24252b;
}

.xhs-card-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  margin: 30px 0 26px;
}

.xhs-card {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(100, 44, 186, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(34, 28, 22, 0.045);
  transform: translateZ(0);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.xhs-card img {
  display: block;
  width: auto;
  height: 210px;
  object-fit: contain;
}

.xhs-card:hover {
  border-color: rgba(100, 44, 186, 0.42);
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    0 18px 42px rgba(34, 28, 22, 0.07),
    0 14px 32px rgba(100, 44, 186, 0.08);
  transform: translateY(-4px);
}

.section-intro {
  max-width: var(--content-width);
  margin: -4px 0 26px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  margin-top: 20px;
}

.product-grid article,
.takeaway-grid article {
  min-height: 216px;
  padding: 28px 30px;
  border: 1px solid rgba(100, 44, 186, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 34px rgba(34, 28, 22, 0.045);
  transform: translateZ(0);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.product-grid article:nth-child(even) {
  border-color: rgba(100, 44, 186, 0.42);
  box-shadow:
    0 18px 48px rgba(34, 28, 22, 0.06),
    0 16px 34px rgba(100, 44, 186, 0.08);
}

.product-grid article:hover,
.takeaway-grid article:hover {
  border-color: rgba(100, 44, 186, 0.46);
  background: rgba(255, 255, 255, 0.76);
  box-shadow:
    0 22px 54px rgba(34, 28, 22, 0.075),
    0 18px 42px rgba(100, 44, 186, 0.11);
  transform: translateY(-5px) scale(1.008);
}

.product-grid span,
.takeaway-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--purple);
  font-family: var(--serif);
  font-size: 35px;
  line-height: 1;
}

.product-grid h3,
.takeaway-grid h3 {
  margin: 0 0 10px;
  color: #7a8290;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.product-grid p,
.takeaway-grid p {
  margin: 0;
  font-size: 15px;
  line-height: 1.68;
}

.process-panel {
  width: min(100%, var(--content-width));
  margin-top: 52px;
  padding: 34px 36px 36px;
  border: 1px solid rgba(100, 44, 186, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 94% 8%, rgba(100, 44, 186, 0.08), transparent 28%),
    rgba(248, 242, 250, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.48),
    0 24px 58px rgba(100, 44, 186, 0.08);
  transform: translateZ(0);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.process-panel:hover {
  border-color: rgba(100, 44, 186, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.56),
    0 28px 68px rgba(100, 44, 186, 0.12);
  transform: translateY(-4px);
}

.process-panel .section-heading {
  margin-bottom: 24px;
}

.process-copy {
  padding-left: 42px;
}

.process-conclusion {
  display: inline;
  color: var(--purple) !important;
  font-family: var(--serif);
  font-size: 24px !important;
  font-style: italic;
  line-height: 1.42 !important;
  background: linear-gradient(transparent 58%, rgba(100, 44, 186, 0.14) 58%);
}

.takeaway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}

.final-quote {
  position: relative;
  width: min(100%, var(--content-width));
  margin-top: 74px;
  padding: 8px 0 0 38px;
  border-left: 5px solid var(--purple);
}

.final-quote::before {
  content: "“";
  position: absolute;
  top: -18px;
  left: 18px;
  color: rgba(100, 44, 186, 0.18);
  font-family: var(--serif);
  font-size: 104px;
  line-height: 1;
}

.final-quote span {
  display: block;
  margin-bottom: 18px;
  color: #8c93a0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.final-quote p {
  max-width: 900px;
  margin: 0;
  color: #262930;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 58px);
  font-style: italic;
  line-height: 1.24;
}

@media (max-width: 900px) {
  .case-page {
    width: min(100% - 48px, 720px);
    padding-top: 96px;
  }

  .close-link {
    top: 18px;
    right: 20px;
  }

  .hero-meta {
    margin-bottom: 42px;
  }

  .product-grid,
  .takeaway-grid {
    grid-template-columns: 1fr;
  }

  .xhs-card-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    width: 100%;
    justify-content: flex-start;
    padding: 0 0 8px;
    scroll-snap-type: x proximity;
  }

  .xhs-card {
    scroll-snap-align: start;
  }

  .xhs-card img {
    height: 190px;
  }

  .process-panel {
    padding: 28px 24px 30px;
  }

  .process-copy {
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .case-page {
    width: min(100% - 34px, 440px);
    padding-top: 82px;
  }

  .hero-meta {
    display: grid;
    gap: 10px;
  }

  .case-hero h1 {
    font-size: 52px;
  }

  .case-hero h1 span {
    font-size: 30px;
  }

  .section-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .section-heading::after {
    grid-column: 1 / -1;
  }

  .section-copy p,
  .section-intro,
  .process-copy p {
    font-size: 15px;
  }

  .product-grid article,
  .takeaway-grid article {
    min-height: auto;
    padding: 24px;
  }
}

@media (hover: none), (pointer: coarse) {
  .xhs-card:hover,
  .product-grid article:hover,
  .takeaway-grid article:hover,
  .process-panel:hover {
    transform: none;
  }
}
