/* Fevnote case styles.
   Dependencies: global.css, ux-case-study.css
   Built natively on the UX Case Master Template (content v2.0).
   Palette B approved by Cafe 2026-10-07: primary #AF4941 (deep brick red
   from the Fevnote palette), secondary #F5847A (Fevnote coral).
   The secondary fails as small text on white (2.48:1), so it is used for
   decoration only (hero bloom). Kickers and emphasis run through the ink
   tokens below. Token derivation follows wst.css / nds.css exactly,
   including the mandatory dark overrides (Master Spec 2.4 and 13.8). */

.ux-case-page--fevnote {
  --ux-primary: #AF4941;
  --ux-secondary: #F5847A;
  --ux-theme: var(--ux-primary);
  --ux-dark: #7E2F29;
  --ux-primary-soft: #DA7468;
  --ux-primary-pale: #FCF0EE;
  /* Deep-primary base that the dark-mode emphasis mixes into (Spec 2.4) */
  --ux-primary-dark: color-mix(in srgb, var(--ux-primary) 55%, black);
  --ux-tone-s: linear-gradient(150deg, #F6DAD6, #F9E4E1 58%, #FCEEEC);
  --ux-tone-p: linear-gradient(145deg, #FDF4F3, #F0CBC6 82%);
  --ux-emphasis: linear-gradient(135deg, #7E2F29, #933832 60%, #86322C);
  --ux-alert-ink: #FFC6BE;
  --ux-accent-ink: var(--ux-primary);
  --ux-strong-ink: #92372F;
  --section-pad: 144px;
}

@media (max-width: 900px) {
  .ux-case-page--fevnote {
    --section-pad: 80px;
  }
}

/* Dark mode redefines every tone token (Master Spec 13.8 items 1 and 2) */
[data-theme=dark] .ux-case-page--fevnote {
  --ux-accent-ink: color-mix(in srgb, var(--ux-secondary) 70%, white);
  --ux-strong-ink: color-mix(in srgb, var(--ux-primary) 62%, white);
  --ux-dark: var(--theme-text);
  --ux-primary-pale: color-mix(in srgb, var(--ux-primary-soft) 46%, var(--theme-bg));
  --ux-tone-s: linear-gradient(150deg, color-mix(in srgb, var(--ux-primary-soft) 28%, var(--theme-bg)), color-mix(in srgb, var(--ux-primary-soft) 16%, var(--theme-bg)) 72%);
  --ux-tone-p: linear-gradient(145deg, var(--theme-bg), color-mix(in srgb, var(--ux-primary-soft) 30%, var(--theme-bg)) 82%);
  --ux-emphasis: linear-gradient(135deg,
    color-mix(in srgb, var(--ux-primary-soft) 22%, var(--ux-primary-dark)),
    color-mix(in srgb, var(--ux-primary-soft) 34%, var(--ux-primary-dark)) 60%,
    color-mix(in srgb, var(--ux-primary-soft) 20%, var(--ux-primary-dark)));
}

.ux-case-page--fevnote figcaption {
  color: color-mix(in srgb, var(--ux-theme) 70%, var(--theme-text-soft));
}

[data-theme=dark] .ux-case-page--fevnote figcaption {
  color: color-mix(in srgb, var(--ux-primary-soft) 70%, var(--theme-text-soft));
}

/* Kickers and ink-token routing (Master Spec 6.1 and 10.4) */
.ux-case-page--fevnote .ux-kicker,
.ux-case-page--fevnote .ux-intro p,
.ux-case-page--fevnote .ux-chapter-head .ux-kicker,
.ux-case-page--fevnote .ux-section-head .ux-kicker {
  color: var(--ux-accent-ink);
}

.ux-case-page--fevnote .ux-related .ux-kicker {
  color: var(--theme-muted);
}

.ux-case-page--fevnote .ux-meta span,
.ux-case-page--fevnote .ux-skills > span,
.ux-case-page--fevnote .ux-lens span,
.ux-case-page--fevnote .ux-recipe-primary span {
  color: var(--ux-accent-ink);
}

.ux-case-page--fevnote .ux-skills em {
  border-color: var(--ux-strong-ink);
  color: var(--ux-strong-ink);
}

.ux-case-page--fevnote .ux-lens a {
  color: var(--ux-strong-ink);
}

/* Tier-d kicker override */
.ux-case-page--fevnote .ux-tier-d .ux-kicker {
  color: var(--ux-alert-ink) !important;
}

.ux-case-page--fevnote .ux-tier-d .ux-influence strong {
  color: var(--ux-alert-ink);
}

/* Dark-mode card lift across S, L and P tiers */
[data-theme=dark] .ux-case-page--fevnote .ux-tier-s .ux-card,
[data-theme=dark] .ux-case-page--fevnote .ux-tier-l .ux-card,
[data-theme=dark] .ux-case-page--fevnote .ux-tier-p .ux-card,
[data-theme=dark] .ux-case-page--fevnote .ux-tier-s .ux-influence,
[data-theme=dark] .ux-case-page--fevnote .ux-tier-l .ux-influence,
[data-theme=dark] .ux-case-page--fevnote .ux-tier-p .ux-influence,
[data-theme=dark] .ux-case-page--fevnote .fev-card {
  background: color-mix(in srgb, var(--ux-primary-soft) 26%, var(--theme-surface));
  --card-border: color-mix(in srgb, var(--ux-primary-soft) 24%, var(--theme-border));
  --card-border-hover: var(--ux-strong-ink);
}

[data-theme=dark] .ux-case-page--fevnote .ux-tier-s .ux-influence,
[data-theme=dark] .ux-case-page--fevnote .ux-tier-l .ux-influence,
[data-theme=dark] .ux-case-page--fevnote .ux-tier-p .ux-influence {
  --card-border-hover: var(--ux-alert-ink);
}

.ux-case-page--fevnote .ux-influence {
  margin-top: 56px;
}

.ux-case-page--fevnote .ux-influence strong {
  color: var(--ux-strong-ink);
}

/* Hero: frosted dual-bloom (Master Spec 7.1). The secondary coral is used
   here as decoration only. */
.fev-hero {
  background-image: none;
  background: linear-gradient(140deg, #FDF1EF, #FFF8F6);
}

.fev-hero::before {
  content: "";
  position: absolute;
  inset: -60px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 54% at 14% 16%, rgba(175, 73, 65, 0.32), transparent 74%),
    radial-gradient(ellipse 52% 46% at 90% 18%, rgba(245, 132, 122, 0.42), transparent 74%);
  filter: blur(34px);
}

[data-theme=dark] .fev-hero {
  background: #0B0605;
}

[data-theme=dark] .fev-hero::before {
  background:
    radial-gradient(ellipse 64% 60% at 15% 16%, rgba(218, 116, 104, 0.66), transparent 70%),
    radial-gradient(ellipse 58% 52% at 88% 20%, rgba(245, 132, 122, 0.46), transparent 70%);
  filter: blur(36px);
}

[data-theme=dark] .fev-hero .ux-hero__copy h1 {
  color: #fff;
}

[data-theme=dark] .fev-hero .ux-hero__copy p {
  color: rgba(255, 255, 255, .82);
}

/* HMW statement and Problem emphasis */
.ux-case-page--fevnote .ux-hmw-statement strong {
  color: var(--ux-alert-ink);
}

/* Shared card used for Research, Validation and Delivery content */
.fev-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  --card-border: color-mix(in srgb, var(--ux-theme) 18%, var(--theme-border-soft));
  border-radius: var(--ux-radius);
  background: var(--theme-surface);
}

.fev-card h3 {
  margin-bottom: 10px;
  color: var(--ux-dark, var(--theme-text));
  font-size: 1.05rem;
}

.fev-card p {
  color: var(--theme-text-soft);
  font-size: .92rem;
  line-height: 1.6;
}

.fev-card p + p {
  margin-top: 12px;
}

/* Icon used on Solution and Problem cards (selector routed through the
   .ux-card parent so it outranks the global ".ux-card span" rule) */
.fev-icon {
  display: flex;
  margin-bottom: 20px;
  color: var(--ux-strong-ink);
  font-size: 2.5rem;
  line-height: 1;
}

.ux-card .fev-icon {
  font-size: 2.5rem;
}

.fev-number {
  display: block;
  margin-bottom: 14px;
  color: var(--ux-accent-ink);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.ux-card .fev-number {
  font-size: .8125rem;
}

/* Problem: four cards below the heading */
.fev-problem-head {
  max-width: 820px;
}

.fev-problem-grid {
  margin-top: 48px;
}

/* Overview: app icon sits beside the facts */
.fev-app-icon {
  width: 72px;
  height: 72px;
  display: block;
  margin-bottom: 24px;
  border-radius: 18px;
}

/* Background: lead paragraph plus a second paragraph */
.fev-background-copy {
  margin-top: 20px;
}

/* Outcome: product facts list under the copy */
.ux-case-page--fevnote .ux-video-grid img.ux-video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  background: transparent;
  box-shadow: none;
}

.ux-case-page--fevnote .ux-video-grid {
  grid-template-columns: minmax(320px, .46fr) minmax(0, 1fr);
}

.ux-case-page--fevnote .ux-video-grid p,
.fev-inuse p {
  margin-top: 16px;
}

.fev-inuse p + p,
.ux-case-page--fevnote .ux-video-grid p + p {
  margin-top: 14px;
}

.fev-fact-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.fev-fact-list li {
  position: relative;
  padding-left: 22px;
  line-height: 1.55;
}

.fev-fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ux-alert-ink);
}

.ux-tier-l .fev-fact-list li::before,
.ux-tier-s .fev-fact-list li::before,
.ux-tier-p .fev-fact-list li::before {
  background: var(--ux-strong-ink);
}

.fev-outcome-actions {
  margin-top: 32px;
}

/* In Use: copy beside a single Doctor View image */
.fev-inuse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: clamp(34px, 7vw, 90px);
  align-items: center;
}

.fev-inuse figure {
  margin: 0;
}

.fev-inuse img {
  width: 100%;
  display: block;
  border-radius: var(--ux-radius);
  box-shadow: none;
  background: transparent;
}

/* Research */
.fev-research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.fev-cut-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.fev-cut-list li {
  padding-left: 18px;
  position: relative;
  color: var(--theme-text-soft);
  font-size: .92rem;
  line-height: 1.5;
}

.fev-cut-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ux-strong-ink);
}

/* Design: sub-blocks */
.fev-block {
  margin-top: 72px;
}

.fev-block .ux-section-head {
  margin-bottom: 0;
}

.fev-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 36px;
  align-items: start;
}

.fev-compare figure {
  margin: 0;
}

.fev-compare img,
.fev-shot img {
  width: 100%;
  display: block;
  border-radius: var(--ux-radius);
  background: transparent;
  box-shadow: none;
}

.fev-compare figcaption,
.fev-shot figcaption {
  margin-top: 12px;
  font-size: .85rem;
  line-height: 1.5;
}

.fev-compare .fev-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border: 1px solid var(--ux-strong-ink);
  border-radius: 999px;
  color: var(--ux-strong-ink);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.fev-block-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: clamp(34px, 6vw, 80px);
  align-items: center;
  margin-top: 36px;
}

.fev-block-body--text {
  grid-template-columns: minmax(0, 1fr);
}

.fev-block-body p {
  color: var(--theme-text-soft);
  line-height: 1.62;
}

.fev-block-body p + p {
  margin-top: 14px;
}

.fev-shot {
  margin: 0;
}

.fev-more[hidden] {
  display: none;
}

.fev-expand {
  margin-top: 40px;
  text-align: center;
}

/* Design 5: palette chips */
.fev-swatch-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.fev-swatch {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 84px;
  padding: 12px;
  border-radius: 12px;
  font-size: .8rem;
  line-height: 1.4;
}

.fev-swatch b {
  font-weight: 700;
}

.fev-swatch--primary { background: #AF4941; color: #fff; }
.fev-swatch--secondary { background: #F5847A; color: #2A0F0C; }
.fev-swatch--ink { background: #202124; color: #fff; }

/* Validation */
.fev-verify-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.fev-limit {
  margin-top: 40px;
  padding: 24px 28px;
  border-left: 4px solid var(--ux-strong-ink);
  border-radius: 0 var(--ux-radius) var(--ux-radius) 0;
  background: color-mix(in srgb, var(--ux-theme) 8%, transparent);
  color: var(--theme-text);
  line-height: 1.6;
}

/* Delivery */
.fev-delivery-stack {
  display: grid;
  gap: 64px;
  margin-top: 8px;
}

.fev-delivery-stack article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: clamp(34px, 6vw, 80px);
  align-items: center;
}

.fev-delivery-stack article.fev-delivery--text {
  grid-template-columns: minmax(0, 1fr);
}

.fev-delivery-stack figure {
  margin: 0;
}

.fev-delivery-stack img {
  width: 100%;
  display: block;
  border-radius: var(--ux-radius);
  background: transparent;
  box-shadow: none;
}

.fev-delivery-stack h3 {
  margin-bottom: 12px;
}

.fev-live-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px 32px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--ux-radius);
  background: rgba(255, 255, 255, .08);
}

.fev-live-card img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.fev-live-card h3 {
  margin: 0 0 6px;
}

.fev-live-card p {
  margin: 0;
  line-height: 1.55;
}

/* Section rhythm for sections that stack several containers */
.ux-case-page--fevnote .ux-section > .container + .container {
  margin-top: 48px;
}

.ux-case-page--fevnote .ux-two-col + .container {
  margin-top: 48px;
}

/* Responsive (breakpoints 1180, 900, 640 and 520 per Master Spec 13.4) */
@media (max-width: 1180px) {
  .ux-case-page--fevnote .ux-video-grid {
    grid-template-columns: 1fr;
  }
  .fev-research-grid,
  .fev-compare {
    grid-template-columns: 1fr;
  }
  .fev-compare {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 900px) {
  .fev-inuse,
  .fev-block-body,
  .fev-delivery-stack article {
    grid-template-columns: 1fr;
  }
  .fev-inuse figure,
  .fev-shot,
  .fev-delivery-stack figure {
    max-width: 380px;
  }
  .fev-verify-grid {
    grid-template-columns: 1fr;
  }
  .fev-live-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }
  .fev-live-card .button {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .fev-live-card img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
}

@media (max-width: 640px) {
  .fev-swatch-row {
    grid-template-columns: 1fr;
  }
  .fev-live-card {
    padding: 22px;
  }
}
