/* Case-study page for "HubSpot Newsletter Builder".
   Reuses the main site's design tokens, fonts and section/card
   conventions (style.css) — this file only adds page-specific
   layout: hero, problem/solution grids, dashboard showcase,
   workflow timeline, code panel and impact cards. */

/* ---------- HERO ---------- */
.hnb-hero {
  background: var(--bg-dark);
  padding: 140px 0 100px;
  text-align: center;
}
.hnb-eyebrow {
  color: var(--text-dark-2);
  font-size: 17px;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.hnb-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 85%;
  font-size: clamp(38px, 7.4vw, 88px);
  line-height: 0.97;
  letter-spacing: -0.03em;
  color: var(--text-dark-1);
  margin: 0 0 20px;
}
.hnb-subtitle {
  max-width: 680px;
  margin: 0 auto 20px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.4;
  color: var(--text-dark-1);
  font-weight: 500;
}
.hnb-desc {
  max-width: 680px;
  margin: 0 auto 56px;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.6;
  color: var(--text-dark-2);
}
.hnb-hero-shot {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}

/* ---------- OVERVIEW ---------- */
.hnb-copy {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-light-2);
}
.hnb-copy p { margin: 0 0 20px; }
.hnb-copy p:last-child { margin-bottom: 0; }
.hnb-issue-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.hnb-issue-list li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-light-1);
}
.hnb-issue-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9463f;
}

/* ---------- PROBLEM ---------- */
.hnb-problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}
.hnb-problem-card {
  background: #fafafa;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 24px;
}
.hnb-problem-card .hnb-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(217,70,63,.08);
  color: #d9463f;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}
.hnb-problem-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.hnb-problem-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-light-2);
  margin: 0;
}
.hnb-shot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.hnb-shot-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: #fafafa;
}
.hnb-shot-card img {
  width: 100%;
  display: block;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.hnb-shot-card:hover img { transform: scale(1.03); }
.hnb-shot-caption {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-light-2);
  border-top: 1px solid var(--border-soft);
}

/* ---------- SOLUTION ---------- */
.hnb-solution {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hnb-benefit-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.hnb-benefit-list li {
  position: relative;
  padding-left: 30px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-light-1);
  font-weight: 500;
}
.hnb-benefit-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: -1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mint);
  color: #06281d;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hnb-solution-shot {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

/* ---------- DASHBOARD SHOWCASE ---------- */
.hnb-dashboard-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.16);
  margin-bottom: 40px;
}
.hnb-dashboard-main img { width: 100%; display: block; }

/* ---------- WORKFLOW ---------- */
.hnb-workflow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  align-items: stretch;
}
.hnb-workflow-step {
  position: relative;
  padding: 0 18px;
  text-align: center;
}
.hnb-workflow-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -4px;
  top: 22px;
  color: var(--border-soft);
  font-size: 20px;
}
.hnb-workflow-num {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-light-1);
  background: #fafafa;
}
.hnb-workflow-step h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------- CODE GENERATION ---------- */
.hnb-code-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.hnb-code-panel {
  background: #0d0f12;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
}
.hnb-code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hnb-code-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.hnb-code-filename {
  margin-left: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.4);
}
.hnb-code-panel pre {
  margin: 0;
  padding: 22px 24px 26px;
  overflow-x: auto;
}
.hnb-code-panel code {
  font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #d7e2ea;
  white-space: pre;
}
.section--dark .hnb-code-split p { color: var(--text-dark-2); }

/* ---------- IMPACT ---------- */
.hnb-impact-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  align-items: stretch;
}
.hnb-impact-card {
  background: #fafafa;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 24px;
}
.hnb-impact-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--text-light-1);
}
.hnb-impact-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-light-2);
  margin: 0;
}

/* ---------- LIVE DASHBOARD CTA ---------- */
.hnb-live {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hnb-live-text p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dark-2);
  margin: 0 0 32px;
}
.hnb-live-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--mint);
  color: #06281d;
  font-size: 15px;
  font-weight: 700;
  transition: transform .25s ease, background .25s ease;
}
.hnb-live-button:hover { transform: translateY(-2px); background: var(--mint-2); }
.hnb-live-shot {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(0,0,0,.5);
}

/* ---------- ROLE TAGS ---------- */
.hnb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hnb-tag {
  padding: 8px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light-1);
}

/* ---------- NEXT PROJECT ---------- */
.hnb-next-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px);
  gap: 20px;
}
.hnb-next-card {
  display: block;
  background: #fafafa;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .3s ease, transform .3s ease;
}
.hnb-next-card:hover { box-shadow: 0 16px 32px rgba(0,0,0,.1); transform: translateY(-4px); }
.hnb-next-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: top center;
}
.hnb-next-name {
  display: block;
  padding: 16px 20px 4px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.hnb-next-link {
  display: block;
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-light-2);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hnb-problem-grid { grid-template-columns: 1fr 1fr; }
  .hnb-shot-grid { grid-template-columns: 1fr; }
  .hnb-solution { grid-template-columns: 1fr; gap: 32px; }
  .hnb-workflow { grid-template-columns: 1fr 1fr; gap: 24px 0; }
  .hnb-workflow-step:nth-child(2)::after,
  .hnb-workflow-step:nth-child(4)::after { display: none; }
  .hnb-code-split { grid-template-columns: 1fr; gap: 32px; }
  .hnb-impact-grid { grid-template-columns: 1fr 1fr; }
  .hnb-live { grid-template-columns: 1fr; gap: 32px; }
  .hnb-next-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .hnb-hero { padding: 110px 0 70px; }
  .hnb-problem-grid { grid-template-columns: 1fr; }
  .hnb-workflow { grid-template-columns: 1fr; }
  .hnb-workflow-step::after { display: none !important; }
  .hnb-impact-grid { grid-template-columns: 1fr; }
}
