/* ============================================================
   麻将吃碰消消消 · Mahjong Blast — marketing site stylesheet
   Mobile-first, dependency-free, respects prefers-reduced-motion.
   ============================================================ */

:root {
  --felt-950: #122b10;
  --felt-900: #1a3d16;
  --felt-800: #2d5016;
  --felt-700: #3c6a20;
  --felt-100: #e8f0e2;
  --red-600: #c93838;
  --red-700: #a02d2d;
  --gold-400: #e6c46a;
  --gold-500: #d4a941;
  --ivory: #f7f3e9;
  --ink: #232a20;
  --ink-soft: #4d5747;
  --paper: #f5f6f2;
  --card: #ffffff;
  --line: rgba(35, 42, 32, 0.08);
  --shadow-sm: 0 2px 8px rgba(18, 43, 16, 0.06);
  --shadow-md: 0 10px 30px rgba(18, 43, 16, 0.12);
  --shadow-lg: 0 24px 60px rgba(18, 43, 16, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Malgun Gothic",
    "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
}

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

a {
  color: var(--red-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--red-700);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: fixed;
  z-index: 20;
  left: 1rem;
  top: -4rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--felt-900);
  border-radius: 0 0 0.6rem 0.6rem;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---------- Language switcher ---------- */
.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.lang-switcher a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  padding: 0.32rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-switcher a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
}

.lang-switcher a.active {
  color: var(--felt-900);
  background: var(--gold-400);
  border-color: var(--gold-400);
  font-weight: 600;
}

.lang-switcher.footer {
  margin: 1.2rem 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: center;
  padding: 2.2rem 1.25rem 3.4rem;
  background: radial-gradient(1200px 600px at 50% -200px, var(--felt-700), transparent 60%),
    linear-gradient(155deg, var(--felt-900) 0%, var(--felt-800) 55%, var(--felt-950) 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    radial-gradient(circle at 15% 25%, var(--gold-400) 0 6px, transparent 7px),
    radial-gradient(circle at 85% 20%, var(--gold-400) 0 5px, transparent 6px),
    radial-gradient(circle at 75% 80%, var(--gold-400) 0 6px, transparent 7px),
    radial-gradient(circle at 22% 82%, var(--gold-400) 0 4px, transparent 5px);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 34px;
  background: var(--paper);
  clip-path: ellipse(60% 100% at 50% 100%);
}

.hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.app-icon {
  width: 118px;
  height: 118px;
  margin: 0 auto 1.2rem;
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--shadow-lg);
  background: var(--ivory);
}

.hero-kicker {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--gold-400);
  border: 1px solid rgba(230, 196, 106, 0.4);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.hero-tagline {
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.3rem;
}

.hero-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.7rem;
}

.hero-chips li {
  font-size: 0.85rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

/* ---------- Store badge ---------- */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.66rem 1.35rem;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.store-badge:hover {
  color: #fff;
  background: #1c1c1e;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.store-badge.center {
  margin-top: 1rem;
}

.apple-logo {
  flex: 0 0 auto;
}

.store-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
}

.store-badge-top {
  font-size: 0.72rem;
  opacity: 0.8;
}

.store-badge-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.cta-note {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.hero-cta .cta-note {
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- Layout / sections ---------- */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1.6rem;
}

.section h2 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--felt-800);
  margin-bottom: 1.1rem;
  position: relative;
  padding-left: 0.95rem;
}

.section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  bottom: 0.22em;
  width: 5px;
  border-radius: 4px;
  background: linear-gradient(var(--red-600), var(--gold-500));
}

.about p {
  margin-bottom: 1rem;
  color: var(--ink-soft);
  line-height: 1.85;
}

.about p:last-child {
  margin-bottom: 0;
}

/* ---------- How-to steps ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.step {
  position: relative;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.2rem 1.2rem 3.6rem;
}

.step-number {
  position: absolute;
  left: 1rem;
  top: 1.2rem;
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--felt-700), var(--felt-800));
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.step h3 {
  font-size: 1.05rem;
  color: var(--felt-900);
  margin-bottom: 0.3rem;
}

.step p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Features grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.feature-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.3rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--felt-800);
  background: linear-gradient(140deg, #fff, var(--felt-100));
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.9rem;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 1.05rem;
  color: var(--felt-900);
  margin-bottom: 0.35rem;
}

.feature-card p {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

/* ---------- Download CTA ---------- */
.download {
  text-align: center;
  background: linear-gradient(150deg, var(--felt-800), var(--felt-950));
  border: none;
  color: #fff;
}

.download h2 {
  color: #fff;
  padding-left: 0;
}

.download h2::before {
  display: none;
}

.download p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 40ch;
  margin: 0 auto;
}

.download .cta-note {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.9rem;
}

/* ---------- Support CTA ---------- */
.support-cta {
  text-align: center;
}

.support-cta p {
  color: var(--ink-soft);
}

.email-link {
  font-weight: 600;
  font-size: 1.05rem;
}

/* ---------- Page header (legal/support) ---------- */
.page-header {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 2rem 1.25rem 2.6rem;
  background: linear-gradient(155deg, var(--felt-900) 0%, var(--felt-800) 60%, var(--felt-950) 100%);
}

.page-header .back-link {
  display: inline-block;
  color: var(--gold-400);
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}

.page-header .back-link:hover {
  color: #fff;
}

.page-header h1 {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: 800;
}

/* ---------- Legal content ---------- */
.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.update-time {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  text-align: center;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.9rem;
  color: var(--felt-800);
}

.legal-content h3 {
  font-size: 1.05rem;
  margin-top: 1.4rem;
  margin-bottom: 0.7rem;
  color: var(--ink);
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--ink-soft);
  line-height: 1.85;
}

.legal-content ul {
  margin: 0 0 1.2rem;
  padding-left: 1.6rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ---------- Support page ---------- */
.support-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.contact-section,
.faq-section,
.links-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.8rem;
  margin-bottom: 1.4rem;
}

.contact-section {
  text-align: center;
}

.contact-section h2,
.faq-section h2,
.links-section h2 {
  font-size: 1.3rem;
  color: var(--felt-800);
  margin-bottom: 1rem;
}

.contact-section p {
  color: var(--ink-soft);
}

.contact-section .email {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1rem 0;
}

/* FAQ accordion */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ivory);
  margin-bottom: 0.8rem;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 1rem 3rem 1rem 1.1rem;
  font-weight: 600;
  color: var(--felt-900);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--red-600);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  padding: 0 1.1rem 1.1rem;
  color: var(--ink-soft);
}

.links-section ul {
  list-style: none;
}

.links-section li {
  margin-bottom: 0.6rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--felt-950);
  color: #fff;
  text-align: center;
  padding: 2.4rem 1.25rem;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.85);
}

.footer-nav a:hover {
  color: var(--gold-400);
}

.copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .step {
    padding: 1.4rem 1.2rem 1.4rem 1.2rem;
    text-align: left;
  }

  .step-number {
    position: static;
    margin-bottom: 0.8rem;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
