/* AMSHALEM — five values, one signature. Load after the page styles. */
:root {
  --title-ivory: #f7f1e4;
  --title-gold: #e6c76e;
  --title-metal: linear-gradient(112deg, #d7b65c 0%, #f6df96 21%, #fff1be 35%, #dbbb63 51%, #f4d98d 68%, #c9a348 100%);
}

/* Real text stays in the DOM. These rules also work without JavaScript. */
body.immersive-site main :is(h1, h2, h3) {
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
  font-kerning: normal;
}

body.immersive-site main :is(h1, h2) {
  color: var(--title-ivory);
  text-shadow: 0 1px 0 #000;
}

body.immersive-site main :is(.hero, .svc-hero, .svc-portal-hero, .launch-copy, .portfolio-hero-copy, .sound-settings-heading, .km-hero) h1 {
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.15;
}

body.immersive-site main h2 {
  letter-spacing: -.025em;
  line-height: 1.2;
}

body.immersive-site main h3:not(:where(.media-console *, dialog *)) {
  letter-spacing: -.015em;
  text-shadow: 0 1px 0 #000;
}

/* Section titles share a warm metal finish; small interface titles keep ivory. */
body.immersive-site main h2:not(:where(.launch-teaser *, .svc-media *, .portfolio-feature *, .sound-settings-card *, .sound-settings-notes *, dialog *, .media-console *)),
body.immersive-site main :is(h1, h2) > span:not(:where(.asi-name, .asi-hebrew-name, .launch-teaser *, .svc-media *, .portfolio-feature *, .sound-settings-card *, .sound-settings-notes *, dialog *, .media-console *)) {
  color: var(--title-gold);
  text-shadow: none;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  body.immersive-site main h2:not(:where(.launch-teaser *, .svc-media *, .portfolio-feature *, .sound-settings-card *, .sound-settings-notes *, dialog *, .media-console *)),
  body.immersive-site main :is(h1, h2) > span:not(:where(.asi-name, .asi-hebrew-name, .launch-teaser *, .svc-media *, .portfolio-feature *, .sound-settings-card *, .sound-settings-notes *, dialog *, .media-console *)) {
    background-image: var(--title-metal);
    background-size: 180% 100%;
    background-position: 100% 50%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }
}

/* Five upright strokes echo the original symbol's strings and five values.
   The mark occupies normal flow: no overlay, fixed height or clipped heading. */
body.immersive-site main :is(h1, h2):not(:where(.launch-teaser *, .svc-media *, .portfolio-feature *, .sound-settings-card *, .sound-settings-notes *, dialog *, .media-console *))::after {
  content: "";
  display: block;
  inline-size: 6.5rem;
  max-inline-size: 100%;
  block-size: 1rem;
  margin-block-start: 1rem;
  background:
    linear-gradient(#f3d780, #c39b3c) right 0 top 50% / 1px 6px no-repeat,
    linear-gradient(#fff0b4, #c39b3c) right 5px top 50% / 1px 11px no-repeat,
    linear-gradient(#fff0b4, #d4ae50) right 10px top 50% / 2px 16px no-repeat,
    linear-gradient(#fff0b4, #c39b3c) right 16px top 50% / 1px 11px no-repeat,
    linear-gradient(#f3d780, #c39b3c) right 21px top 50% / 1px 6px no-repeat,
    linear-gradient(270deg, #dfbc62, #8c6b2b 70%, transparent) left center / calc(100% - 32px) 1px no-repeat;
  opacity: .82;
  pointer-events: none;
}

body.immersive-site main h1::after {
  inline-size: 8.5rem;
  margin-block-start: 1.25rem;
}

/* Respect ASI's existing wordmark proportions; it remains the artist identity. */
body.asi-site main #asi-title {
  overflow-wrap: normal;
  text-shadow: none;
}

body.asi-site main #asi-title > .asi-name {
  color: #f7f1e4;
  background: none;
  -webkit-text-fill-color: currentColor;
}

body.asi-site main #asi-title > .asi-hebrew-name {
  color: var(--title-gold);
  background: none;
  -webkit-text-fill-color: currentColor;
}

/* A finite light pass. JavaScript adds the class only for a short, eligible run. */
html.brand-titles-motion body.immersive-site main .brand-title--light,
html.brand-titles-motion body.immersive-site main .brand-title--light > span:not(.asi-name):not(.asi-hebrew-name) {
  animation: amshalem-title-metal 1400ms cubic-bezier(.2, .55, .35, 1) 1;
}

html.brand-titles-motion body.immersive-site main .brand-title--light::after {
  animation: amshalem-title-signature 1400ms ease-out 1;
}

@keyframes amshalem-title-metal {
  0% { background-position: 100% 50%; }
  58% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes amshalem-title-signature {
  0%, 100% { opacity: .82; }
  42% { opacity: 1; }
}

@media (max-width: 700px) {
  body.asi-site main #asi-title::after { margin-inline: auto; }
  body.immersive-site main :is(h1, h2)::after { margin-block-start: .85rem; }
}

/* Long Hebrew titles remain complete on narrow phones without tiny body copy. */
@media (max-width: 380px) {
  body.immersive-site main :is(.hero, .svc-hero, .svc-portal-hero, .launch-copy, .portfolio-hero-copy, .sound-settings-heading, .km-hero) h1 {
    font-size: clamp(2.1rem, 10.4vw, 2.45rem);
    line-height: 1.18;
    letter-spacing: -.025em;
  }
  body.immersive-site main :is(.section-heading, .svc-heading, .svc-feature, .svc-band, .svc-faq, .svc-inquiry, .contact-copy, .marketing-identity, .about-statement, .portfolio-section-heading, .portfolio-invitation, .km-introduction, .km-section, .asi-latest-copy, .asi-section-heading, .asi-story, .asi-collaboration, .asi-contact, .launch-section-heading, .launch-story, .launch-final-cta) h2 {
    font-size: clamp(1.85rem, 9vw, 2.1rem);
    line-height: 1.24;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.brand-titles-motion body.immersive-site main .brand-title--light,
  html.brand-titles-motion body.immersive-site main .brand-title--light > span,
  html.brand-titles-motion body.immersive-site main .brand-title--light::after { animation: none; }
}

html.visual-effects-off body.immersive-site main .brand-title--light,
html.visual-effects-off body.immersive-site main .brand-title--light > span,
html.visual-effects-off body.immersive-site main .brand-title--light::after { animation: none; }

@media (forced-colors: active) {
  body.immersive-site main :is(h1, h2, h3),
  body.immersive-site main :is(h1, h2) > span {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    text-shadow: none;
  }
  body.immersive-site main :is(h1, h2)::after { display: none; }
}

@media print {
  body.immersive-site main :is(h1, h2, h3),
  body.immersive-site main :is(h1, h2) > span {
    background: none;
    color: #000;
    -webkit-text-fill-color: #000;
    text-shadow: none;
    animation: none;
  }
  body.immersive-site main :is(h1, h2)::after { display: none; }
}
