/* Zengram standalone landing (zengram.zenku.life).
 * House style: Zenku-ish header + serif display headings, sage hero, the game
 * embedded as the centrepiece, terracotta (#C78440) accent. Namespaced `zl-`
 * so it never collides with the game's `zg-` classes. Loaded AFTER zengram.css
 * so the page-level overrides win. */

:root {
  --zl-sage: #CEDBCB;
  --zl-ink: #1A1C1E;
  --zl-terracotta: #C78440;
  --zl-terracotta-dark: #a96a2c;
  --zl-muted: #5b6b58;
  --zl-paper: #ffffff;
}

/* Page-level overrides of zengram.css's global html/body sage fill. */
body {
  background: var(--zl-paper);
  margin: 0;
}
.zl-serif {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---- header ------------------------------------------------------------- */
.zl-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--zl-paper);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.zl-brand { display: flex; align-items: center; gap: 14px; }
.zl-wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--zl-ink);
  text-decoration: none;
}
.zl-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.zl-hamburger span { width: 22px; height: 2px; background: var(--zl-ink); border-radius: 2px; }

.zl-nav { display: flex; align-items: center; gap: 20px; }
.zl-nav a, .zl-nav button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--zl-ink);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}
.zl-nav a:hover { color: var(--zl-terracotta-dark); }
.zl-login-btn {
  border: 1.5px solid var(--zl-ink) !important;
  border-radius: 999px;
  padding: 8px 20px;
}
.zl-login-btn:hover { background: var(--zl-ink); color: #fff !important; }
.zl-userchip {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.zl-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--zl-terracotta);
  color: #fff;
  display: grid; place-items: center;
  font-size: 0.8rem; font-weight: 700;
  overflow: hidden;
}
.zl-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---- hero --------------------------------------------------------------- */
.zl-hero {
  background: var(--zl-sage);
  color: var(--zl-ink);
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 60px;
}
.zl-hero-copy { flex: 1 1 320px; max-width: 460px; }
.zl-eyebrow {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--zl-terracotta-dark);
  background: rgba(199, 132, 64, 0.16);
  padding: 5px 13px; border-radius: 999px;
  margin-bottom: 18px;
}
.zl-hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  line-height: 1.05; font-weight: 700;
  margin: 0 0 16px;
}
.zl-hero-tagline {
  font-size: 1.1rem; line-height: 1.55;
  color: #3c4a39; margin: 0 0 26px;
}
.zl-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.zl-btn {
  font: inherit; font-size: 0.98rem; font-weight: 700;
  padding: 13px 28px; border-radius: 999px;
  cursor: pointer; text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.08s ease, background 0.15s ease;
}
.zl-btn:active { transform: scale(0.98); }
.zl-btn-primary { background: var(--zl-terracotta); color: #fff; }
.zl-btn-primary:hover { background: var(--zl-terracotta-dark); }
.zl-btn-ghost { background: transparent; color: var(--zl-ink); border-color: var(--zl-ink); }
.zl-btn-ghost:hover { background: var(--zl-ink); color: #fff; }
.zl-hero-meta { font-size: 0.82rem; color: var(--zl-muted); margin: 20px 0 0; }
.zl-hero-meta .zl-streak-hint { color: var(--zl-terracotta-dark); cursor: pointer; }

/* The embedded game card sits to the right on desktop, below on mobile. */
.zl-hero-game { flex: 0 1 360px; display: flex; justify-content: center; }

/* ---- embedded game ------------------------------------------------------ */
#zl-play { background: var(--zl-sage); padding: 0 0 40px; scroll-margin-top: 64px; }
#zl-play .zg-app {
  background: transparent;
  height: auto;
  min-height: 70vh;
}
/* The site header replaces the game's own ‹ zengram ⟳ bar. */
#zl-play .zg-header { display: none; }

/* ---- how to play -------------------------------------------------------- */
.zl-how {
  background: var(--zl-paper);
  padding: 54px 24px;
  scroll-margin-top: 64px;
}
.zl-how h2 {
  font-family: "Fraunces", Georgia, serif;
  text-align: center; font-size: 1.9rem; font-weight: 700;
  margin: 0 0 36px; color: var(--zl-ink);
}
.zl-steps {
  display: flex; flex-wrap: wrap; gap: 22px;
  max-width: 880px; margin: 0 auto; justify-content: center;
}
.zl-step { flex: 1 1 200px; min-width: 180px; max-width: 260px; text-align: center; }
.zl-step-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(199, 132, 64, 0.14);
  color: var(--zl-terracotta-dark);
  display: grid; place-items: center; margin: 0 auto 14px;
  font-size: 24px;
}
.zl-step h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; color: var(--zl-ink); }
.zl-step p { font-size: 0.9rem; line-height: 1.5; color: var(--zl-muted); margin: 0; }

/* ---- footer ------------------------------------------------------------- */
.zl-footer {
  background: var(--zl-ink);
  color: #cdd4ca;
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  padding: 22px 24px;
  font-size: 0.82rem;
}
.zl-footer a { color: #cdd4ca; text-decoration: none; margin: 0 10px; }
.zl-footer a:hover { color: #fff; }
.zl-footer .zl-foot-brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700; letter-spacing: 0.05em; color: #fff;
}

/* ---- login modal -------------------------------------------------------- */
.zl-modal {
  position: fixed; inset: 0;
  background: rgba(26, 28, 30, 0.55);
  display: grid; place-items: center;
  padding: 24px; z-index: 50;
}
.zl-modal.zl-hidden { display: none; }
.zl-modal-card {
  position: relative;
  background: var(--zl-paper);
  border-radius: 18px;
  padding: 30px 26px;
  width: 100%; max-width: 380px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}
.zl-modal-card h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; color: var(--zl-ink);
}
.zl-modal-card p.zl-sub { font-size: 0.88rem; color: var(--zl-muted); margin: 0 0 22px; }
.zl-modal-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: var(--zl-muted);
}
.zl-auth-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; margin: 8px 0;
  border-radius: 12px; border: 1.5px solid rgba(0,0,0,0.14);
  background: #fff; color: #3c4c61;
  font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.zl-auth-btn:hover { background: #f6f6f3; }
.zl-auth-btn img { width: 18px; height: 18px; }
.zl-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--zl-muted); font-size: 0.78rem; margin: 16px 0;
}
.zl-divider::before, .zl-divider::after {
  content: ""; flex: 1; height: 1px; background: rgba(0,0,0,0.12);
}
.zl-email-form { display: flex; flex-direction: column; gap: 10px; }
.zl-email-form input {
  font: inherit; font-size: 0.95rem;
  padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid rgba(0,0,0,0.14); background: #fff; color: var(--zl-ink);
}
.zl-email-form input:focus { outline: none; border-color: var(--zl-terracotta); }
.zl-email-submit {
  background: var(--zl-terracotta); color: #fff; border: none;
  border-radius: 12px; padding: 12px; font: inherit; font-weight: 700;
  font-size: 0.95rem; cursor: pointer;
}
.zl-email-submit:hover { background: var(--zl-terracotta-dark); }
.zl-auth-msg { font-size: 0.85rem; margin: 12px 0 0; min-height: 1.2em; }
.zl-auth-msg.zl-ok { color: #2e7d32; }
.zl-auth-msg.zl-err { color: #b00020; }

/* ---- mobile drawer ------------------------------------------------------ */
@media (max-width: 720px) {
  .zl-hamburger { display: flex; }
  .zl-nav {
    position: absolute; top: 100%; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--zl-paper);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding: 8px 0;
    box-shadow: 0 16px 30px rgba(0,0,0,0.12);
  }
  .zl-nav.zl-closed { display: none; }
  .zl-nav a, .zl-nav button { padding: 14px 22px; text-align: left; width: 100%; }
  .zl-login-btn { border: none !important; border-radius: 0; }
  .zl-login-btn:hover { background: rgba(0,0,0,0.05); color: var(--zl-ink) !important; }
  .zl-hero { padding: 40px 22px 46px; }
}
