/* ============================================================
   MENUSHOP (MENU店+) case study
   Mirrors projects/menu/css/menu.css — same class names, so the
   two case studies share one structure; only the brand layer
   (店+ Design: green → teal) changes.
   ============================================================ */

/* ── MENU店+ design-system palette ── */
:root {
  /* Brand (from 店+ Design spec) */
  --ms-green: #5CD646;
  --ms-teal: #24ADA8;
  --ms-gray: #808080;
  --ms-ink: #231F20;
  --ms-gradient: linear-gradient(120deg, #5CD646 0%, #24ADA8 100%);

  /* Accessible text accent — brand green is too light for text on white */
  --ms-green-ink: #5CD646;

  /* Neutrals (shared with MENU) */
  --ms-white: #FFFFFF;
  --ms-offwhite: #FAFAFA;
  --ms-stone: #9B9B9B;
  --ms-mist: #F2F2F2;

  /* Aliases so shared markup / inline styles keep working */
  --menu-brand-color: #d5ad78;
  --menushop-brand-color: #5cd646;
}

/* ── Case study base classes ── */
.cs-label {
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ms-stone);
  display: block;
  margin-bottom: 0.5rem;
}

.cs-divider {
  border: none;
  border-top: 1px solid var(--ms-mist);
  margin: 0;
}

.cs-stat-block {
  padding-left: 0;
}

.cs-stat-block h2 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
  color: var(--ms-ink);
}

.cs-pull-quote {
  padding: 1.5rem 0;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.75;
  color: #555;
}

.cs-step-number {
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--ms-stone);
  text-transform: uppercase;
}

.cs-feature-card {
  padding: 1rem;
  height: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cs-feature-card:hover {
  border-color: var(--ms-green);
  box-shadow: 0 4px 20px rgba(92, 214, 70, 0.15);
}

.cs-feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
  display: block;
}

.cs-feature-answer {
  color: var(--ms-green-ink);
  font-size: 0.7rem;
}

.process-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ms-teal);
  font-size: 1.25rem;
  padding: 0 0.5rem;
}

/* theme.css overrides .bg-white to #f8f7f4 — force pure white on this page */
.bg-white {
  background-color: #fff !important;
}

.bg-near-white {
  background-color: var(--ms-offwhite);
}

.text-ms-green {
  color: var(--ms-green-ink);
}

/* ── Brand gradient band (Overview) ── */
.cs-brand-band {
  background: var(--ms-gradient);
}

.cs-brand-band .cs-label,
.cs-brand-band p {
  color: rgba(35, 31, 32, 0.82);
}

.cs-brand-band h2 {
  color: var(--ms-ink);
}

/* ── UI design sections ── */
.cs-swatch {
  width: 72px;
  height: 72px;
  border-radius: 120px;
  margin-bottom: 0.75rem;
}

.cs-swatch-label {
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ms-stone);
}

.cs-swatch-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ms-ink);
  margin-bottom: 0.15rem;
}

.cs-type-row {
  border-bottom: 1px solid var(--ms-mist);
  padding: 1.25rem 0;
}

.cs-type-row:last-child {
  border-bottom: none;
}

.cs-type-zh {
  font-family: "Yuanti SC", "Yuanti TC", "Heiti TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  color: var(--ms-ink);
  margin: 0;
  letter-spacing: 0.05em;
}

.cs-screen-annotation {
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  color: #444;
  line-height: 1.5;
  border-bottom: 1px solid var(--ms-mist);
}

.cs-screen-annotation:last-child {
  border-bottom: none;
}

.cs-screen-annotation strong {
  font-weight: 700;
  color: var(--ms-ink);
  display: block;
  margin-bottom: 0.2rem;
}

.cs-principle-number {
  font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(36, 173, 168, 0.35);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* ── About · value proposition (MENU店+ promo panel style) ── */
.cs-promo {
  border-radius: 6px;
  overflow: hidden;
}

.cs-promo-visual {
  min-height: 280px;
  background: #313443 url('../images/promo-modules.jpg') center / cover no-repeat;
}

.cs-promo .cs-promo-content {
  background: linear-gradient(160deg, #84D766 0%, #6FC98A 55%, #63BFA0 100%);
  padding: 3rem 2.5rem;
  color: var(--ms-ink);
}

.cs-promo-content .cs-label {
  color: rgba(35, 31, 32, 0.6);
}

.cs-promo-title {
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #313443;
  margin-bottom: 1rem;
}

.cs-promo-zh {
  font-family: "STHeiti Light", "Heiti TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.7;
  letter-spacing: 0.1em;
  color: #313443;
  margin-bottom: 1.25rem;
}

.cs-promo-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #313443;
}

.cs-promo-list li::before {
  content: "◇ ";
}

/* Dark rounded CTA — MENU店+ .btn-color-black */
.btn-ms-dark {
  display: inline-block;
  background: #313443;
  color: #fff;
  border: 1px solid #313443;
  border-radius: 5px;
  padding: 9px 48px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-ms-dark:hover,
.btn-ms-dark:focus {
  background: transparent;
  color: #313443;
  text-decoration: none;
}

/* Feature badges — MENU店+ outline icons */
.cs-feature-badge {
  width: 88px;
  height: 88px;
  display: block;
  margin: 0 auto 1rem;
}

@media (max-width: 991px) {
  .cs-promo-visual {
    min-height: 240px;
  }

  .cs-promo .cs-promo-content {
    padding: 2.25rem 1.5rem;
  }

  .cs-promo-title {
    font-size: 1.6rem;
  }
}

/* ── Figures ── */
.cs-figure {
  border-radius: 6px;
  overflow: hidden;
  background: var(--ms-mist);
  margin-bottom: 0.75rem;
}

.cs-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-figure--bordered {
  border: 1px solid var(--ms-mist);
  background: var(--ms-white);
}

.cs-figure-caption {
  font-size: 0.8rem;
  color: var(--ms-stone);
  margin-bottom: 0;
}

/* ── Onboarding funnel steps ── */
.cs-funnel-step {
  border-top: 2px solid var(--ms-mist);
  padding-top: 1rem;
  height: 100%;
}

.cs-funnel-step--active {
  border-top-color: var(--ms-green);
}

.cs-funnel-step code {
  font-size: 0.75rem;
  color: var(--ms-stone);
  background: none;
  padding: 0;
}

/* ── Green CTA button (counterpart of .btn-amber) ── */
.btn-green {
  display: inline-block;
  border: 1.5px solid var(--ms-green-ink);
  color: var(--ms-white);
  background: var(--ms-green-ink);
  padding: 0.5rem 1.75rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.btn-green:hover {
  background: transparent;
  color: var(--ms-green-ink);
  text-decoration: none;
}

/* ── Discovery accordion ── */
.cs-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs-accordion-item {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(92, 214, 70, 0.18);
  transition: box-shadow 0.25s ease;
}

.cs-accordion-item--1 {
  background: linear-gradient(120deg, rgba(92, 214, 70, 0.18) 0%, rgba(242, 242, 242, 0.55) 100%);
}

.cs-accordion-item--2 {
  background: linear-gradient(120deg, rgba(64, 194, 120, 0.13) 0%, rgba(250, 250, 250, 0.60) 100%);
}

.cs-accordion-item--3 {
  background: linear-gradient(120deg, rgba(36, 173, 168, 0.09) 0%, rgba(255, 255, 255, 0.70) 100%);
}

.cs-accordion-item[open] {
  box-shadow: 0 4px 24px rgba(36, 173, 168, 0.14);
  border-color: rgba(36, 173, 168, 0.35);
}

.cs-accordion-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.4rem 1.75rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.cs-accordion-header::-webkit-details-marker {
  display: none;
}

.cs-accordion-header img {
  border-radius: 50%;
  flex-shrink: 0;
}

.cs-accordion-title {
  flex: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ms-ink);
}

.cs-accordion-arrow {
  color: var(--ms-teal);
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.22s ease;
  display: inline-block;
}

.cs-accordion-item[open] .cs-accordion-arrow {
  transform: rotate(45deg);
}

.cs-accordion-body {
  padding: 0 1.75rem 1.5rem;
  color: #555;
}

/* ── Challenge — full-bleed dark section ── */
.cs-challenge-section {
  position: relative;
  background-image: url('../images/bg-challenge.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.cs-challenge-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 12, 0.78);
  pointer-events: none;
}

.cs-challenge-label {
  color: rgba(92, 214, 70, 0.9);
}

.cs-challenge-body {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 400;
}

.cs-challenge-quote {
  color: rgba(255, 255, 255, 0.7);
  border-color: transparent;
  background: rgba(92, 214, 70, 0.08);
  border-left: 2px solid rgba(92, 214, 70, 0.5);
  padding-left: 1.5rem;
}

/* ── Horizontal photo strip (research / testing) ── */
.cs-interview-life-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.cs-interview-life-strip::-webkit-scrollbar {
  display: none;
}

.cs-interview-life-strip:active {
  cursor: grabbing;
}

.cs-interview-life-photo {
  flex: 0 0 calc(25% - 6px);
  width: calc(25% - 6px);
  min-width: 0;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  background: var(--ms-mist);
  border: 1px solid var(--ms-mist);
  scroll-snap-align: start;
  pointer-events: none;
}

@media (max-width: 768px) {
  .cs-interview-life-photo {
    flex: 0 0 calc(60% - 4px);
    width: calc(60% - 4px);
  }
}

/* ============================================================
   Centre-aligned layout — every content section except the
   hero (#cafe-header) and the footer nav (#software-footer)
   ============================================================ */
.cs-center {
  text-align: center;
}

/* Centre the narrow intro columns (col-lg-8 etc.) inside their rows */
.cs-center .row {
  justify-content: center;
}

/* Block-level images / icons / swatches */
.cs-center img:not(.cs-interview-life-photo),
.cs-center .cs-swatch,
.cs-center .cs-feature-icon,
.cs-center .cs-feature-badge {
  margin-left: auto;
  margin-right: auto;
}

.cs-center .cs-swatch-label,
.cs-center .cs-swatch-name {
  text-align: center;
}

/* Strategy logos */
.cs-center .process-connector {
  margin: 1rem 0;
}

/* Challenge quote — swap the side rule for top/bottom rules */
.cs-center .cs-challenge-quote {
  border-left: none;
  border-top: 1px solid rgba(92, 214, 70, 0.45);
  border-bottom: 1px solid rgba(92, 214, 70, 0.45);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Discovery accordion — centre the header row */
.cs-center .cs-accordion-header {
  justify-content: center;
}

.cs-center .cs-accordion-header {
  position: relative;
  padding-left: 3.5rem;
  padding-right: 3.5rem;
}

.cs-center .cs-accordion-header img {
  margin: 0;
}

.cs-center .cs-accordion-title {
  flex: 0 1 auto;
}

.cs-center .cs-accordion-arrow {
  position: absolute;
  right: 1.75rem;
  top: 50%;
  margin-top: -0.7rem;
}

/* PhoneCall annotations */
.cs-center .cs-screen-annotation strong {
  text-align: center;
}

/* Value proposition panel */
.cs-center .cs-promo-list {
  justify-content: center;
}

/* Photo strips — centre when they don't overflow */
.cs-center .cs-interview-life-strip {
  justify-content: safe center;
}

/* Typography specimen rows */
.cs-center .cs-type-row .row>[class*="col-"] {
  text-align: center;
}

/* ── Hero · centred, keep the title on one line on phones ── */
@media (max-width: 575px) {
  #cafe-header h1.display-3 {
    font-size: 15vw;
  }

  #cafe-header .row.mt-6>[class*="col-"] {
    margin-bottom: 1rem;
  }
}

/* ── Discovery · insight cards ── */
.cs-insight-card {
  position: relative;
  height: 100%;
  background: var(--ms-white);
  border: 1px solid var(--ms-mist);
  border-radius: 8px;
  padding: 2.5rem 1.75rem 2rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cs-insight-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--ms-gradient);
}

.cs-insight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(92, 214, 70, 0.4);
  box-shadow: 0 12px 32px rgba(36, 173, 168, 0.14);
}

.cs-insight-num {
  position: absolute;
  top: 0.75rem;
  right: 1.25rem;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(92, 214, 70, 0.12);
  pointer-events: none;
}

.cs-insight-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 0 6px rgba(92, 214, 70, 0.10);
}

.cs-insight-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ms-ink);
  margin-bottom: 0.75rem;
}

.cs-insight-card p {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.7;
}

.cs-insight-link {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ms-mist);
  width: 100%;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ms-teal);
  text-decoration: none;
}

.cs-insight-link:hover {
  color: var(--ms-green);
  text-decoration: none;
}

/* ── Mobile side gutters ── */
@media (max-width: 767px) {
  .main .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}
