:root {
  --ink: #11110f;
  --paper: #f2efe7;
  --accent: #d7a646;
  --red: #b7332e;
  --forest: #16392e;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

button {
  color: inherit;
  font: inherit;
}

.portfolio {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
  transition: background-color .7s var(--ease), color .7s var(--ease);
}

.tone-paper {
  color: var(--ink);
  background: var(--paper);
}

.tone-gold {
  color: var(--ink);
  background: var(--accent);
}

.tone-red {
  color: var(--paper);
  background: var(--red);
}

.tone-forest {
  color: var(--paper);
  background: var(--forest);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 28px;
}

.wordmark,
.top-actions button,
.controls button,
.closing-actions button,
.overview button {
  border: 0;
  background: none;
  cursor: pointer;
}

.wordmark {
  display: block;
  position: relative;
  width: 150px;
  height: 56px;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}

.wordmark img {
  display: block;
  position: absolute;
  width: 180px;
  height: 180px;
  max-width: none;
  transform: translate(-14px, -64px);
}

.wordmark:hover,
.wordmark:focus-visible {
  transform: translateY(-2px);
  opacity: .8;
}

.wordmark:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.top-actions {
  display: flex;
  gap: 22px;
  align-items: center;
}

.top-actions button {
  padding: 0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 96px 7vw 72px;
  animation: reveal .85s var(--ease) both;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.copy {
  position: relative;
  z-index: 3;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 7.3vw, 126px);
  font-weight: 400;
  line-height: .88;
  letter-spacing: -.055em;
}

.note {
  max-width: 32ch;
  margin: 20px 0 0;
  font-size: clamp(14px, 1.25vw, 20px);
  line-height: 1.35;
}

.layout-cover {
  align-content: center;
  background:
    radial-gradient(circle at 70% 28%, rgba(215, 166, 70, .24), transparent 26%),
    linear-gradient(125deg, transparent 47%, rgba(255,255,255,.04) 47%, rgba(255,255,255,.04) 48%, transparent 48%);
}

.layout-cover h1,
.layout-closing h1 {
  max-width: 9ch;
  font-size: clamp(68px, 10.5vw, 176px);
}

.layout-cover .note {
  margin-top: 30px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}

.layout-hero {
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.55fr);
  align-items: center;
  gap: 6vw;
}

.artwork {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.layout-hero .artwork {
  width: min(100%, 1100px);
  height: min(72vh, 780px);
  height: min(72dvh, 780px);
  justify-self: center;
}

figure {
  margin: 0;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}

figure img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  user-select: none;
}

.layout-hero figure {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: clamp(10px, 1.25vw, 22px);
  box-shadow: 0 28px 80px rgba(0,0,0,.2);
}

.layout-hero figure.contain,
.layout-hero figure.wide {
  display: grid;
  place-items: center;
  padding: clamp(28px, 4vw, 72px);
  background: #fff;
}

.layout-hero figure.contain img,
.layout-hero figure.wide img {
  object-fit: contain;
}

.layout-hero .artwork-natural {
  display: grid;
  place-items: center;
  width: 100%;
  height: min(74dvh, 820px);
  max-height: calc(100dvh - 150px);
  aspect-ratio: auto;
  overflow: visible;
}

.layout-hero .artwork-natural figure.fit-full {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.layout-hero .artwork-natural figure.fit-full img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: scale-down !important;
}

.layout-pair {
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 28px;
}

.layout-pair .copy {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  align-items: end;
}

.layout-pair .copy .eyebrow {
  grid-column: 1;
}

.layout-pair .copy h1 {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: clamp(46px, 5.8vw, 96px);
}

.layout-pair .copy .note {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: end;
}

.layout-pair .artwork {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  overflow: hidden;
}

.layout-pair figure {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: clamp(8px, 1vw, 16px);
  background: rgba(255,255,255,.12);
}

.layout-pair figure img {
  object-fit: contain;
}

.layout-grid {
  grid-template-columns: .65fr 1.35fr;
  align-items: center;
  gap: 5vw;
}

.layout-grid .artwork {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  height: auto;
}

.layout-grid figure {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 10%;
  background: #fff;
}

.layout-grid figure img {
  object-fit: contain;
}

.layout-closing {
  align-content: center;
  background:
    linear-gradient(135deg, transparent 0 61%, rgba(215,166,70,.12) 61% 62%, transparent 62%),
    radial-gradient(circle at 85% 85%, rgba(183,51,46,.24), transparent 26%);
}

.layout-social-intro {
  align-content: center;
  background:
    linear-gradient(115deg, transparent 0 49%, rgba(215,166,70,.14) 49% 50%, transparent 50%),
    radial-gradient(circle at 82% 26%, rgba(183,51,46,.3), transparent 25%);
}

.layout-social-intro h1 { max-width: 8ch; font-size: clamp(64px, 9vw, 150px); }
.layout-social-intro .note { max-width: 42ch; }

.social-preview {
  position: absolute;
  right: 7vw;
  bottom: 11vh;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  transform: rotate(-5deg);
}

.social-preview span {
  display: grid;
  place-items: end start;
  width: clamp(50px, 7vw, 108px);
  aspect-ratio: 4 / 5;
  padding: 9px;
  border: 1px solid rgba(242,239,231,.35);
  background: var(--forest);
  font-size: 9px;
  font-weight: 800;
}

.social-preview span:nth-child(2) { background: var(--red); transform: translateY(-12px); }
.social-preview span:nth-child(3) { color: var(--ink); background: var(--accent); transform: translateY(7px); }
.social-preview span:nth-child(4) { color: var(--ink); background: var(--paper); transform: translateY(-7px); }
.social-preview span:nth-child(5) { color: var(--ink); background: #d8a3a6; }

.layout-social {
  grid-template-columns: minmax(230px,.72fr) minmax(360px,1.28fr);
  align-items: center;
  gap: 6vw;
}

.layout-social h1 { font-size: clamp(46px,6vw,96px); }
.social-stage { justify-self: center; width: min(100%, 660px); min-width: 0; }
.social-post {
  position: relative;
  isolation: isolate;
  width: min(60vh, 620px);
  width: min(60dvh, 620px);
  max-width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: clamp(22px, 3vw, 48px);
  color: #f2efe7;
  background: #16392e;
  box-shadow: 0 32px 90px rgba(0,0,0,.28);
}

.social-grain {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .22;
  background-image: repeating-radial-gradient(circle at 20% 30%, transparent 0 2px, rgba(255,255,255,.18) 3px, transparent 4px);
  background-size: 13px 15px;
  mix-blend-mode: overlay;
}

.social-brand,.social-kicker,.social-detail,.social-tag { position: absolute; z-index: 2; font-weight: 750; text-transform: uppercase; }
.social-brand { top: 7%; left: 8%; font-size: clamp(10px,1vw,15px); letter-spacing: .12em; }
.social-kicker { top: 20%; left: 8%; font-size: clamp(8px,.72vw,11px); letter-spacing: .18em; }
.social-headline { position: absolute; z-index: 2; top: 29%; left: 8%; max-width: 84%; font-family: Georgia,serif; font-size: clamp(38px,4.6vw,76px); line-height: .89; letter-spacing: -.055em; }
.social-detail { left: 8%; bottom: 15%; max-width: 60%; font-size: clamp(8px,.75vw,12px); line-height: 1.45; letter-spacing: .09em; }
.social-tag { left: 8%; bottom: 7%; font-size: clamp(8px,.72vw,11px); letter-spacing: .15em; }
.social-mark { position: absolute; z-index: 3; right: 7%; bottom: 6%; text-align: right; font-family: Georgia,serif; font-size: clamp(18px,2vw,30px); line-height: .75; }
.social-mark span { font-family: Arial,sans-serif; font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.social-shape { position: absolute; z-index: 1; border: 1px solid currentColor; opacity: .6; }
.sample-caption { margin: 10px 0 0; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-align: center; text-transform: uppercase; }

.theme-trail .social-post { background: linear-gradient(155deg,#224c3b 0 58%,#d7a646 58%); }
.theme-trail .social-shape { right: -18%; bottom: 11%; width: 75%; aspect-ratio: 1; border: 46px solid rgba(17,17,15,.16); border-radius: 48% 52% 35% 65%; transform: rotate(27deg); }
.theme-rivet .social-post { background: #b7332e; }
.theme-rivet .social-headline { font-family: Arial,sans-serif; font-weight: 900; font-style: italic; letter-spacing: -.07em; }
.theme-rivet .social-shape { right: -14%; top: 8%; width: 54%; height: 84%; border: 24px solid rgba(17,17,15,.2); transform: skew(-10deg); }
.theme-coffee .social-post { color: #11110f; background: #d7a646; }
.theme-coffee .social-shape { right: -12%; bottom: 8%; width: 57%; aspect-ratio: 1; border: 44px solid rgba(112,55,32,.26); border-radius: 50%; }
.theme-build .social-post { color: #11110f; background: #f2efe7; }
.theme-build .social-headline { font-family: Arial,sans-serif; font-weight: 800; letter-spacing: -.06em; }
.theme-build .social-shape { right: -6%; top: 18%; width: 52%; height: 58%; border: 18px solid #d7a646; transform: rotate(8deg); }
.theme-boutique .social-post { color: #11110f; background: #d8a3a6; }
.theme-boutique .social-headline { font-style: italic; }
.theme-boutique .social-shape { right: -13%; top: 14%; width: 56%; aspect-ratio: 1; border: 2px solid #b7332e; border-radius: 50%; box-shadow: 0 0 0 22px rgba(183,51,46,.15),0 0 0 44px rgba(183,51,46,.1); }

.mini-trail { background: var(--forest); }
.mini-rivet { background: var(--red); }
.mini-coffee { color: var(--ink); background: var(--accent); }
.mini-build { color: var(--ink); background: var(--paper); }
.mini-boutique { color: var(--ink); background: #d8a3a6; }

.closing-actions {
  display: flex;
  gap: 12px;
  margin-top: 36px;
}

.closing-actions button {
  border: 1px solid currentColor;
  padding: 13px 18px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.closing-actions button:first-child {
  background: var(--paper);
  color: var(--ink);
}

.controls {
  position: fixed;
  z-index: 20;
  right: 28px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.controls button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.controls button:disabled {
  opacity: .25;
  cursor: default;
}

.controls span {
  min-width: 54px;
  text-align: center;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
}

.progress {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(127,127,127,.24);
}

.progress span {
  display: block;
  height: 100%;
  background: currentColor;
  transition: width .6s var(--ease);
}

.overview {
  position: fixed;
  z-index: 50;
  inset: 0;
  overflow-y: auto;
  padding: 24px 28px 60px;
  color: var(--paper);
  background: rgba(17,17,15,.98);
  animation: overview-in .45s var(--ease) both;
}

@keyframes overview-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overview-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 0 20px;
  background: var(--ink);
}

.overview-head p,
.overview-head button {
  margin: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px 18px;
}

.overview-grid button,
.overview-grid a {
  position: relative;
  display: block;
  padding: 0;
  color: var(--paper);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.overview-grid button > span,
.overview-grid a > span {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  padding: 4px 6px;
  color: var(--paper);
  background: rgba(17,17,15,.8);
  font-size: 9px;
  letter-spacing: .08em;
}

.overview-grid img,
.index-card {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  filter: saturate(.75);
  transition: transform .35s var(--ease), filter .35s var(--ease);
}

/* One consistent, uncropped presentation stage for every project. */
.layout-hero .artwork,
.layout-pair .artwork,
.layout-grid .artwork {
  align-self: center;
  max-width: 1100px;
  max-height: calc(100dvh - 180px);
  margin-inline: auto;
}

.layout-hero .artwork {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
}

.layout-hero figure,
.layout-pair figure,
.layout-grid figure {
  border: 1px solid rgba(17, 17, 15, .1);
  background: #f7f4ec;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .14);
}

.layout-hero figure,
.layout-pair figure {
  padding: clamp(12px, 1.8vw, 28px);
}

.layout-hero figure img,
.layout-pair figure img,
.layout-grid figure img,
.overview-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center;
}

.layout-pair .artwork {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
}

.layout-pair figure {
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
}

.layout-grid .artwork {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
}

.overview-grid img {
  padding: 10px;
  background: #f7f4ec;
}

.index-card {
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 40px;
}

.overview-grid button:hover img,
.overview-grid button.active img,
.overview-grid a:hover img,
.overview-grid a:focus-visible img {
  filter: saturate(1);
  transform: scale(.985);
}

.overview-grid strong {
  display: block;
  margin-top: 10px;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 400;
}

@media (max-width: 820px) {
  .topbar {
    padding: 18px;
  }

  .wordmark {
    width: 126px;
    height: 48px;
  }

  .wordmark img {
    width: 154px;
    height: 154px;
    transform: translate(-13px, -55px);
  }

  .desktop-action {
    display: none;
  }

  .slide {
    padding: 82px 18px 76px;
  }

  .layout-hero,
  .layout-grid,
  .layout-social {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 26px;
  }

  .layout-social { gap: 16px; }
  .layout-social .copy { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: end; }
  .layout-social .copy .eyebrow { grid-column: 1 / -1; margin-bottom: 8px; }
  .layout-social .copy h1 { font-size: clamp(34px,10vw,52px); }
  .layout-social .copy .note { max-width: 24ch; margin: 0; font-size: 11px; }
  .social-stage { align-self: center; }
  .social-post { width: min(48dvh, 100%); margin-inline: auto; padding: 20px; }
  .social-preview { right: 18px; bottom: 14vh; opacity: .55; }
  .social-preview span { width: 48px; }

  h1,
  .layout-cover h1,
  .layout-closing h1 {
    max-width: 10ch;
    font-size: clamp(48px, 15vw, 78px);
  }

  .layout-hero .artwork {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    min-height: 0;
    align-self: stretch;
  }

  .layout-hero figure {
    height: 100%;
    max-height: none;
    padding: 8px;
  }

  .layout-hero .artwork-natural {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: auto;
    align-self: center;
  }

  .layout-hero .artwork-natural figure.fit-full img {
    max-height: 48dvh;
  }

  .layout-hero figure img {
    min-height: 0;
  }

  .layout-pair .copy {
    display: block;
  }

  .layout-pair .copy h1 {
    font-size: 48px;
  }

  .layout-pair .copy .note {
    margin-top: 10px;
  }

  .layout-pair .artwork {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    gap: 10px;
  }

  .layout-pair figure {
    padding: 6px;
  }

  .layout-grid .artwork {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    gap: 10px;
  }

  .controls {
    right: 18px;
    bottom: 18px;
  }

  .overview {
    padding: 20px 18px 50px;
  }

  .overview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px 10px;
  }
}

@media (max-width: 540px) {
  .top-actions {
    gap: 14px;
  }

  .layout-pair .artwork {
    grid-template-columns: 1fr 1fr;
  }

  .layout-pair figure {
    max-height: none;
  }

  .layout-grid .artwork {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-height: 700px) and (min-width: 821px) {
  .topbar {
    padding-top: 16px;
    padding-bottom: 14px;
  }

  .slide {
    padding-top: 72px;
    padding-bottom: 56px;
  }

  .layout-hero {
    gap: 4vw;
  }

  .layout-hero .artwork {
    height: min(76vh, 620px);
    height: min(76dvh, 620px);
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  h1 {
    font-size: clamp(42px, 6.4vw, 86px);
  }

  .note {
    margin-top: 12px;
  }

  .layout-pair {
    gap: 14px;
  }

  .layout-pair .copy h1 {
    font-size: clamp(38px, 5vw, 70px);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .topbar {
    padding: 12px 16px;
  }

  .wordmark {
    width: 110px;
    height: 40px;
  }

  .wordmark img {
    width: 132px;
    height: 132px;
    transform: translate(-10px, -47px);
  }

  .slide,
  .layout-hero,
  .layout-grid,
  .layout-social {
    grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr);
    grid-template-rows: 1fr;
    align-items: center;
    gap: 24px;
    padding: 58px 16px 48px;
  }

  .social-post { width: min(70dvh, 390px); }
  .layout-social .copy h1 { font-size: clamp(32px,6vw,52px); }

  .layout-cover,
  .layout-closing {
    display: grid;
    grid-template-columns: 1fr;
  }

  .layout-hero .artwork {
    height: auto;
    max-height: calc(100dvh - 108px);
    aspect-ratio: 16 / 8;
  }

  .layout-hero .artwork-natural {
    height: 100%;
    max-height: calc(100dvh - 108px);
    aspect-ratio: auto;
  }

  .layout-hero .artwork-natural figure.fit-full img {
    max-height: calc(100dvh - 108px);
  }

  .layout-hero figure {
    max-height: 100%;
  }

  h1,
  .layout-cover h1,
  .layout-closing h1 {
    font-size: clamp(36px, 8vw, 58px);
  }

  .note {
    margin-top: 8px;
    font-size: 12px;
  }

  .layout-pair {
    display: grid;
    grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr);
    grid-template-rows: 1fr;
  }

  .layout-pair .copy {
    display: block;
  }

  .layout-pair .copy h1 {
    font-size: clamp(34px, 7vw, 52px);
  }

  .layout-pair .artwork {
    height: auto;
    max-height: calc(100dvh - 108px);
    aspect-ratio: 16 / 8;
  }

  .layout-pair figure {
    max-height: 100%;
  }

  .controls {
    right: 16px;
    bottom: 10px;
  }
}

/* Slides 2 and 6: preserve the source artwork's natural ratio at every size. */
.layout-hero .artwork.artwork-natural {
  display: grid;
  place-items: center;
  width: 100%;
  height: min(74dvh, 820px);
  max-height: calc(100dvh - 150px);
  aspect-ratio: auto;
  overflow: visible;
}

.layout-hero .artwork.artwork-natural figure.fit-full {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.layout-hero .artwork.artwork-natural figure.fit-full img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(74dvh, 820px);
  object-fit: scale-down !important;
}

@media (max-width: 820px) {
  .layout-hero .artwork.artwork-natural {
    height: auto;
    max-height: none;
  }

  .layout-hero .artwork.artwork-natural figure.fit-full img {
    max-height: 48dvh;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .layout-hero .artwork.artwork-natural {
    height: 100%;
    max-height: calc(100dvh - 108px);
  }

  .layout-hero .artwork.artwork-natural figure.fit-full img {
    max-height: calc(100dvh - 108px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Photo-led feed mockups: compact enough for shorter MacBook displays. */
.layout-social {
  grid-template-columns: minmax(220px,.7fr) minmax(340px,1.3fr);
  gap: clamp(28px,5vw,78px);
  padding-top: 82px;
  padding-bottom: 54px;
}

.layout-social .copy { align-self: center; }
.layout-social h1 { font-size: clamp(42px,5.2vw,82px); }
.layout-social .note { font-size: clamp(13px,1.05vw,17px); }

.social-stage {
  width: min(100%, 520px);
  max-height: calc(100dvh - 126px);
  display: grid;
  place-items: center;
}

.feed-card {
  width: min(45dvh, 430px, 100%);
  overflow: hidden;
  color: #11110f;
  background: #fff;
  border: 1px solid rgba(17,17,15,.14);
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(0,0,0,.24);
}

.feed-head {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  font-family: Arial,sans-serif;
}

.feed-head > span:nth-child(2) { display: grid; gap: 1px; }
.feed-head strong { font-size: 10px; line-height: 1.1; }
.feed-head small { font-size: 8px; }
.feed-head b { margin-left: auto; font-size: 11px; letter-spacing: 1px; }
.feed-avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #fff; background: var(--forest); font-family: Georgia,serif; font-size: 15px; }
.theme-rivet .feed-avatar { background: var(--red); }
.theme-coffee .feed-avatar { color: var(--ink); background: var(--accent); }
.theme-build .feed-avatar { background: #4e4b45; }
.theme-boutique .feed-avatar { color: var(--ink); background: #d8a3a6; }

.feed-card .social-post {
  width: 100%;
  max-width: none;
  aspect-ratio: 4 / 5;
  padding: 0;
  box-shadow: none;
  background: #222;
}

.social-photo { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.social-shade { position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg,rgba(7,9,7,.52),transparent 43%,rgba(7,9,7,.48)); }
.theme-coffee .social-shade,.theme-build .social-shade,.theme-boutique .social-shade { background: linear-gradient(180deg,rgba(20,12,7,.4),transparent 48%,rgba(20,12,7,.48)); }

.feed-card .social-brand { top: 6%; left: 7%; font-size: clamp(9px,1dvh,12px); letter-spacing: .15em; }
.feed-card .social-kicker { top: 14%; left: 7%; font-size: clamp(7px,.8dvh,9px); }
.feed-card .social-headline { top: 21%; left: 7%; font-size: clamp(30px,4.2dvh,48px); color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.theme-rivet .feed-card .social-headline { font-family: Arial,sans-serif; font-weight: 900; font-style: italic; }
.theme-build .feed-card .social-headline { font-family: Arial,sans-serif; font-weight: 800; letter-spacing: -.055em; }
.theme-boutique .feed-card .social-headline { font-style: italic; }
.feed-card .social-detail { left: 7%; bottom: 7%; max-width: 72%; font-size: clamp(7px,.8dvh,9px); color: #fff; }
.feed-card .social-mark { right: 7%; bottom: 6%; color: #fff; font-family: Arial,sans-serif; font-size: 10px; font-weight: 800; line-height: 1; letter-spacing: .07em; }
.feed-card .social-mark span { font-size: 6px; }

.feed-foot { padding: 7px 11px 10px; font-family: Arial,sans-serif; }
.feed-actions { display: flex; align-items: center; gap: 13px; height: 23px; font-size: 19px; line-height: 1; }
.feed-actions span:last-child { margin-left: auto; }
.feed-foot p { min-height: 22px; margin: 2px 0 0; font-size: 8px; line-height: 1.35; }
.feed-foot p strong { margin-right: 3px; }
.feed-card + .sample-caption { margin-top: 7px; font-size: 7px; }

@media (max-height: 760px) and (min-width: 821px) {
  .layout-social { padding-top: 68px; padding-bottom: 42px; }
  .feed-card { width: min(47dvh, 360px, 100%); }
  .feed-head { height: 40px; padding-block: 5px; }
  .feed-avatar { width: 27px; height: 27px; }
  .feed-foot { padding-block: 5px 7px; }
  .feed-actions { height: 19px; font-size: 16px; }
  .layout-social h1 { font-size: clamp(38px,4.6vw,66px); }
}

@media (max-width: 820px) {
  .layout-social { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding-top: 78px; padding-bottom: 61px; gap: 9px; }
  .layout-social .copy { grid-template-columns: minmax(0,1fr) minmax(110px,.8fr); }
  .layout-social .copy h1 { font-size: clamp(30px,9vw,43px); line-height: .9; }
  .layout-social .copy .note { max-width: 21ch; font-size: 10px; }
  .social-stage { justify-self: stretch; width: 100%; max-height: calc(100dvh - 210px); }
  .feed-card { width: min(39dvh, 330px, 100%); border-radius: 8px; }
  .feed-head { height: 38px; padding: 5px 8px; }
  .feed-avatar { width: 26px; height: 26px; font-size: 12px; }
  .feed-head strong { font-size: 8px; }
  .feed-head small { font-size: 7px; }
  .feed-foot { padding: 4px 8px 7px; }
  .feed-actions { height: 18px; font-size: 16px; gap: 10px; }
  .feed-foot p { min-height: 18px; max-height: 22px; overflow: hidden; font-size: 7px; }
  .feed-card + .sample-caption { font-size: 6px; }
}

@media (max-width: 390px) {
  .layout-social { padding-top: 68px; gap: 6px; }
  .layout-social .copy .eyebrow { display: none; }
  .feed-card { width: min(36dvh, 290px, 100%); }
}

@media (max-height: 700px) and (min-width: 821px) {
  .feed-card { width: min(46dvh, 340px, 100%); }
}

/* Closing slide: clear hierarchy and a usable CTA at every viewport height. */
.layout-closing {
  grid-template-columns: minmax(0,1.35fr) minmax(280px,.65fr);
  align-items: center;
  align-content: initial;
  gap: clamp(36px,7vw,120px);
  padding-top: 88px;
  padding-bottom: 68px;
}

.layout-closing .copy { align-self: center; }
.layout-closing h1 {
  max-width: 8.5ch;
  font-size: clamp(58px,7.6vw,118px);
  line-height: .86;
}
.layout-closing .note {
  margin-top: 24px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.closing-panel {
  align-self: center;
  padding: clamp(24px,3vw,44px);
  border: 1px solid rgba(242,239,231,.28);
  background: rgba(242,239,231,.045);
  backdrop-filter: blur(8px);
}
.closing-panel > p {
  margin: 0 0 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.closing-panel > a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 18px;
  border-bottom: 1px solid currentColor;
  color: inherit;
  font-family: Georgia,"Times New Roman",serif;
  font-size: clamp(31px,3.2vw,50px);
  line-height: .95;
  letter-spacing: -.045em;
  text-decoration: none;
}
.closing-panel > a span { font-family: Arial,sans-serif; font-size: .55em; }
.closing-panel > small {
  display: block;
  margin-top: 14px;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.closing-panel .closing-actions { margin-top: 30px; }
.closing-panel .closing-actions button { padding: 10px 12px; font-size: 9px; }

@media (max-height: 760px) and (min-width: 821px) {
  .layout-closing { padding-top: 72px; padding-bottom: 48px; }
  .layout-closing h1 { font-size: clamp(54px,6.9vw,88px); }
  .layout-closing .note { margin-top: 16px; }
  .closing-panel { padding: 26px; }
  .closing-panel > a { font-size: clamp(30px,2.8vw,42px); }
  .closing-panel .closing-actions { margin-top: 22px; }
}

@media (max-width: 820px) {
  .layout-closing {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 24px;
    padding: 84px 18px 70px;
  }
  .layout-closing h1 { max-width: 9ch; font-size: clamp(48px,14vw,74px); }
  .layout-closing .note { margin-top: 16px; }
  .closing-panel { align-self: end; width: 100%; padding: 20px; }
  .closing-panel > a { font-size: clamp(30px,10vw,44px); }
  .closing-panel .closing-actions { margin-top: 18px; }
}

/* CRM case study: let the dashboard itself fill the stage without a mockup frame. */
.layout-hero figure.crm-dashboard {
  align-self: center;
  width: 100%;
  height: auto;
  aspect-ratio: 1.22 / 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.layout-hero figure.crm-dashboard img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: initial !important;
  object-position: top center;
}

@media (max-width: 820px) {
  .layout-hero figure.crm-dashboard {
    aspect-ratio: 1.18 / 1;
  }
}
