/* ─────────────────────────────────────────────────────────
   Portfolio · Luis Puesán — pixel-faithful CSS
   Recreated from portfolio.fig (frame: "Home page" 1440×9952,
   frame: "Desktop - 2" 1440×9886)
   ───────────────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #fff;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Palatino Linotype (web fallback) */
.serif { font-family: "Palatino Linotype", "Book Antiqua", Palatino, "URW Palladio L", serif; }

/* ── Page container ─────────────────────────────────────── */
.page {
  width: 100%;
  margin: 0 auto;
  position: relative;
  background: #fff;
  overflow-x: hidden; /* clip any not-yet-converted fixed-width section so there's no horizontal scroll */
}

/* ── Responsive foundation ──────────────────────────────── */
/* Centered content column used by every section as we convert them. */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}
img { max-width: 100%; height: auto; }

/* Shared horizontal rule (Line2 / Line6) */
.rule {
  width: 1452px;
  height: 1px;
  background: rgba(0, 0, 0, 0.2);
  margin-left: -6px;
}
.rule--light {
  background: rgb(238, 238, 238);
  width: 1450px;
}

/* Brand/name (Luis Puesán) */
.brand {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 24px;
  line-height: 100%;
  color: rgb(180, 46, 169);
}

/* Small mark line that follows the brand on hero / sections */
.mark-line {
  width: 21px;
  height: 1px;
  background: #000;
  display: inline-block;
}

/* ── Top nav ────────────────────────────────────────────── */
.topnav {
  padding-top: clamp(40px, 7vw, 100px);
}
.topnav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}
.topnav .brand {
  margin-right: 33px;
  /* keep the brand look now that it's a back-to-top link, not a span */
  color: rgb(180, 46, 169);
  font-size: 24px;
  text-decoration: none;
}
.topnav a {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 32px;
  color: #000;
  text-decoration: none;
}
.topnav a:hover { color: rgb(180, 46, 169); }
.topnav .topnav-underline {
  position: absolute;
  left: 271px;
  top: 110px;
  width: 100px;
  height: 5px;
  background: rgba(83, 88, 98, 0.29);
}
/* Mobile: the nav links are all same-page anchors, so hide them and keep just the brand */
@media (max-width: 768px) {
  .topnav-inner a:not(.brand) { display: none; }
}

/* ── Hero (home page) ───────────────────────────────────── */
.hero {
  position: relative;
  margin-top: clamp(56px, 11vw, 156px);
  min-height: 620px;
}
.hero-inner {
  position: relative;
  z-index: 1;          /* copy stays in the 1280 container, above the bleeding portrait */
  margin-top: -40px;   /* nudge the copy up ~40px */
}
.hero-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-name-row .brand { font-weight: 300; }
.hero-name-row::before {
  content: "";
  width: 21px;
  height: 1px;
  background: #000;
}

.hero-title {
  font-family: "Palatino Linotype", serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 4.6vw, 64px);
  line-height: 1.11;
  color: #000;
  margin-top: 31px;
  max-width: 563px;
}

.hero-sub {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.125rem, 1.6vw, 24px);
  line-height: 1.25;
  color: #000;
  margin-top: clamp(32px, 6vw, 80px);
  max-width: 579px;
}

.hero-cta {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 100%;
  color: rgb(7, 34, 133);
  text-decoration: none;
  display: inline-block;
  margin-top: clamp(32px, 7vw, 96px);
}
.hero-cta:hover { text-decoration: underline; }

.hero-portrait {
  position: absolute;
  right: calc(50vw - 771px);  /* same size, pulled in from the right edge: keeps ~40px from the copy and slides responsively */
  top: -80px;
  width: 760px;
  height: 700px;
  background-image: url("../images/portfolio/hero-portrait.png");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 800px auto;
}

/* Tablet / small desktop: scale the portrait so it never overlaps the copy */
@media (max-width: 1400px) {
  .hero-title,
  .hero-sub { max-width: 44vw; }
  .hero-portrait {
    width: 46vw;
    height: 44vw;
    right: -10px;
    top: -40px;
    background-size: 50vw auto;
  }
}

/* Mobile: stack the portrait below the copy at full width */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    margin-top: clamp(40px, 12vw, 80px);
  }
  .hero-inner { margin-top: 0; }
  .hero-title,
  .hero-sub { max-width: 100%; }
  .hero-portrait {
    position: static;
    width: min(calc(100% - 40px), 460px);
    height: auto;
    aspect-ratio: 4 / 5;
    margin: clamp(28px, 8vw, 44px) auto 0;
    right: auto;
    top: auto;
    background-size: cover;
  }
}

/* ── Approach section (cream bg) ────────────────────────── */
.approach-section {
  position: relative;
  width: 100%;
  background: rgb(251, 250, 246); /* full-bleed solid cream */
  border-top: 1px solid rgba(0, 0, 0, 0.1); /* divider between the hero and My approach, same line as the footer */
  margin-top: 0; /* flush with the hero bottom so the line meets the portrait's bottom edge */
  padding-block: clamp(40px, 6vw, 66px) clamp(56px, 8vw, 100px); /* vertical only; .container handles the sides */
}
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 20px;
  line-height: 100%;
  color: rgb(180, 46, 169);
}
.section-label::before {
  content: "";
  width: 21px;
  height: 1px;
  background: #000;
}
.section-label--right { color: #000; }

/* Home sections: only "My approach" keeps the leading rule before its label */
.what-section .section-label::before,
.selected-section .section-label::before,
.how-section .section-label::before,
.bring-section .section-label::before,
.experience-section .section-label::before { display: none; }

.approach-heading {
  font-family: "Palatino Linotype", serif;
  font-size: clamp(1.5rem, 2.6vw, 32px);
  line-height: 1.25;
  color: #000;
  text-align: left;   /* aligned to the "My approach" rule, not centered */
  max-width: 761px;
  margin: clamp(40px, 5vw, 70px) 0 0;
}

/* My Approach section image (replaces the framework-area diagram) */
.approach-image {
  display: block;
  width: 1086px;
  max-width: 100%;
  height: auto;
  margin: clamp(48px, 7vw, 90px) auto 0; /* centered; top gap scales down on small screens */
}

/* Framework cards row + decorative arc */
.framework-area {
  position: relative;
  margin: 90px auto 0;
  width: 1101px;
  height: 460px;
}
.framework-card {
  position: absolute;
  width: 317px;
  height: 307px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 7px 12.1px 5px rgba(0, 0, 0, 0.03);
  padding: 21px 27px 37px 25px;
  display: flex;
  flex-direction: column;
  gap: 21px;
}
.framework-card .step-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.framework-card .step-label {
  font-size: 12px;
  line-height: 18px;
  color: rgb(113, 118, 128);
}
.framework-card .step-icon {
  width: 24px; height: 24px;
  color: #000;
}
.framework-card h3 {
  font-family: "Palatino Linotype", serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 100%;
  color: rgb(129, 22, 126);
  margin-top: 24px;
}
.framework-card h3.outcome { color: rgb(14, 112, 144); }
.framework-card h3.ai { color: rgb(66, 48, 125); }

.framework-card p {
  font-size: 16px;
  line-height: 20px;
  color: rgb(113, 118, 128);
  margin-top: 21px;
}
.framework-card .chips {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.chip {
  border-radius: 16px;
  background: rgb(248, 249, 252);
  border: 1px solid rgb(213, 217, 235);
  padding: 2px 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: rgb(54, 63, 114);
}
.chip--purple {
  background: rgb(244, 243, 255);
  border-color: rgb(217, 214, 254);
  color: rgb(89, 37, 220);
}
.framework-card .dashed-divider {
  margin-top: 14px;
  border: none;
  border-top: 0.5px dashed rgba(0, 0, 0, 0.18);
  width: 100%;
}
.framework-card .signal {
  font-size: 12px;
  line-height: 18px;
  color: rgb(83, 88, 98);
  margin-top: 14px;
}

.framework-card.user { left: 0; top: 0; }
.framework-card.ai   { left: 784px; top: 0; }
.framework-card.behavior {
  left: 392px;
  top: 226px;
  width: 317px;
  height: 269px;
}

/* Decorative arrows (between cards) */
.arc-curve {
  position: absolute;
  left: 360px;
  top: 145px;
  width: 340.5px;
  height: 82.387px;
  pointer-events: none;
}
.feedback-pill {
  position: absolute;
  left: 442px;
  top: 263px;
  width: 151px;
  height: 28px;
  border-radius: 16px;
  background: rgb(244, 243, 255);
  border: 1px solid rgb(217, 214, 254);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 10px;
}
.feedback-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgb(185, 178, 11);
}
.feedback-pill span {
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: rgb(89, 37, 220);
}
.feedback-caption {
  position: absolute;
  left: 404px;
  top: 310px;
  width: 226px;
  font-family: "Palatino Linotype", serif;
  font-size: 24px;
  text-align: center;
  line-height: 26px;
  color: rgb(69, 44, 134);
}

/* Section rule */
.section-rule {
  width: 1452px;
  height: 1px;
  background: rgba(0, 0, 0, 0.2);
  margin-left: -6px;
}

/* ── "What I do" section (white) ───────────────────────── */
.what-section {
  position: relative;
  padding: clamp(64px, 9vw, 100px) 0 clamp(56px, 8vw, 100px);
  background: rgb(251, 250, 246);   /* cream */
  border-top: 1px solid rgba(0, 0, 0, 0.1);   /* divider above the section */
}
.what-heading {
  font-family: "Palatino Linotype", serif;
  font-size: clamp(2.25rem, 4.6vw, 64px);
  line-height: 1.05;
  color: #000;
  margin-left: 15%;   /* heading column — same indent across all sections */
  margin-top: 7px;
}
.what-description {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.125rem, 1.6vw, 24px);
  line-height: 1.5;
  color: #000;
  max-width: 50%;
  margin: clamp(32px, 4vw, 60px) 0 clamp(32px, 4vw, 60px) 20%;   /* copy column — aligned across sections */
}

.what-cards {
  display: flex;
  align-items: stretch;   /* all three cards share the same height */
  margin-top: clamp(32px, 5vw, 40px);
}
.what-card {
  min-height: 254px;
  padding: 36px;
}
.what-card .label {
  font-family: "Palatino Linotype", serif;
  font-size: 14px;
  line-height: 32px;
  color: #000;
}
.what-card h4 {
  font-family: "Palatino Linotype", serif;
  font-size: 32px;
  line-height: 40px;
  color: #000;
  font-weight: 400;
  margin-top: 8px;
}
.what-card p {
  font-size: 16px;
  line-height: 20px;
  color: rgb(113, 118, 128);
  margin-top: 18px;
}
.what-card.left {
  flex: 382;   /* proportional widths preserve the original 382/461/400 ratio */
  border-radius: 16px;   /* same rounded corners as mobile, at every breakpoint */
  background: rgba(255, 238, 238, 0.72);
}
.what-card.mid {
  flex: 461;
  border-radius: 16px;
  background: rgba(255, 229, 229, 0.73);
  border: 1px solid #cccccc;
}
.what-card.mid .label {
  color: rgb(246, 61, 104);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
}
.what-card.right {
  flex: 400;
  border-radius: 16px;
  background: rgba(255, 217, 217, 0.73);
}
.what-card.right .label { color: rgb(81, 11, 36); }

/* What I do — below 1024px: drop the editorial offsets + separate the three cards.
   At 1024px and up the cards stay touching, all equal height, no card raised. */
@media (max-width: 1023.98px) {
  .what-heading { margin-left: 0; }
  .what-description { margin-left: 0; max-width: 100%; }
  /* gap applies to the row here and (in cascade) to the stacked column on mobile */
  .what-cards { gap: 24px; }
}
/* What I do — mobile: stack the three cards */
@media (max-width: 768px) {
  .what-cards { flex-direction: column; align-items: stretch; }
  .what-card { min-height: 0; }
}

/* ── Selected Work ──────────────────────────────────────── */
.selected-section {
  position: relative;
  padding: clamp(64px, 9vw, 110px) 0 clamp(56px, 8vw, 100px);
  background: #fff;   /* white */
  border-top: 1px solid rgba(0, 0, 0, 0.1);   /* divider above the section */
}
.selected-heading {
  font-family: "Palatino Linotype", serif;
  font-size: clamp(2.25rem, 4.6vw, 64px);
  line-height: 1.05;
  color: #000;
  margin-left: 15%;
  margin-top: 7px;
}

.work-grid {
  margin-top: clamp(48px, 7vw, 80px);
  width: 100%;
  display: grid;
  grid-template-columns: 1.6fr 1fr;   /* image column wider, meta column narrower */
  column-gap: clamp(24px, 4vw, 48px);
  row-gap: clamp(40px, 6vw, 72px);
  align-items: start;
}
.work-card { min-width: 0; }
/* Dotted separator under the featured 2-up row */
.work-divider {
  grid-column: 1 / -1;
  border-top: 1px dotted rgba(0, 0, 0, 0.28);
}
.work-image {
  width: 100%;
  border-radius: 18px;
  background: #efeae3;
  position: relative;
  overflow: hidden;
}
.work-image--framework {
  height: 480px;
  background: url("../images/portfolio/framework-ui.png") left center/contain no-repeat;
}
.work-image--tunirvana {
  height: 480px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.work-image--tunirvana img {
  height: 460px;        /* size by height so the 416×756 image fits the card without clipping */
  width: auto;          /* keeps the 416:756 ratio → ~253px wide */
  display: block;
}
.work-image--listo {
  height: 440px;
  background: #d68466 url("../images/portfolio/intro-listo.png") center/cover no-repeat;
}
.work-image--nable,
.work-image--florida {
  background: transparent;
}
.work-image--nable img,
.work-image--florida img {
  width: 100%;
  display: block;
}
.work-meta {
  margin-top: 22px;
}
/* Rows 2-4: meta sits beside the image, vertically centered */
.work-meta--side {
  margin-top: 0;
  align-self: center;
}
.work-meta .tag {
  font-size: 12px;
  line-height: 18px;
  color: rgb(113, 118, 128);
  letter-spacing: 0.04em;
}
.work-meta h3 {
  font-family: "Palatino Linotype", serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 40px;
  color: #000;
  margin-top: 6px;
}
.work-meta .case-link {
  display: inline-block;
  margin-top: 14px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 24px;
  color: #000;
  text-decoration: none;
  letter-spacing: 0.05em;
}
.work-meta .case-link:hover { color: rgb(180, 46, 169); }

/* Selected Work — tablet: drop the heading indent */
@media (max-width: 1024px) {
  .selected-heading { margin-left: 0; }
}
/* Selected Work — mobile: single column, each image stacked above its meta */
@media (max-width: 768px) {
  .work-grid { grid-template-columns: 1fr; row-gap: clamp(40px, 9vw, 64px); }
  .work-meta--side { margin-top: 22px; align-self: start; }
  .work-image--framework,
  .work-image--tunirvana { height: clamp(280px, 70vw, 420px); }
  .work-image--listo { height: clamp(280px, 70vw, 420px); }
  .work-image--tunirvana img { height: clamp(240px, 62vw, 400px); }
}

/* ── How I think section ────────────────────────────────── */
.how-section {
  position: relative;
  padding: clamp(72px, 10vw, 130px) 0 clamp(56px, 8vw, 100px);
  background: rgb(251, 250, 246);   /* cream */
  border-top: 1px solid rgba(0, 0, 0, 0.1);   /* divider above the section */
}
.how-heading {
  font-family: "Palatino Linotype", serif;
  font-size: clamp(2rem, 4vw, 54px);
  line-height: 1.05;
  color: #000;
  margin-left: 15%;
  margin-top: 6px;
}
.how-description {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.125rem, 1.6vw, 24px);
  line-height: 1.5;
  color: #000;
  max-width: 56%;
  margin: clamp(32px, 4vw, 60px) 0 clamp(32px, 4vw, 60px) 20%;   /* copy column — aligned across sections */
}
.how-chips {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.5vw, 28px);
  justify-content: center;
  align-items: center;
  margin-top: clamp(28px, 4vw, 40px);
}
.how-chips .chip-text {
  font-family: "Palatino Linotype", serif;
  font-size: 24px;
  color: #000;
  line-height: 100%;
}
.how-chips .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgb(217, 217, 217);
}

/* ── What I bring ───────────────────────────────────────── */
.bring-section {
  position: relative;
  padding: clamp(72px, 10vw, 140px) 0 clamp(56px, 8vw, 100px);
  background: rgb(251, 250, 246);   /* cream */
  border-top: 1px solid rgba(0, 0, 0, 0.1);   /* divider above the section */
}
.bring-heading {
  font-family: "Palatino Linotype", serif;
  font-size: clamp(2rem, 4vw, 54px);
  line-height: 1.05;
  color: #000;
  margin-left: 15%;
  margin-top: 6px;
}
.bring-list {
  list-style: none;
  margin: clamp(40px, 6vw, 70px) auto 0;
  max-width: 760px;
}
.bring-list li {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 26px 28px;
  border-bottom: 1px solid rgb(238, 238, 238);
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 32px;
  color: #000;
}
.bring-list .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgb(207, 207, 207);
  font-size: 16px;
  color: #000;
  flex: 0 0 auto;
}

/* ── Experience ─────────────────────────────────────────── */
.experience-section {
  position: relative;
  padding: clamp(72px, 10vw, 140px) 0 clamp(56px, 8vw, 100px);
  background: rgb(251, 250, 246);   /* cream */
  border-top: 1px solid rgba(0, 0, 0, 0.1);   /* divider above the section */
}
.experience-heading {
  font-family: "Palatino Linotype", serif;
  font-size: clamp(2rem, 4vw, 54px);
  line-height: 1.05;
  color: #000;
  margin-left: 15%;
  margin-top: 6px;
}
.exp-list {
  list-style: none;
  margin: clamp(40px, 5vw, 60px) auto 0;
  max-width: 760px;
}
.exp-list li {
  padding: 26px 28px;
  border-bottom: 1px solid rgb(238, 238, 238);
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 32px;
  color: #000;
}

/* How I think / What I bring / Experience — tablet: drop the editorial indents */
@media (max-width: 1024px) {
  .how-heading,
  .bring-heading,
  .experience-heading { margin-left: 0; }
  .how-description { margin-left: 0; max-width: 100%; }
}

/* ── CTA + footer ───────────────────────────────────────── */
.cta-section {
  position: relative;
  padding: clamp(96px, 16vw, 200px) 0 clamp(40px, 6vw, 60px);
}
.cta-title {
  font-family: "Palatino Linotype", serif;
  font-size: clamp(2rem, 4.4vw, 54px);
  line-height: 1.18;
  color: #000;
  max-width: 720px;
}
.cta-sub {
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.4vw, 20px);
  line-height: 1.6;
  color: #000;
  max-width: 57%;
  margin: clamp(32px, 4vw, 50px) 0 0 26%;
}
.cta-actions {
  margin: clamp(24px, 3vw, 32px) 0 0 26%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
}
.cta-actions .contact-link {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.125rem, 1.6vw, 24px);
  color: #000;
  text-decoration: none;
}
.cta-actions .contact-link.email { color: rgb(180, 46, 169); }

/* CTA — tablet: drop the offsets; mobile: stack the contact links */
@media (max-width: 1024px) {
  .cta-sub { margin-left: 0; max-width: 100%; }
  .cta-actions { margin-left: 0; }
}
@media (max-width: 768px) {
  .cta-actions { flex-direction: column; align-items: flex-start; }
}

.site-footer {
  padding-block: clamp(40px, 6vw, 60px);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: rgb(113, 118, 128);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ─────────────────────────────────────────────────────────
   Case study page (Desktop - 2 / AI Behavior Framework)
   ───────────────────────────────────────────────────────── */

.cs-page { background: #fff; }

.cs-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  max-width: 1280px;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 95px) clamp(20px, 5vw, 48px) 0;
}
.cs-nav .brand-link {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 32px;
  color: #000;
  text-decoration: none;
  margin-right: 20px;
}
.cs-nav a {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 32px;
  color: #000;
  text-decoration: none;
}
/* Underline that stays under the current nav item ("Case Studies") */
.cs-nav a.is-current {
  border-bottom: 2px solid rgba(83, 88, 98, 0.5);
  padding-bottom: 6px;
}

/* Hero */
.cs-hero {
  max-width: 1280px;
  margin-inline: auto;
  padding: clamp(40px, 7vw, 80px) clamp(20px, 5vw, 48px) 0;
}
.cs-hero .label-small {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 32px;
  color: rgb(83, 88, 98);
  margin-bottom: 18px;
}
.cs-hero h1 {
  font-family: "Palatino Linotype", serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 54px);
  line-height: 1.18;
  color: #000;
}
/* Below the full-width title: paragraph (left) + diagram (right) */
.cs-hero-body {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  margin-top: clamp(40px, 5vw, 64px);
}
.cs-hero p {
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.4vw, 20px);
  line-height: 1.7;
  color: #000;
}
.cs-hero-right {
  height: clamp(280px, 28vw, 380px);
  background: url("../images/case_studies/Ai-behavior.png") center/contain no-repeat;
}
/* Case-study hero — mobile: stack the paragraph and the diagram */
@media (max-width: 768px) {
  .cs-hero-body { grid-template-columns: 1fr; gap: 32px; }
  .cs-hero-right { height: clamp(240px, 60vw, 320px); }
}

/* Hero metadata — Role / Focus / Tools / Type credits beneath the hero intro.
   Scoped to .cs-hero-meta so it can't affect other pages. */
.cs-hero-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: clamp(28px, 3vw, 36px);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.cs-hero-meta div { min-width: 0; }
.cs-hero-meta dt {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(140, 140, 140);
  margin-bottom: 8px;
}
.cs-hero-meta dd {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(0.95rem, 1.2vw, 17px);
  line-height: 1.5;
  color: #000;
}
@media (max-width: 768px) {
  .cs-hero-meta { grid-template-columns: 1fr 1fr; gap: 24px 28px; }
}

/* Cream section block — full-bleed background, content centered to the same
   1184px column index.cfm's .container uses (1280 max-width − 2×48 padding). */
.cs-cream {
  background: rgb(251, 250, 246);
  padding-block: clamp(64px, 10vw, 130px);
  padding-inline: max(clamp(20px, 5vw, 48px), calc((100% - 1184px) / 2));
  margin-top: clamp(56px, 8vw, 100px);
}

/* Single left-aligned column: stage label on top, heading + copy below,
   all flowing left-to-right across the full container width. */
.cs-row {
  margin-bottom: 0;
}
/* Faint divider + balanced spacing between consecutive blocks */
.cs-row + .cs-row {
  margin-top: clamp(64px, 9vw, 110px);
  padding-top: clamp(64px, 9vw, 110px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
/* Replacement images inside a case-study row body */
.cs-img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 40px;
}
/* Core principle diagram — compact and centered; width:100% keeps it
   legible (it scales down to fit the screen) on mobile. */
.cs-img[src*="core-principle"] {
  max-width: 460px;
  margin-inline: auto;
}
/* Framework model diagram — centered at a comfortable size */
.cs-img[src*="Framework_model"] {
  max-width: 920px;
  margin-inline: auto;
}
.cs-row .stage {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 32px;
  color: rgb(83, 88, 98);
  margin-bottom: clamp(16px, 2vw, 24px);
}
.cs-row .body { width: 100%; }

.cs-row h2 {
  font-family: "Palatino Linotype", serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 42px);
  line-height: 1.28;
  color: #000;
}
.cs-row .lead {
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.4vw, 20px);
  line-height: 1.6;
  color: #000;
  margin-top: 24px;
}

/* Core principle output → outcome row */
.principle-rows {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.principle-rows .pr-row {
  display: flex;
  align-items: center;
  gap: 60px;
  font-family: "Inter", sans-serif;
  font-size: 40px;
  line-height: 48px;
  color: #000;
}
.principle-rows .pr-icon {
  margin-left: auto;
  width: 79px;
  height: 79px;
  border: 1.5px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pr-row .arrow { color: #aaa; }

/* Framework model diagram */
.fm-diagram {
  margin-top: 60px;
  position: relative;
  height: 460px;
  width: 920px;
  max-width: 100%;
}
.fm-card {
  position: absolute;
  border-radius: 18px;
  padding: 28px 28px;
  border: 1px solid rgb(83, 88, 98);
}
.fm-card.left {
  left: 0; top: 92px;
  width: 290px; height: 240px;
  border-radius: 20px 0 0 20px;
  background: rgba(255, 238, 238, 0.72);
}
.fm-card.mid {
  left: 305px; top: 78px;
  width: 320px; height: 268px;
  border-radius: 18px;
  background: rgba(255, 229, 229, 0.73);
  box-shadow: 0 2px 4.6px 5px rgba(0, 0, 0, 0.05);
}
.fm-card.right {
  left: 640px; top: 92px;
  width: 290px; height: 240px;
  border-radius: 0 20px 20px 0;
  background: rgba(255, 217, 217, 0.73);
}
.fm-card h4 {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 20px;
  color: rgb(81, 11, 36);
}
.fm-card p {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 32px;
  color: #000;
  margin-top: 24px;
}
.fm-loop-caption {
  text-align: center;
  margin-top: 40px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: #000;
}
.fm-arc-top, .fm-arc-bot {
  position: absolute;
  width: 540px;
  left: 190px;
  pointer-events: none;
}
.fm-arc-top { top: -4px; }
.fm-arc-bot { top: 350px; transform: scaleY(-1); }

/* Interaction states */
.states-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 60px;
  flex-wrap: wrap;
}
.state-pill {
  background: rgb(212, 231, 233);
  border-radius: 24px;
  padding: 18px 36px;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 22px;
  color: #000;
  text-align: center;
  min-width: 200px;
}
.state-arrow {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 32px;
  color: rgb(192, 208, 210);
}
.fallback-row {
  margin-top: 40px;
  padding: 18px 36px;
  border: 1px dashed rgb(19, 120, 132);
  border-radius: 24px;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: rgb(20, 70, 76);
  width: 100%;
}

.states-table {
  margin-top: 60px;
  width: 100%;
}
.states-table .st-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  padding: 28px 0;
  border-bottom: 1px solid rgb(238, 238, 238);
  align-items: baseline;
}
.states-table .st-name {
  font-family: "Palatino Linotype", serif;
  font-size: 24px;
  color: rgb(14, 112, 144);
}
.states-table .st-desc {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  line-height: 32px;
  color: #000;
}

/* Trust spectrum */
.trust-spectrum {
  margin-top: 60px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.ts-col {
  background: linear-gradient(180deg, #fff 0%, #fffaeb 100%);
  padding: 30px;
  border-radius: 12px;
  min-height: 360px;
}
.ts-col h5 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 40px;
  margin-bottom: 14px;
}
.ts-col.user h5 { color: rgb(10, 106, 116); }
.ts-col.assisted h5 { color: rgb(127, 86, 217); text-align: center; }
.ts-col.guided h5 { color: rgb(246, 61, 104); text-align: right; }
.ts-col ul {
  list-style: none;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  line-height: 32px;
  color: #000;
}
.ts-col ul li::before {
  content: "·  ";
  color: rgb(83, 88, 98);
}
.ts-col.assisted ul { text-align: center; }
.ts-col.guided ul { text-align: right; }
.spectrum-foot {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: rgb(83, 88, 98);
  border-top: 1px solid rgb(208, 202, 202);
  padding-top: 16px;
}
.spectrum-foot {
  position: relative;
}
.spectrum-line {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgb(83, 88, 98);
}

/* Applied across products */
.applied-grid {
  margin-top: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px minmax(0, 1fr);
  gap: clamp(32px, 4vw, 60px);
  align-items: start;
}
.applied-col {
  font-family: "Inter", sans-serif;
}
.applied-col h3 {
  font-family: "Palatino Linotype", serif;
  font-weight: 400;
  font-size: 32px;
  color: #000;
}
.applied-col .notes {
  font-size: 16px;
  line-height: 26px;
  color: #000;
  margin-top: 22px;
}
.applied-col .lead {
  font-size: 18px;
  line-height: 28px;
  color: #000;
  margin-top: 36px;
}
/* Greeting / prompt shown as a conversation bubble (Listo, tuNirvana, prompt samples) */
.convo-quote {
  margin: 16px 0 0;
  padding: 18px 20px;
  background: rgba(214, 132, 102, 0.18);   /* warm tint, stronger so it reads as a bubble */
  border: 1px solid rgba(214, 132, 102, 0.4);
  border-radius: 18px 18px 18px 4px;        /* speech-bubble tail corner */
  font-family: "Palatino Linotype", serif;
  font-size: 19px;
  line-height: 1.5;
  color: #000;
}
.convo-translation {
  display: block;
  margin-top: 10px;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: rgb(140, 140, 140);
}

/* Image placeholders (used until real artwork exists) */
.cs-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 40px;
  padding: 28px;
  min-height: 240px;
  background: rgba(0, 0, 0, 0.025);
  border: 1px dashed rgba(0, 0, 0, 0.28);
  border-radius: 14px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: rgb(120, 120, 120);
}
.cs-placeholder--hero {
  margin-top: 0;
  height: clamp(280px, 28vw, 380px);
  min-height: 0;
}

/* Simple bulleted list (My role, UX takeaways) */
.cs-bullets {
  list-style: none;
  margin-top: 40px;
}
.cs-bullets li {
  position: relative;
  padding: 18px 0 18px 26px;
  border-bottom: 1px solid rgb(238, 238, 238);
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.4vw, 20px);
  line-height: 1.55;
  color: #000;
}
.cs-bullets li::before {
  content: "·";
  position: absolute;
  left: 6px;
  color: rgb(83, 88, 98);
}

/* Prompt sample / interaction moment */
.moment { margin-top: 56px; }
.moment:first-of-type { margin-top: 40px; }
/* Divider between consecutive moments so each one reads as its own section */
.moment + .moment {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 56px;
}
.moment h3 {
  font-family: "Palatino Linotype", serif;
  font-weight: 400;
  font-size: clamp(1.375rem, 2.4vw, 28px);
  line-height: 1.3;
  color: #000;
}
.moment .purpose {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: rgb(83, 88, 98);
  margin-top: 14px;
}
.moment .purpose strong { color: #000; font-weight: 600; }
/* Prompt moment as two columns: context (left) + Luz's reply bubble (right).
   Collapses to a single column on mobile. */
.moment-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: 22px;
}
.moment-grid .moment-context > .lead:first-child { margin-top: 0; }
.moment-grid .convo-quote { margin-top: 0; }
@media (max-width: 768px) {
  .moment-grid { grid-template-columns: 1fr; gap: 20px; }
}
/* The phone frame ("mobile border") is baked into each PNG, so show the whole
   image with `contain` (no cropping) at its exact aspect ratio. No CSS border,
   radius, or shadow needed — they live in the artwork. */
.applied-screen {
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-inline: auto;
  background: center / contain no-repeat;
}
.applied-screen.listo {
  aspect-ratio: 379 / 812;
  background-image: url("../images/case_studies/Listo-screen.png");
}
.applied-screen.tunirvana {
  aspect-ratio: 381 / 826;
  background-image: url("../images/case_studies/tuNirvana-screen.png");
}

/* Outcomes table */
.outcomes-list {
  margin-top: 60px;
  list-style: none;
}
.outcomes-list li {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 26px 0;
  border-bottom: 1px solid rgb(238, 238, 238);
  font-family: "Palatino Linotype", serif;
  font-size: 24px;
  color: #000;
}
.outcomes-list .num {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: rgb(113, 118, 128);
  width: 28px;
}

/* Closing */
.cs-closing {
  padding-block: clamp(72px, 10vw, 130px);
  padding-inline: max(clamp(20px, 5vw, 48px), calc((100% - 1184px) / 2));
  border-top: 1px solid rgb(208, 202, 202);
}
.cs-closing h2 {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 24px);
  line-height: 1.5;
  color: #000;
  max-width: 964px;
  width: 100%;
}
.cs-closing .next {
  margin-top: 80px;
  font-family: "Inter", sans-serif;
  font-size: 24px;
  color: rgb(83, 88, 98);
}
.cs-closing .next a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.cs-closing .next a:hover { color: rgb(180, 46, 169); }

/* Page footer */
.cs-footer {
  padding-block: 30px 60px;
  padding-inline: max(clamp(20px, 5vw, 48px), calc((100% - 1184px) / 2));
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #000;
}

/* ── Listo case study: image caption + icon card grid ───── */
.cs-caption {
  margin-top: 14px;
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  color: rgb(120, 120, 120);
}
.cs-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 36px);
  margin-top: 40px;
}
.cs-card { text-align: center; }
.cs-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 20px;
}
.cs-card h4 {
  font-family: "Inter", sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #000;
}
.cs-card p {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: rgb(60, 60, 60);
}
@media (max-width: 768px) { .cs-cards { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .cs-cards { grid-template-columns: 1fr; } }
/* Equal two-column layout (personas side by side, paired demo blocks) */
.cs-twocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: 40px;
}
@media (max-width: 768px) { .cs-twocol { grid-template-columns: 1fr; gap: 36px; } }
/* Three-column layout with vertical dividers (e.g., challenge breakdown).
   Stacks with bottom dividers on mobile. */
.cs-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 40px;
}
.cs-three > div { padding-inline: clamp(20px, 2.5vw, 36px); }
.cs-three > div:first-child { padding-left: 0; }
.cs-three > div:last-child { padding-right: 0; }
.cs-three > div:not(:last-child) { border-right: 1px solid rgba(0, 0, 0, 0.14); }
@media (max-width: 768px) {
  .cs-three { grid-template-columns: 1fr; }
  .cs-three > div { padding-inline: 0; }
  .cs-three > div:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.14);
    padding-bottom: 28px;
    margin-bottom: 28px;
  }
}
/* Responsive visibility helpers (desktop/tablet vs mobile) */
.only-mobile { display: none; }
@media (max-width: 768px) {
  .only-desktop { display: none; }
  .only-mobile { display: block; }
}

/* ── Case study · responsive (tablet) ───────────────────── */
@media (max-width: 1024px) {
  .applied-grid {
    grid-template-columns: minmax(0, 1fr) 300px minmax(0, 1fr);
    gap: clamp(24px, 3vw, 40px);
  }
}

/* ── Case study · responsive (mobile) ───────────────────── */
@media (max-width: 768px) {
  /* Interaction states: name above its description */
  .states-table .st-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  /* Applied across products: one centered column, phone screen in the middle */
  .applied-grid {
    grid-template-columns: 1fr;
    gap: clamp(28px, 8vw, 48px);
  }
}
