/* DBTI 1.16.5 — v2 Soft Redesign (Preserving Original C Soft Lavender-Mist Aesthetic)
   Strictly scoped to body.is-home-soft-redesign & .home-hero[data-home-soft-redesign="v2"].
   Does NOT modify body background, #wall (15 cards), profile dialog, quiz, result, or ?layout=c. */

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] {
  --soft-serif: "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
  --soft-ease: cubic-bezier(.22, .68, .28, 1);

  /* Preserve Original C surface, border, radius, glow & shadow exactly */
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  min-height: clamp(518px, 64vh, 558px);
  margin: 32px clamp(22px, 3.8vw, 54px) 0;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 29px;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 25px 60px rgba(94, 95, 121, .09);
  animation: none;
}

/* Keep Original C's soft lavender + aqua ambient glow inside the hero */
body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"]::before {
  background:
    radial-gradient(ellipse 560px 440px at 74% 12%, rgba(214, 207, 232, .68), transparent 78%),
    radial-gradient(ellipse 480px 380px at 98% 94%, rgba(198, 225, 220, .57), transparent 75%);
}

/* Left column: refined editorial rhythm & cleaner whitespace */
body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-copy.guide-intro {
  padding: clamp(42px, 5vw, 68px) 0 clamp(42px, 5vw, 68px) clamp(36px, 4.8vw, 68px);
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--lavender-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .19em;
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: rgba(116, 105, 164, .42);
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .guide-intro h1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(44px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: 0;
  white-space: nowrap;
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .guide-intro h1 > br {
  display: none;
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .soft-title-lead {
  display: block;
  color: rgba(36, 40, 50, .82);
  font-size: clamp(30px, 2.75vw, 38px);
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: .02em;
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .soft-title-focus {
  display: block;
  margin-inline-start: .14em;
  color: var(--ink-strong);
  font-family: var(--soft-serif);
  font-size: clamp(54px, 5.1vw, 70px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: .018em;
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .guide-intro .hero-lead {
  max-width: 34ch;
  margin: clamp(18px, 2.2vw, 24px) 0 0;
  color: #606b7b;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.76;
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .guide-intro .home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: clamp(26px, 2.9vw, 34px);
}

/* Preserve exact Original C button colors, refine tactile rhythm */
body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button {
  min-height: 50px;
  padding: 11px 22px;
  border-radius: 15px;
  font-size: 15px;
  transition:
    transform .18s var(--soft-ease),
    background-color .18s var(--soft-ease),
    border-color .18s var(--soft-ease),
    box-shadow .18s var(--soft-ease);
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button-primary {
  min-width: 176px;
  justify-content: space-between;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(41, 45, 58, .1);
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button-primary:hover {
  background: #414456;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(41, 45, 58, .15);
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button-quiet.light {
  background: rgba(255, 255, 255, .4);
  color: #596272;
  border-color: #cbd0da;
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button-quiet.light:hover {
  border-color: #9890b5;
  background: #f4f2fa;
  transform: translateY(-2px);
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button:active {
  transform: translateY(0);
}

/* Right column: upright, un-obscured portrait on a borderless soft-mist pedestal */
body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: clamp(28px, 3.2vw, 40px) clamp(26px, 3.6vw, 48px) clamp(28px, 3.2vw, 40px) 0;
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  row-gap: 12px;
  column-gap: 0;
  align-items: center;
  width: min(100%, 396px);
  min-height: clamp(424px, 50vh, 464px);
  aspect-ratio: auto;
  padding: 24px 28px 22px;
  border: 0;
  border-radius: 26px;
  transform: none;
  background: linear-gradient(
    152deg,
    rgba(238, 236, 245, .66) 0%,
    rgba(255, 255, 255, .72) 52%,
    rgba(220, 234, 232, .56) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .92),
    0 18px 38px rgba(116, 105, 164, .08);
  overflow: hidden;
  animation: none;
}

/* Remove Original C's redundant double inner border & circular line */
body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame::before {
  display: none;
  content: none;
}

/* Soft ambient air-glow under the portrait (no border) */
body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame::after {
  content: "";
  position: absolute;
  inset: auto 12% 62px 12%;
  width: auto;
  height: 118px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, .82) 0%,
    rgba(220, 234, 232, .34) 55%,
    transparent 78%
  );
  pointer-events: none;
  z-index: 0;
}

/* Top caption */
body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame > span {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: start;
  margin: 0;
  color: var(--lavender-deep);
  opacity: .82;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: .16em;
}

/* Upright, full-opacity hero illustration — zero overlap with text */
body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-graphic .guide-watermark {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 2;
  inset: auto;
  justify-self: center;
  align-self: center;
  width: min(100%, 284px);
  height: clamp(256px, 26vw, 288px);
  object-fit: contain;
  opacity: 1;
  z-index: 1;
  filter: drop-shadow(0 14px 22px rgba(116, 105, 164, .14));
  animation: none;
}

/* Bottom clean metadata bar — unified seamless hairline, separated from portrait */
body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame > strong {
  grid-column: 1;
  grid-row: 3;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(139, 130, 181, .22);
  color: var(--lavender-deep);
  font-family: var(--soft-serif);
  font-size: clamp(28px, 2.5vw, 34px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame > small {
  grid-column: 2;
  grid-row: 3;
  align-self: stretch;
  justify-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  margin: 0;
  padding: 14px 0 3px 12px;
  border-top: 1px solid rgba(139, 130, 181, .22);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .09em;
  text-align: right;
}

/* Restrained entrance motion (no tilt, respects prefers-reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"][data-soft-enter] .eyebrow {
    animation: soft-fade-up 300ms var(--soft-ease) both;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"][data-soft-enter] .soft-title-lead {
    animation: soft-fade-up 340ms 40ms var(--soft-ease) both;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"][data-soft-enter] .soft-title-focus {
    animation: soft-focus-in 400ms 100ms var(--soft-ease) both;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"][data-soft-enter] .guide-intro .hero-lead,
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"][data-soft-enter] .guide-intro .home-actions {
    animation: soft-fade-up 380ms 150ms var(--soft-ease) both;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"][data-soft-enter] .hero-graphic .guide-watermark {
    animation: soft-portrait-in 460ms 130ms var(--soft-ease) both;
  }

  @keyframes soft-fade-up {
    from { opacity: 0; translate: 0 7px; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes soft-focus-in {
    from { opacity: 0; translate: 0 9px; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes soft-portrait-in {
    from { opacity: 0; translate: 0 10px; scale: .98; }
    to { opacity: 1; translate: 0 0; scale: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"],
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] * {
    animation: none !important;
    transition: none !important;
  }
}

/* Tablet / medium screens */
@media (max-width: 1080px) {
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] {
    grid-template-columns: minmax(0, 1.14fr) minmax(242px, .86fr);
    gap: 18px;
    min-height: 446px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-copy.guide-intro {
    padding: 36px 0 36px 32px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .soft-title-lead {
    font-size: clamp(26px, 3.2vw, 33px);
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .soft-title-focus {
    font-size: clamp(46px, 5.8vw, 58px);
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions {
    gap: 10px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button {
    padding: 11px 16px;
    font-size: 14px;
    gap: 10px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button-primary {
    min-width: 148px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-graphic {
    padding: 24px 24px 24px 0;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame {
    min-height: 368px;
    padding: 18px 20px 16px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-graphic .guide-watermark {
    width: min(100%, 212px);
    height: 212px;
  }
}

/* Mobile (<= 680px): full-width airy pedestal replacing Original C's tiny tilted stamp */
@media (max-width: 680px) {
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] {
    display: block;
    min-height: 0;
    margin: 18px clamp(16px, 4.2vw, 22px) 0;
    border-radius: 25px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-copy.guide-intro {
    padding: 28px 22px 18px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .eyebrow {
    margin-bottom: 14px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .guide-intro h1 {
    gap: 4px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .soft-title-lead {
    font-size: clamp(24px, 6.8vw, 30px);
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .soft-title-focus {
    margin-inline-start: .1em;
    font-size: clamp(42px, 12.2vw, 52px);
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .guide-intro .hero-lead {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.7;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .guide-intro .home-actions {
    gap: 10px;
    margin-top: 20px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button {
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    gap: 8px;
    flex: 1 1 136px;
    min-width: 0;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button-primary {
    min-width: 0;
    justify-content: center;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-graphic {
    display: block;
    padding: 4px 18px 20px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame {
    width: 100%;
    min-height: 156px;
    padding: 16px 18px;
    border-radius: 20px;
    grid-template-columns: minmax(0, 1fr) 132px;
    grid-template-rows: auto 1fr auto;
    row-gap: 4px;
    column-gap: 12px;
    align-items: start;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame::after {
    inset: auto 12px 10px auto;
    width: 132px;
    height: 70px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame > span {
    grid-column: 1;
    grid-row: 1;
    font-size: 10px;
    letter-spacing: .14em;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame > strong {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    display: block;
    padding-top: 8px;
    border-top: 0;
    font-size: 36px;
    line-height: 1;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame > small {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    display: block;
    padding: 2px 0 0;
    border-top: 0;
    text-align: left;
    font-size: 11px;
    letter-spacing: .06em;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-graphic .guide-watermark {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    justify-self: center;
    width: 128px;
    height: 128px;
    opacity: 1;
  }
}

/* Narrow mobile (<= 360px, e.g. 320x640): guaranteed zero horizontal overflow */
@media (max-width: 360px) {
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] {
    margin: 14px 12px 0;
    border-radius: 22px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-copy.guide-intro {
    padding: 22px 16px 14px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .soft-title-lead {
    font-size: 22px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .soft-title-focus {
    font-size: 38px;
    margin-inline-start: .06em;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .guide-intro .hero-lead {
    font-size: 14px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .guide-intro .home-actions {
    flex-direction: column;
    align-items: stretch;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .home-actions .button {
    flex: none;
    width: 100%;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-graphic {
    padding: 2px 14px 16px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame {
    min-height: 136px;
    padding: 14px 14px;
    grid-template-columns: minmax(0, 1fr) 108px;
    column-gap: 8px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .graphic-frame > strong {
    font-size: 30px;
  }
  body.is-home-soft-redesign .home-hero[data-home-soft-redesign="v2"] .hero-graphic .guide-watermark {
    width: 104px;
    height: 104px;
  }
}
