.character-hero {
  min-height: max(900px, calc(100svh - 56px));
}

.character-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.character-hero .hero-shade {
  background:
    linear-gradient(90deg, rgba(14, 11, 19, 0.96) 0%, rgba(14, 11, 19, 0.8) 46%, rgba(14, 11, 19, 0.28) 78%),
    linear-gradient(180deg, rgba(14, 11, 19, 0.2) 0%, rgba(14, 11, 19, 0.74) 100%);
}

.character-hero .hero-copy > p { max-width: 780px; }

.character-hero-footer {
  display: flex;
  max-width: 820px;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  margin: 15px auto 0;
}

.character-credit-note {
  display: flex;
  max-width: 650px;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  line-height: 1.5;
}

.character-credit-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: #ff82c6;
}

.character-credit-note strong { color: #fff; }

.character-example-link {
  flex: 0 0 auto;
  padding: 3px 0;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.character-hero .hero-model-picker,
.character-hero .hero-model-trigger { min-width: 216px; }

.character-hero .hero-model-menu {
  top: auto;
  bottom: calc(100% + 10px);
  width: min(420px, calc(100vw - 32px));
  max-height: min(430px, 56vh);
  padding: 8px;
}

.character-hero .hero-model-menu button {
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
}

.hero-model-option-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.hero-model-option-copy strong {
  color: inherit;
  font-size: 0.8rem;
  line-height: 1.25;
}

.character-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: -18px auto 30px;
}

.character-filter button {
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  color: #514b57;
  background: var(--button-surface);
  cursor: pointer;
  font: 700 0.82rem/1 "DM Sans", sans-serif;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.character-filter button:hover,
.character-filter button:focus-visible {
  border-color: var(--button-border-hover);
  color: #8c1654;
  background: var(--button-surface-hover);
  transform: translateY(-1px);
}

.character-filter button.is-active { border-color: var(--button-primary-border); color: #fff; background: var(--brand-gradient); box-shadow: none; }

.character-filter button:focus-visible {
  outline: 2px solid var(--button-focus);
  outline-offset: 2px;
}

.character-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  column-count: auto;
}

.character-gallery .work-card,
.character-gallery .work-card:nth-child(n) {
  display: block;
  grid-column: span 1;
  margin: 0;
}

.character-gallery .work-card[hidden] { display: none; }

.character-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #e9e6eb;
}

.character-gallery .character-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.work-create-similar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.character-use-cases {
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 16%, rgba(244, 91, 174, 0.08), transparent 28%),
    radial-gradient(circle at 92% 70%, rgba(106, 118, 255, 0.08), transparent 30%),
    #fbfafc;
}

.character-story-list {
  display: grid;
  gap: clamp(72px, 8vw, 112px);
}

.character-story {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(42px, 7vw, 96px);
}

.character-story.is-reversed .character-story-media { order: 2; }

.character-story-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(73, 62, 78, 0.12);
  border-radius: 28px;
  background: #e9e6eb;
  box-shadow: 0 24px 70px rgba(45, 33, 51, 0.14);
}

.character-story-media.is-landscape {
  aspect-ratio: 3 / 2;
}

.character-story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-story-copy h2 {
  max-width: 650px;
  margin: 0 0 22px;
  color: #171419;
  font: 800 var(--type-story-title)/1.08 "Manrope", sans-serif;
  letter-spacing: -0.045em;
}

.character-story-copy p {
  max-width: 680px;
  margin: 0 0 16px;
  color: #625d67;
  font-size: var(--type-story-copy);
  line-height: 1.82;
}

.character-story-copy p:last-child { margin-bottom: 0; }

.faq-list a {
  color: #a81765;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.faq-list a:hover { color: #761044; }

@media (max-width: 980px) {
  .character-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .character-hero { min-height: max(920px, calc(100svh - 44px)); }
  .character-story { grid-template-columns: 1fr; gap: 28px; }
  .character-story.is-reversed .character-story-media { order: initial; }
  .character-story-media { max-width: 620px; }
  .character-story-copy h2,
  .character-story-copy p { max-width: 720px; }
}

@media (max-width: 580px) {
  .character-hero { min-height: max(1030px, calc(100svh - 36px)); }
  .character-hero-image { object-position: 45% center; }
  .character-hero .hero-copy h1 em { white-space: normal; font-size: var(--type-hero-title); line-height: 1.05; }
  .character-hero-footer { display: grid; gap: 10px; }
  .character-credit-note { font-size: 0.7rem; }
  .character-hero .hero-model-picker,
  .character-hero .hero-model-trigger { min-width: 0; }
  .character-hero .hero-model-menu { width: 100%; max-height: min(380px, 52vh); }
  .character-hero .hero-model-menu button { min-height: 54px; }
  .character-filter { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .character-filter button { flex: 0 0 auto; }
  .character-gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .character-gallery .work-meta { padding: 13px 12px 14px; }
  .character-gallery .work-meta span { font-size: var(--type-gallery-meta); }
  .character-gallery .work-meta strong { font-size: var(--type-gallery-title); }
  .character-story-list { gap: 64px; }
  .character-story { gap: 24px; }
  .character-story-media { border-radius: 20px; }
  .character-story-copy h2 { margin-bottom: 16px; font-size: var(--type-story-title); line-height: 1.12; }
  .character-story-copy p { font-size: var(--type-story-copy); line-height: 1.72; }
}
