/* Adapt the reference layout to lucky's actual text without changing its content. */

/* Services: one stable title column, with the description kept in its own lane. */
#services .svc-row {
  grid-template-columns: 56px minmax(0, 1fr) minmax(220px, 24%);
  gap: clamp(20px, 2.4vw, 48px);
  padding: clamp(34px, 4.5vh, 60px) 0;
  align-items: center;
}
#services .svc-row h3 {
  min-width: 0;
  font-size: clamp(26px, 3.15vw, 58px);
  line-height: 1.06;
  letter-spacing: -.035em;
  overflow-wrap: normal;
  word-break: normal;
}
#services .svc-en { display: block; }
#services .svc-zh {
  display: block;
  margin-top: 15px;
  font-family: var(--inter);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .09em;
  text-transform: none;
  color: #b1ada6;
}
#services .svc-row p {
  width: 100%;
  max-width: 360px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.85;
  color: #a6a29b;
}
#services .svc-row:hover h3 { transform: translateX(10px); }

/* Account metrics use the body typeface: the wide display face remains on headings. */
.footer .account-grid {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.footer .account-text {
  display: flex;
  flex-direction: column;
  padding: 36px clamp(24px, 3vw, 48px) 36px 0;
}
.footer .account-text + .account-text {
  padding: 36px 0 36px clamp(24px, 3vw, 48px);
}
.footer .account-text h3 {
  font-size: clamp(24px, 2.25vw, 34px);
  line-height: 1.4;
  min-height: 1.4em;
  margin: 24px 0 30px;
  letter-spacing: -.025em;
}
.footer .account-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
  margin: auto 0 28px;
}
.footer .account-metrics p {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  min-width: 0;
  gap: 14px;
}
.footer .account-metrics strong {
  font-family: var(--inter);
  font-size: clamp(40px, 4.1vw, 62px);
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.footer .account-metrics span {
  font-family: var(--inter);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .015em;
  color: #a6a29b;
}
.footer .account-text > p {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
}

/* About: bounded columns keep the reference's floating layers clear of the portrait. */
#aboutPage .ap-head {
  background: rgba(5, 5, 5, .94);
  mix-blend-mode: normal;
}
#aboutPage .ap-stage {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: min-content;
  gap: clamp(20px, 2.7vh, 32px) clamp(20px, 2.2vw, 52px);
  align-items: start;
  align-content: start;
  padding: clamp(116px, 12vh, 160px) 4vw 54px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-padding-top: 116px;
}
#aboutPage .ap-lines { opacity: .35; }
#aboutPage .ap-title {
  position: relative;
  top: auto !important;
  left: auto !important;
  grid-column: 1 / 9;
  grid-row: 1;
  width: 100%;
  margin: 0 0 6px;
  font-size: clamp(46px, 4.85vw, 112px);
  line-height: .98;
  letter-spacing: -.045em;
  text-shadow: none;
}
#aboutPage .ap-subtitle {
  position: relative;
  bottom: auto;
  right: auto;
  grid-column: 1 / 9;
  grid-row: 6;
  margin: 8px 0 0;
  text-align: left;
  font-size: clamp(30px, 2.8vw, 64px);
  line-height: .98;
  text-shadow: none;
}
#aboutPage .ap-portrait {
  position: relative;
  inset: auto;
  grid-column: 9 / 13;
  grid-row: 1 / 7;
  align-self: start;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: calc(100svh - 180px);
  aspect-ratio: 941 / 1671;
  object-fit: contain;
  object-position: top right;
  transform: none;
  opacity: 1;
  filter: none;
}
#aboutPage .ap-card {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0;
  align-self: start;
}
#aboutPage .ap-card__inner {
  width: 100%;
  padding: clamp(18px, 1.7vw, 30px);
}
#aboutPage .ap-card p {
  max-width: none;
  font-size: clamp(13px, .95vw, 16px);
  line-height: 1.8;
  color: #a6a29b;
}
#aboutPage .ap-card h4 { font-size: clamp(17px, 1.3vw, 24px); }
#aboutPage .ap-card .big {
  font-size: clamp(36px, 3.45vw, 64px);
  line-height: 1;
  white-space: nowrap;
}
#aboutPage .ap-card .lbl {
  font-family: var(--inter);
  line-height: 1.6;
  letter-spacing: .06em;
}
#aboutPage .ap-card .pill {
  font-size: clamp(9px, .7vw, 12px);
  line-height: 1.5;
  letter-spacing: .035em;
  padding: 6px 10px;
}
#aboutPage .ap-card.quote p {
  max-width: none;
  font-size: clamp(17px, 1.55vw, 26px);
  line-height: 1.45;
  color: var(--ink);
}
#aboutPage .ap-intro { grid-column: 1 / 5; grid-row: 2; }
#aboutPage .ap-views { grid-column: 5 / 9; grid-row: 2; margin-top: 14px; }
#aboutPage .ap-practice { grid-column: 1 / 6; grid-row: 3; }
#aboutPage .ap-platforms { grid-column: 6 / 9; grid-row: 3; margin-top: 12px; }
#aboutPage .ap-independent { grid-column: 1 / 5; grid-row: 4; }
#aboutPage .ap-quote { grid-column: 5 / 9; grid-row: 4; margin-top: 14px; }
#aboutPage .ap-floater {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  justify-self: start;
  align-self: start;
  max-width: 100%;
  margin: 0;
  font-size: clamp(9px, .68vw, 12px);
  line-height: 1.5;
  letter-spacing: .06em;
}
#aboutPage .ap-certifications { grid-column: 1 / 5; grid-row: 5; }
#aboutPage .ap-workflow { grid-column: 5 / 9; grid-row: 5; }

@media (max-width: 980px) {
  #services .svc-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px 20px;
    padding: 32px 0;
  }
  #services .svc-row h3 { font-size: clamp(26px, 4.3vw, 42px); }
  #services .svc-row p { grid-column: 2; max-width: 62ch; }
  #aboutPage .ap-stage { gap: 22px 20px; }
  #aboutPage .ap-title { font-size: 4.85vw; }
  #aboutPage .ap-card .skills { gap: 6px; }
}

@media (max-width: 820px) {
  .footer .account-grid { grid-template-columns: minmax(0, 1fr); }
  .footer .account-text,
  .footer .account-text + .account-text { padding: 32px 0; }
  .footer .account-text + .account-text { border-left: 0; }
  .footer .account-text h3 { margin: 20px 0 28px; min-height: 0; }
  .footer .account-metrics { margin: 0 0 24px; }
  #aboutPage .ap-head { padding: 20px 4vw; }
  #aboutPage .ap-stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: min-content;
    gap: 24px 20px;
    padding: 108px 5vw 40px;
  }
  #aboutPage .ap-title {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: clamp(33px, 7vw, 57px);
    margin-bottom: 8px;
  }
  #aboutPage .ap-portrait {
    grid-column: 2;
    grid-row: 2 / 4;
    max-height: none;
    margin: 0;
    width: 100%;
    opacity: 1;
    align-self: start;
  }
  #aboutPage .ap-intro { grid-column: 1; grid-row: 2; }
  #aboutPage .ap-views { grid-column: 1; grid-row: 3; }
  #aboutPage .ap-practice { grid-column: 1 / -1; grid-row: 4; }
  #aboutPage .ap-platforms { grid-column: 1; grid-row: 5; }
  #aboutPage .ap-certifications { grid-column: 2; grid-row: 5; align-self: center; }
  #aboutPage .ap-independent { grid-column: 1; grid-row: 6; }
  #aboutPage .ap-quote { grid-column: 2; grid-row: 6; }
  #aboutPage .ap-workflow { grid-column: 1 / -1; grid-row: 7; }
  #aboutPage .ap-subtitle {
    grid-column: 1 / -1;
    grid-row: 8;
    margin: 6px 0 0;
    font-size: clamp(30px, 5.6vw, 46px);
  }
  #aboutPage .ap-card,
  #aboutPage .ap-floater { margin: 0; }
  #aboutPage .ap-card__inner { padding: 20px; }
  #aboutPage .ap-card p { font-size: 13px; }
  #aboutPage .ap-card .big { font-size: 42px; }
  #aboutPage .ap-card .pill { font-size: 10px; }
  #aboutPage .ap-card.quote p { font-size: 18px; }
}

@media (max-width: 480px) {
  #services .svc-row { grid-template-columns: 30px minmax(0, 1fr); gap: 14px 10px; }
  #services .svc-row h3 { font-size: clamp(23px, 6.5vw, 30px); line-height: 1.1; }
  #services .svc-en { overflow-wrap: anywhere; }
  #services .svc-row .no { font-size: 10px; }
  #services .svc-zh { margin-top: 10px; font-size: 12px; }
  #services .svc-row p { font-size: 13px; line-height: 1.85; }
  #services .svc-row:hover h3 { transform: translateX(4px); }
  .footer .account-metrics { gap: 20px; }
  .footer .account-metrics strong { font-size: clamp(36px, 10.5vw, 48px); }
  .footer .account-metrics span { font-size: 11px; }
  .footer .account-text h3 { font-size: 24px; }
  .footer .account-text > p { font-size: 12px; }
  #aboutPage .ap-stage { gap: 22px 14px; padding: 100px 5vw 36px; }
  #aboutPage .ap-title { font-size: 7vw; line-height: 1.06; }
  #aboutPage .ap-portrait { grid-column: 1 / -1; grid-row: 2; width: min(100%, 270px); justify-self: end; }
  #aboutPage .ap-intro { grid-column: 1 / -1; grid-row: 3; }
  #aboutPage .ap-views { grid-column: 1 / -1; grid-row: 4; }
  #aboutPage .ap-practice { grid-column: 1 / -1; grid-row: 5; }
  #aboutPage .ap-platforms { grid-column: 1 / -1; grid-row: 6; }
  #aboutPage .ap-independent { grid-column: 1 / -1; grid-row: 7; }
  #aboutPage .ap-quote { grid-column: 1 / -1; grid-row: 8; }
  #aboutPage .ap-certifications { grid-column: 1 / -1; grid-row: 9; }
  #aboutPage .ap-workflow { grid-column: 1 / -1; grid-row: 10; }
  #aboutPage .ap-subtitle { grid-row: 11; font-size: 6.3vw; }
  #aboutPage .ap-card__inner { padding: 22px; }
}
