/* =============================================
   Monster Survivors — Apple-inspired design system
   ============================================= */

:root {
  --color-bg: #fbfbfd;
  --color-bg-alt: #f5f5f7;
  --color-surface: #ffffff;
  --color-text: #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-text-tertiary: #86868b;
  --color-accent: #0071e3;
  --color-accent-hover: #0077ed;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-shadow: rgba(0, 0, 0, 0.06);
  --color-shadow-lg: rgba(0, 0, 0, 0.12);

  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --header-height: 52px;
  --container-max: 1080px;
  --narrow-max: 720px;

  --transition: 0.2s ease;
}

/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-system);
  font-size: 17px;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 22px;
}

.container.narrow {
  max-width: var(--narrow-max);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.logo:hover {
  color: var(--color-text);
  text-decoration: none;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0071e3 0%, #42a5f5 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.header-nav {
  display: flex;
  gap: 28px;
}

.header-nav a {
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--color-text);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: 18px;
}

.hero-tagline {
  font-size: clamp(17px, 2.5vw, 21px);
  line-height: 1.381;
  font-weight: 400;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  text-decoration: none;
  transform: scale(1.02);
}

/* Sections */
.content-section,
.game-section {
  padding: 64px 0;
}

.game-section {
  background: var(--color-bg-alt);
}

.content-section:nth-child(even) {
  background: var(--color-surface);
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 16px;
  text-align: center;
}

h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.019em;
  line-height: 1.21053;
  color: var(--color-text);
  margin-bottom: 8px;
}

.section-lead {
  font-size: 19px;
  line-height: 1.4211;
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 36px;
  letter-spacing: -0.01em;
}

.content-section p {
  font-size: 17px;
  line-height: 1.58824;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  letter-spacing: -0.022em;
}

.content-section p:last-child {
  margin-bottom: 0;
}

.content-section strong {
  color: var(--color-text);
  font-weight: 600;
}

/* Game iframe wrapper — 16:9 responsive */
.game-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow:
    0 4px 24px var(--color-shadow),
    0 1px 3px var(--color-shadow-lg);
  border: 1px solid var(--color-border);
}

.game-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Feature grid */
.feature-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.features-section .feature-card {
  background: var(--color-bg-alt);
}

.feature-card:hover {
  box-shadow: 0 8px 30px var(--color-shadow);
  transform: translateY(-2px);
}

.feature-card p {
  font-size: 15px;
  line-height: 1.46667;
  color: var(--color-text-tertiary);
  margin: 0;
}

/* Controls */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin-inline: auto;
}

.controls-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

.controls-card ul {
  list-style: none;
}

.controls-card li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}

.controls-card li:last-child {
  border-bottom: none;
}

kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  margin-right: 2px;
}

.controls-tip {
  text-align: center;
  font-size: 15px;
  color: var(--color-text-tertiary);
  margin-top: 28px;
  font-style: italic;
}

/* FAQ */
.faq-list {
  margin-top: 8px;
}

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  padding-top: 0;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-item dt {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.019em;
  color: var(--color-text);
  margin-bottom: 8px;
}

.faq-item dd {
  font-size: 17px;
  line-height: 1.58824;
  color: var(--color-text-secondary);
  margin: 0;
}

/* Footer */
.site-footer {
  padding: 40px 0 48px;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-brand a {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.footer-brand a:hover {
  color: var(--color-accent);
}

.footer-copy {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-tertiary);
  margin-top: 10px;
  max-width: 520px;
  margin-inline: auto;
}

/* =============================================
   Responsive — Tablet
   ============================================= */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================
   Responsive — Mobile
   ============================================= */
@media (max-width: 734px) {
  body {
    font-size: 16px;
  }

  .header-nav {
    gap: 16px;
  }

  .header-nav a {
    font-size: 13px;
  }

  .logo-text {
    display: none;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero-tagline {
    font-size: 17px;
  }

  .content-section,
  .game-section {
    padding: 48px 0;
  }

  .feature-grid,
  .controls-grid {
    grid-template-columns: 1fr;
  }

  .game-wrapper {
    border-radius: var(--radius-md);
    aspect-ratio: 4 / 3;
  }

  h2 {
    font-size: 28px;
  }

  .section-lead {
    font-size: 17px;
    margin-bottom: 28px;
  }

  .feature-card,
  .controls-card {
    padding: 22px 20px;
  }
}

@media (max-width: 390px) {
  .container {
    padding-inline: 16px;
  }

  .header-nav a:nth-child(n+3) {
    display: none;
  }
}
