/* lagoslifehacks — Lagos Life fan guide
   Visual system matched to the official game (lagoslife.app):
   tokens extracted from the official stylesheet (Oct 2026).
   - Fonts: Fredoka (display) + Plus Jakarta Sans (body) — same as the game
   - Colors: ink #1d2433, leaf #22b573, lagoon #2f7de1, sunset #f59e42, coral #ef5a6f
   - Shapes: floating cream pill cards, radius 16-24px, soft wide shadows, emoji icons */

:root {
  /* official tokens */
  --ink: #1d2433;
  --ink-soft: #5b6478;
  --leaf: #22b573;
  --leaf-deep: #128a55;
  --leaf-ink: #0f7047;
  --lagoon-link: #1d5fc0;
  --leaf-soft: #e7f8ef;
  --lagoon: #2f7de1;
  --lagoon-soft: #e8f1fd;
  --sunset: #f59e42;
  --sunset-deep: #8f4e0b;
  --sunset-soft: #fef3e2;
  --coral: #ef5a6f;
  --coral-deep: #b32438;
  --coral-soft: #fdeef0;
  --cream: #fdfbf6;
  --bg: #eef2f7;
  --card: #ffffff;
  --border: rgba(29, 36, 51, 0.08);
  --border-strong: rgba(29, 36, 51, 0.14);
  --sky-hi: #8ecdf0;
  --sky-lo: #5fb4e8;

  /* derived */
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(29, 36, 51, 0.15);
  --shadow: 0 2px 4px rgba(29, 36, 51, 0.06), 0 12px 32px -8px rgba(29, 36, 51, 0.18);
  --shadow-lg: 0 4px 8px rgba(29, 36, 51, 0.05), 0 20px 48px -12px rgba(29, 36, 51, 0.22);
  --font-display: "Fredoka", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
}

::selection { background: var(--lagoon-soft); color: var(--ink); }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 18px; }

a { color: var(--lagoon-link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; font-weight: 600; }
a:hover { color: var(--leaf-deep); }

:focus-visible { outline: 3px solid rgba(47, 125, 225, 0.45); outline-offset: 2px; border-radius: 6px; }

/* ---------- header: floating cream pill island (like the game's UI) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 10px 0 0;
}
.site-header .bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 8px 16px;
  max-width: 880px; margin: 0 auto;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 17px;
  color: var(--ink); text-decoration: none;
  white-space: nowrap; letter-spacing: 0.005em;
}
.logo .chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--leaf-ink); color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}
.logo small { font-weight: 600; color: var(--ink-soft); font-size: 10.5px; display: block; line-height: 1; letter-spacing: 0.01em; }
.site-nav {
  display: flex; gap: 2px; margin-left: auto;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  max-width: 100%;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  font-family: var(--font-display);
  text-decoration: none; color: var(--ink-soft); font-size: 14px; font-weight: 500;
  padding: 10px 13px; border-radius: 999px; white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { background: var(--lagoon-soft); color: var(--lagoon); }
.site-nav a[aria-current="page"] { background: var(--leaf-ink); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.14); }

/* ---------- hero: sky panel (the game's canvas) ---------- */
main.wrap { padding-top: 18px; }

.hero {
  background: linear-gradient(180deg, var(--sky-hi) 0%, var(--sky-lo) 100%);
  border-radius: var(--radius-xl);
  padding: 30px 24px 26px;
  margin: 14px 0 8px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cream); color: var(--ink);
  border-radius: 999px; border: none;
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 500; padding: 5px 14px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18; letter-spacing: 0;
  color: var(--ink);
}
h1 { font-size: clamp(1.5rem, 4.9vw, 2.35rem); line-height: 1.14; margin: 0 0 12px; text-wrap: balance; }
h2 { font-size: clamp(1.28rem, 3.4vw, 1.55rem); margin: 44px 0 12px; text-wrap: balance; }
h3 { font-size: 1.06rem; margin: 26px 0 8px; }
h2 + p, h3 + p { margin-top: 0; }
p { margin: 0 0 14px; }
.lede { font-size: 1.07rem; color: var(--ink); }
.lede strong, .hero strong { color: var(--ink); }

.meta-line {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  margin: 10px 0 6px;
}
.meta-line span { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- cards & grids: cream floating cards ---------- */
.grid { display: grid; gap: 14px; margin: 18px 0; }
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .arrow-link { font-family: var(--font-display); font-weight: 500; font-size: 14.5px; text-decoration: none; color: var(--leaf-deep); }
.card .arrow-link::after { content: " →"; }
.card-wide { grid-column: 1 / -1; }

a.card-link { text-decoration: none; color: inherit; display: block; transition: transform 0.15s ease, box-shadow 0.15s ease; }
a.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
a.card-link .arrow-link { color: var(--leaf-deep); }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 20px 0; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--leaf-ink); }
.stat span { font-size: 12px; color: var(--ink-soft); font-weight: 600; }

/* ---------- steps: leaf-green numbered coins ---------- */
.steps { list-style: none; margin: 18px 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 54px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--leaf-ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16), var(--shadow-sm);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 42px; bottom: 6px;
  width: 2px; border-radius: 2px; background: var(--border-strong);
}
.steps h3 { margin: 3px 0 6px; }
.steps p:last-child { margin-bottom: 0; }

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card); box-shadow: var(--shadow); margin: 16px 0;
}
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th {
  background: var(--lagoon-soft); color: var(--ink);
  font-family: var(--font-display); font-weight: 500;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #f8fafc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

/* ---------- callouts: soft tinted, borderless feel ---------- */
.callout {
  border-radius: var(--radius-lg); padding: 16px 18px; margin: 18px 0;
  border: 1px solid; font-size: 15px; box-shadow: var(--shadow-sm);
}
.callout b { display: block; margin-bottom: 4px; font-family: var(--font-display); font-weight: 600; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout a { font-weight: 700; }
.callout-warn { background: var(--coral-soft); border-color: rgba(239, 90, 111, 0.25); color: #64262e; }
.callout-warn b { color: var(--coral-deep); }
.callout-gold { background: var(--sunset-soft); border-color: rgba(245, 158, 66, 0.3); color: #6b4413; }
.callout-gold b { color: var(--sunset-deep); }
.callout-green { background: var(--leaf-soft); border-color: rgba(34, 181, 115, 0.28); color: #14503a; }
.callout-green b { color: var(--leaf-deep); }

/* ---------- FAQ ---------- */
.faq { margin: 14px 0; }
.faq details {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0; margin-bottom: 10px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 14px 16px;
  font-family: var(--font-display); font-weight: 500; font-size: 15.5px; color: var(--ink);
  display: flex; align-items: baseline; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+"; color: var(--leaf-deep); font-weight: 600; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--leaf-soft); font-size: 15px; line-height: 1;
  transform: translateY(3px);
}
.faq details[open] summary::before { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .a { padding: 12px 16px 14px 48px; font-size: 15px; color: var(--ink-soft); }
.faq .a p:last-child { margin-bottom: 0; }

/* ---------- misc ---------- */
ul.compact li, ol.compact li { margin-bottom: 6px; }
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  background: var(--lagoon-soft); color: var(--lagoon);
  border-radius: 999px; padding: 2px 10px; margin-right: 6px;
}
.tag.gold { background: var(--sunset-soft); color: var(--sunset-deep); }
.tag.red { background: var(--coral-soft); color: var(--coral-deep); }

.vs-grid { display: grid; gap: 12px; margin: 16px 0; }
@media (min-width: 640px) { .vs-grid { grid-template-columns: 1fr 1fr; } }
.vs-card { border-radius: var(--radius-lg); padding: 18px; border: 1px solid; box-shadow: var(--shadow-sm); }
.vs-card h3 { margin-top: 0; font-size: 1.1rem; }
.vs-card ul { margin-bottom: 0; }
.vs-nepo { background: var(--sunset-soft); border-color: rgba(245, 158, 66, 0.32); }
.vs-nepo h3 { color: var(--sunset-deep); }
.vs-lapo { background: var(--leaf-soft); border-color: rgba(34, 181, 115, 0.3); }
.vs-lapo h3 { color: var(--leaf-deep); }

.divider { border: none; border-top: 1px solid var(--border-strong); margin: 36px 0; }

.toc {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 18px; margin: 20px 0;
  box-shadow: var(--shadow-sm);
}
.toc b { display: block; font-family: var(--font-display); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 6px; font-weight: 500; }
.toc ol { margin: 0; padding-left: 20px; font-size: 14.5px; }
.toc li { margin-bottom: 3px; }

/* ---------- footer: ink ground with cream text ---------- */
.site-footer {
  margin-top: 56px; padding: 30px 0 44px;
  background: var(--ink); color: #cdd5e1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  font-size: 13.5px;
}
.site-footer a { color: #9cc3f3; }
.site-footer strong { color: #fff; font-family: var(--font-display); font-weight: 500; }
.site-footer .fine { font-size: 12.5px; line-height: 1.6; color: #97a1b3; }

/* ---------- CTA band: the game's green banner ---------- */
.play-cta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: var(--leaf-ink); color: #fff;
  border-radius: var(--radius-lg); padding: 18px 20px; margin: 22px 0;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14), var(--shadow);
}
.play-cta b { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; }
.play-cta span { font-size: 14px; }
.play-cta a {
  color: var(--leaf-deep); background: #fff;
  padding: 12px 20px; border-radius: 999px; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 14.5px;
  box-shadow: var(--shadow-sm);
}
.play-cta a:hover { background: var(--cream); color: var(--leaf-deep); }

.updated-pill {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  color: var(--ink-soft); border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 2px 10px; margin-left: 8px; vertical-align: middle; background: var(--cream);
}


/* ---------- motion (transform/opacity only, honors reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero .kicker { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero h1 { animation: rise 0.55s 0.06s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .lede { animation: rise 0.55s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .meta-line { animation: rise 0.55s 0.18s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .faq details[open] .a { animation: fade 0.25s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
.faq summary { transition: color 0.15s ease; }
.faq summary:hover { color: var(--lagoon-link); }
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: var(--lagoon-soft); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- content screenshots ---------- */
.shot { margin: 22px 0; }
.shot img { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.shot figcaption { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; text-align: center; }
