/* ============================================================
   Perdue — A Real Protein Bar
   Case study page + portfolio section
   Self-contained. No dependencies beyond the Archivo webfont.
   ============================================================ */

:root {
  --stock:  #F9F6EF;
  --navy:   #0A498A;
  --deep:   #063764;
  --yellow: #F2C11A;
  --slate:  #5F6A75;

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 92px);
  --band: clamp(64px, 9vw, 140px);
}

*, *::before, *::after { box-sizing: border-box; }

.pd-scope {
  margin: 0;
  background: var(--stock);
  color: var(--navy);
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- type scale ---------- */
.pd-scope h1, .pd-scope h2, .pd-scope h3 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.94;
  text-transform: uppercase;
  margin: 0;
}
.pd-d1 { font-size: clamp(46px, 7.4vw, 122px); }
.pd-d2 { font-size: clamp(34px, 4.8vw, 76px); }
.pd-d3 { font-size: clamp(24px, 2.6vw, 40px); line-height: 1.02; }

.pd-lead {
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.38;
  font-weight: 500;
  max-width: 24ch;
  margin: 0;
}
.pd-body { max-width: var(--measure); margin: 0; }
.pd-body + .pd-body { margin-top: 1.1em; }
.pd-note { font-size: 15px; color: var(--slate); max-width: 56ch; }

.pd-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--yellow);
  display: inline-block;
}

.pd-rule { width: 108px; height: 5px; background: var(--yellow); border: 0; margin: 34px 0; }

/* ---------- layout primitives ---------- */
.pd-wrap { padding-inline: var(--gutter); }
.pd-section { padding-block: var(--band); }
.pd-split {
  display: grid;
  gap: clamp(32px, 5vw, 84px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}
.pd-split--copyfirst { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }

.pd-field { background: var(--navy); color: var(--stock); }
.pd-field .pd-label { color: var(--stock); }
.pd-field .pd-note { color: rgba(249,246,239,0.72); }
.pd-field--deep { background: var(--deep); }

/* ---------- hero ---------- */
.pd-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  min-height: 86vh;
}
.pd-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
}
.pd-hero__art {
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 72px);
}
.pd-hero__art img { width: 100%; }

.pd-meta {
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 22px 30px;
  max-width: 560px;
  border-top: 2px solid rgba(10,73,138,0.2);
  padding-top: 24px;
}
.pd-meta div { min-width: 0; }
.pd-meta dt { font-size: 13px; font-weight: 600; color: var(--slate); margin: 0 0 4px; }
.pd-meta dd { font-size: 17px; font-weight: 700; margin: 0; }

/* ---------- the line ---------- */
.pd-line { text-align: left; }
.pd-line p { margin: 0; }
.pd-line__primary { font-size: clamp(42px, 8vw, 132px); font-weight: 800; letter-spacing: -0.03em; line-height: 0.92; text-transform: uppercase; }
.pd-line__secondary { font-size: clamp(26px, 3.6vw, 58px); font-weight: 800; letter-spacing: -0.028em; line-height: 0.96; text-transform: uppercase; color: var(--yellow); margin-top: clamp(28px, 3.4vw, 54px); padding-top: clamp(28px, 3.4vw, 54px); border-top: 3px solid rgba(249,246,239,0.28); }

/* ---------- OOH boards ---------- */
.pd-boards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 24px);
  margin-top: 48px;
  list-style: none;
  padding: 0;
}
.pd-board {
  aspect-ratio: 16 / 9;
  padding: clamp(20px, 2.2vw, 30px);
  display: flex;
  align-items: flex-start;
  font-size: clamp(19px, 1.7vw, 27px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.018em;
  text-transform: uppercase;
}
.pd-board--navy   { background: var(--navy);   color: var(--stock); }
.pd-board--paper  { background: #FFFFFF;       color: var(--navy); border: 1px solid rgba(10,73,138,0.16); }
.pd-board--yellow { background: var(--yellow); color: var(--deep); }

/* ---------- menu ---------- */
.pd-menu { list-style: none; margin: 40px 0 0; padding: 0; }
.pd-menu li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid rgba(249,246,239,0.26);
}
.pd-menu li:last-child { border-bottom: 1px solid rgba(249,246,239,0.26); }
.pd-menu b { font-size: clamp(22px, 2.2vw, 34px); font-weight: 800; text-transform: uppercase; letter-spacing: -0.018em; }
.pd-menu span { font-size: 14px; color: rgba(249,246,239,0.66); }
.pd-menu i { flex: 1; border-bottom: 2px dotted rgba(249,246,239,0.3); transform: translateY(-7px); }
.pd-menu em { font-style: normal; font-size: clamp(22px, 2.2vw, 34px); font-weight: 800; color: var(--yellow); }

/* ---------- ecosystem (a real 6-part sequence, so numbered) ---------- */
.pd-eco { list-style: none; margin: 48px 0 0; padding: 0; counter-reset: eco; }
.pd-eco li {
  counter-increment: eco;
  display: grid;
  grid-template-columns: 46px minmax(0, 260px) minmax(0, 1fr);
  gap: 22px;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid rgba(10,73,138,0.2);
}
.pd-eco li:last-child { border-bottom: 1px solid rgba(10,73,138,0.2); }
.pd-eco li::before {
  content: "0" counter(eco);
  background: var(--yellow);
  color: var(--deep);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  padding: 6px 0;
  align-self: start;
}
.pd-eco b { font-size: clamp(19px, 1.7vw, 26px); font-weight: 800; text-transform: uppercase; letter-spacing: -0.014em; }
.pd-eco span { color: var(--slate); }

/* ---------- image bands ---------- */
.pd-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 18px); }
.pd-figure--tall img { max-height: 760px; width: auto; margin-inline: auto; }
.pd-figure { margin: 0; }
.pd-figure figcaption { font-size: 14px; color: var(--slate); margin-top: 12px; }
.pd-field .pd-figure figcaption { color: rgba(249,246,239,0.68); }

/* ---------- close ---------- */
.pd-close p { margin: 0; }
.pd-close .pd-line__primary { font-size: clamp(38px, 6vw, 96px); }
.pd-close .pd-close__b { border: 0; padding-top: 0; }
.pd-close__b { color: var(--yellow); margin-top: clamp(20px, 2.6vw, 40px) !important; }

.pd-download {
  display: inline-block;
  margin-top: 44px;
  background: var(--yellow);
  color: var(--deep);
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  padding: 16px 30px;
  border: 3px solid var(--yellow);
  transition: background 140ms ease, color 140ms ease;
}
.pd-download:hover, .pd-download:focus-visible { background: transparent; color: var(--yellow); }

.pd-back {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 3px solid var(--yellow);
}
.pd-back:hover, .pd-back:focus-visible { color: var(--deep); }

/* ============================================================
   PORTFOLIO SECTION (the card that lives on your homepage)
   ============================================================ */
.pd-work { background: var(--stock); padding-block: var(--band); }
.pd-work__head { margin-bottom: clamp(30px, 4vw, 56px); }
.pd-work__head h2 { margin: 0; }
.pd-work__list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(24px, 3vw, 44px); }

.pd-card {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  background: var(--navy);
  color: var(--stock);
  text-decoration: none;
  overflow: hidden;
}
.pd-card__art { overflow: hidden; background: var(--deep); }
.pd-card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms cubic-bezier(.2,.7,.3,1); }
.pd-card__copy { padding: clamp(28px, 3.6vw, 60px); display: flex; flex-direction: column; justify-content: center; }
.pd-card__client { font-size: 14px; font-weight: 700; color: var(--yellow); margin: 0 0 14px; }
.pd-card__title { font-size: clamp(30px, 3.4vw, 54px); font-weight: 800; letter-spacing: -0.026em; line-height: 0.96; text-transform: uppercase; margin: 0; }
.pd-card__desc { margin: 20px 0 0; max-width: 40ch; color: rgba(249,246,239,0.82); font-size: 17px; }
.pd-card__tags { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.pd-card__tags li { font-size: 13px; font-weight: 600; border: 1px solid rgba(249,246,239,0.4); padding: 6px 12px; }
.pd-card__cta {
  margin-top: 30px;
  font-weight: 800;
  font-size: 17px;
  align-self: flex-start;
  padding-bottom: 7px;
  border-bottom: 3px solid var(--yellow);
  transition: border-color 200ms ease;
}
.pd-card:hover .pd-card__art img,
.pd-card:focus-visible .pd-card__art img { transform: scale(1.035); }
.pd-card:hover .pd-card__cta,
.pd-card:focus-visible .pd-card__cta { border-color: var(--stock); }

/* ---------- accessibility floor ---------- */
.pd-scope a:focus-visible,
.pd-card:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  .pd-scope *, .pd-scope *::before, .pd-scope *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- hero reveal: the one orchestrated moment ---------- */
@media (prefers-reduced-motion: no-preference) {
  .pd-hero__art img { animation: pd-rise 900ms cubic-bezier(.2,.7,.3,1) both; }
  .pd-hero__copy > * { animation: pd-fade 700ms ease both; }
  .pd-hero__copy > *:nth-child(1) { animation-delay: 90ms; }
  .pd-hero__copy > *:nth-child(2) { animation-delay: 170ms; }
  .pd-hero__copy > *:nth-child(3) { animation-delay: 250ms; }
  .pd-hero__copy > *:nth-child(4) { animation-delay: 330ms; }
  .pd-hero__copy > *:nth-child(5) { animation-delay: 410ms; }
}
@keyframes pd-rise { from { opacity: 0; transform: translateY(26px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes pd-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .pd-hero { grid-template-columns: 1fr; min-height: 0; }
  .pd-hero__art { order: -1; padding: 22px; }
  .pd-split, .pd-split--copyfirst { grid-template-columns: 1fr; }
  .pd-card { grid-template-columns: 1fr; }
  .pd-card__art { aspect-ratio: 16 / 10; }
  .pd-eco li { grid-template-columns: 42px 1fr; }
  .pd-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-eco span { grid-column: 2; }
}
@media (max-width: 560px) {
  .pd-scope { font-size: 17px; }
  .pd-menu li { flex-wrap: wrap; }
  .pd-menu i { display: none; }
  .pd-boards { grid-template-columns: 1fr; }
  .pd-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   HOMEPAGE — intro + footer
   ============================================================ */
.pd-intro {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(70px, 10vw, 130px);
  border-bottom: 2px solid rgba(10,73,138,0.18);
}
.pd-intro__role { font-size: 15px; font-weight: 700; color: var(--slate); margin: 0 0 18px; }
.pd-intro__name {
  font-size: clamp(56px, 12vw, 178px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0;
}
.pd-intro__blurb { max-width: 30ch; }
.pd-intro__contact { margin: 38px 0 0; font-size: 19px; font-weight: 700; }
.pd-intro__contact a { color: var(--navy); text-decoration: none; padding-bottom: 5px; border-bottom: 3px solid var(--yellow); }
.pd-intro__contact a:hover, .pd-intro__contact a:focus-visible { color: var(--deep); }

.pd-foot {
  background: var(--navy);
  color: var(--stock);
  padding-block: clamp(44px, 5vw, 72px);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
  font-weight: 600;
}
.pd-foot p { margin: 0; }
.pd-foot a { color: var(--yellow); text-decoration: none; }
.pd-foot a:hover, .pd-foot a:focus-visible { text-decoration: underline; }

@media (prefers-reduced-motion: no-preference) {
  .pd-intro > * { animation: pd-fade 700ms ease both; }
  .pd-intro > *:nth-child(1) { animation-delay: 60ms; }
  .pd-intro > *:nth-child(2) { animation-delay: 140ms; }
  .pd-intro > *:nth-child(3) { animation-delay: 220ms; }
  .pd-intro > *:nth-child(4) { animation-delay: 300ms; }
  .pd-intro > *:nth-child(5) { animation-delay: 380ms; }
}
