/* ===== Hey.ai — case-study pages =====
   Loaded only on /casos/* via Base.astro's extraCss. Composes on the DS tokens
   and reuses the site's visual language (dark hero, glass cards, brand mesh,
   founder cards from sections3.css). Pure CSS, theme-aware, no extra JS. */

.case-main { overflow: hidden; }

/* Back link (mirrors .legal-back) */
.case-back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-label);
  text-transform: uppercase; letter-spacing: var(--ls-label); font-weight: 600; font-size: 12px;
  color: rgba(255,255,255,0.72); transition: color var(--dur-fast); }
.case-back svg { transform: rotate(180deg); }
.case-back:hover { color: #fff; }

/* ---------- HERO (dark forest band) ---------- */
.case-hero { position: relative; color: #fff; background: #080d0a; overflow: hidden;
  padding: clamp(108px, 13vh, 138px) 0 clamp(40px, 5vw, 68px); }
.case-hero .mesh, .case-hero-mesh { position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(56% 54% at 78% 18%, rgba(44,203,135,0.30), transparent 62%),
    radial-gradient(50% 50% at 12% 92%, rgba(24,168,201,0.20), transparent 62%),
    radial-gradient(44% 44% at 46% 44%, rgba(143,234,122,0.10), transparent 70%),
    #080d0a; }
.case-hero .dots { opacity: 0.6; }
.case-hero-inner { position: relative; z-index: 2; display: grid;
  grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 68px); align-items: center; }
.case-hero-copy { max-width: none; }
.case-hero .eyebrow { color: var(--green-light); margin-bottom: 20px; }
.case-hero h1 { font-size: clamp(30px, 4vw, 47px); line-height: 1.05; letter-spacing: var(--ls-head);
  margin: 14px 0 0; text-wrap: balance; }
.case-hero .case-sub { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55;
  color: rgba(255,255,255,0.74); margin: 22px 0 0; max-width: 46ch; text-wrap: pretty; }

/* hero capability chips */
.case-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.case-chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-label);
  text-transform: uppercase; letter-spacing: var(--ls-label); font-weight: 600; font-size: 11px;
  color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14); padding: 8px 14px; border-radius: var(--radius-pill); }
.case-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-core); flex: none; }

/* hero highlight stats (case 2) */
.case-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 30px; }
.case-stat { display: flex; flex-direction: column; gap: 4px; }
.case-stat b { font-family: var(--font-head); font-weight: 500; letter-spacing: var(--ls-head);
  font-size: clamp(30px, 3.4vw, 42px); line-height: 1; color: var(--green-light); }
.case-stat span { font-family: var(--font-label); text-transform: uppercase; letter-spacing: var(--ls-label);
  font-weight: 600; font-size: 11px; color: rgba(255,255,255,0.62); max-width: 14ch; }

/* Real hero screenshot that already ships its own device frame (e.g. a phone
   mockup PNG) — rendered bare (no extra frame) as a floating shot. */
.case-hero-media { display: flex; justify-content: center; }
.case-hero-shot { width: auto; max-width: 100%; max-height: 620px; height: auto; display: block;
  filter: drop-shadow(0 34px 60px rgba(0,0,0,0.5)); }
@media (max-width: 960px) { .case-hero-shot { max-height: 560px; } }
@media (max-width: 600px) { .case-hero-shot { max-height: 460px; } }

/* ---------- Device mockups ---------- */
.mock { position: relative; }
.mock-screen { position: relative; overflow: hidden; }
.mock-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
/* branded placeholder fill (until real screenshots arrive) */
.mock-ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px;
  background:
    radial-gradient(70% 70% at 28% 16%, rgba(143,234,122,0.5), transparent 60%),
    radial-gradient(60% 60% at 84% 90%, rgba(24,168,201,0.28), transparent 60%),
    linear-gradient(155deg, #e2f1da, #c3e7d0 55%, #a2d8c8); }
.mock-ph svg { color: #1c3a26; opacity: 0.7; }
.mock-ph span { font-family: var(--font-label); text-transform: uppercase; letter-spacing: var(--ls-label);
  font-weight: 600; font-size: 11px; color: #1c3a26; opacity: 0.72; }
.mock-demo { position: absolute; top: 12px; right: 12px; z-index: 3; font-family: var(--font-label);
  text-transform: uppercase; letter-spacing: var(--ls-label); font-weight: 600; font-size: 10px; color: #1c3a26;
  background: rgba(255,255,255,0.92); padding: 6px 11px; border-radius: var(--radius-pill); box-shadow: var(--shadow-xs); }

/* browser frame */
.mock--browser { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-card);
  border: 1px solid var(--border-default); box-shadow: var(--shadow-card-lg); }
.mock--browser .mock-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px;
  background: var(--bg-sunken); border-bottom: 1px solid var(--border-default); }
.mock--browser .mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); flex: none; }
.mock--browser .mock-bar .mock-url { margin-left: 10px; flex: 1; height: 16px; border-radius: var(--radius-pill);
  background: var(--surface-card); border: 1px solid var(--border-default); }
.mock--browser .mock-screen { aspect-ratio: 16 / 10; }
/* browser sitting on a dark hero gets a soft glow */
.case-hero .mock--browser { box-shadow: 0 30px 70px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06); }

/* phone frame */
.mock--phone { width: min(268px, 74%); margin: 0 auto; aspect-ratio: 9 / 18.6; border-radius: 42px;
  background: #0f130e; border: 1px solid rgba(255,255,255,0.12); padding: 10px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12); }
.mock--phone .mock-screen { height: 100%; border-radius: 32px; background: var(--surface-card); }
.mock--phone::before { content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 42%; height: 22px; background: #0f130e; border-radius: 0 0 14px 14px; z-index: 4; }
/* phone on light bands keeps a subtle ring */
.cfeat .mock--phone { box-shadow: 0 24px 50px rgba(38,48,40,0.22), inset 0 1px 0 rgba(255,255,255,0.12); }

/* ---------- PROBLEM band (light) ---------- */
.case-problem { background: var(--bg-sunken); padding: clamp(40px, 5.2vw, 72px) 0; position: relative; }
.case-problem .case-sec-head { max-width: 62ch; margin: 0 auto clamp(26px, 3.4vw, 40px); text-align: center; }
.case-problem .case-sec-head .eyebrow { justify-content: center; }
.case-problem .case-sec-head p { margin-left: auto; margin-right: auto; }
.case-sec-head .eyebrow { margin-bottom: 16px; }
.case-sec-head h2 { font-size: clamp(24px, 2.8vw, 36px); line-height: 1.07; margin: 0; text-wrap: balance; }
.case-sec-head p { font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.55; color: var(--text-body);
  margin: 18px 0 0; max-width: 56ch; text-wrap: pretty; }

.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pain-card { background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-xl);
  padding: 26px 26px 28px; box-shadow: var(--shadow-card); position: relative; }
.pain-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; margin-bottom: 18px;
  background: rgba(192,73,47,0.10); color: var(--danger); }
.pain-ico svg { display: block; }
.pain-card h3 { font-family: var(--font-head); font-weight: 500; letter-spacing: var(--ls-head);
  font-size: clamp(18px, 1.5vw, 21px); line-height: 1.15; color: var(--text-heading); margin: 0; }
.pain-tag { display: inline-flex; align-items: center; gap: 7px; margin: 12px 0 0; font-family: var(--font-label);
  text-transform: uppercase; letter-spacing: var(--ls-label); font-weight: 600; font-size: 10.5px; color: var(--danger); }
.pain-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--danger);
  box-shadow: 0 0 0 3px rgba(192,73,47,0.16); flex: none; }
.pain-card p { font-size: 15px; line-height: 1.55; color: var(--text-body); margin: 14px 0 0; }

/* ---------- FEATURE / OVERVIEW rows ---------- */
.case-flow { padding: clamp(10px, 1.6vw, 22px) 0; }
.cfeat { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; padding: clamp(30px, 4.4vw, 58px) 0; }
.cfeat + .cfeat { border-top: 1px solid var(--border-default); }
.cfeat.rev .cfeat-media { order: -1; }
.cfeat.dev-phone { grid-template-columns: 1.15fr 0.85fr; }

.cfeat-copy .cfeat-num { font-family: var(--font-head); font-weight: 500; font-size: 14px; color: var(--green-deep); }
.cfeat-copy .eyebrow { margin: 0 0 6px; }
.cfeat-copy h2 { font-size: clamp(22px, 2.4vw, 31px); line-height: 1.1; margin: 12px 0 0;
  max-width: none; text-wrap: balance; }
/* Desktop line break inside headings (authored as `<br class="dbr">`); on small
   phones it collapses so titles wrap naturally instead of forcing a fixed break. */
@media (max-width: 600px) { .dbr { display: none; } }
.cfeat-copy > p { font-size: clamp(15px, 1.35vw, 17.5px); line-height: 1.6; color: var(--text-body);
  margin: 18px 0 0; max-width: 48ch; text-wrap: pretty; }

/* plain check bullets */
.cfeat-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.cfeat-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 15.5px; line-height: 1.45; color: var(--text-heading); }
.cfeat-list .ck { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  margin-top: 1px; background: var(--green-core); color: var(--ink); }

/* richer label + text feature lines */
.cfeat-feats { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.cfeat-feats li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; }
.cfeat-feats .fico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; margin-top: 2px;
  background: rgba(44,203,135,0.14); color: var(--green-deep); }
.cfeat-feats b { display: block; font-family: var(--font-head); font-weight: 500; letter-spacing: var(--ls-head);
  font-size: 16.5px; color: var(--text-heading); margin: 0 0 4px; }
.cfeat-feats span { font-size: 14.5px; line-height: 1.5; color: var(--text-body); }

/* ---------- STEPS / PILLARS (full-width numbered blocks) ---------- */
.case-block { padding: clamp(34px, 4.6vw, 64px) 0; }
.case-block.tint { background: var(--bg-sunken); }
.case-block .case-sec-head { text-align: center; max-width: 56ch; margin: 0 auto clamp(26px, 3.2vw, 40px); }
.case-block .case-sec-head .eyebrow { justify-content: center; }
.case-block .case-sec-head p { margin-left: auto; margin-right: auto; }

.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.step-card { background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-xl);
  padding: 30px 28px 32px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.step-card .step-n { font-family: var(--font-head); font-weight: 500; letter-spacing: var(--ls-head);
  font-size: 15px; color: var(--ink); background: var(--gradient-brand); width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 20px; }
.step-card .step-ico svg { display: block; color: var(--ink); }
.step-card h3 { font-family: var(--font-head); font-weight: 500; letter-spacing: var(--ls-head);
  font-size: clamp(18px, 1.5vw, 21px); line-height: 1.14; color: var(--text-heading); margin: 0; text-wrap: balance; }
.step-card > p { font-size: 15px; line-height: 1.55; color: var(--text-body); margin: 12px 0 0; }
.step-card .cfeat-list { margin-top: 18px; }
.step-card .cfeat-list li { font-size: 14.5px; }
.step-card .cfeat-list .ck { width: 22px; height: 22px; }

/* ---------- MODULES chip grid ---------- */
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mod-card { display: flex; align-items: center; gap: 16px; background: var(--surface-card);
  border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base); }
.mod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-lg); }
.mod-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(44,203,135,0.12); color: var(--green-deep); }
.mod-ico svg { display: block; }
.mod-txt { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.mod-txt b { display: block; font-family: var(--font-head); font-weight: 500; letter-spacing: var(--ls-head);
  font-size: 16px; color: var(--text-heading); }
.mod-txt span { font-family: var(--font-label); text-transform: uppercase; letter-spacing: var(--ls-label);
  font-weight: 600; font-size: 10.5px; color: var(--text-muted); margin-top: 4px; display: inline-block; }
.mod-card.is-add { border-style: dashed; border-color: var(--green-core); background: transparent; box-shadow: none; }
.mod-card.is-add .mod-ico { background: var(--gradient-brand); color: var(--ink); }

/* ---------- CLOSING "prova de capacidade" — compact CTA band (dark, no team) ---------- */
.case-prova { position: relative; overflow: hidden; padding: clamp(46px, 6vw, 78px) 0; color: #fff; background:
    radial-gradient(46% 50% at 88% 6%, rgba(44,203,135,0.18), transparent 62%),
    radial-gradient(40% 46% at 6% 96%, rgba(24,168,201,0.13), transparent 62%),
    var(--ink); }
.case-prova .dots { opacity: 0.5; }
.prova-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto;
  gap: clamp(24px, 2.6vw, 46px); align-items: center; }
.prova-head h2 { font-size: clamp(24px, 2.8vw, 35px); line-height: 1.08; color: #fff; margin: 16px 0 0;
  max-width: none; text-wrap: balance; }
.prova-head h2 .cta-green { color: var(--green-light); }
.prova-head > p { font-size: clamp(15px, 1.35vw, 17.5px); line-height: 1.6; color: rgba(255,255,255,0.74);
  margin: 18px 0 0; max-width: 54ch; text-wrap: pretty; }
.prova-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
/* CTA + PDF stacked vertically (PDF on top, "Marcar consultoria" below, note under);
   align-items:stretch makes the PDF button match the CTA button's width. */
.prova-cta { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
/* Download-PDF: same shape as the CTA but ghost + white text, sits to the LEFT of it */
.btn-pdf { padding: 14px 26px; }
.prova-note { font-family: var(--font-label); text-transform: uppercase; letter-spacing: var(--ls-label);
  font-weight: 600; font-size: 11.5px; color: var(--green-light); }

/* ---------- OTHER CASES — mini version of the homepage Cases slider ---------- */
/* Dark band + the exact .hcase card visual (styled globally in page.css), in a
   horizontal scroll-snap track — same look and behaviour as the main section. */
.case-more { position: relative; padding: clamp(40px, 5.2vw, 72px) 0; color: #fff; background:
    radial-gradient(56% 54% at 80% 16%, rgba(44,203,135,0.16), transparent 60%),
    radial-gradient(50% 50% at 12% 90%, rgba(24,168,201,0.12), transparent 60%),
    var(--forest-900); }
.case-more-head { margin-bottom: clamp(22px, 3vw, 34px); }
.case-more-head h2 { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.06; color: #fff; margin: 12px 0 0;
  max-width: 20ch; text-wrap: balance; }
.case-more-track { display: flex; gap: clamp(18px, 2.4vw, 28px); overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 6px; }
.case-more-track::-webkit-scrollbar { display: none; }
.case-more-track .hcase { scroll-snap-align: center; flex: none; width: clamp(280px, 48%, 520px); }
@media (min-width: 761px) {
  /* two cards fill the row on desktop; no scrolling needed but stays swipeable */
  .case-more-track .hcase { flex: 1 1 0; width: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .case-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .case-hero-copy { max-width: none; }
  .cfeat, .cfeat.dev-phone { grid-template-columns: 1fr; gap: 32px; }
  .cfeat.rev .cfeat-media { order: 0; }
  .cfeat-media { max-width: 560px; }
  .cfeat-copy h2, .cfeat-copy > p { max-width: none; }
  .pain-grid, .step-grid, .mod-grid { grid-template-columns: 1fr; }
  .prova-inner { grid-template-columns: 1fr; gap: 26px; }
  .prova-head h2 { max-width: none; }
}
@media (min-width: 601px) and (max-width: 960px) {
  .pain-grid, .step-grid, .mod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .mock--phone { width: min(240px, 82%); }
  .case-stats { gap: 22px; }
  .prova-cta { width: 100%; }
}

/* Section headings on ONE line on desktop (1st = problem, centered; 2nd = solution,
   already centered); they wrap naturally at smaller resolutions. Placed last so it
   overrides the .case-block .case-sec-head max-width defined earlier in the file. */
@media (min-width: 961px) {
  .case-problem .case-sec-head, .case-block .case-sec-head { max-width: none; }
  .case-problem .case-sec-head h2, .case-block .case-sec-head h2 { white-space: nowrap; }
  .case-problem .case-sec-head p, .case-block .case-sec-head p { max-width: 62ch; }
}
