/* ============================================================
   PlayPala — shared.css
   All pages link to this. Page-specific styles stay inline.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

/* ── Design tokens ── */
:root {
  --bg: #f5f7f2;
  --card: #ffffff;
  --card2: #f0f2ed;
  --border: #d8ddd0;
  --border2: #e4e8de;
  --text: #1a1f14;
  --muted: #6b7a60;
  --muted2: #9aaa8a;
  --green: #1a8c00;
  --green-dim: rgba(26,140,0,0.08);
  --green-border: rgba(26,140,0,0.2);
  --teal: #0066cc;
  --teal-dim: rgba(0,102,204,0.08);
  --red: #cc2200;
  --gold: #996600;
  --orange: #b36200;
}

/* ── Base ── */
html, body { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
}

/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(245,247,242,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 56px;
}
.nav-logo { font-size: 1rem; font-weight: 800; color: var(--green); text-decoration: none; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a {
  font-size: 0.8rem; font-weight: 500; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--green); font-weight: 700; }
.nav-cta { background: var(--green); color: #fff !important; padding: 6px 14px; border-radius: 6px; }
.nav-cta:hover { background: #146e00 !important; }
/* nav-back used on case-study page */
.nav-back { font-size: 0.82rem; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav-back:hover { color: var(--text); }

/* ── Layout ── */
.page { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ── Hero (plan pages) ── */
.hero {
  padding: 100px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green); background: var(--green-dim); border: 1px solid var(--green-border);
  padding: 4px 10px; border-radius: 20px; margin-bottom: 16px;
}
/* Used on case study and GTM */
.tag {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--green);
  background: var(--green-dim); border: 1px solid var(--green-border);
  border-radius: 20px; padding: 4px 12px; margin-bottom: 16px;
}
.hero-sub { font-size: 1rem; color: var(--muted); max-width: 600px; }
.breadcrumb { font-size: 0.75rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--teal); text-decoration: none; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--muted); text-decoration: none; margin-bottom: 20px;
}
.back-link:hover { color: var(--text); }

/* ── Sections ── */
.section { margin-bottom: 56px; }
/* Used on case study / GTM pages */
section { padding: 60px 0; border-bottom: 1px solid var(--border2); }
section:last-of-type { border-bottom: none; }

/* ── Section tags / labels ── */
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); background: var(--card2); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
}
.section-label {
  display: block; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--green); margin-bottom: 8px;
}

/* ── Headings ── */
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 12px; }
h1.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 12px; }
h2 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
h2.section-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.hero-sub, .sub { font-size: 0.9rem; color: var(--muted); max-width: 580px; line-height: 1.65; margin-bottom: 24px; }
.section-intro { font-size: 0.9rem; color: var(--muted); margin-bottom: 24px; }

/* ── Cards ── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px 24px; margin-bottom: 14px;
}
.card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.875rem; line-height: 1.6; }
.card.highlight { border-color: var(--green-border); background: var(--green-dim); }
.card.highlight h3 { color: var(--green); }
.card.green-glow { border-color: var(--green-border); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
thead tr { background: var(--card2); }
thead th {
  padding: 10px 14px; text-align: left;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border2); background: var(--card); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 10px 14px; vertical-align: top; }
tbody tr:hover td { background: rgba(26,140,0,0.03); }
tbody tr.subtotal td { background: var(--card2); font-weight: 600; }
tbody tr.total td { background: var(--green-dim); font-weight: 700; font-size: 0.9rem; }
.total-row td { font-weight: 700; border-top: 2px solid var(--border); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* ── Utility color classes ── */
.green { color: var(--green); }
.teal  { color: var(--teal); }
.gold  { color: var(--gold); }
.red   { color: var(--red); }

/* ── Callout blocks ── */
.insight {
  background: var(--green-dim); border: 1px solid var(--green-border);
  border-radius: 14px; padding: 18px 22px; margin: 20px 0;
}
.insight .il {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--green); margin-bottom: 8px;
}
.insight p { font-size: 0.875rem; color: var(--text); line-height: 1.65; }

/* ── Plan page nav footer ── */
.plan-nav {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border);
}
.plan-link {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; text-decoration: none; color: var(--text);
  font-size: 0.84rem; font-weight: 600; transition: border-color 0.2s;
  display: flex; align-items: center; gap: 8px;
}
.plan-link:hover { border-color: var(--green); }
.plan-link.active { border-color: var(--green); background: var(--green-dim); color: var(--green); }

/* ── Footer ── */
footer {
  padding: 40px 0; text-align: center;
  font-size: 0.78rem; color: var(--muted2);
  border-top: 1px solid var(--border); margin-top: 48px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  nav {
    padding: 0 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
  }
  nav::-webkit-scrollbar { display: none; }
  .nav-logo { flex-shrink: 0; }
  .nav-links {
    flex-shrink: 0;
    gap: 12px;
    overflow-x: auto;
  }
  .nav-links a { font-size: 0.75rem; white-space: nowrap; }
  .page { padding: 0 16px; }
}
