/* ===== Designing AI that can act — independent AI interaction studies ===== */
/* A short landing page: the umbrella's hero, then one entry per study (D-043). Values follow the
   Parleva page (styles_parleva.css) so it sits with the other case studies. Each study's own
   visuals appear only in its images. */

/* Header background responds to dark mode */
.header {
  background-color: var(--bg-color-cs);
}

/* The page is short: the page colour fills the screen below it, in both themes. */
body {
  background-color: var(--background-color_lighter);
}

/* Page offset for fixed-ish header */
.dai-page {
  padding-top: 120px;
  background-color: var(--background-color_lighter);
}

.dai-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 80px;
  box-sizing: border-box;
}

/* ════════════════════════════════
   HERO
════════════════════════════════ */
/* Text-only, so tighter than Parleva's hero: the finding and its figures fit the first screen. */
.dai-hero {
  padding: 56px 0 24px;
}

.dai-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.dai-hero h1 {
  font-size: clamp(1.8rem, 2.5vw + 1rem, 2.8rem);
  font-weight: 700;
  color: var(--text-headline);
  line-height: 1.15;
  margin: 0 0 14px;
}

.dai-lede {
  max-width: 640px;
  font-size: 18px !important;
  color: var(--text-secondary) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* ════════════════════════════════
   STUDIES: one entry each
════════════════════════════════ */
.dai-studies {
  padding: 16px 0 96px;
}

.dai-entry {
  padding-top: 36px;
  border-top: 1px solid var(--border-color, #e5e7eb);
}

/* The finding spans the entry; the evidence, the study and the routes sit beside the image. */
.dai-entry-body {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 56px;
  align-items: start;
  margin-top: 18px;
}

.dai-entry-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* The project's name labels the entry; the finding is its headline (D-044). */
.dai-project {
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.4 !important;
  text-transform: uppercase;
  color: var(--primary-color) !important;
}

.dai-entry h2 {
  margin: 14px 0 0;
  font-size: clamp(1.5rem, 1.2vw + 1rem, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-headline);
}

/* Each sentence of the finding on its own line, wrapped evenly on narrow screens. */
.dai-entry h2 span {
  display: block;
  text-wrap: balance;
}

.dai-finding {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: var(--text-primary) !important;
}

/* Three figures, in the Parleva page's summary-box style. */
.dai-figures {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dai-figures li {
  margin: 0; /* the shared stylesheet indents and centres every li */
  justify-content: flex-start;
  padding: 14px 16px;
  background: var(--background-color_lighter);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dai-figures strong {
  display: block;
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-headline);
}

.dai-figures span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
}

.dai-kicker {
  margin: 24px 0 0 !important;
  font-size: 17px !important;
  font-weight: 600;
  line-height: 1.4 !important;
  color: var(--text-headline) !important;
}

.dai-thesis {
  margin: 4px 0 0 !important;
  font-size: 16px !important;
  font-weight: 500;
  line-height: 1.5 !important;
  color: var(--text-primary) !important;
}

.dai-role {
  margin: 14px 0 0 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: var(--text-secondary) !important;
}

.dai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* The shared stylesheet hides .case_study_button on phones; pages re-enable their own (as Parleva's closing CTA does). */
.dai-actions .case_study_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 24px;
}

.dai-entry-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dai-image-note {
  margin: 12px 0 0 !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: var(--text-secondary) !important;
}

/* ════════════════════════════════
   NEXT CASE STUDY (as on the Parleva page)
════════════════════════════════ */
.next {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 80px;
  background: var(--background-color_lighter);
  border-top: 1px solid var(--border-color, #e5e7eb);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.next:hover {
  background: var(--about-background, #f3f3f3);
}

.next:hover .next-arrow {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateX(3px);
}

.next img {
  border-radius: 8px;
  object-fit: cover;
  height: 110px;
  width: 160px;
  flex-shrink: 0;
}

.next-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.next-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-hover, rgba(0, 0, 0, .45));
}

.next-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.next-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line-color, rgba(0,0,0,.15));
  font-size: 0;
  color: transparent;
  flex-shrink: 0;
  position: relative;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.next-arrow::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2.5px solid var(--text-primary);
  border-top: 2.5px solid var(--text-primary);
  border-radius: 1px;
  transform: rotate(45deg) translate(-1px, 0px);
  transition: border-color 0.2s;
}

.next:hover .next-arrow::after {
  border-color: #fff;
}

/* ════════════════════════════════
   RESPONSIVE (the Parleva page's breakpoints)
════════════════════════════════ */
@media (max-width: 1024px) {
  .dai-page {
    padding-top: 96px;
  }
  .dai-wrap {
    padding: 0 40px;
  }
  .dai-entry-body {
    gap: 40px;
  }
  .next {
    padding: 24px 40px;
  }
}

/* Too narrow for two columns: the entry stacks, words first. */
@media (max-width: 900px) {
  .dai-entry-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 700px) {
  .dai-page {
    padding-top: 0;
  }
  .dai-wrap {
    padding: 0 24px;
  }
  .dai-hero {
    padding: 48px 0 24px;
  }
  .dai-lede {
    font-size: 17px !important;
  }
  .dai-studies {
    padding-bottom: 64px;
  }
  .dai-entry {
    padding-top: 36px;
  }
  .dai-figures {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .dai-figures li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 14px;
  }
  .dai-figures strong {
    flex: none;
    min-width: 2ch;
    margin: 0;
    font-size: 22px;
  }
  /* The study first, full width; framework and evidence share the next row. */
  .dai-actions a {
    flex: 1 1 0;
  }
  .dai-actions a:first-child {
    flex-basis: 100%;
  }
  .dai-actions .case_study_button {
    width: 100%;
    font-size: 16px;
  }
  .next {
    padding: 20px 24px 44px;
    gap: 16px;
  }
  .next img {
    height: 84px;
    width: 126px;
  }
  .next-title {
    font-size: 15px;
  }
  .next-label {
    font-size: 11px;
  }
  .next-arrow {
    display: none;
  }
}

@media (max-width: 450px) {
  .dai-wrap {
    padding: 0 16px;
  }
}
