/* ==========================================================================
   苹果短剧 · 官方片库
   浅绿白底 / 深绿主色 / 全宽上下结构
   ========================================================================== */

:root {
  --ap-bg: #f3f7f1;
  --ap-surface: #ffffff;
  --ap-green: #256b3b;
  --ap-green-2: #34854d;
  --ap-deep: #0f2a18;
  --ap-lime: #dceccb;
  --ap-ink: #101c14;
  --ap-muted: #66766b;
  --ap-muted-2: #8c9a8f;
  --ap-line: #dbe5da;
  --ap-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --ap-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ap-bg);
  color: var(--ap-ink);
  font-family: var(--ap-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--ap-green);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--ap-green-2);
  outline-offset: 3px;
  border-radius: 3px;
}

.ap-wrap {
  width: min(1140px, calc(100% - 48px));
  margin-inline: auto;
}

.ap-skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ap-green);
  color: #fff;
  transform: translateY(-160%);
}

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

/* ============================ 顶部导航 ============================ */
.ap-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ap-line);
}

.ap-head-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 68px;
}

.ap-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.ap-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.ap-brand b {
  display: block;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.ap-brand small {
  display: block;
  margin-top: 2px;
  font-family: var(--ap-mono);
  font-size: 7px;
  letter-spacing: 0.15em;
  color: var(--ap-green);
}

.ap-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.ap-nav a {
  padding: 5px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ap-muted);
  transition: color 0.2s ease;
}

.ap-nav a:hover {
  color: var(--ap-green);
}

.ap-head-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 6px;
  background: var(--ap-green);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.ap-head-cta:hover {
  background: var(--ap-green-2);
  transform: translateY(-1px);
}

.ap-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ap-line);
  border-radius: 7px;
}

.ap-menu-btn i {
  position: relative;
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ap-ink);
}

.ap-menu-btn i::before,
.ap-menu-btn i::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  background: var(--ap-ink);
  transition: transform 0.22s ease;
}

.ap-menu-btn i::before {
  top: -6px;
}

.ap-menu-btn i::after {
  top: 6px;
}

.ap-menu-btn[aria-expanded="true"] i {
  background: transparent;
}

.ap-menu-btn[aria-expanded="true"] i::before {
  transform: translateY(6px) rotate(45deg);
}

.ap-menu-btn[aria-expanded="true"] i::after {
  transform: translateY(-6px) rotate(-45deg);
}

.ap-mobile {
  display: none;
  position: fixed;
  inset: 68px 0 auto;
  z-index: 95;
  padding: 10px 24px 22px;
  background: #fff;
  border-bottom: 1px solid var(--ap-line);
  box-shadow: 0 22px 40px -30px rgba(16, 28, 20, 0.4);
}

.ap-mobile.is-open {
  display: block;
}

.ap-mobile a {
  display: block;
  padding: 13px 2px;
  border-bottom: 1px solid var(--ap-line);
  font-size: 14px;
  font-weight: 600;
}

.ap-mobile .ap-head-cta {
  margin-top: 16px;
}

/* ============================ 首屏 ============================ */
.ap-hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0 0;
  text-align: center;
  background:
    radial-gradient(circle at 86% 4%, rgba(37, 107, 59, 0.08), transparent 34%),
    radial-gradient(circle at 8% 80%, rgba(37, 107, 59, 0.06), transparent 36%),
    var(--ap-bg);
}

.ap-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(16, 28, 20, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000, transparent 80%);
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000, transparent 80%);
}

.ap-hero > .ap-wrap {
  position: relative;
  z-index: 1;
}

.ap-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 15px;
  font-family: var(--ap-mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ap-green);
}

.ap-kicker::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--ap-green);
}

.ap-hero h1 {
  max-width: 900px;
  margin: 0 auto 17px;
  font-size: clamp(44px, 6.4vw, 80px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.ap-hero h1 em {
  display: block;
  font-style: normal;
  color: var(--ap-green);
}

.ap-hero-copy p {
  max-width: 620px;
  margin: 0 auto 22px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ap-muted);
}

.ap-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 20px;
  border: 1.5px solid transparent;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  transition: transform 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
}

.ap-btn svg {
  width: 14px;
  height: 14px;
}

.ap-btn--green {
  background: var(--ap-green);
  border-color: var(--ap-green);
  color: #fff;
}

.ap-btn--green:hover {
  transform: translateY(-2px);
  background: var(--ap-green-2);
  border-color: var(--ap-green-2);
}

.ap-btn--line {
  border-color: var(--ap-line);
  color: var(--ap-ink);
  background: #fff;
}

.ap-btn--line:hover {
  transform: translateY(-2px);
  border-color: var(--ap-green);
  color: var(--ap-green);
}

/* 封面带 */
.ap-shelf {
  position: relative;
  z-index: 1;
  margin-top: 42px;
  padding: 16px 0 20px;
  background: var(--ap-deep);
  color: #fff;
}

.ap-shelf-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  font-family: var(--ap-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.46);
}

.ap-shelf-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  padding-top: 14px;
}

.ap-shelf-card {
  min-width: 0;
}

.ap-shelf-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  border-radius: 5px;
  background: #233728;
}

.ap-shelf-card h3 {
  margin: 7px 0 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.ap-shelf-card p {
  margin: 0;
  font-family: var(--ap-mono);
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================ 通用区块 ============================ */
.ap-sec {
  padding: 54px 0;
}

.ap-sec--white {
  background: var(--ap-surface);
  border-top: 1px solid var(--ap-line);
  border-bottom: 1px solid var(--ap-line);
}

.ap-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.ap-sec-head h2 {
  margin: 0;
  font-size: clamp(25px, 3.2vw, 38px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.ap-sec-head h2 em {
  font-style: normal;
  color: var(--ap-green);
}

.ap-sec-head p {
  max-width: 280px;
  margin: 0 0 3px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ap-muted);
}

/* ============================ 热门三张 ============================ */
.ap-feature {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.ap-feature-card {
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ap-line);
  border-radius: 8px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ap-feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--ap-green);
}

.ap-feature-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ap-feature-card > div {
  padding: 10px 12px 13px;
}

.ap-feature-card h3 {
  margin: 0 0 2px;
  font-size: 14px;
  line-height: 1.4;
}

.ap-feature-card p {
  margin: 0;
  font-family: var(--ap-mono);
  font-size: 8px;
  color: var(--ap-muted);
}

/* ============================ 片库网格 ============================ */
.ap-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ap-card {
  min-width: 0;
}

.ap-card-cover {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  background: #dfe8db;
}

.ap-card-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ap-card:hover .ap-card-cover img {
  transform: scale(1.03);
}

.ap-card-cover span {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ap-green);
  font-family: var(--ap-mono);
  font-size: 8px;
}

.ap-card h3 {
  margin: 7px 0 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 700;
}

.ap-card p {
  margin: 0;
  font-size: 9px;
  color: var(--ap-muted);
}

/* ============================ 题材 ============================ */
.ap-genre-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 14px 0 0;
}

.ap-genre-bar a {
  padding: 7px 12px;
  border: 1px solid var(--ap-line);
  border-radius: 999px;
  background: #fff;
  font-size: 11px;
  color: var(--ap-muted);
}

.ap-genre-bar a:hover {
  border-color: var(--ap-green);
  color: var(--ap-green);
}

/* ============================ 下载 ============================ */
.ap-download {
  background: var(--ap-deep);
  color: #fff;
  padding: 42px 0;
  text-align: center;
}

.ap-download h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.3vw, 38px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.ap-download p {
  max-width: 620px;
  margin: 0 auto 18px;
  font-size: 11.5px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.6);
}

.ap-download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.ap-download .ap-btn--green {
  background: var(--ap-lime);
  border-color: var(--ap-lime);
  color: var(--ap-deep);
}

.ap-download .ap-btn--green:hover {
  background: #edf7e4;
  border-color: #edf7e4;
}

.ap-download .ap-btn--line {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.ap-download .ap-btn--line:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.ap-device-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-width: 820px;
  margin: 26px auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.ap-device-item {
  padding: 12px 9px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.ap-device-item:first-child {
  border-left: 0;
}

.ap-device-item b {
  display: block;
  font-size: 11.5px;
}

.ap-device-item span {
  display: block;
  margin-top: 2px;
  font-family: var(--ap-mono);
  font-size: 8px;
  color: rgba(255, 255, 255, 0.45);
}

/* ============================ FAQ ============================ */
.ap-faq-wrap {
  max-width: 860px;
  margin-inline: auto;
}

.ap-faq-head {
  margin-bottom: 22px;
  text-align: center;
}

.ap-faq-head h2 {
  margin: 0 0 7px;
  font-size: clamp(25px, 3.2vw, 38px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.ap-faq-head h2 em {
  font-style: normal;
  color: var(--ap-green);
}

.ap-faq-head p {
  margin: 0;
  font-size: 11.5px;
  color: var(--ap-muted);
}

.ap-faq-list {
  border-top: 1px solid var(--ap-line);
}

.ap-q {
  border-bottom: 1px solid var(--ap-line);
}

.ap-q-btn {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 13px 2px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
}

.ap-q-btn:hover {
  color: var(--ap-green);
}

.ap-q-icon {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1px solid var(--ap-line);
  border-radius: 50%;
}

.ap-q-icon::before,
.ap-q-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 1.2px;
  background: var(--ap-green);
  transform: translate(-50%, -50%);
}

.ap-q-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.ap-q.is-open .ap-q-icon {
  background: var(--ap-green);
  border-color: var(--ap-green);
}

.ap-q.is-open .ap-q-icon::before,
.ap-q.is-open .ap-q-icon::after {
  background: #fff;
}

.ap-q.is-open .ap-q-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.ap-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.ap-q.is-open .ap-a {
  grid-template-rows: 1fr;
}

.ap-a-inner {
  overflow: hidden;
}

.ap-a-inner p {
  margin: 0;
  padding: 0 30px 13px 0;
  font-size: 11px;
  line-height: 1.8;
  color: var(--ap-muted);
}

/* ============================ 页脚 ============================ */
.ap-footer {
  background: #fff;
  border-top: 1px solid var(--ap-line);
  padding: 28px 0 20px;
}

.ap-footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
}

.ap-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.ap-footer-brand b {
  font-size: 15px;
}

.ap-footer p {
  margin: 0;
  max-width: 30em;
  font-size: 10px;
  line-height: 1.7;
  color: var(--ap-muted);
}

.ap-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.ap-footer-links a {
  font-size: 10.5px;
  color: var(--ap-muted);
}

.ap-footer-links a:hover {
  color: var(--ap-green);
}

.ap-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--ap-line);
  font-family: var(--ap-mono);
  font-size: 8px;
  color: var(--ap-muted-2);
}

/* ============================ 动效 ============================ */
.ap-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ap-reveal.is-in {
  opacity: 1;
  transform: none;
}

.ap-sec-head.ap-reveal {
  opacity: 1;
  transform: none;
}

/* ============================ 响应式 ============================ */
@media (max-width: 1080px) {
  .ap-catalog {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .ap-nav {
    display: none;
  }

  .ap-menu-btn {
    display: inline-flex;
  }

  .ap-head-inner {
    gap: 12px;
  }

  .ap-brand {
    margin-right: auto;
  }

  .ap-hero {
    padding-top: 38px;
  }

  .ap-hero h1 {
    font-size: clamp(40px, 11vw, 64px);
  }

  .ap-shelf-row {
    grid-template-columns: repeat(6, 160px);
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .ap-sec {
    padding: 42px 0;
  }

  .ap-sec-head {
    display: block;
    margin-bottom: 20px;
  }

  .ap-sec-head p {
    margin-top: 5px;
    max-width: none;
  }

  .ap-feature {
    grid-template-columns: 1fr;
  }

  .ap-feature-card img {
    aspect-ratio: 16 / 9;
  }

  .ap-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ap-device-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ap-device-item:nth-child(3) {
    border-left: 0;
  }

  .ap-device-item:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .ap-footer-main {
    display: block;
  }

  .ap-footer p {
    margin-top: 8px;
  }

  .ap-footer-links {
    margin-top: 10px;
  }
}

@media (max-width: 560px) {
  .ap-wrap {
    width: calc(100% - 30px);
  }

  .ap-head-inner {
    height: 62px;
  }

  .ap-brand img {
    width: 34px;
    height: 34px;
  }

  .ap-brand b {
    font-size: 15px;
  }

  .ap-head-cta {
    padding: 8px 12px;
    font-size: 10.5px;
  }

  .ap-hero h1 {
    font-size: clamp(36px, 11.8vw, 50px);
  }

  .ap-shelf-row {
    grid-template-columns: repeat(6, 140px);
    gap: 8px;
  }

  .ap-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .ap-card h3 {
    font-size: 11.5px;
  }

  .ap-device-grid {
    grid-template-columns: 1fr;
  }

  .ap-device-item,
  .ap-device-item:nth-child(3) {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .ap-device-item:first-child {
    border-top: 0;
  }

  .ap-footer-bottom {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .ap-reveal {
    opacity: 1;
    transform: none;
  }
}
