/* Merge Battles website. Same palette and type as the game. */
:root {
  --bg: #fbf7ee;
  --card: #ffffff;
  --sand: #f3ece0;
  --line: #e2d8c4;
  --ink: #3f342b;
  --muted: #8a7560;
  --pink: #ff4d82;
  --pink-dark: #b3255a;
  --blue: #2e86ff;
  --gold: #ffa800;
  --teal: #14b8a6;
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand, .btn {
  font-family: "Baloo 2", "Manrope", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.005em;
}

a { color: var(--pink-dark); text-underline-offset: 3px; }
a:hover { color: var(--pink); }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

/* ------------------------------------------------------------ header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 24px; color: var(--ink); text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 11px; }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 16px; }
.site-header nav a:hover { color: var(--ink); }

/* -------------------------------------------------------------- hero */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(42px, 6vw, 68px); margin: 0 0 18px; }
.hero h1 span { color: var(--pink); }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 0 30px; max-width: 30em; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 28px; border-radius: 999px;
  font-size: 19px; text-decoration: none; color: #fff;
  background: var(--pink); border-top: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 5px 0 var(--pink-dark);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { color: #fff; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--pink-dark); }
.btn.secondary { background: var(--card); color: var(--ink); border-top-color: transparent; border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); }
.btn.secondary:hover { color: var(--ink); }
.btn.disabled { background: var(--sand); color: var(--muted); border: 2px solid var(--line); box-shadow: none; cursor: default; }

.hero-art { position: relative; display: flex; justify-content: center; }
.phone {
  width: min(300px, 62%); border-radius: 34px; overflow: hidden;
  border: 8px solid var(--ink); background: var(--ink);
  box-shadow: 0 24px 40px -18px rgba(63, 52, 43, 0.45);
}
.phone img { display: block; width: 100%; height: auto; }
.hero-art .phone.back { position: absolute; left: 2%; top: 40px; transform: rotate(-7deg); opacity: 0.95; width: min(240px, 50%); }
.hero-art .phone.front { position: relative; margin-left: 26%; transform: rotate(3deg); }

/* ----------------------------------------------------------- sections */
section { padding: 64px 0; }
section h2 { font-size: clamp(32px, 4vw, 44px); margin: 0 0 12px; }
section .sub { color: var(--muted); margin: 0 0 36px; max-width: 34em; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  position: relative;
}
.step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: 14px;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 22px; color: #fff;
  background: var(--pink); border-top: 3px solid rgba(255, 255, 255, 0.5); box-shadow: 0 4px 0 var(--pink-dark);
}
.step:nth-child(2)::before { background: var(--gold); box-shadow: 0 4px 0 #b37600; color: #3d2a00; }
.step:nth-child(3)::before { background: var(--blue); box-shadow: 0 4px 0 #1451a8; }
.step h3 { margin: 0 0 6px; font-size: 24px; }
.step p { margin: 0; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .dot { width: 14px; height: 14px; border-radius: 50%; margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; font-size: 22px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.shots { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.shots .phone { width: 240px; transform: none; }

.cta { text-align: center; background: var(--sand); border-radius: 32px; padding: 56px 24px; }
.cta p { color: var(--muted); max-width: 32em; margin: 0 auto 26px; }
.cta .actions { justify-content: center; }

/* ------------------------------------------------------- text pages */
.page { padding: 24px 0 72px; }
.page h1 { font-size: clamp(36px, 5vw, 52px); margin: 0 0 6px; }
.page .updated { color: var(--muted); margin: 0 0 32px; font-size: 15px; }
.page h2 { font-size: 27px; margin: 40px 0 8px; }
.page h3 { font-size: 20px; margin: 22px 0 4px; }
.page p, .page li { color: #54473c; }
.page ul { padding-left: 22px; }
.page li { margin: 6px 0; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin: 18px 0;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.callout { background: #fff3f7; border: 1px solid #ffd0df; border-radius: var(--radius); padding: 18px 22px; margin: 22px 0; }

table.data { width: 100%; border-collapse: collapse; margin: 14px 0 6px; font-size: 16px; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; margin: 10px 0; }
summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
details p { margin: 10px 0 14px; }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0 46px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .actions { justify-content: center; }
  .steps { grid-template-columns: 1fr; }
  .hero-art { margin-top: 20px; }
  .hero-art .phone.front { margin-left: 22%; }
  .site-header .wrap { justify-content: center; }
}

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