/* ════════════════════════════════════════
   SHARED STYLES — Chris Kovacs Portfolio
   Desktop first, media queries at bottom
   ════════════════════════════════════════ */

/* ── Skip to main content (accessibility) ── */
.skip-to-main {
  position: absolute;
  top: -100%;
  left: 16px;
  background: #E8A838;
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-to-main:focus {
  top: 0;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
body {
  background: #212121;
  font-family: 'Inter', sans-serif;
  padding-top: 80px;
}

/* ════════════════
   NAV
   ════════════════ */

nav {
  background: #212121;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 80px;
  transform: translateY(0);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
  height: 100%;
}

nav.nav-hidden {
  transform: translateY(-100%);
}

.nav-logo a {
  font-weight: 700;
  font-size: 32px;
  color: #ffffff;
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s ease;
}

.nav-logo a:hover {
  color: #FFC480;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-weight: 300;
  font-size: 16px;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #FFC480;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

.nav-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 150;
  background: transparent;
}

.nav-backdrop.active {
  display: block;
}

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  height: auto;
  background: #E8A838;
  z-index: 200;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-mobile-menu.open {
  max-height: 400px;
}

.nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
}

.nav-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #1a1a1a;
  padding: 4px;
  font-size: 22px;
  line-height: 1;
}

.nav-mobile-links {
  list-style: none;
  padding: 8px 0 32px;
  opacity: 0;
  transition: opacity 0.2s ease 0.2s;
}

.nav-mobile-menu.open .nav-mobile-links { opacity: 1; }

.nav-mobile-links li a {
  display: block;
  padding: 16px 32px;
  font-weight: 300;
  font-size: 20px;
  color: #1a1a1a;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s ease;
}

.nav-mobile-links li a:hover { opacity: 0.6; }

/* ════════════════
   FOOTER
   ════════════════ */

.footer {
  background: #1a1a1a;
}

.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 64px 48px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 32px;
}

.footer-heading {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-heading-line {
  width: 100%;
  height: 1px;
  background: #E8A838;
  margin-bottom: 20px;
}

.footer-tagline {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 55ch;
}

.footer-quote {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 8px;
  max-width: 55ch;
  padding-left: 16px;
  border-left: 2px solid rgba(232,168,56,0.5);
}

.footer-quote-author {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  padding-left: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-links a,
.footer-email-btn {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.footer-links a:hover,
.footer-email-btn:hover {
  color: #FFC480;
}

.footer-email-btn.copied {
  color: #4caf50;
}

.footer-copyright {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}

/* ════════════════════════════════════════
   CHATBOT PAGE — projects/chatbot.html
   ════════════════════════════════════════ */

body.chatbot-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Hero section (dark) ── */
.case-hero {
  background: #212121;
  padding: 80px 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 68px));
  margin-bottom: -68px;
}

.case-hero-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
}

.case-intro {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 64px;
  align-items: flex-start;
  padding-bottom: 24px;
}

.case-date {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: #E8A838;
  margin-bottom: 20px;
}

.case-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 4vw, 56px);
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 32px;
}

.case-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 20px;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
}

.case-intro-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.case-intro-image img {
  width: 100%;
  max-width: 288px;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

/* ── Metadata row ── */
.case-meta {
  padding: 8px 0 120px;
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 80px;
  justify-content: start;
}

.case-meta-heading {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #FFC480;
  margin-bottom: 16px;
}

.case-meta-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  list-style: none;
}

.case-meta-body li::before {
  content: '• ';
  color: rgba(255,255,255,0.4);
}

.case-meta-col-wide {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.diagonal-divider { display: none; }

.focus-col-last { padding-left: 32px; }

/* ── Page content area (light) ── */
.page-wrap {
  background: #FBFBFB url('img/bg_dots.svg') repeat;
  flex: 1;
}

.page-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── The Challenge section ── */
.challenge-section {
  padding: 120px 0 112px;
}

.challenge-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px;
}

.challenge-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  color: #282828;
  text-align: center;
  margin-bottom: 48px;
}

.challenge-cards-wrapper {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
}

.challenge-cards-wrapper.dragging { cursor: grabbing; }
.challenge-cards-wrapper::-webkit-scrollbar { display: none; }

.challenge-cards {
  display: flex;
  gap: 20px;
  padding: 8px max(48px, calc((100vw - 1600px) / 2 + 48px)) 32px max(48px, calc((100vw - 1600px) / 2 + 48px));
  width: max-content;
}

.challenge-card {
  background: #F0DDD8;
  border-radius: 8px;
  padding: 40px 36px;
  width: 60ch;
  min-height: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.challenge-card:nth-child(2) { background: #D8E5D8; }
.challenge-card:nth-child(3) { background: #DDD8E5; }
.challenge-card:nth-child(4) { background: #D8DDE5; }

.challenge-card-icon {
  width: 192px;
  height: 192px;
  object-fit: contain;
  margin-bottom: 12px;
  draggable: false;
  -webkit-user-drag: none;
  pointer-events: none;
}

.challenge-card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #282828;
  margin-bottom: 12px;
  line-height: 1.3;
}

.challenge-card-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 20px;
  color: rgba(40,40,40,0.8);
  line-height: 1.7;
}

/* ── Grey section ── */
.grey-section {
  background: #EFEEEE url('img/bg_squares.svg') repeat;
  padding: 80px 0;
  clip-path: polygon(0 0, 100% 68px, 100% 100%, 0 100%);
  margin-top: -68px;
}

/* ════════════════════════════════════════
   CONSTRAINTS & CONTEXT — Flip Cards
   ════════════════════════════════════════ */

.constraints-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 80px 48px 96px;
}

.constraints-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  color: #282828;
  text-align: center;
  margin-bottom: 56px;
}

.flip-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Flip card container ── */
.flip-card {
  perspective: 1200px;
  height: 420px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

/* ── Front & Back shared ── */
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #E7D1A7;
  padding: 36px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

/* ── Front face ── */
.flip-card-front {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.flip-card-bg-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.flip-card-bg-icon img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  opacity: 0.2;
  draggable: false;
  -webkit-user-drag: none;
}

.flip-card-front-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  color: #1a1a1a;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.flip-card-front-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(26,26,26,0.7);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

/* ── Back face ── */
.flip-card-back {
  transform: rotateY(180deg);
  justify-content: flex-start;
  background: #ede5d7;
}

.flip-card-back-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2vw, 26px);
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 6px;
}

.flip-card-back-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: rgba(26,26,26,0.7);
  margin-bottom: 20px;
}

.flip-card-back-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  color: #1a1a1a;
  line-height: 1.75;
}

/* ── Flip card chevron / toggle (mobile only) ── */
.flip-card-chevron {
  display: none;
  position: absolute;
  top: 50%;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 1;
}

.flip-card-chevron-left  { left: 16px;  transform: translateY(-50%); }
.flip-card-chevron-right { right: 16px; transform: translateY(-50%); }

.flip-card-chevron svg {
  width: 100%;
  height: 100%;
}

.flip-card-chevron .icon-minus { display: none; }
.flip-card.flipped .flip-card-chevron .icon-plus  { display: none; }
.flip-card.flipped .flip-card-chevron .icon-minus { display: block; }

/* ── Mobile overrides in media queries section ── */

/* ════════════════════════════════════════
   DESIGN METHOD SECTION
   ════════════════════════════════════════ */

.design-method-wrap {
  background: #FBFBFB url('img/bg_dots.svg') repeat;
  clip-path: polygon(0 48px, 100% 0, 100% 100%, 0 100%);
  margin-top: -48px;
  padding-bottom: 96px;
}

.design-method-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 96px 48px 0;
}

.design-method-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  color: #282828;
  text-align: center;
  margin-bottom: 64px;
}

/* ── 3-column grid ── */
.design-grid {
  display: grid;
  grid-template-columns: 1fr 340px 1fr;
  gap: 0 48px;
  align-items: stretch;
}

/* ── Column header with side lines ── */
.design-col-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.design-col-header h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 24px);
  color: #282828;
  white-space: nowrap;
}

.design-col-header .header-line {
  flex: 1;
  height: 2px;
  background: #282828;
  display: block;
}

/* ── Research / Design items ── */
.design-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 12px;
}

.design-item-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #E7D1A7;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.design-item-icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.design-item-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #282828;
  margin-bottom: 4px;
}

.design-item-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(40,40,40,0.75);
  line-height: 1.6;
}

/* ── Synthesis center card ── */
.design-col-center {
  display: flex;
  flex-direction: column;
}

/* ════════════════════════════════════════
   CONVERSATION DESIGN PRINCIPALS SECTION
   ════════════════════════════════════════ */

.conv-design-section {
  background: #F5F5F3 url('img/bg_dots.svg') repeat;
  clip-path: polygon(0 68px, 100% 0, 100% 100%, 0 100%);
  margin-top: -68px;
  padding-bottom: 96px;
}

.gen-flow-section {
  background: #EFEEEE url('img/bg_squares.svg') repeat;
  clip-path: polygon(0 0, 100% 68px, 100% 100%, 0 100%);
  margin-top: -68px;
  padding-bottom: 96px;
}

.conv-design-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 96px 48px 0;
}

.conv-design-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  color: #282828;
  text-align: center;
  margin-bottom: 72px;
}

.conv-subsection {
  margin-bottom: 40px;
}

.conv-sub-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  color: #282828;
  text-align: center;
  margin-bottom: 12px;
}

.conv-sub-desc {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  color: rgba(40,40,40,0.75);
  text-align: center;
  max-width: 65ch;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.conv-flow-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 64px;
  align-items: start;
}

.conv-flow-layout--flipped {
  grid-template-columns: 2fr 3fr;
}

.conv-flow-steps {
  display: flex;
  flex-direction: column;
}

.conv-outcomes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.conv-outcome {
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.conv-outcome-green { background: #D8E5D8; }
.conv-outcome-pink  { background: #F0DDD8; }

.conv-flow-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: sticky;
  top: 80px;
  padding: 0 24px;
}

.conv-flow-image img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.conv-image-caption {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(40,40,40,0.55);
  text-align: center;
}

.conv-use-case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.conv-use-case-card {
  background: #ffffff;
  border: 1px solid rgba(40,40,40,0.12);
  border-radius: 8px;
  padding: 28px 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #282828;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ── Mobile overrides ── */
@media (max-width: 900px) {
  .conv-flow-layout { grid-template-columns: 1fr; }
  .conv-flow-image  { position: static; }
  .conv-use-case-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .conv-design-inner { padding: 72px 24px 0; }
  .conv-outcomes     { grid-template-columns: 1fr; }
  .conv-use-case-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════
   REFLECTIONS SECTION
   ════════════════════════════════════════ */

.reflections-section {
  background: #ffffff;
  clip-path: polygon(0 68px, 100% 0, 100% 100%, 0 100%);
  margin-top: -68px;
  padding-bottom: 96px;
}

.reflections-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 112px 48px 0;
}

.reflections-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  color: #282828;
  text-align: center;
  margin-bottom: 72px;
}

.reflections-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.reflections-text {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.reflection-item-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 1.6vw, 22px);
  color: #282828;
  margin-bottom: 10px;
}

.reflection-item-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(40, 40, 40, 0.75);
  line-height: 1.75;
  max-width: 56ch;
}

.reflections-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.reflections-image img {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
}

/* ════════════════════════════════════════
   OUTCOMES SECTION
   ════════════════════════════════════════ */

.outcomes-section {
  background: #212121;
  clip-path: polygon(0 68px, 100% 0, 100% 100%, 0 100%);
  margin-top: -68px;
  padding-bottom: 96px;
}

.outcomes-inner {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 112px 48px 0;
}

.outcomes-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  color: #F5F5F3;
  text-align: center;
  margin-bottom: 64px;
}

.outcomes-list {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 800px;
  margin: 0 auto;
}

.outcome-item {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.outcome-icon {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #D4BC8A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.outcome-icon img {
  width: 48%;
  height: 48%;
  object-fit: contain;
}
.outcome-icon img[src*="icon_scalable"] {
  width: 55%;
  height: 55%;
}
.outcome-icon img[src*="icon_support_human_ai"] {
  width: 60%;
  height: 60%;
}
.outcome-icon img[src*="icon_clear_paths"] {
  width: 53%;
  height: 53%;
  position: relative;
  left: -4px;
}

.outcome-text {
  padding-top: 8px;
}

.outcome-item-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 24px);
  color: #F5F5F3;
  margin-bottom: 10px;
  line-height: 1.3;
}

.outcome-item-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(245, 245, 243, 0.7);
  line-height: 1.7;
}

/* ════════════════════════════════════════ */

.synthesis-card {
  background: #E7D1A7;
  border-radius: 8px;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.synthesis-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  overflow: hidden;
}

.synthesis-icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.synthesis-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #282828;
  margin-bottom: 12px;
}

.synthesis-body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(40,40,40,0.8);
  line-height: 1.7;
}


/* ════════════════════════════════════════
   INSIGHTS SECTION
   ════════════════════════════════════════ */

.insights-section {
  background: #EFEEEE url('img/bg_squares.svg') repeat;
  clip-path: polygon(0 0, 100% 68px, 100% 100%, 0 100%);
  margin-top: -68px;
  padding-bottom: 96px;
}

.insights-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 96px 48px 0;
  overflow: visible;
}

.insights-grid {
  overflow: visible;
}

.insights-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  color: #282828;
  text-align: center;
  margin-bottom: 56px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
  min-height: 360px;
  max-height: 360px;
}

.insight-card {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  transition: box-shadow 0.25s ease, opacity 0.3s ease-in-out;
}

.insight-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.insight-card.insight-blue     { background: #B5C9D8; }
.insight-card.insight-lavender { background: #C2B9D6; }
.insight-card.insight-sage     { background: #A8BDA8; }
.insight-card.insight-tan      { background: #D0BC88; }
.insight-card.insight-rose     { background: #D4ACAC; }
.insight-card.insight-warm     { background: #E7D1A7; }

.insight-card-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 175px;
  padding: 48px 52px 20px;
  text-align: center;
}

.insight-card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 1.4vw, 19px);
  color: #1a1a1a;
  line-height: 1.3;
}

.insight-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.insight-toggle:hover { opacity: 0.6; }

.insight-toggle svg { width: 18px; height: 18px; }

.insight-toggle .icon-minus { display: none; }
.insight-card.open .insight-toggle .icon-plus  { display: none; }
.insight-card.open .insight-toggle .icon-minus { display: block; }

/* Full-width card expansion */

.insight-card.peer-hidden {
  opacity: 0;
  pointer-events: none;
}

.insight-card-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: none;
}

.insight-card.open {
  align-self: stretch;
}

.insight-card.open .insight-card-header {
  flex: none;
}

.insight-card.bottom-row.open {
  align-self: end;
}

.insight-card.open .insight-card-content {
  grid-template-rows: 1fr;
}

.insight-card-content-inner {
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 0 40px;
  transition: padding-bottom 0.4s ease, opacity 0.5s ease-out;
  opacity: 0;
}

.insight-card.open .insight-card-content-inner {
  padding-bottom: 40px;
  opacity: 1;
  transition: padding-bottom 0.4s ease, opacity 0.5s ease-out 0.2s;
}

.insight-card-content-inner > div {
  max-width: 50ch;
}

.insight-card-content-inner > div:first-child {
  justify-self: end;
}

.insight-card-content-inner > div:last-child {
  justify-self: start;
}

.insight-label {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #1a1a1a;
  margin-top: 16px;
  margin-bottom: 6px;
}

.insight-label:first-child { margin-top: 0; }

.insight-text {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(26,26,26,0.85);
  line-height: 1.7;
}

/* ════════════════════════════════════════
   MEDIA QUERIES
   ════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Nav */
  .nav-inner { padding: 0 24px; }
  .nav-logo a { font-size: 22px; }
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-mobile-menu { display: block; }

  /* Footer */
  .footer-inner { padding: 48px 24px 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }

  /* Chatbot hero */
  .case-hero {
    padding-top: 40px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 16px));
    margin-bottom: -16px;
  }
  .case-hero-inner { padding: 0 24px; }
  .case-intro { grid-template-columns: 1fr; gap: 0; }
  .case-intro-image { display: none; }
  .case-meta {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding-bottom: 48px;
  }
  .case-meta-col-wide {
    grid-column: 1 / -1;
    display: block;
  }
  .case-meta-col-wide > div:not(:first-child) .case-meta-heading { display: none; }
  .case-meta-col-wide > div { margin-bottom: 0; padding-left: 0; }
  .focus-col-last { padding-left: 0; }
  .case-meta-col-wide .case-meta-body { display: block; }
  .case-meta-col-wide .case-meta-body li { margin-bottom: 4px; }

  /* Chatbot content */
  .page-content { padding: 0 24px; }
  .challenge-section { padding: 80px 0 112px; }
  .challenge-inner { padding: 0 24px; }
  .challenge-cards {
    padding-left: 24px;
    padding-right: 24px;
  }
  .challenge-card {
    width: 85vw;
    align-items: flex-start;
    text-align: left;
  }
  .challenge-card-icon { display: block; margin: 0 auto 24px; }

  .grey-section {
    clip-path: polygon(0 0, 100% 16px, 100% 100%, 0 100%);
    margin-top: -16px;
  }

  .design-method-wrap {
    clip-path: polygon(0 0, 100% 16px, 100% 100%, 0 100%);
    margin-top: -16px;
  }

  .insights-section {
    clip-path: polygon(0 0, 100% 16px, 100% 100%, 0 100%);
    margin-top: -16px;
  }

  .conv-design-section {
    clip-path: polygon(0 16px, 100% 0, 100% 100%, 0 100%);
    margin-top: -16px;
  }

  .gen-flow-section {
    clip-path: polygon(0 0, 100% 16px, 100% 100%, 0 100%);
    margin-top: -16px;
    padding-top: 32px;
  }

  .insights-inner { padding: 72px 24px 0; }
  .insights-grid  {
    grid-template-columns: 1fr;
    min-height: unset;
    max-height: unset;
    height: auto;
  }
  .insight-card { min-height: unset; display: flex; flex-direction: column; }
  .insight-card-header { min-height: 100px; flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 48px; }
  .insight-card-content-inner { grid-template-columns: 1fr; gap: 24px; padding: 0 28px; }
  .insight-card-content-inner > div:first-child { justify-self: start; }
  .insight-card-content-inner > div:last-child  { justify-self: start; }
  .insight-card.open .insight-card-content-inner { padding-bottom: 32px; }

  /* Simple accordion behaviour on mobile — no peer-hiding, smooth height reveal */
  .insight-card.peer-hidden { opacity: 1; pointer-events: auto; display: flex !important; }
  .insight-card-content { transition: grid-template-rows 0.35s ease; }
  .insight-card.open { align-self: auto; }
  .insight-card.open .insight-card-header { flex: 1; }
  .conv-flow-image { display: none; }

  .reflections-section {
    clip-path: polygon(0 16px, 100% 0, 100% 100%, 0 100%);
    margin-top: -16px;
  }

  .reflections-inner { padding: 72px 24px 0; }

  .reflections-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .reflections-image { order: -1; }

  .outcomes-section {
    clip-path: polygon(0 16px, 100% 0, 100% 100%, 0 100%);
    margin-top: -16px;
  }

  .outcomes-inner { padding: 72px 24px 0; width: 90%; }
  .outcome-icon { display: none; }

  .outcome-icon {
    width: 64px;
    height: 64px;
  }

  .outcome-icon img { width: 44%; height: 44%; }
}

@media (max-width: 480px) {
  .challenge-card { width: 85vw; }
}

/* ── Tablet: soften diagonal and add breathing room for wrapped meta ── */
@media (max-width: 1000px) {
  .case-hero {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 36px));
    margin-bottom: -36px;
    padding-bottom: 36px;
  }
}

/* ── Tablet: case-meta tighten before mobile collapse ── */
@media (max-width: 1100px) {
  .case-meta {
    gap: 40px;
  }
  .case-meta-col-wide {
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .case-meta {
    gap: 24px;
  }
  .case-meta-col-wide {
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .design-method-inner { padding: 72px 24px 0; }
  .design-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .synthesis-card { margin-top: 0; }
  .design-col-header .header-line { display: none; }
}

/* ── Tablet: flip cards horizontal scroll (769px–900px) ── */
@media (min-width: 769px) and (max-width: 900px) {
  .constraints-section { padding: 60px 0 80px; }
  .constraints-title { padding: 0 24px; }
  .flip-cards-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .flip-cards-scroll-wrapper::-webkit-scrollbar { display: none; }
  .flip-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    padding: 8px 24px 24px;
    width: max-content;
  }
  .flip-card {
    width: 72vw;
    max-width: 360px;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .constraints-section { padding: 60px 24px 80px; }

  .flip-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* ── Mobile flip cards: simple accordion, no 3D ── */
  .flip-card {
    height: auto;
    perspective: none;
    cursor: pointer;
  }

  .flip-card-inner {
    position: static;
    width: 100%;
    height: auto;
    transform: none !important;
    transform-style: flat;
    transition: none;
  }

  .flip-card:hover .flip-card-inner { transform: none; }

  .flip-card-front,
  .flip-card-back {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 0;
    transform: none;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    border-radius: 8px;
    overflow: visible;
  }

  /* Front: compact header row */
  .flip-card-front {
    border-radius: 8px;
    padding: 20px 56px;
    min-height: 72px;
    justify-content: center;
  }

  /* Back: hidden by default */
  .flip-card-back {
    display: none;
    border-radius: 0 0 8px 8px;
    padding: 20px 24px 24px;
  }

  /* Hide repeated title/sub on back */
  .flip-card-back .flip-card-back-title,
  .flip-card-back .flip-card-back-sub {
    display: none;
  }

  /* Show chevrons */
  .flip-card-chevron { display: block; }
  .flip-card-chevron svg rect { display: none; }

  /* Expanded state */
  .flip-card.flipped .flip-card-front {
    border-radius: 8px 8px 0 0;
  }

  .flip-card.flipped .flip-card-back {
    display: flex;
  }

  /* +/- icon swap handled in shared rules above */
}
