/* ==========================================================================
   P77 Games Landing Page — Styles
   Palette: clean white base, dark maroon accents
   ========================================================================== */

:root {
  --maroon-900: #4a0a15;
  --maroon-800: #5e0f1c;
  --maroon-700: #7a1523;
  --maroon-600: #8f1c2b;
  --maroon-50:  #fbf0f1;

  --ink-900: #1c1414;
  --ink-700: #4a3f3f;
  --ink-500: #7a6f6f;

  --white: #ffffff;
  --off-white: #faf7f6;
  --border: #ece2e2;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 8px rgba(74, 10, 21, 0.06);
  --shadow-md: 0 12px 32px rgba(74, 10, 21, 0.10);

  --container-w: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--ink-900);
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; margin-bottom: 8px; }

p { margin: 0 0 16px; color: var(--ink-700); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon-700);
  margin-bottom: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--maroon-800);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--maroon-900);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--maroon-800);
  border-color: var(--maroon-800);
}
.btn-outline:hover {
  background: var(--maroon-50);
  transform: translateY(-1px);
}

.btn-light {
  background: var(--white);
  color: var(--maroon-800);
  box-shadow: var(--shadow-sm);
}
.btn-light:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--maroon-800);
  letter-spacing: -0.02em;
}
.logo span { color: var(--ink-900); font-weight: 600; }

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.main-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-700);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--maroon-800); }

.header-cta { padding: 10px 20px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink-900);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 88px;
  background: linear-gradient(180deg, var(--maroon-50) 0%, var(--white) 65%);
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--ink-900);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

/* ---------- Placeholders ---------- */
.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--off-white);
  border: 2px dashed var(--maroon-600);
  border-radius: var(--radius-md);
  color: var(--maroon-700);
  font-weight: 600;
  gap: 6px;
  padding: 24px;
}
.placeholder small {
  font-weight: 400;
  color: var(--ink-500);
  font-size: 0.8rem;
}

.phone-placeholder {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 18;
  border-radius: 32px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}
.phone-placeholder.small {
  max-width: 280px;
  aspect-ratio: 9 / 17;
}

.icon-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  padding: 8px;
  margin-bottom: 14px;
}
.icon-placeholder.large {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  margin: 0 auto;
}

.category-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  object-fit: cover;
}

.app-icon-image {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-lg);
  margin: 0 auto;
  display: block;
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

/* ---------- Screenshot gallery ---------- */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.screenshot-grid .phone-placeholder {
  max-width: none;
}

.screenshot-image {
  width: 100%;
  aspect-ratio: 9 / 20;
  border-radius: 32px;
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--off-white); }

.section-head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 { margin-bottom: 14px; }
.section-sub { color: var(--ink-700); }

/* ---------- Category / Feature Grids ---------- */
.category-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.category-card,
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.category-card:hover,
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--maroon-600);
}

.category-card p,
.feature-card p { margin-bottom: 0; font-size: 0.95rem; }

.section-alt .category-card,
.section-alt .feature-card { background: var(--white); }

/* ---------- Split sections ---------- */
.split-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-section.reverse .split-inner {
  grid-template-columns: 0.9fr 1.1fr;
}
.split-section.reverse .split-media { order: -1; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--maroon-800);
  color: var(--white);
  padding: 64px 0;
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, 0.85); }

/* ---------- Steps ---------- */
.steps-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.steps-list li {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}
.steps-list h3 { margin: 0; }
.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--maroon-800);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.note {
  max-width: 720px;
  margin: 32px auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-500);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-900);
  padding: 20px 24px;
  cursor: pointer;
}
.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--maroon-50);
  color: var(--maroon-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.2s ease, background 0.2s ease;
}
.faq-item.active .faq-icon {
  background: var(--maroon-800);
  color: var(--white);
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 24px;
}
.faq-answer p { padding-bottom: 20px; margin: 0; }
.faq-item.active .faq-answer { max-height: 240px; }

/* ---------- Final CTA ---------- */
.final-cta {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}
.final-cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--off-white);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { font-size: 0.9rem; color: var(--ink-700); }
.footer-nav a:hover { color: var(--maroon-800); }
.footer-copy { font-size: 0.85rem; color: var(--ink-500); margin: 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .category-grid,
  .feature-grid { grid-template-columns: repeat(2, 1fr); }

  .screenshot-grid { grid-template-columns: repeat(3, 1fr); }

  .split-inner,
  .split-section.reverse .split-inner {
    grid-template-columns: 1fr;
  }
  .split-section.reverse .split-media { order: 0; }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .header-cta { display: none; }

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

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

  .cta-band-inner { flex-direction: column; text-align: center; }

  .steps-list li { flex-direction: column; text-align: center; }

  .footer-inner { flex-direction: column; text-align: center; }
}

/* Mobile nav open state */
.main-nav.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
