/* =========================================================
   Pictionary Word List Generator — global stylesheet
   Aesthetic: playful editorial / tactile party poster
   ========================================================= */

:root {
  --bg: #f7f1e6;
  --bg-card: #fffaf2;
  --ink: #1a1b2e;
  --ink-soft: #4a4b63;
  --muted: #8a8a9a;
  --line: #1a1b2e;

  --coral: #ff5d3a;
  --coral-deep: #d64325;
  --mint: #6dd3a8;
  --sun: #f7c244;
  --rose: #ec6a9f;
  --navy: #1a1b2e;
  --paper: #fffaf2;

  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-soft: 0 8px 24px rgba(26, 27, 46, 0.08);

  --radius: 14px;
  --radius-lg: 24px;

  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 8%, rgba(255, 93, 58, 0.06) 0, transparent 35%),
    radial-gradient(circle at 85% 60%, rgba(109, 211, 168, 0.07) 0, transparent 40%),
    radial-gradient(circle at 50% 95%, rgba(247, 194, 68, 0.06) 0, transparent 35%);
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Header & nav ---------- */
.site-header {
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand-mark {
  width: 34px; height: 34px;
  background: var(--coral);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  color: var(--paper);
  font-size: 18px;
  transform: rotate(-4deg);
}
.brand-mark::after { content: "P"; }

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  list-style: none;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--ink); color: var(--paper); }
.nav-links a.active { background: var(--coral); color: var(--paper); }

.lang-switch {
  position: relative;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.lang-btn:hover { background: var(--sun); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  list-style: none;
  padding: 6px;
  min-width: 180px;
  box-shadow: var(--shadow-hard);
  display: none;
  z-index: 60;
}
.lang-switch.open .lang-menu { display: block; }
.lang-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.lang-menu li a:hover { background: var(--bg); }
.lang-menu li a.active { background: var(--coral); color: var(--paper); }
.flag {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid var(--ink);
  display: inline-block;
  flex-shrink: 0;
  overflow: hidden;
}

/* mobile nav */
.menu-toggle {
  display: none;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 28px 30px;
  position: relative;
}
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--coral-deep);
  font-weight: 600;
  margin-bottom: 18px;
}
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 6.4vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  max-width: 18ch;
}
h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--coral);
}
.lede {
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 28px;
}

/* ---------- Generator tool ---------- */
.tool-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px 60px;
}
.tool {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  padding: 36px;
  position: relative;
}
.tool-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-end;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1.5px dashed rgba(26,27,46,0.2);
}
.control-group { flex: 1; min-width: 200px; }
.control-group label {
  display: block;
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--coral);
  font-weight: 700;
}
select {
  width: 100%;
  padding: 12px 38px 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-weight: 500;
}
select:focus { outline: 2px solid var(--coral); outline-offset: 2px; }

.word-display {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-deep) 100%);
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  padding: 56px 32px;
  text-align: center;
  position: relative;
  margin-bottom: 24px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.word-display::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,0.16) 0, transparent 25%),
    radial-gradient(circle at 80% 78%, rgba(0,0,0,0.10) 0, transparent 30%);
  pointer-events: none;
}
.word-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255,250,242,0.85);
  margin-bottom: 14px;
  position: relative;
}
.word-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(36px, 5.5vw, 62px);
  line-height: 1.05;
  color: var(--paper);
  position: relative;
  letter-spacing: -0.02em;
}
.word-difficulty {
  display: inline-block;
  margin-top: 18px;
  padding: 5px 14px;
  background: var(--paper);
  color: var(--coral-deep);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  position: relative;
  border: 1.5px solid var(--ink);
}

.tool-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  transition: transform 0.1s, background 0.15s, box-shadow 0.1s;
  box-shadow: 3px 3px 0 var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--mint); }
.btn-primary:hover { background: #56c595; }
.btn-secondary { background: var(--sun); }

.timer-display {
  text-align: center;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1.5px dashed rgba(26,27,46,0.2);
}
.timer-time {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.timer-time.running { color: var(--coral); }
.timer-time.warning { color: var(--coral-deep); animation: pulse 0.6s infinite alternate; }
@keyframes pulse { to { transform: scale(1.05); } }
.timer-actions { display: inline-flex; gap: 10px; margin-top: 10px; }
.timer-btn {
  padding: 8px 18px;
  font-size: 14px;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  font-weight: 600;
}
.timer-btn:hover { background: var(--sun); }

/* ---------- Generic sections ---------- */
section.content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 70px 28px;
}
section.content + section.content { padding-top: 0; }

h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  max-width: 22ch;
}
h2 em { font-style: italic; color: var(--coral); font-weight: 400; }

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-top: 32px;
  margin-bottom: 12px;
}
h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  margin-top: 22px;
  margin-bottom: 8px;
}
p { margin-bottom: 16px; color: var(--ink-soft); max-width: 70ch; }
p strong { color: var(--ink); }

ul, ol { padding-left: 22px; margin-bottom: 18px; color: var(--ink-soft); }
li { margin-bottom: 6px; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--coral-deep);
  margin-bottom: 14px;
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 93, 58, 0.12);
  border-radius: 999px;
}

/* Word card grid */
.word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 28px 0;
}
.word-card {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  padding: 18px 16px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  text-align: center;
  transition: transform 0.15s, background 0.15s;
}
.word-card:nth-child(4n+1) { background: var(--paper); }
.word-card:nth-child(4n+2) { background: #fef3df; }
.word-card:nth-child(4n+3) { background: #ecf8f1; }
.word-card:nth-child(4n+4) { background: #fde6ee; }
.word-card:hover { transform: rotate(-2deg) scale(1.04); }

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 36px;
}
.feature {
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s;
}
.feature:hover { transform: translateY(-3px); }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--sun);
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.feature:nth-child(2) .feature-icon { background: var(--mint); }
.feature:nth-child(3) .feature-icon { background: var(--rose); color: var(--paper); }
.feature:nth-child(4) .feature-icon { background: var(--coral); color: var(--paper); }

/* Difficulty pill */
.diff-pills { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.diff-pill {
  padding: 6px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--paper);
}
.diff-pill.easy { background: var(--mint); }
.diff-pill.medium { background: var(--sun); }
.diff-pill.hard { background: var(--coral); color: var(--paper); }

/* FAQ */
.faq-item {
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  padding: 18px 22px;
  font-weight: 600;
  font-size: 17px;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q::after {
  content: "+";
  font-size: 28px;
  color: var(--coral);
  font-weight: 300;
  transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  padding: 0 22px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
  color: var(--ink-soft);
}
.faq-item.open .faq-a {
  padding: 0 22px 18px;
  max-height: 500px;
}

/* CTA strip */
.cta-strip {
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  margin: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  background: var(--coral);
  border-radius: 50%;
  top: -110px; right: -80px;
  opacity: 0.55;
}
.cta-strip::after {
  content: "";
  position: absolute;
  width: 160px; height: 160px;
  background: var(--mint);
  border-radius: 50%;
  bottom: -80px; left: -60px;
  opacity: 0.5;
}
.cta-strip h2 { color: var(--paper); margin-bottom: 14px; max-width: 100%; position: relative; }
.cta-strip p { color: rgba(255,250,242,0.85); max-width: 60ch; margin: 0 auto 22px; position: relative; }
.cta-strip .btn { position: relative; }

/* Footer */
footer {
  border-top: 1.5px solid var(--ink);
  background: var(--paper);
  padding: 50px 28px 24px;
  margin-top: 60px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-col h5 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--ink);
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; font-size: 14px; }
.footer-col a { color: var(--ink-soft); }
.footer-col a:hover { color: var(--coral); }
.footer-brand p { font-size: 14px; max-width: 36ch; }
.footer-bottom {
  max-width: var(--maxw);
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(26,27,46,0.12);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Page hero (non-home) */
.page-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px 28px 30px;
}
.page-hero h1 { font-size: clamp(34px, 5vw, 60px); max-width: 26ch; }
.page-hero .lede { max-width: 65ch; }

.prose { max-width: 72ch; }
.prose p, .prose ul, .prose ol { font-size: 17px; }

/* Form */
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink);
}
.form-row textarea { min-height: 130px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--coral); outline-offset: 2px; }

/* 404 */
.error-page {
  text-align: center;
  padding: 100px 28px;
  max-width: 700px;
  margin: 0 auto;
}
.error-page .big-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(120px, 22vw, 240px);
  line-height: 0.9;
  color: var(--coral);
  font-weight: 600;
  letter-spacing: -0.05em;
}

/* Sitemap */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.sitemap-col h3 { margin-top: 0; }
.sitemap-col ul { list-style: none; padding: 0; }
.sitemap-col li { margin-bottom: 8px; }
.sitemap-col a {
  color: var(--ink);
  border-bottom: 1px dotted var(--coral);
  padding-bottom: 1px;
}
.sitemap-col a:hover { color: var(--coral); }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 15px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(26,27,46,0.12); }
th { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); }

/* Mobile */
@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    display: none;
    padding-top: 8px;
    border-top: 1px solid rgba(26,27,46,0.12);
    margin-top: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .tool { padding: 24px; }
  .word-display { padding: 40px 18px; min-height: 180px; }
  .hero { padding-top: 44px; }
  section.content { padding: 50px 22px; }
  .cta-strip { padding: 36px 24px; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .tool-controls { gap: 14px; }
  .control-group { min-width: 100%; }
  .nav { padding: 12px 18px; }
  .brand { font-size: 19px; }
  body { font-size: 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
