/* RamaiPlay 官网样式。颜色见 branding/ramaiplay/README.md */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/plus-jakarta-sans.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #e4002b;
  --red-dark: #c4001f;
  --red-tint: #fdecef;
  --ink: #1b1418;
  --ink-2: #4a4146;
  --ink-3: #6f666b;
  --line: #ebe6e3;
  --paper: #ffffff;
  --sand: #f7f4f1;
  --wa: #128c4b;
  --radius: 14px;
  --wrap: 1180px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:lang(zh) body,
html:lang(zh-Hans) body {
  line-height: 1.75;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}

.skip:focus {
  top: 8px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.btn:hover {
  background: var(--red-dark);
}

.btn:active {
  transform: translateY(1px);
}

.btn--small {
  height: 38px;
  padding: 0 18px;
  font-size: 14px;
}

.btn--big {
  height: 56px;
  padding: 0 28px;
  font-size: 17px;
}

.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.btn--ghost:hover {
  background: var(--sand);
}

.btn--light {
  background: #fff;
  color: var(--red);
}

.btn--light:hover {
  background: var(--red-tint);
}

.btn__icon {
  width: 22px;
  height: 22px;
  flex: none;
}

/* ---------- 顶栏 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.top__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}

.top__brand {
  flex: none;
  margin-right: auto;
}

.top__brand img {
  height: 26px;
  width: auto;
}

.top__nav {
  display: none;
}

.top__cta {
  display: none;
}

@media (min-width: 900px) {
  .top__inner {
    height: 68px;
    gap: 20px;
  }

  .top__brand img {
    height: 30px;
  }

  .top__nav {
    display: flex;
    gap: 28px;
    margin-right: 8px;
  }

  .top__nav a {
    color: var(--ink-2);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
  }

  .top__nav a:hover {
    color: var(--red);
  }

  .top__cta {
    display: inline-flex;
  }
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sand);
}

.lang button {
  min-width: 40px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font: 600 13px/1 var(--font);
  cursor: pointer;
}

.lang button[aria-pressed='true'] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(27, 20, 24, 0.12);
}

/* ---------- 首屏 ---------- */

.hero {
  padding: 32px 0 20px;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: 36px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--red-tint);
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 700;
}

.hero__title {
  font-size: clamp(34px, 9vw, 54px);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 13em;
}

:lang(zh) .hero__title {
  letter-spacing: 0;
  line-height: 1.25;
}

.hero__lead {
  margin-top: 16px;
  max-width: 34em;
  color: var(--ink-2);
  font-size: 17px;
}

.hero__actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 手机上点下载没用（客户端只有 Windows 版），多给一个 WhatsApp 入口；桌面不显示 */
@media (min-width: 900px) {
  .hero__wa {
    display: none;
  }
}

.hero__meta {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.hero__note {
  margin-top: 4px;
  max-width: 34em;
  color: var(--ink-3);
  font-size: 13px;
}

.hero__art {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: end;
}

.hero__card {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: var(--sand);
  box-shadow: 0 10px 24px -14px rgba(27, 20, 24, 0.45);
}

.hero__card--2 {
  transform: translateY(-18px);
}

@media (max-width: 539px) {
  .btn--big {
    width: 100%;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__meta,
  .hero__note {
    text-align: center;
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 72px 0 64px;
  }
}

/* 桌面首屏只放首屏内容：游戏网格从第二屏开始，封面不会在首屏露出空块 */
@media (min-width: 960px) and (min-height: 640px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 68px);
    min-height: calc(100svh - 68px);
    padding: 48px 0;
  }
}

@media (min-width: 960px) {

  .hero__lead {
    font-size: 19px;
  }

  .hero__title {
    max-width: none;
  }

  .hero__inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
  }

  .hero__art {
    gap: 18px;
  }

  .hero__card--1 {
    transform: translateY(24px);
  }

  .hero__card--2 {
    transform: translateY(-24px);
  }

  .hero__card--3 {
    transform: translateY(40px);
  }
}

/* ---------- 区块 ---------- */

.section {
  padding: 48px 0;
}

.section--tint {
  background: var(--sand);
}

.section__head {
  max-width: 640px;
  margin-bottom: 28px;
}

.section__head h2 {
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 800;
}

:lang(zh) .section__head h2 {
  letter-spacing: 0;
}

.section__head p {
  margin-top: 10px;
  color: var(--ink-2);
}

@media (min-width: 960px) {
  .section {
    padding: 80px 0;
  }

  .section__head {
    margin-bottom: 40px;
  }
}

/* ---------- 游戏网格 ---------- */

.games {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .games {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 20px;
  }
}

@media (min-width: 1024px) {
  .games {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.game__cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--sand);
}

.game__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game__cover img[data-src] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game__cover img.is-loaded {
  opacity: 1;
}

.game__tag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(27, 20, 24, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.game__name {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.game__tagline {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) {
  .game__name {
    font-size: 17px;
  }

  .game__tagline {
    font-size: 15px;
  }
}

.games__empty {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--sand);
  color: var(--ink-2);
}

/* ---------- 三步 ---------- */

.steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 22px 20px 22px 20px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}

.step__icon {
  width: 52px;
  height: 52px;
  padding: 10px;
  border-radius: 14px;
  background: var(--red-tint);
  color: var(--red);
}

.step__icon svg {
  width: 100%;
  height: 100%;
}

.step h3 {
  margin-top: 16px;
  font-size: 19px;
  font-weight: 700;
}

.step p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 15px;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .step {
    padding: 28px;
  }
}

/* ---------- 联系 ---------- */

.contact__list {
  display: grid;
  gap: 12px;
}

@media (min-width: 860px) {
  .contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
  }

  .contact .section__head {
    margin-bottom: 0;
  }
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.contact__item:hover {
  border-color: var(--ink-3);
}

.contact__icon {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  background: var(--sand);
  color: var(--ink);
}

.contact__icon--wa {
  background: #e7f6ee;
  color: var(--wa);
}

.contact__icon svg {
  width: 100%;
  height: 100%;
}

.contact__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-right: auto;
}

.contact__label {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
}

.contact__value {
  font-weight: 700;
  font-size: 16px;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.contact__go {
  flex: none;
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 419px) {
  .contact__go {
    display: none;
  }
}

/* ---------- 底部下载条 ---------- */

.cta {
  padding: 44px 0;
  background: var(--red);
  color: #fff;
}

.cta__inner {
  display: grid;
  gap: 20px;
}

.cta h2 {
  font-size: clamp(24px, 5.5vw, 34px);
  font-weight: 800;
}

:lang(zh) .cta h2 {
  letter-spacing: 0;
}

.cta p {
  margin-top: 8px;
  max-width: 36em;
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 539px) {
  .cta .btn {
    width: 100%;
  }
}

@media (min-width: 860px) {
  .cta {
    padding: 56px 0;
  }

  .cta__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 40px;
  }
}

/* ---------- 页脚 ---------- */

.foot {
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

.foot__inner img {
  height: 24px;
  width: auto;
}

.foot__copy {
  width: 100%;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
