/*
 * YALI desktop layout refinement
 * Reference: 26-0812-亞立生技-Land-CN.pdf
 * The visual system is sized against a 1440px design canvas.
 * Wider screens extend section backgrounds without scaling the core UI.
 */

@media (min-width: 1101px) {
  :root {
    --yali-max: 1040px;
  }

  .yali-container {
    width: min(calc(100% - 64px), var(--yali-max));
  }

  .yali-section {
    padding: 105px 0;
  }

  .section-title {
    font-size: 54px;
  }

  .section-heading-icon {
    width: 172px;
    margin-bottom: 18px;
  }

  /* Header: fixed 1440-scale dimensions instead of viewport scaling. */
  .site-header {
    top: 30px !important;
  }

  .site-header > .yali-container {
    width: min(calc(100% - 64px), 1260px) !important;
  }

  .site-header__inner {
    grid-template-columns: minmax(245px, .9fr) minmax(390px, 1.15fr) minmax(245px, .86fr) !important;
    gap: 26px !important;
    min-height: 76px !important;
    padding: 8px 32px !important;
  }

  .site-logo img {
    width: 260px !important;
    /* The logo artwork sits low inside its transparent PNG canvas. */
    transform: translateY(-6px);
  }

  .main-nav {
    gap: 34px !important;
    font-size: 20px !important;
    letter-spacing: .14em !important;
    /* Optical baseline correction for the Chinese display typeface. */
    transform: translateY(4px);
  }

  .header-actions {
    gap: 14px !important;
  }

  .header-cta {
    min-height: 48px !important;
    padding-inline: 26px !important;
    font-size: 14px !important;
  }

  .language-switch {
    min-height: 44px !important;
    font-size: 13px !important;
  }

  .language-switch a {
    min-width: 42px !important;
    min-height: 34px !important;
  }

  .language-switch a + a {
    margin-left: 8px !important;
    padding-left: 13px !important;
  }

  .line-float {
    right: max(34px, calc((100vw - 1440px) / 2 + 34px)) !important;
    bottom: 34px !important;
    width: 58px !important;
    font-size: 13px !important;
  }

  /* Hero remains full bleed; only its core type follows the 1440 canvas. */
  .hero {
    min-height: 760px;
    padding: 130px 0 78px;
  }

  .hero h1 {
    letter-spacing: .13em;
  }

  .hero__en {
    margin-top: 19px;
    font-size: 21px;
  }

  .hero__tagline {
    margin-bottom: 34px;
    font-size: 17px;
  }

  /* Philosophy */
  .philosophy {
    min-height: 0;
    padding-top: 108px;
    padding-bottom: 32px;
    background-size: 1440px auto;
  }

  .philosophy__intro {
    gap: 82px;
  }

  .philosophy__icon {
    width: 172px;
    margin-bottom: 24px;
  }

  .philosophy .section-title {
    max-width: 530px;
    font-size: 46px;
  }

  .philosophy__copy {
    max-width: 470px;
    padding-top: 50px;
    font-size: 16px;
    line-height: 1.95;
  }

  .philosophy__copy p {
    margin-bottom: 19px;
  }

  .philosophy__timeline {
    gap: 35px;
    max-width: 980px;
    margin: 285px auto 0;
  }

  .timeline-card__body {
    padding: 44px 28px 16px;
  }

  .timeline-card__body strong {
    font-size: 19px;
  }

  .timeline-card__kicker {
    margin: 8px 0 17px;
    font-size: 13px;
  }

  .timeline-card__body h3 {
    margin-bottom: 15px;
    font-size: 19px;
  }

  .timeline-card__body p {
    margin-bottom: 9px;
    font-size: 14px;
    line-height: 1.7;
  }

  /* Products */
  .products {
    padding: 75px 0 65px;
  }

  .products__intro {
    max-width: 680px;
    margin-bottom: 35px;
  }

  .products__heading {
    width: 245px;
    margin-bottom: 20px;
  }

  .products .section-title {
    font-size: 40px;
  }

  .products__eyebrow {
    font-size: 12px;
  }

  .products__intro p {
    font-size: 16px;
  }

  .product-grid {
    gap: 25px 26px;
  }

  .product-card {
    min-height: 520px;
    border-radius: 36px;
  }

  .product-card:nth-child(-n+2) {
    min-height: 520px;
  }

  .product-card__summary {
    padding: 24px 18px;
  }

  .product-card__visual {
    width: min(78%, 225px);
    height: 120px;
    margin-bottom: 20px;
  }

  .product-card:nth-child(n+3) .product-card__visual {
    width: min(84%, 180px);
    height: 92px;
  }

  .product-card__label {
    gap: 10px;
    font-size: 12px;
  }

  .product-card__label img {
    width: 36px;
    height: 12px;
  }

  .product-card__title {
    margin-top: 9px;
    font-size: 25px;
  }

  .product-card__prompt {
    margin-top: 25px;
    font-size: 16px;
  }

  .product-card__detail {
    padding: 24px 26px 22px;
  }

  .product-card__head {
    min-height: 88px;
  }

  .product-card__detail-image {
    height: 88px;
  }

  .product-card__rule {
    margin: 13px 0 15px;
  }

  .product-card__features {
    gap: 7px;
    font-size: 16px;
    line-height: 1.35;
  }

  .product-card__features strong {
    font-size: 16px;
  }

  /* Quality */
  .quality {
    padding: 72px 0 0;
  }

  .quality__eyebrow {
    gap: 12px;
    margin-bottom: 18px;
    font-size: 13px;
  }

  .quality__eyebrow img {
    width: 230px;
  }

  .quality .section-title {
    margin-bottom: 24px;
    font-size: 44px;
  }

  .quality .section-lead {
    max-width: 760px;
    font-size: 16px;
    line-height: 1.8;
  }

  .quality__visual {
    margin-top: 20px;
  }

  .quality__hand {
    width: min(1050px, 86vw);
    margin: 0 auto -26px calc((100vw - 1440px) / -2 - 75px);
  }

  .quality__pillars {
    max-width: 1040px;
  }

  .quality-pillar {
    grid-template-rows: minmax(145px, auto) 195px;
    gap: 18px;
    min-height: 440px;
    padding: 36px 36px 42px;
  }

  .quality-pillar h3 {
    margin-bottom: 18px;
    font-size: 23px;
  }

  .quality-pillar p {
    font-size: 16px;
    line-height: 1.9;
  }

  .quality-pillar img {
    width: min(72%, 185px);
    height: 185px;
  }

  .quality__certification {
    margin-top: 0;
    padding-top: 0;
    background: linear-gradient(to bottom, transparent 0 180px, var(--yali-dark) 180px 100%);
  }

  .quality__certification img {
    width: min(560px, 39vw);
  }

  /* Partnership */
  .partnership {
    padding: 0 0 80px;
  }

  .partnership__visual {
    min-height: 0;
    aspect-ratio: 16 / 9;
    background-size: 100% 100%;
  }

  .partnership__title {
    width: 100%;
    margin: 0;
  }

  .partnership__title .partnership__heading {
    top: 45%;
    left: 50%;
    display: block;
    width: 210px;
    height: auto;
    margin: 0;
    transform: translate(-50%, -50%);
  }

  .partnership__title h2 {
    font-size: 36px;
  }

  .partnership__lead {
    max-width: 810px;
    margin: 14px auto 52px;
  }

  .partnership__lead p:first-child {
    margin-bottom: 23px;
    font-size: 29px;
  }

  .partnership__lead p:last-child {
    font-size: 16px;
    line-height: 1.95;
  }

  .advantage-grid {
    gap: 20px 48px;
    max-width: 1040px;
  }

  .advantage-card {
    grid-template-columns: 165px minmax(0, 1fr);
    column-gap: 24px;
    min-height: 110px;
    padding: 42px 30px 18px;
    border-radius: 32px 32px 0 0;
  }

  .advantage-card::before {
    height: 105px;
  }

  .advantage-card::after {
    top: 36px;
    left: 30px;
    width: 165px;
    background: #ec6c1f;
  }

  .advantage-card h3 {
    margin-top: 17px;
    font-size: 24px;
  }

  .advantage-card small {
    font-size: 10px;
    color: #ec6c1f;
    text-align: left;
    transform: translateY(-15px);
  }

  .advantage-card p {
    margin-top: 5px;
    font-size: 15px;
  }

  .partnership__tagline {
    width: 335px;
    margin-top: 38px;
  }

  /* Contact: the 1920px viewport extends the two background colors only. */
  .contact {
    padding: 0;
    background: #808080;
  }

  .contact__layout {
    width: 100%;
    margin-inline: auto;
  }

  .service-process {
    align-self: stretch;
    min-height: min(50vw, 960px);
    height: auto;
    aspect-ratio: auto;
    border-radius: 0;
    border-top-right-radius: 96px;
  }

  .service-process__visual h2 {
    font-size: 18px;
  }

  .service-process__visual h2 span {
    font-size: 15px;
  }

  .service-process__steps {
    top: 57%;
    right: 15%;
    left: 19%;
    padding: 0;
  }

  .service-process__steps ol {
    gap: 20px 34px;
  }

  .service-process__steps li {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
  }

  .service-process__steps strong {
    font-size: 32px;
  }

  .service-process__steps span {
    font-size: 20px;
  }

  .service-process__steps small {
    font-size: 10px;
  }

  .service-process__steps p {
    margin: 48px -8% 0;
    font-size: 22px;
    line-height: 1.75;
  }

  .contact-panel {
    padding: 45px 56px 42px;
  }

  .contact-copy {
    margin-bottom: 25px;
  }

  .contact-copy h2 {
    margin-bottom: 20px;
    font-size: 32px;
  }

  .contact-copy p {
    max-width: 540px;
    font-size: 15px;
  }

  .contact-form {
    gap: 12px;
  }

  .contact-form__row {
    gap: 15px;
  }

  .contact-form label {
    gap: 8px;
    font-size: 12px;
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    min-height: 52px;
    padding: 10px 22px;
    font-size: 16px;
  }

  .contact-form textarea {
    min-height: 90px;
    border-radius: 26px;
  }

  /* Footer */
  .site-footer {
    padding-top: 56px;
  }

  .site-footer .yali-container {
    width: min(calc(100% - 72px), 1260px);
  }

  .footer-grid {
    gap: 45px;
  }

  .footer-logo {
    width: 320px;
  }

  .footer-contact {
    gap: 9px;
    font-size: 12px;
  }

  .footer-contact img {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .footer-links {
    gap: 7px;
    font-size: 12px;
  }

  .footer-links h3 {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .footer-base {
    margin-top: 52px;
    padding: 20px 0 28px;
    font-size: 12px;
  }
}

/* First client revision: desktop canvas and card proportions. */
@media (min-width: 1101px) {
  .main-nav {
    font-size: 16px !important;
  }

  .philosophy {
    background-size: max(100vw, 1920px) auto;
  }

  .philosophy__timeline {
    max-width: 980px;
    margin-bottom: 72px;
  }

  .timeline-card,
  .timeline-card:first-child {
    height: auto;
    aspect-ratio: 5 / 12;
  }

  .product-card:nth-child(-n+2) {
    min-height: 475px;
  }

  .product-card:nth-child(n+3) {
    min-height: 520px;
  }

  .quality__visual {
    height: max(600px, 31.25vw);
    background-size: max(100vw, 1920px) auto;
  }

  .partnership__visual {
    height: max(1080px, 56.25vw);
    aspect-ratio: auto;
    background-size: max(100vw, 1920px) auto;
  }

  .advantage-card {
    min-height: 145px;
  }

  .service-process {
    align-self: stretch;
    min-height: min(50vw, 960px);
    height: auto;
    aspect-ratio: auto;
    border-radius: 0;
    border-top-right-radius: 96px;
  }

  .service-process__media {
    left: auto;
    right: 0;
    width: min(720px, 100%);
    height: auto;
  }
}

@media (min-width: 1920px) {
  .service-process__media {
    right: 120px;
  }
}
