/* NAXO final refinement: one artwork layer, balanced hero, and predictable actions. */
.home-intro {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  grid-template-rows: repeat(5, auto);
  align-content: center;
  align-items: center;
  gap: 0 clamp(24px, 4vw, 62px);
  min-height: clamp(500px, 43vw, 660px);
  padding: clamp(38px, 5.2vw, 78px) clamp(28px, 6vw, 88px);
  background: radial-gradient(ellipse at 78% 48%, rgba(190, 135, 38, .11), transparent 42%), linear-gradient(135deg, #090b0c 4%, #080a0a 54%, #100d08 100%);
}

.home-intro > :not(.hero-art) {
  grid-column: 1;
  justify-self: stretch;
  width: min(100%, 620px);
  min-width: 0;
  direction: rtl;
  text-align: right;
}
.home-intro > .section-kicker { grid-row: 1; align-self: end; margin-bottom: 8px; }
.home-intro > h1 { grid-row: 2; max-width: 100%; margin: 5px 0 10px; font-size: clamp(38px, 4.1vw, 61px); line-height: 1.35; text-wrap: balance; }
.home-intro > .intro-copy { grid-row: 3; max-width: 54ch; margin-block: 9px 0; font-size: clamp(14px, 1.2vw, 17px); line-height: 1.95; }
.home-intro > .hero-actions { grid-row: 4; direction: rtl; justify-content: flex-start; flex-wrap: wrap; gap: 11px; margin-top: 25px; }
.home-intro > .hero-points { grid-row: 5; direction: rtl; justify-content: flex-start; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.home-intro > .hero-actions .hero-secondary { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 9px; }
.home-intro > .hero-actions .hero-secondary > span { display: inline-flex; flex: 0 0 20px; align-items: center; justify-content: center; width: 20px; height: 20px; }

.home-intro > .hero-art {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1 / 6;
  align-self: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1.69;
  overflow: hidden;
  border: 1px solid rgba(233, 187, 91, .3);
  border-radius: 22px;
  background: #08090b;
  box-shadow: 0 26px 72px rgba(0, 0, 0, .46), inset 0 0 0 1px rgba(255, 231, 170, .04);
  transform: none;
  transition: border-color .3s ease, box-shadow .3s ease;
  isolation: isolate;
}
.hero-feature-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #08090b;
  filter: saturate(.96) contrast(1.02);
}
.home-intro > .hero-art::before {
  z-index: 1;
  background: linear-gradient(0deg, rgba(4, 5, 6, .2), transparent 25%, transparent 82%, rgba(4, 5, 6, .12));
}
.home-intro > .hero-art::after { z-index: 2; opacity: .24; }
.home-intro > .hero-art > .hero-orbit,
.home-intro > .hero-art > .hero-ribbon,
.home-intro > .hero-art > .hero-particle { display: none; }
.home-intro:hover > .hero-art { border-color: rgba(246, 207, 119, .48); box-shadow: 0 30px 82px rgba(0, 0, 0, .5), 0 0 30px rgba(216, 164, 61, .09); }

html[dir="ltr"] .home-intro > :not(.hero-art) { direction: ltr; text-align: left; }
html[dir="ltr"] .home-intro > .hero-actions,
html[dir="ltr"] .home-intro > .hero-points { direction: ltr; }

/* Keep actions consistent without forcing unrelated controls to stretch. */
.app-shell :is(.primary-button, .secondary-button, .text-button, .service-link, .service-showcase-action, .work-card-copy button, .portfolio-filters button, .auth-tabs button, .admin-tabs button) {
  box-sizing: border-box;
  min-height: 42px;
  max-width: 100%;
  padding-block: 9px;
  padding-inline: clamp(13px, 1.25vw, 19px);
  border-radius: 12px;
  font-family: inherit;
  font-size: clamp(11px, .92vw, 14px);
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  transition: transform .2s ease, filter .2s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.app-shell :is(.primary-button, .secondary-button, .service-link, .service-showcase-action, .work-card-copy button):hover { transform: translateY(-1px); }
.app-shell :is(.primary-button, .secondary-button, .text-button, .service-link, .service-showcase-action, .work-card-copy button, .portfolio-filters button, .auth-tabs button, .admin-tabs button):focus-visible { outline: 2px solid rgba(246, 211, 129, .92); outline-offset: 3px; }

/* Reveal motion is progressive enhancement; an observer miss must never blank a page. */
.app-shell .naxo-reveal { opacity: 1; transform: none; transition: none; }
.app-shell .naxo-reveal.naxo-visible { animation: naxo-refinement-reveal .48s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--naxo-delay, 0ms); }
@keyframes naxo-refinement-reveal { from { opacity: .72; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 850px) {
  .home-intro { grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); min-height: 480px; gap: 0 18px; padding-inline: clamp(22px, 4vw, 36px); }
  .home-intro > h1 { font-size: clamp(32px, 5.1vw, 45px); }
  .home-intro > .intro-copy { font-size: 12px; }
  .home-intro > .hero-actions { gap: 8px; margin-top: 18px; }
  .app-shell :is(.primary-button, .secondary-button, .text-button, .service-link, .service-showcase-action, .work-card-copy button, .portfolio-filters button, .auth-tabs button, .admin-tabs button) { font-size: 11px; }
}

@media (max-width: 560px) {
  .home-intro { display: flex; flex-direction: column; align-items: stretch; width: calc(100% - 20px); min-height: 0; margin: 12px auto 25px; padding: 23px 19px 17px; gap: 0; border-radius: 19px; }
  .home-intro > :not(.hero-art) { width: 100%; }
  .home-intro > .section-kicker { order: 1; margin-bottom: 4px; font-size: 9px; }
  .home-intro > h1 { order: 2; margin: 9px 0 7px; font-size: clamp(30px, 8vw, 39px); line-height: 1.4; }
  .home-intro > .intro-copy { order: 3; font-size: 12px; line-height: 1.9; }
  .home-intro > .hero-actions { order: 4; gap: 8px; margin-top: 15px; }
  .home-intro > .hero-points { order: 5; margin-top: 13px; font-size: 8px; }
  .home-intro > .hero-art { order: 6; width: 100%; aspect-ratio: 1.69; min-height: 0; margin-top: 18px; border-radius: 13px; }
  .hero-feature-visual { object-fit: contain; }
  .home-intro .hero-actions :is(.primary-button, .hero-secondary) { min-height: 42px; padding-inline: 12px; font-size: 10px; }
}

@media (max-width: 360px) {
  .home-intro > .hero-actions { flex-direction: column; align-items: stretch; }
  .home-intro > .hero-actions :is(.primary-button, .hero-secondary) { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell :is(.primary-button, .secondary-button, .text-button, .service-link, .service-showcase-action, .work-card-copy button, .portfolio-filters button, .auth-tabs button, .admin-tabs button),
  .home-intro > .hero-art { transition: none !important; }
  .app-shell :is(.primary-button, .secondary-button, .service-link, .service-showcase-action, .work-card-copy button):hover { transform: none; }
  .app-shell .naxo-reveal.naxo-visible { animation: none !important; }
}

/* Let the NAXO artwork carry the full hero while keeping every line readable. */
.home-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(5, auto);
  align-content: center;
  align-items: center;
  gap: 0;
  min-height: clamp(540px, 44vw, 680px);
  padding: clamp(42px, 5vw, 76px) clamp(28px, 7vw, 104px);
  border: 1px solid rgba(225, 178, 77, .2);
  border-radius: 25px;
  background-color: #080a0b;
  background-image: linear-gradient(270deg, rgba(5, 7, 8, .28) 0%, rgba(5, 7, 8, .2) 48%, rgba(5, 7, 8, .07) 73%, rgba(5, 7, 8, .03) 100%), linear-gradient(0deg, rgba(5, 7, 8, .18), transparent 45%, rgba(5, 7, 8, .08)), url("assets/naxo-home-background.webp?v=1");
  background-position: center, center, center;
  background-size: cover;
}
.home-intro > :not(.hero-art) {
  grid-column: 1;
  position: relative;
  z-index: 2;
  justify-self: end;
  width: min(100%, 900px);
}
.home-intro > h1 {
  grid-row: 2;
  max-width: 900px;
  margin: 5px 0 10px;
  font-size: clamp(40px, 4.45vw, 68px);
  line-height: 1.28;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .72);
}
.home-intro > .section-kicker { grid-row: 1; align-self: end; margin: 0 0 8px; }
.home-intro > .intro-copy {
  grid-row: 3;
  max-width: 62ch;
  margin: 9px 0 0;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.85;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .82);
}
.home-intro > .section-kicker,
.home-intro > .hero-points { text-shadow: 0 1px 7px rgba(0, 0, 0, .82); }
.home-intro > .hero-actions { grid-row: 4; justify-self: end; margin-top: 24px; }
.home-intro > .hero-points { grid-row: 5; justify-self: end; margin-top: 17px; }
.home-intro > .hero-art {
  display: none;
}
.home-intro > .hero-art .hero-feature-visual {
  object-fit: cover;
  object-position: 38% center;
  opacity: .9;
}
.home-intro > .hero-art::before {
  z-index: 1;
  background: linear-gradient(90deg, rgba(5, 7, 8, .34) 0%, rgba(5, 7, 8, .48) 35%, rgba(5, 7, 8, .78) 67%, rgba(5, 7, 8, .86) 100%), linear-gradient(0deg, rgba(5, 7, 8, .54), transparent 42%, rgba(5, 7, 8, .24));
}
.home-intro > .hero-art::after { z-index: 1; opacity: .16; }

/* Mirror the hero composition for English: copy and the readable side of the gradient move left. */
html[dir="ltr"] .home-intro {
  background-image: linear-gradient(90deg, rgba(5, 7, 8, .28) 0%, rgba(5, 7, 8, .2) 48%, rgba(5, 7, 8, .07) 73%, rgba(5, 7, 8, .03) 100%), linear-gradient(0deg, rgba(5, 7, 8, .18), transparent 45%, rgba(5, 7, 8, .08)), url("assets/naxo-home-background.webp?v=1");
}
html[dir="ltr"] .home-intro > :not(.hero-art) { direction: ltr; text-align: left; justify-self: start; }
html[lang="en"] .home-intro > h1 { font-size: clamp(40px, 4.45vw, 68px); line-height: 1.28; }
html[dir="ltr"] .home-intro > .hero-actions,
html[dir="ltr"] .home-intro > .hero-points { direction: ltr; justify-self: start; }

@media (max-width: 850px) {
  .home-intro { min-height: 540px; padding-inline: clamp(24px, 5vw, 54px); }
  .home-intro > :not(.hero-art) { width: min(100%, 720px); }
  .home-intro > h1 { font-size: clamp(36px, 5.4vw, 54px); }
  .home-intro > .intro-copy { font-size: clamp(14px, 1.7vw, 16px); }
}

@media (max-width: 560px) {
  .home-intro { position: relative; min-height: 0; }
  .home-intro > :not(.hero-art) { z-index: 2; }
  .home-intro { background-position: center, center, 52% center; }
  .home-intro > h1 { font-size: clamp(34px, 8.4vw, 46px); line-height: 1.35; }
  html[lang="en"] .home-intro > h1 { font-size: clamp(34px, 8.4vw, 46px); line-height: 1.35; }
  .home-intro > .intro-copy { font-size: 14px; line-height: 1.9; }
}
