/* =============================================================================
   case-edplace.css  —  scoped re-layout for /cases/edplace (all locales)
   Loaded only on the EdPlace case page (main.case-edplace). Nothing here leaks
   to other case studies. Built per the yusmp-case-layout skill.

   EdPlace is a DESKTOP case (EdTech web platform: expert/student/admin cabinets,
   course constructor, admin console) → landscape BROWSER-FRAME device mockups.
   Page runs on the dark Quiet-Aurora theme (navy bg, light text), so tables and
   dividers use explicit ruling colours that are actually VISIBLE on navy — the
   theme's --c-border (8%) / --c-border-strong (16%) wash out to nothing on dark.
   ========================================================================== */

/* ---- 1. Section rhythm + brand-yellow title accent ------------------------- */
.case-edplace .section__title { position: relative; }
.case-edplace .case-detail__section > .container > .section__title::after,
.case-edplace .case-detail__section > .container > .cl-prose > .section__title::after,
.case-edplace .case-detail__hero + .case-detail__section .section__title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 14px;
  border-radius: 3px;
  background: var(--c-brand);
}
/* Comfortable measure for lone lead paragraphs (before columnisation). */
.case-edplace .case-detail__section > .container > .section__lead {
  max-width: 68ch;
  font-size: 1.06rem;
  line-height: 1.72;
}

/* ---- 2. Feature rows: balance the browser mockup against the copy ---------- */
@media (min-width: 900px) {
  .case-edplace .case-feature {
    align-items: center;
    gap: clamp(40px, 5vw, 72px);
  }
  .case-edplace .case-feature__copy { max-width: 60ch; }
}

/* ---- 3. App screens as landscape BROWSER-FRAME mockups (DESKTOP case) -------
   Feature images are landscape web screenshots (≈16:10). Wrap each in a soft
   on-brand stage and frame the screenshot in a browser chrome: a light title
   bar (~30px) with three traffic-light dots, rounded corners, a soft shadow.
   height:auto + aspect-ratio keep the screenshot from distorting. */
.case-edplace .case-feature__media {
  padding: clamp(20px, 3.4vw, 40px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(46, 92, 242, 0.16), rgba(46, 92, 242, 0) 62%),
    linear-gradient(180deg, #f2f6ff 0%, #e9f0ff 100%);
  border: 1px solid var(--c-border);
  overflow: hidden;
}
.case-edplace .case-feature__browser {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(11, 16, 32, 0.14);
  box-shadow:
    0 34px 60px -26px rgba(11, 16, 32, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  transition: transform var(--dur-3, 480ms) var(--ease-out, ease),
              box-shadow var(--dur-3, 480ms) var(--ease-out, ease);
}
.case-edplace .case-feature__media:hover .case-feature__browser {
  transform: translateY(-6px);
  box-shadow:
    0 44px 70px -24px rgba(11, 16, 32, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}
/* Browser chrome bar with three traffic-light dots. */
.case-edplace .case-feature__browser::before {
  content: "";
  display: block;
  height: 30px;
  background:
    radial-gradient(circle at 18px 50%, #ff5f57 0 5px, transparent 6px),
    radial-gradient(circle at 38px 50%, #febc2e 0 5px, transparent 6px),
    radial-gradient(circle at 58px 50%, #28c840 0 5px, transparent 6px),
    linear-gradient(180deg, #f4f5f7 0%, #e9ebef 100%);
  border-bottom: 1px solid rgba(11, 16, 32, 0.1);
}
.case-edplace .case-feature__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

/* ---- 4. Hero cover: lift the landing-page shot off the panel --------------- */
.case-edplace .case-detail__hero-cover { border-radius: var(--radius-xl); overflow: hidden; }
.case-edplace .case-detail__hero-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  filter: drop-shadow(0 30px 50px rgba(11, 16, 32, 0.28));
}

/* ---- 5. "By the numbers" stat cards: quieter cards, louder numbers -------- */
.case-edplace .card strong[style] {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* ---- 6. Comparison table — dark-native, visibly ruled, full-width ---------
   Custom vs SaaS builders vs open marketplaces. Inline theme borders vanish on
   navy, so use dedicated ruling colours. The table lives as a direct child of
   the .container (.cl-compare--full), NOT inside the narrow .case-feature__copy
   column — a 4-column 780px-min table crammed next to a mockup scrolls and reads
   as broken. On phones each row collapses into a labelled card (data-label). */
.case-edplace .cl-compare {
  --cl-line: rgba(255, 255, 255, 0.26);
  --cl-line-soft: rgba(255, 255, 255, 0.14);
}
.case-edplace .cl-compare--full {
  margin-top: clamp(32px, 4.5vw, 56px);
}
.case-edplace .cl-compare__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--cl-line);
  border-radius: var(--radius-lg);
  background: var(--c-surface-card);
  box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.7);
}
.case-edplace .cl-compare__scroll:focus-visible {
  outline: 3px solid var(--c-brand);
  outline-offset: 3px;
}
.case-edplace .cl-compare__caption {
  text-align: left;
  font-weight: 700;
  padding: 18px 22px 0;
}
.case-edplace .cl-compare__table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--c-text);
}
.case-edplace .cl-compare__table th,
.case-edplace .cl-compare__table td {
  text-align: left;
  vertical-align: top;
  padding: 18px 22px;
  border-bottom: 1px solid var(--cl-line);
  border-right: 1px solid var(--cl-line-soft);
}
.case-edplace .cl-compare__table th:last-child,
.case-edplace .cl-compare__table td:last-child { border-right: 0; }
.case-edplace .cl-compare__table thead th {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-text-muted);
  background: var(--c-bg-dark);
  border-bottom: 2px solid var(--cl-line);
  vertical-align: bottom;
}
.case-edplace .cl-compare__table tbody th {
  font-weight: 700;
  color: var(--c-text);
  width: 22%;
  background: rgba(255, 255, 255, 0.05);
}
.case-edplace .cl-compare__table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.055);
}
.case-edplace .cl-compare__table tbody tr:last-child th,
.case-edplace .cl-compare__table tbody tr:last-child td { border-bottom: 0; }

/* Highlighted EdPlace (custom build) column — "our" option at a glance. */
.case-edplace .cl-compare__table thead th.is-edplace {
  color: #fff;
  background: var(--c-cta);
  border-bottom-color: var(--c-cta);
}
.case-edplace .cl-compare__table td.is-edplace {
  background: rgba(46, 92, 242, 0.24);
  font-weight: 600;
  color: #fff;
  box-shadow: inset 3px 0 0 var(--c-cta), inset -3px 0 0 var(--c-cta);
}
.case-edplace .cl-compare__table tbody tr:nth-child(even) td.is-edplace {
  background: rgba(46, 92, 242, 0.3);
}
.case-edplace .cl-compare__refs {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-top: 16px;
  line-height: 1.6;
}

/* Phones: stop shrinking a 4-column table; stack each row as a labelled card. */
@media (max-width: 640px) {
  .case-edplace .cl-compare__scroll {
    overflow-x: visible;
    border: 0;
    background: none;
    box-shadow: none;
  }
  .case-edplace .cl-compare__caption { padding: 0 0 0.4rem; }
  .case-edplace .cl-compare__table { min-width: 0; }
  .case-edplace .cl-compare__table thead {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); border: 0;
  }
  .case-edplace .cl-compare__table tbody tr {
    display: block;
    margin-bottom: 18px;
    border: 1px solid var(--cl-line);
    border-radius: var(--radius-md);
    background: var(--c-surface-card);
    overflow: hidden;
  }
  .case-edplace .cl-compare__table tbody th {
    display: block; width: auto;
    font-size: 1rem; padding: 14px 18px;
    background: var(--c-bg-dark);
    border-right: 0; border-bottom: 1px solid var(--cl-line);
  }
  .case-edplace .cl-compare__table tbody td {
    display: grid;
    grid-template-columns: minmax(0, 42%) 1fr;
    gap: 12px 16px;
    align-items: start;
    padding: 13px 18px;
    border-right: 0; border-bottom: 1px solid var(--cl-line-soft);
  }
  .case-edplace .cl-compare__table tbody td.is-edplace { box-shadow: none; }
  .case-edplace .cl-compare__table tbody td::before {
    content: attr(data-label);
    font-weight: 700; font-size: 0.78rem; line-height: 1.45;
    color: var(--c-text-muted);
  }
  .case-edplace .cl-compare__table tbody td.is-edplace::before { color: #8fb0ff; }
  .case-edplace .cl-compare__table tbody tr td:last-child { border-bottom: 0; }
}

/* ---- 7. Spacing polish + hero-grid fix ------------------------------------
   Page markup uses .case-detail__hero-grid / -copy / -visual, but the sitewide
   hero CSS targets -inner / -cover, so none of it matched: the hero never became
   a grid and the mockup dropped flush under the copy. Restore the two-column
   layout with a real column gutter. */
.case-edplace .case-detail__hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 4.5vw, 56px);
  align-items: center;
}
@media (min-width: 900px) {
  .case-edplace .case-detail__hero-grid { grid-template-columns: 47fr 53fr; }
}
.case-edplace .case-detail__hero-visual { margin-top: clamp(8px, 1.5vw, 16px); }
.case-edplace .case-detail__hero-meta {
  gap: 20px 44px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--c-border);
}
.case-edplace .case-feature__text p { margin-bottom: 16px; }
.case-edplace .case-feature__text p:last-child { margin-bottom: 0; }
.case-edplace .case-highlights { gap: 14px; margin-top: 28px; }
.case-edplace .grid { gap: clamp(20px, 2.4vw, 32px); }
.case-edplace .grid .card { padding: clamp(22px, 2.4vw, 30px); }
.case-edplace .section__lead + .section__lead { margin-top: 20px; }

/* ---- 8. FAQ — sitewide accordion component, flush-left --------------------
   Use the REAL .faq / .faq__item / .faq__q / .faq__a component (circular +/×
   pictogram + open-state feedback) — never bare <details>, which drops the
   pictograms and the hover cue. Pin flush-left under the heading, card styling,
   and an explicit hover state. Mirrors limp / joyjet 1:1. */
.case-edplace .faq {
  gap: 12px;
  margin-left: 0;
  max-width: 900px;
}
.case-edplace .faq__item {
  border: 1px solid var(--cl-faq, rgba(255, 255, 255, 0.16));
  border-radius: var(--radius-md);
  background: var(--c-surface-card);
  overflow: hidden;
  transition: border-color var(--dur-2, 220ms) var(--ease, ease),
              background var(--dur-2, 220ms) var(--ease, ease);
}
.case-edplace .faq__item:hover { border-color: var(--c-cta); }
.case-edplace .faq__item:hover .faq__q::after {
  background: var(--c-cta);
  color: #fff;
}
.case-edplace .faq__item[open] { border-color: var(--c-cta); }

/* ---- 9. Long-form prose sections → two readable columns -------------------
   Narrative walls ("The brief", the platform economy, "Launching across the US
   and EU") are single essay-length blocks. Wrap the prose in .cl-prose and
   columnise the WRAPPER only — never a <h2> with column-span:all (WebKit
   collapses the multicol back to a wall), and never let .cl-prose wrap a
   grid/table (multicol fragments it). Guard with :not(:has(.grid)). */
.case-edplace .cl-prose { max-width: 1000px; }
.case-edplace .cl-prose > .section__lead {
  font-size: 1.06rem;
  line-height: 1.72;
  max-width: 68ch;
}
@media (min-width: 761px) {
  .case-edplace .cl-prose:not(:has(.grid)) {
    column-count: 2;
    column-gap: clamp(40px, 4.5vw, 72px);
  }
  .case-edplace .cl-prose:not(:has(.grid)) > .section__title {
    max-width: none;
  }
  .case-edplace .cl-prose:not(:has(.grid)) > .section__lead {
    max-width: none;
    margin-top: 0;
    orphans: 3;
    widows: 3;
  }
  .case-edplace .cl-prose:not(:has(.grid)) > .section__lead + .section__lead { margin-top: 1.05rem; }
}

/* ---- Gap after the hero (first block) ------------------------------------
   Same rule as limp / joyjet: hero padding-bottom + first section padding-top
   can stack to ~192px of dead air under the fold. Cap to ≤120px (64 + 56). */
.case-edplace .case-detail__hero { padding-bottom: clamp(40px, 5vw, 64px); }
.case-edplace .case-detail__hero + .case-detail__section { padding-top: clamp(36px, 4.5vw, 56px); }
