/* Badminton Speed Meter uses the portfolio's shared design system from styles.css. */

body.speed-page {
  background: #fbfbfb;
  color: var(--ink);
  font-family: var(--sans);
}

body.speed-page-zh {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

.speed-skip {
  position: fixed;
  z-index: 600;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.speed-skip:focus {
  transform: translateY(0);
}

.speed-page main {
  overflow: visible;
}

.speed-hero {
  position: relative;
  padding-top: clamp(140px, 14vw, 200px);
  padding-bottom: clamp(76px, 8vw, 112px);
  background: transparent;
}

.speed-hero .head {
  max-width: 820px;
  margin-left: 0;
  text-align: left;
}

.speed-hero .h-display {
  max-width: 760px;
  text-wrap: balance;
}

.speed-hero .h-sub {
  max-width: 740px;
}

.speed-actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.speed-actions .a-link {
  margin-left: 4px;
}

.speed-showcase {
  position: relative;
  isolation: isolate;
  width: min(1120px, calc(100% - 44px));
  margin: clamp(52px, 7vw, 82px) auto 0;
  padding: clamp(18px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.82fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  color: #f5f5f7;
  background: #101412;
  box-shadow: 0 30px 78px rgba(5, 9, 8, 0.22);
}

.speed-screen-main {
  position: relative;
  isolation: isolate;
  min-height: 680px;
  margin: 0;
  padding: 54px 34px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: #252a27;
}

.speed-screen-main::before,
.speed-screen-main::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.speed-screen-main::before {
  inset: 34px 28px 72px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.speed-screen-main::after {
  top: 34px;
  bottom: 72px;
  left: 50%;
  width: 1px;
  background: rgba(217, 181, 111, 0.2);
}

.speed-flight {
  position: absolute;
  z-index: 0;
  top: 80px;
  left: 50%;
  width: min(360px, 72%);
  height: 150px;
  border-top: 2px dashed rgba(217, 181, 111, 0.48);
  border-radius: 50%;
  transform: translateX(-50%) rotate(-8deg);
  pointer-events: none;
}

.speed-flight span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d9b56f;
  box-shadow: 0 0 0 5px rgba(217, 181, 111, 0.12);
}

.speed-flight span:nth-child(1) {
  top: -5px;
  left: 8%;
  opacity: 0.42;
}

.speed-flight span:nth-child(2) {
  top: -14px;
  left: 49%;
}

.speed-flight span:nth-child(3) {
  top: 3px;
  right: 8%;
  opacity: 0.62;
}

.speed-phone-frame {
  position: relative;
  z-index: 1;
  width: min(310px, 78%);
  overflow: hidden;
  border: 7px solid #111816;
  border-radius: 42px;
  background: #111816;
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.34);
}

.speed-phone-frame img,
.speed-shot-media img {
  width: 100%;
  height: auto;
}

.speed-screen-main figcaption {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: auto;
  padding: 18px 0 20px;
  color: rgba(245, 245, 247, 0.64);
  font-size: 13px;
  text-align: center;
}

.speed-proof {
  min-width: 0;
}

.speed-result-lockup {
  padding: 2px 0 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.speed-proof-label,
.speed-result-lockup p,
.speed-proof-steps strong,
.speed-proof-steps p,
.speed-proof-meta span {
  display: block;
}

.speed-proof-label {
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.speed-proof-number {
  color: #f5f5f7;
  font-size: clamp(72px, 7.4vw, 104px);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.speed-proof-number span {
  margin-left: 6px;
  color: #d9b56f;
  font-size: 0.22em;
  font-weight: 650;
  letter-spacing: 0;
}

.speed-result-lockup p {
  max-width: 350px;
  margin: 20px 0 0;
  color: rgba(245, 245, 247, 0.64);
  font-size: 14px;
  line-height: 1.5;
}

.speed-proof-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.speed-proof-steps li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0 23px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.speed-proof-steps li > span {
  padding-top: 4px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.speed-proof-steps strong {
  color: #f5f5f7;
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.speed-proof-steps p {
  margin: 7px 0 0;
  color: rgba(245, 245, 247, 0.62);
  font-size: 13px;
  line-height: 1.48;
}

.speed-proof-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 24px;
}

.speed-proof-meta span {
  position: relative;
  padding-left: 13px;
  color: rgba(245, 245, 247, 0.72);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.speed-proof-meta span::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 118, 93, 0.16);
}

.speed-content-section,
.speed-flow-section,
.speed-screens-section {
  padding: clamp(82px, 9vw, 126px) 0;
}

.speed-content-section,
.speed-screens-section {
  background: var(--paper);
}

.speed-content-section .container {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(48px, 8vw, 108px);
  align-items: start;
}

.speed-flow-section {
  background: var(--bg-2);
}

.speed-content-section .head,
.speed-flow-section .head {
  margin-left: 0;
}

.speed-content-section .head {
  position: sticky;
  top: 112px;
}

.speed-content-section .read {
  margin-top: 0;
}

.speed-content-section .read p:first-child {
  color: var(--ink);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.46;
  letter-spacing: -0.025em;
}

.speed-flow-section .timeline {
  margin-top: clamp(42px, 5vw, 58px);
}

.speed-flow-section .timeline-row {
  grid-template-columns: 72px 1fr;
  padding-top: 28px;
  padding-bottom: 28px;
}

.speed-flow-section .timeline-year {
  color: var(--gold);
}

.speed-screen-pair {
  width: min(1120px, calc(100% - 44px));
  margin: clamp(48px, 6vw, 72px) auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.speed-shot {
  min-width: 0;
  margin: 0;
}

.speed-shot-media {
  height: 650px;
  padding: 48px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 24px;
  background: var(--bg-2);
}

.speed-shot:nth-child(2) {
  margin-top: 72px;
}

.speed-shot:nth-child(2) .speed-shot-media {
  border-color: rgba(255, 255, 255, 0.14);
  background: #252a27;
  box-shadow: 0 26px 68px rgba(5, 9, 8, 0.16);
}

.speed-shot-media img {
  width: min(286px, 78%);
  border: 7px solid #111816;
  border-radius: 40px;
  box-shadow: 0 24px 58px rgba(18, 31, 28, 0.2);
}

.speed-shot figcaption {
  padding: 16px 2px 0;
}

.speed-shot figcaption strong,
.speed-shot figcaption span {
  display: block;
}

.speed-shot figcaption strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.speed-shot figcaption span {
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.45;
}

.speed-screens-section .story-grid {
  margin-top: clamp(56px, 7vw, 84px);
}

.speed-screens-section .stats {
  margin-top: clamp(68px, 8vw, 96px);
}

.speed-page .stat-num {
  overflow-wrap: anywhere;
}

.speed-download-section {
  padding: clamp(76px, 8vw, 112px) 0;
  background: var(--paper);
}

.speed-download {
  position: relative;
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 68px);
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: clamp(26px, 4vw, 48px);
  align-items: start;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(217, 181, 111, 0.68);
  border-radius: 24px;
  color: #f5f5f7;
  background: var(--night);
  box-shadow: 0 28px 64px rgba(5, 9, 8, 0.22);
}

.speed-download > img {
  width: 110px;
  height: 110px;
  border-radius: 26px;
}

.speed-download .eyebrow {
  color: var(--gold);
}

.speed-download .h-section {
  max-width: 720px;
  margin-top: 10px;
  color: #f5f5f7;
}

.speed-download p {
  max-width: 620px;
  margin-top: 15px;
  color: rgba(245, 245, 247, 0.68);
  font-size: 17px;
  line-height: 1.5;
}

.speed-download-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
}

.speed-download .pill {
  color: var(--night);
  background: #fff;
}

.speed-download .pill:hover {
  color: var(--night);
  background: #e8eeeb;
}

.speed-download .a-link {
  color: #c5ddd5;
}

.speed-download .a-link::after {
  color: #c5ddd5;
}

.speed-page footer {
  background: #f5f5f7;
}

@media (max-width: 900px) {
  .speed-showcase {
    grid-template-columns: 1fr;
  }

  .speed-screen-main {
    width: min(650px, 100%);
    justify-self: center;
  }

  .speed-proof {
    width: min(650px, 100%);
    justify-self: center;
  }

  .speed-shot-media {
    height: 570px;
  }
}

@media (max-width: 680px) {
  .speed-hero {
    padding-top: 126px;
  }

  .speed-actions {
    gap: 10px;
  }

  .speed-actions .pill,
  .speed-actions .a-link {
    font-size: 14px;
  }

  .speed-showcase,
  .speed-screen-pair,
  .speed-download {
    width: calc(100% - 36px);
  }

  .speed-showcase {
    padding: 14px;
    border-radius: 22px;
  }

  .speed-screen-main {
    min-height: 570px;
    padding: 38px 22px 0;
  }

  .speed-phone-frame {
    width: min(270px, 82%);
  }

  .speed-proof-number {
    font-size: clamp(66px, 20vw, 88px);
  }

  .speed-proof-meta {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .speed-content-section .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .speed-content-section .head {
    position: static;
  }

  .speed-flow-section .timeline-row {
    grid-template-columns: 52px 1fr;
    gap: 20px;
  }

  .speed-screen-pair {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .speed-shot:nth-child(2) {
    margin-top: 0;
  }

  .speed-shot-media {
    height: 540px;
  }

  .speed-download {
    grid-template-columns: 1fr;
  }

  .speed-download > img {
    width: 84px;
    height: 84px;
    border-radius: 21px;
  }
}

@media (max-width: 420px) {
  .speed-screen-main {
    min-height: 520px;
  }

  .speed-phone-frame,
  .speed-shot-media img {
    border-width: 6px;
    border-radius: 34px;
  }

  .speed-shot-media {
    height: 500px;
    padding: 34px 20px 0;
  }

  .speed-download-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .speed-skip {
    transition: none;
  }
}
