/* ==========================================================================
   SECTIONS — everything after the hero (brief §07–§21, §37)
   Rhythm: editorial → mosaic → typographic → compact → immersive → minimal
   ========================================================================== */

/* --------------------------------------------------------------------------
   Scroll reveal primitive (progressive enhancement: visible without JS)
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1s var(--ease-out),
    transform 1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

/* will-change is expensive: promoting all ~45 reveal elements to their own
   compositor layer for the whole page life is what made scrolling stutter.
   JS adds .is-warm only while an element is approaching the viewport, so at
   most a handful of layers exist at any moment. */
.js [data-reveal].is-warm {
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Image mask reveal (brief §23) */
.js [data-reveal-mask] .reveal-media {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.25s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal-mask].is-visible .reveal-media {
  clip-path: inset(0 0 0 0);
}

.reveal-media {
  overflow: hidden;
}

/* <picture> must stretch too, otherwise img{height:100%} resolves to auto */
.reveal-media,
.reveal-media picture,
.about-visual picture,
.tile__media picture,
.space-stage__bg picture,
.page-hero__bg picture,
.contact-lantern__bg picture,
.between-visual picture,
.music-card__art picture {
  display: block;
  width: 100%;
  height: 100%;
}

.reveal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}

/* --------------------------------------------------------------------------
   01 · ABOUT — editorial split (brief §09)
   -------------------------------------------------------------------------- */

.chapter-about {
  padding-top: clamp(4rem, 7vw, 6.5rem);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(2.5rem, 5vw, 5rem);
  }
}

.about-visual {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--night-850);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

@media (max-width: 899px) {
  .about-visual {
    aspect-ratio: 16 / 11;
  }
}

.about-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(2, 11, 17, 0.72),
    rgba(2, 11, 17, 0.05) 55%
  );
  pointer-events: none;
}

.about-visual__caption {
  position: absolute;
  inset-inline: 1.35rem;
  bottom: 1.25rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: rgba(240, 237, 228, 0.62);
}

.about-visual__caption strong {
  font-weight: 500;
  color: var(--gold);
}

.about-copy > * + * {
  margin-top: 1.15rem;
}

.about-copy .h-1 {
  margin-bottom: 0.35rem;
}

/* The "and sometimes…" staccato list — a rhythm device, not a bullet list */
.about-verbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  margin-top: 1.35rem !important;
}

.about-verbs span {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: rgba(240, 237, 228, 0.78);
  transition:
    border-color var(--transition),
    color var(--transition),
    background-color var(--transition);
}

.about-verbs span:hover {
  border-color: rgba(232, 162, 74, 0.55);
  color: var(--gold);
  background: rgba(232, 162, 74, 0.06);
}

/* --------------------------------------------------------------------------
   02 · SELECTED WORKS — editorial mosaic (brief §10–§13)
   -------------------------------------------------------------------------- */

.chapter-works {
  background:
    radial-gradient(
      120% 60% at 50% 0%,
      rgba(19, 39, 65, 0.5),
      transparent 70%
    ),
    var(--night-950);
}

.works-head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 4vw, 3.75rem);
}

@media (min-width: 900px) {
  .works-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    align-items: end;
    gap: 3rem;
  }
}

.works-head__index {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(240, 237, 228, 0.4);
}

/* The mosaic: deliberately unequal tiles, staggered, with negative space */
.mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: span 12;
}

@media (min-width: 900px) {
  /* هماهنگ — large featured, but NOT full-bleed (brief §11) */
  .tile--feature-a {
    grid-column: 1 / span 7;
  }
  /* دست راست — large featured, offset downward for asymmetry */
  .tile--feature-b {
    grid-column: 8 / span 5;
    margin-top: clamp(2rem, 5vw, 4.5rem);
  }
  /* آراسب */
  .tile--medium:nth-of-type(3) {
    grid-column: 1 / span 5;
  }
  /* تاج */
  .tile--medium:nth-of-type(4) {
    grid-column: 6 / span 4;
    margin-top: clamp(1rem, 2vw, 2rem);
  }
  /* سایر */
  .tile--small {
    grid-column: 10 / span 3;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .tile--feature-a,
  .tile--feature-b {
    grid-column: span 12;
  }
  .tile--medium,
  .tile--small {
    grid-column: span 6;
  }
}

.tile__media {
  position: relative;
  display: block;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--night-850);
  border: 1px solid var(--line-soft);
}

.tile--feature-a .tile__media {
  aspect-ratio: 16 / 11;
}

.tile--feature-b .tile__media {
  aspect-ratio: 4 / 4.4;
}

.tile--medium .tile__media {
  aspect-ratio: 16 / 10;
}

.tile--small .tile__media {
  aspect-ratio: 3 / 3.4;
}

@media (max-width: 899px) {
  .tile__media {
    aspect-ratio: 16 / 10 !important;
  }
}

.tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(2, 11, 17, 0.55),
    transparent 60%
  );
  opacity: 0.9;
  transition: opacity var(--transition);
}

.tile a.tile__media:hover img,
.tile a.tile__media:focus-visible img {
  transform: scale(1.045);
}

.tile a.tile__media:hover::after {
  opacity: 0.55;
}

/* Ownership badge — distinguishes owned products from client work (brief §12) */
.tile__badge {
  position: absolute;
  z-index: 2;
  top: 0.9rem;
  inset-inline-start: 0.9rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.tile--product .tile__badge {
  background: rgba(232, 162, 74, 0.16);
  color: var(--gold);
  border-color: rgba(232, 162, 74, 0.4);
}

.tile--service .tile__badge {
  background: rgba(2, 11, 17, 0.55);
  color: rgba(240, 237, 228, 0.8);
}

.tile__body {
  padding-top: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tile__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(240, 237, 228, 0.5);
}

.tile__meta .num {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.tile__meta .dash {
  flex: 0 0 1.5rem;
  height: 1px;
  background: var(--line);
}

.tile__title {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.4;
  color: var(--cream);
}

.tile--feature-a .tile__title,
.tile--feature-b .tile__title {
  font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2rem);
}

.tile--medium .tile__title {
  font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem);
}

.tile--small .tile__title {
  font-size: 1.1rem;
}

.tile__excerpt {
  font-size: 0.88rem;
  line-height: 1.85;
  color: rgba(240, 237, 228, 0.62);
  max-width: 46ch;
  text-wrap: pretty;
}

.tile--small .tile__excerpt {
  font-size: 0.82rem;
}

.tile__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--gold);
  transition: gap var(--transition);
}

.tile__link svg {
  width: 0.95rem;
  height: 0.95rem;
  transition: transform var(--transition);
}

.tile__link:hover {
  gap: 0.75rem;
}

.tile__link:hover svg {
  transform: translateX(-0.2rem);
}

[dir="ltr"] .tile__link:hover svg {
  transform: translateX(0.2rem) rotate(180deg);
}

[dir="ltr"] .tile__link svg {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   03 · I WORK BETWEEN — typography-driven, compact (brief §15)
   -------------------------------------------------------------------------- */

.chapter-between {
  padding-block: var(--chapter-y-tight);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--night-900);
}

.between-grid {
  display: grid;
  gap: clamp(1.75rem, 3vw, 3rem);
}

@media (min-width: 900px) {
  .between-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
  }
}

.between-copy .body-text {
  margin-top: 1rem;
}

/* Interactive list: hover/focus swaps the paired visual behind it */
.between-list {
  position: relative;
  display: grid;
  gap: 0;
}

.between-item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  padding-block: clamp(0.7rem, 1.4vw, 1rem);
  border-bottom: 1px solid var(--line-soft);
  cursor: default;
  transition: padding-inline-start var(--transition);
}

.between-item:first-child {
  border-top: 1px solid var(--line-soft);
}

.between-item__key {
  flex: 0 0 auto;
  min-width: 8.5rem;
  /* Latin keys stay in Vazirmatn: Hasti is reserved for Persian headings */
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.95rem, 0.85rem + 0.42vw, 1.2rem);
  line-height: 1.3;
  color: rgba(240, 237, 228, 0.55);
  letter-spacing: 0.14em;
  transition:
    color var(--transition),
    letter-spacing var(--transition);
}

.between-item__text {
  font-size: 0.86rem;
  line-height: 1.8;
  color: rgba(240, 237, 228, 0.42);
  transition: color var(--transition);
  text-wrap: pretty;
}

.between-item:hover,
.between-item:focus-within {
  padding-inline-start: 0.6rem;
}

.between-item:hover .between-item__key,
.between-item:focus-within .between-item__key {
  color: var(--gold);
  letter-spacing: 0.19em;
}

.between-item:hover .between-item__text,
.between-item:focus-within .between-item__text {
  color: rgba(240, 237, 228, 0.82);
}

/* Paired visual — cross-fades with the hovered discipline */
.between-visual {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--night-850);
  border: 1px solid var(--line-soft);
}

@media (max-width: 899px) {
  .between-visual {
    display: none;
  }
}

.between-visual figure {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out);
}

.between-visual figure.is-active {
  opacity: 1;
}

.between-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.between-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(2, 11, 17, 0.6),
    transparent 65%
  );
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   04 · WRITING — compact editorial rows (brief §16)
   -------------------------------------------------------------------------- */

.chapter-writing {
  padding-block: var(--chapter-y-tight);
}

.writing-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 800px) {
  .writing-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

.writing-list {
  border-top: 1px solid var(--line-soft);
}

.writing-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.75rem);
  padding-block: clamp(0.95rem, 1.8vw, 1.3rem);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color var(--transition);
}

.writing-row:hover {
  background: rgba(240, 237, 228, 0.022);
}

.writing-row__num {
  font-size: 0.72rem;
  color: rgba(240, 237, 228, 0.35);
  font-variant-numeric: tabular-nums;
}

.writing-row__main {
  min-width: 0;
}

.writing-row__cat {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 0.3rem;
  opacity: 0.85;
}

.writing-row__title {
  font-size: clamp(0.95rem, 0.9rem + 0.35vw, 1.15rem);
  line-height: 1.6;
  color: rgba(240, 237, 228, 0.92);
  transition: color var(--transition);
  text-wrap: pretty;
}

.writing-row:hover .writing-row__title {
  color: var(--gold);
}

.writing-row__aside {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.72rem;
  color: rgba(240, 237, 228, 0.4);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .writing-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .writing-row__aside {
    grid-column: 2;
    gap: 0.7rem;
  }
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--gold);
  transition: gap var(--transition);
}

.link-more:hover {
  gap: 0.75rem;
}

.link-more svg {
  width: 0.95rem;
  height: 0.95rem;
}

[dir="ltr"] .link-more svg {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   05 · MY SPACE — immersive image (brief §17)
   -------------------------------------------------------------------------- */

.chapter-space {
  padding-block: 0;
}

.space-stage {
  position: relative;
  min-height: clamp(24rem, 62vh, 40rem);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

.space-stage__bg {
  position: absolute;
  inset: -12% 0;
  z-index: -2;
}

.space-stage__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.space-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to bottom,
      var(--night-950) 0%,
      rgba(2, 11, 17, 0.35) 22%,
      rgba(2, 11, 17, 0.45) 70%,
      var(--night-950) 100%
    );
}

.space-copy {
  position: relative;
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  max-width: 46rem;
}

/* The staccato poem — line-per-line reveal */
.space-poem {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.08rem);
  line-height: 1.9;
  color: rgba(240, 237, 228, 0.82);
}

.space-tags {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.space-tags span {
  padding: 0.42rem 1rem;
  border: 1px solid rgba(240, 237, 228, 0.18);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: rgba(240, 237, 228, 0.72);
  background: rgba(2, 11, 17, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    color var(--transition),
    border-color var(--transition);
}

.space-tags span:hover {
  color: var(--gold);
  border-color: rgba(232, 162, 74, 0.5);
}

/* --------------------------------------------------------------------------
   06 · MUSIC — small, unexpected, artistic (brief §18)
   -------------------------------------------------------------------------- */

.chapter-music {
  padding-block: var(--chapter-y-tight);
}

.music-card {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line-soft);
  border-radius: 1.5rem;
  background:
    linear-gradient(
      135deg,
      rgba(232, 162, 74, 0.05),
      rgba(2, 11, 17, 0) 55%
    ),
    var(--night-900);
}

@media (min-width: 760px) {
  .music-card {
    grid-template-columns: 12rem minmax(0, 1fr);
    /* deliberately small + offset: music is an aside, not a full-width band */
    max-width: 46rem;
    margin-inline-start: auto;
    margin-inline-end: clamp(0rem, 6vw, 5rem);
  }
}

/* no real audio yet: keep the track present but visibly inert */
.player:has(.player__btn:disabled) .player__bar {
  opacity: 0.45;
}

.music-card__art {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--night-850);
}

.music-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-card__body {
  min-width: 0;
}

.music-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
  line-height: 1.4;
  margin-top: 0.15rem;
}

.music-card__note {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  line-height: 1.9;
  color: rgba(240, 237, 228, 0.6);
  max-width: 44ch;
  text-wrap: pretty;
}

/* Real, minimal player. Rendered disabled until an audio file exists (brief §18) */
.player {
  margin-top: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.player__btn {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(232, 162, 74, 0.45);
  color: var(--gold);
  background: rgba(232, 162, 74, 0.08);
  transition:
    background-color var(--transition),
    transform var(--transition);
}

.player__btn:hover:not(:disabled) {
  background: rgba(232, 162, 74, 0.18);
  transform: scale(1.05);
}

.player__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.player__btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.player__track {
  flex: 1 1 auto;
  min-width: 0;
}

.player__bar {
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: rgba(240, 237, 228, 0.14);
  overflow: hidden;
}

.player__fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 0%;
  background: var(--gold);
  transition: width 0.1s linear;
}

.player__time {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(240, 237, 228, 0.42);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   07 · NOW — minimal, data-driven (brief §19)
   -------------------------------------------------------------------------- */

.chapter-now {
  padding-block: var(--chapter-y-tight);
  border-top: 1px solid var(--line-soft);
}

.now-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.now-period {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.now-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-soft);
}

.now-item {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  transition: background-color var(--transition);
}

a.now-item:hover {
  background: rgba(240, 237, 228, 0.022);
}

.now-item__tag {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: rgba(240, 237, 228, 0.45);
}

.now-item__label {
  font-size: 0.92rem;
  color: rgba(240, 237, 228, 0.88);
}

.now-item__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--amber);
  opacity: 0.55;
}

a.now-item:hover .now-item__dot {
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(232, 162, 74, 0.14);
}

@media (max-width: 560px) {
  .now-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .now-item__tag {
    grid-column: 1 / -1;
    margin-bottom: -0.35rem;
  }
}

/* --------------------------------------------------------------------------
   08 · CONTACT — cinematic ending (brief §20)
   -------------------------------------------------------------------------- */

.contact-lantern {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(16rem, 40vh, 24rem);
  overflow: hidden;
  text-align: center;
}

.contact-lantern__bg {
  position: absolute;
  inset: -10% 0;
  z-index: 0;
}

.contact-lantern__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.contact-lantern::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    var(--night-950),
    rgba(2, 11, 17, 0.4) 45%,
    var(--night-950)
  );
}

.contact-lantern p {
  position: relative;
  z-index: 2;
  padding-inline: var(--gutter);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.75rem);
  line-height: 1.7;
  color: rgba(240, 237, 228, 0.9);
  text-wrap: balance;
}

.chapter-contact {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: var(--chapter-y);
}

.contact-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
}

.contact-intro .body-text {
  margin-top: 1.1rem;
}

.contact-direct {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-direct__label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: rgba(240, 237, 228, 0.42);
}

.contact-direct a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  transition: opacity var(--transition);
  width: fit-content;
}

.contact-direct a:hover {
  opacity: 0.78;
}

.contact-direct a svg {
  width: 1.05rem;
  height: 1.05rem;
  opacity: 0.7;
}

/* Form */
.contact-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line-soft);
  border-radius: 1.5rem;
  background: var(--night-900);
}

.contact-form__row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 620px) {
  .contact-form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: rgba(240, 237, 228, 0.72);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(2, 11, 17, 0.55);
  color: var(--cream);
  font-size: 0.92rem;
  transition:
    border-color var(--transition),
    background-color var(--transition);
}

.contact-form textarea {
  resize: vertical;
  min-height: 7.5rem;
  line-height: 1.8;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(232, 162, 74, 0.55);
  background: rgba(2, 11, 17, 0.8);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(240, 237, 228, 0.28);
}

/* Honeypot */
.contact-form__trap {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.contact-form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--night-950);
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -12px rgba(232, 162, 74, 0.6);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.btn-primary svg {
  width: 1rem;
  height: 1rem;
}

.form-status {
  font-size: 0.82rem;
  line-height: 1.7;
  color: rgba(240, 237, 228, 0.68);
}

.form-status[data-state="error"] {
  color: #f0a37a;
}

.form-status[data-state="success"] {
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   09 · FOOTER — minimal with identity (brief §21)
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--night-950);
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.75rem;
}

.footer-top {
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 820px) {
  .footer-top {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
  }
}

.footer-brand__logo {
  display: inline-block;
  line-height: 0;
  opacity: 0.92;
  transition: opacity var(--transition);
}

.footer-brand__logo:hover,
.footer-brand__logo:focus-visible {
  opacity: 1;
}

.footer-brand__logo img {
  width: clamp(110px, 12vw, 150px);
  height: auto;
}

.footer-brand__tagline {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(240, 237, 228, 0.5);
}

.footer-brand__tagline span:not(:last-child)::after {
  content: "";
}

.footer-col__title {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: rgba(240, 237, 228, 0.38);
  margin-bottom: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.7rem;
}

.footer-links a {
  font-size: 0.86rem;
  color: rgba(240, 237, 228, 0.68);
  transition: color var(--transition);
  width: fit-content;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: rgba(240, 237, 228, 0.68);
  transition: color var(--transition);
}

.footer-socials a:hover {
  color: var(--gold);
}

.footer-socials svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.75;
}

.footer-bottom {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.35rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: rgba(240, 237, 228, 0.4);
}

.footer-bottom .still {
  color: var(--amber);
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   Inner pages (project detail, writing archive, 404)
   -------------------------------------------------------------------------- */

.page {
  padding-top: 0;
}

.page-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(20rem, 52vh, 30rem);
  padding-top: clamp(7rem, 14vh, 10rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  isolation: isolate;
}

.page-hero__bg {
  position: absolute;
  inset: -8% 0;
  z-index: -2;
}

.page-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(2, 11, 17, 0.86),
    rgba(2, 11, 17, 0.6) 45%,
    var(--night-950)
  );
}

.page-hero--plain {
  min-height: auto;
}

.page-hero--plain::after {
  background: none;
}

.page-hero__inner .lead {
  margin-top: 1rem;
}

.page-body {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
}

@media (min-width: 900px) {
  .page-body {
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  }
}

.page-facts dl {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
}

.page-facts dl > div {
  display: grid;
  gap: 0.3rem;
}

.page-facts dt {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: rgba(240, 237, 228, 0.4);
}

.page-facts dd {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(240, 237, 228, 0.86);
}

.page-tags {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.page-tags li {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.74rem;
  color: rgba(240, 237, 228, 0.7);
}

.page-prose > section + section {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.page-prose .body-text {
  margin-top: 0.85rem;
}

.page-back {
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* --------------------------------------------------------------------------
   11 · ARTICLE — /writing/{slug}
   -------------------------------------------------------------------------- */

.article-meta {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}

.article-prose {
  max-width: 68ch;
  margin-inline: auto;
}

.article-prose .lead {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 2rem;
}

.article-prose .h-3 {
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
}

.article-prose .body-text + .body-text {
  margin-top: 1.15rem;
}

.article-quote {
  margin: 2.25rem 0;
  padding-inline-start: 1.25rem;
  border-inline-start: 2px solid rgba(232, 162, 74, 0.5);
}

.article-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.4rem);
  line-height: 1.85;
  color: rgba(240, 237, 228, 0.92);
  text-wrap: balance;
}

.article-more {
  max-width: 68ch;
  margin: clamp(3rem, 6vw, 4.5rem) auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}

.article-more__list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.article-more__list a {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-soft);
  transition: opacity var(--transition);
}

.article-more__list a:hover {
  opacity: 0.72;
}

.article-more__cat {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.article-more__title {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--cream);
}

/* ==========================================================================
   12 · WRITING ARCHIVE — list + sticky sidebar
   ========================================================================== */
.archive {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
}

@media (min-width: 1000px) {
  .archive {
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
  }
}

.archive__main { min-width: 0; }

.archive__side-inner {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1000px) {
  .archive__side-inner {
    position: sticky;
    top: 6.5rem;
  }
}

/* --- cards --------------------------------------------------------------- */
.side-card {
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius) * 0.85);
  background: rgba(240, 237, 228, 0.022);
}

.side-card__title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(240, 237, 228, 0.45);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

/* --- search -------------------------------------------------------------- */
.side-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.15rem 0.15rem 0.15rem 0.15rem;
  background: rgba(2, 11, 17, 0.45);
  transition: border-color var(--transition);
}

.side-search:focus-within { border-color: rgba(232, 162, 74, 0.5); }

.side-search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.6rem 0.7rem;
}

.side-search input::placeholder { color: rgba(240, 237, 228, 0.32); }
.side-search input:focus { outline: none; }

.side-search button {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0.45rem;
  background: rgba(232, 162, 74, 0.14);
  color: var(--amber);
  cursor: pointer;
  transition: background var(--transition);
}

.side-search button:hover { background: rgba(232, 162, 74, 0.26); }
.side-search button svg { width: 15px; height: 15px; }

/* --- simple list --------------------------------------------------------- */
.side-list,
.side-rank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.side-list a,
.side-rank a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.side-list__title {
  display: block;
  font-size: 0.88rem;
  line-height: 1.75;
  color: rgba(240, 237, 228, 0.86);
  transition: color var(--transition);
}

.side-list a:hover .side-list__title,
.side-rank a:hover .side-list__title { color: var(--gold); }

.side-list__meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: rgba(240, 237, 228, 0.4);
}

/* --- ranked list --------------------------------------------------------- */
.side-rank a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.side-rank__num {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(232, 162, 74, 0.55);
  padding-top: 0.22rem;
}

.side-rank__body { min-width: 0; }

/* --- tags ---------------------------------------------------------------- */
.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.side-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  color: rgba(240, 237, 228, 0.75);
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.side-tag span {
  font-size: 0.68rem;
  color: rgba(240, 237, 228, 0.38);
}

.side-tag:hover,
.side-tag.is-active {
  border-color: rgba(232, 162, 74, 0.45);
  background: rgba(232, 162, 74, 0.08);
  color: var(--gold);
}

.side-tag.is-active span { color: rgba(244, 194, 107, 0.7); }

/* --- about --------------------------------------------------------------- */
.side-about__text {
  font-size: 0.85rem;
  line-height: 2;
  color: rgba(240, 237, 228, 0.62);
  margin-bottom: 0.9rem;
}

/* --- sidebar search hint -------------------------------------------------- */
.side-search__hint {
  margin-top: 0.6rem;
  font-size: 0.68rem;
  line-height: 1.9;
  color: rgba(240, 237, 228, 0.34);
}

/* --------------------------------------------------------------------------
   Site-wide search results (/search)
   -------------------------------------------------------------------------- */
.search-hero {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(2, 11, 17, 0.5);
  transition: border-color var(--transition);
}

.search-hero:focus-within { border-color: rgba(232, 162, 74, 0.5); }

.search-hero input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 0.9rem;
}

.search-hero input::placeholder { color: rgba(240, 237, 228, 0.3); }
.search-hero input:focus { outline: none; }

.search-hero button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 0.65rem;
  padding: 0.75rem 1.1rem;
  background: rgba(232, 162, 74, 0.16);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
}

.search-hero button:hover { background: rgba(232, 162, 74, 0.28); }
.search-hero button svg { width: 16px; height: 16px; }

.search-group + .search-group { margin-top: 2.5rem; }

.search-group__count {
  margin-inline-start: 0.5rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(240, 237, 228, 0.07);
  font-size: 0.65rem;
  color: rgba(240, 237, 228, 0.5);
}

.search-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.1rem;
}

.search-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.9rem;
  padding: 1.05rem 0.2rem;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), padding-inline-start var(--transition);
}

.search-row:hover {
  border-color: rgba(232, 162, 74, 0.32);
  padding-inline-start: 0.6rem;
}

.search-row__label {
  flex-shrink: 0;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: rgba(240, 237, 228, 0.55);
  white-space: nowrap;
}

.search-row--project .search-row__label {
  border-color: rgba(232, 162, 74, 0.4);
  color: var(--gold);
  background: rgba(232, 162, 74, 0.1);
}

.search-row__body { min-width: 0; }

.search-row__title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.18rem);
  line-height: 1.75;
  color: rgba(240, 237, 228, 0.92);
  transition: color var(--transition);
}

.search-row:hover .search-row__title { color: var(--gold); }

.search-row__excerpt {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.82rem;
  line-height: 1.95;
  color: rgba(240, 237, 228, 0.5);
}

.search-row__meta {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: rgba(240, 237, 228, 0.35);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .search-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
  }
  .search-row__label { justify-self: start; }
  .search-hero button span { display: none; }
}
/* --- filter chip + empty state ------------------------------------------- */
.archive-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.82rem;
  color: rgba(240, 237, 228, 0.5);
}

.archive-filter strong {
  color: var(--gold);
  font-weight: 600;
}

.archive-filter__count {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(240, 237, 228, 0.07);
  font-size: 0.7rem;
}

.archive-filter__clear {
  margin-inline-start: auto;
  color: rgba(240, 237, 228, 0.45);
  text-decoration: none;
  transition: color var(--transition);
}

.archive-filter__clear:hover { color: var(--amber); }

.archive-empty {
  padding: 3rem 0;
  text-align: center;
  color: rgba(240, 237, 228, 0.45);
  font-size: 0.92rem;
}



/* ==========================================================================
   13 · IMAGE TREATMENT — every picture dissolves on ALL FOUR edges
   --------------------------------------------------------------------------
   The "My Space" stage and the contact lantern already melted into the page
   instead of sitting on it as a rectangle. This section turns that into a
   shared vocabulary: tiles, the portrait, covers and album art all lose their
   four straight edges and bleed into the night background.

   How it works: two linear gradients (vertical + horizontal) are used as mask
   layers and intersected, so the image is fully opaque in the middle and
   dissolves towards top, bottom, start and end at once. The corners — where
   both gradients are already thin — dissolve the most, which is exactly the
   soft, non-rectangular silhouette we want.

   Rules kept deliberately narrow:
     · no filters, no new imagery, no palette change — masks and shape only
     · the SAME mask is applied to the scrim (::after) and the hover light
       (::before) and the frame background is cleared, otherwise those layers
       would keep painting the rectangle the mask just dissolved away
     · every mask degrades to "plain rounded image" where masks are unsupported
   ========================================================================== */

:root {
  --img-radius-lg: clamp(1.25rem, 0.9rem + 1.4vw, 2rem);
  --img-radius-md: clamp(1rem, 0.8rem + 0.9vw, 1.5rem);

  /* Vertical curve: gentle at the top, deeper at the bottom (the edge the
     eye reads as "the image ending"). */
  --img-fade-y: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 3%,
    rgba(0, 0, 0, 0.82) 8%,
    #000 14%,
    #000 70%,
    rgba(0, 0, 0, 0.88) 82%,
    rgba(0, 0, 0, 0.5) 91%,
    rgba(0, 0, 0, 0.16) 97%,
    transparent 100%
  );

  /* Horizontal curve: symmetric, slightly tighter so the composition keeps
     its width and the subject never gets eaten. */
  --img-fade-x: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 2%,
    rgba(0, 0, 0, 0.85) 7%,
    #000 12%,
    #000 88%,
    rgba(0, 0, 0, 0.85) 93%,
    rgba(0, 0, 0, 0.35) 98%,
    transparent 100%
  );
}

/* --------------------------------------------------------------------------
   Shape. Larger, softer corners underneath the mask — they carry the look on
   browsers without mask support and keep hover/scale clipping smooth.
   -------------------------------------------------------------------------- */
.tile__media {
  border: 0;
  border-radius: var(--img-radius-md);
}

.tile--feature-a .tile__media,
.tile--feature-b .tile__media {
  border-radius: var(--img-radius-lg);
}

.tile--small .tile__media {
  border-radius: calc(var(--img-radius-md) * 0.72);
}

.about-visual {
  border-radius: var(--img-radius-lg);
}

.between-visual {
  border: 0;
  border-radius: var(--img-radius-lg);
}

.music-card__art {
  border-radius: var(--img-radius-md);
}

/* --------------------------------------------------------------------------
   The dissolve itself.
   -------------------------------------------------------------------------- */
@supports (mask-image: linear-gradient(#000, transparent)) or
          (-webkit-mask-image: linear-gradient(#000, transparent)) {

  /* The frame must stop painting anything of its own, or a rectangle survives */
  .tile__media,
  .about-visual,
  .between-visual,
  .music-card__art {
    background: none;
    box-shadow: none;
    overflow: visible;
  }

  .tile__media picture,
  .tile__media::after,
  .tile__media::before,
  .about-visual picture,
  .about-visual::after,
  .between-visual figure,
  .between-visual::after,
  .music-card__art picture,
  .music-card__art::after,
  .page-hero__bg picture {
    -webkit-mask-image: var(--img-fade-y), var(--img-fade-x);
    mask-image: var(--img-fade-y), var(--img-fade-x);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }

  /* overflow:visible above would let the hover scale spill; clip the picture
     itself instead, which is also what the rounded corners now live on. */
  .tile__media picture,
  .about-visual picture,
  .between-visual figure,
  .music-card__art picture {
    overflow: hidden;
    border-radius: inherit;
  }

  /* Inner-page cover: it is full-bleed, so only the vertical edges dissolve —
     a horizontal fade on a screen-wide photo would look like a vignette. */
  .page-hero__bg picture {
    -webkit-mask-image: var(--img-fade-y);
    mask-image: var(--img-fade-y);
  }
}

/* Where masks are unsupported the old rounded frame is still wanted. */
@supports not ((mask-image: linear-gradient(#000, transparent)) or
               (-webkit-mask-image: linear-gradient(#000, transparent))) {
  .tile__media,
  .between-visual {
    border: 1px solid var(--line-soft);
  }
}

/* --------------------------------------------------------------------------
   Overlays. Bottom scrims are much lighter now — the dissolve already darkens
   that edge, so the old heavy gradient would double up and grey out the photo.
   -------------------------------------------------------------------------- */
.tile__media::after {
  background: linear-gradient(
    to bottom,
    rgba(2, 11, 17, 0.34) 0%,
    transparent 24%,
    transparent 62%,
    rgba(2, 11, 17, 0.28) 100%
  );
  opacity: 0.95;
}

.tile a.tile__media:hover::after {
  opacity: 0.6;
}

/* Warm glance-light on hover — palette-native, no filter, no extra zoom. */
.tile__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    120% 90% at 50% 108%,
    rgba(232, 162, 74, 0.18),
    transparent 62%
  );
  opacity: 0;
  transition: opacity var(--transition);
}

.tile a.tile__media:hover::before,
.tile a.tile__media:focus-visible::before {
  opacity: 1;
}

.about-visual::after {
  background:
    linear-gradient(to bottom, rgba(2, 11, 17, 0.3) 0%, transparent 22%),
    radial-gradient(
      130% 70% at 50% 104%,
      rgba(232, 162, 74, 0.12),
      transparent 62%
    );
}

.between-visual::after {
  background: linear-gradient(
    to bottom,
    rgba(2, 11, 17, 0.3) 0%,
    transparent 24%
  );
}

.music-card__art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    110% 80% at 50% 104%,
    rgba(232, 162, 74, 0.16),
    transparent 62%
  );
}

/* The badge and the caption sit on dissolved edges, so they carry their own
   readability now that the heavy scrims are gone. */
.tile__badge {
  backdrop-filter: blur(6px);
}

.about-visual__caption {
  text-shadow: 0 1px 12px rgba(2, 11, 17, 0.95), 0 0 3px rgba(2, 11, 17, 0.9);
}

/* --- Inner-page cover scrim, matched to the mask above -------------------- */
.page-hero::after {
  background: linear-gradient(
    to bottom,
    var(--night-950) 0%,
    rgba(2, 11, 17, 0.5) 30%,
    rgba(2, 11, 17, 0.66) 66%,
    var(--night-950) 100%
  );
}

@media (prefers-reduced-motion: reduce) {
  .tile__media::before {
    display: none;
  }
}


/* ==========================================================================
   14 · HERO — BOTTOM EDGE DISSOLVE (client-approved exception, round 4)
   --------------------------------------------------------------------------
   The hero itself stays locked: same markup, layout, type, colours, video and
   animation. The only addition is a gradient veil over the LOWER edge of the
   background video, so the hero melts into the page instead of ending on a
   hard horizontal cut. It lives here — not in hero.css — so the locked file
   stays byte-identical, and it sits under the hero content (z-index 10).
   ========================================================================== */

.hero-bg::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  z-index: 1;
  height: clamp(9rem, 24vh, 18rem);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(9, 22, 32, 0) 0%,
    rgba(9, 22, 32, 0.28) 32%,
    rgba(7, 18, 26, 0.62) 58%,
    rgba(4, 14, 21, 0.88) 80%,
    var(--night-950) 100%
  );
}
