/* Ajuste final: logotipo global y una sola portada para tablet/celular. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.brand-seal {
  border-color: rgba(212, 187, 130, 0.72);
  background:
    #f3ead8
    url("../images/logo-nan-tien-men.png")
    center / calc(100% - 4px) calc(100% - 4px)
    no-repeat;
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

.official-emblem {
  display: none;
}

@media (max-width: 1020px) {
  .hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(660px, 100svh) auto auto auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  .hero > * {
    min-width: 0;
  }

  .hero-copy {
    display: contents;
  }

  .hero-art {
    grid-column: 1;
    grid-row: 1;
    min-height: max(660px, 100svh);
    background-position: 50% center;
  }

  .hero-art::after {
    z-index: 3;
    background:
      linear-gradient(180deg, rgba(15, 10, 7, 0.8), rgba(15, 10, 7, 0.35) 45%, transparent 62%),
      linear-gradient(0deg, rgba(15, 10, 7, 0.7), transparent 36%);
  }

  .master-portrait {
    right: auto;
    left: 50%;
    bottom: 0;
    z-index: 4;
    width: min(108%, 820px);
    height: 68%;
    max-width: none;
    object-position: center bottom;
    transform: translateX(-50%);
  }

  .hero-copy .kicker,
  .hero-copy .chinese-name,
  .hero-copy h1 {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    z-index: 7;
    padding: 0;
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.58);
  }

  .hero-copy .kicker {
    margin: 128px clamp(24px, 7vw, 72px) 0;
    font-size: 0.65rem;
    line-height: 1.35;
    letter-spacing: 0.1em;
    text-wrap: balance;
  }

  .hero-copy .kicker span {
    width: 34px;
  }

  .hero-copy .chinese-name {
    margin: 188px clamp(24px, 7vw, 72px) 0;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
  }

  .hero-copy h1 {
    max-width: min(760px, calc(100% - 48px));
    margin: 226px clamp(24px, 7vw, 72px) 0;
    font-size: clamp(3.8rem, 8.6vw, 6.3rem);
    line-height: 0.78;
    overflow-wrap: normal;
  }

  .international-name {
    display: none;
  }

  .hero-lead {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    padding: 34px clamp(24px, 7vw, 72px) 0;
  }

  .hero-actions {
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    padding: 28px clamp(24px, 7vw, 72px) 0;
  }

  .hero-position {
    grid-column: 1;
    grid-row: 4;
    margin: 32px clamp(24px, 7vw, 72px) 48px;
  }
}

@media (max-width: 760px) {
  .site-header {
    width: calc(100% - 28px);
  }

  .brand {
    min-width: 0;
  }

  .brand-seal {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
  }

  .brand strong {
    font-size: clamp(1rem, 5vw, 1.3rem);
  }

  .brand small {
    font-size: clamp(0.46rem, 2vw, 0.56rem);
    letter-spacing: 0.13em;
  }

  .hero {
    grid-template-rows: minmax(620px, 100svh) auto auto auto;
  }

  .hero-art {
    min-height: max(620px, 100svh);
  }

  .master-portrait {
    width: min(118%, 540px);
    height: 64%;
  }

  .hero-copy .kicker {
    margin: 106px 18px 0;
    max-width: calc(100% - 36px);
    font-size: 0.58rem;
    letter-spacing: 0.075em;
  }

  .hero-copy .chinese-name {
    margin: 160px 18px 0;
    font-size: clamp(1.2rem, 6vw, 1.6rem);
  }

  .hero-copy h1 {
    width: calc(100% - 36px);
    max-width: calc(100% - 36px);
    margin: 194px 18px 0;
    font-size: clamp(1.9rem, 15vw, 4.65rem);
    line-height: 0.8;
  }

  .hero-copy h1 span {
    margin-left: 0.12em;
  }

  .hero-lead {
    padding-inline: 22px;
  }

  .hero-actions {
    padding-inline: 22px;
  }

  .hero-position {
    margin-inline: 22px;
  }
}

@media (max-width: 280px) {
  .site-header {
    width: calc(100% - 18px);
    gap: 5px;
  }

  .brand {
    gap: 6px;
  }

  .brand-seal {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 0.82rem;
  }

  .brand small {
    font-size: 0.4rem;
    letter-spacing: 0.06em;
  }

  .hero-copy .kicker {
    margin-top: 92px;
    font-size: 0.49rem;
    letter-spacing: 0.045em;
  }

  .hero-copy .chinese-name {
    margin-top: 145px;
    font-size: 1rem;
  }

  .hero-copy h1 {
    margin-top: 174px;
    font-size: clamp(1.6rem, 14.8vw, 2.5rem);
  }

  .master-portrait {
    width: min(126%, 360px);
    height: 60%;
  }
}
