/* ============================================================
   Grow a Garden 2 Pets Generator — "Sunny Meadow" theme
   Display: Baloo 2 · Body: Nunito · bright, playful, toy-like
   (Deliberately different from the dark sister site.)
   ============================================================ */
:root {
  --grass: #4caf50;
  --grass-d: #2e7d32;
  --sky: #38bdf8;
  --sky-d: #0284c7;
  --sun: #ffd23f;
  --sun-d: #f59e0b;
  --berry: #ff5d8f;
  --plum: #8b5cf6;

  --ink: #20351f;
  --muted: #5d7259;
  --cream: #fffdf5;
  --paper: #ffffff;
  --line: #e4ecd8;

  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 10px 24px -10px rgba(46, 90, 30, 0.28), 0 2px 6px rgba(46, 90, 30, 0.08);
  --shadow-pop: 0 16px 34px -10px rgba(46, 90, 30, 0.35);
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --max: 1060px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  background:
    radial-gradient(60% 50% at 85% -5%, rgba(255, 210, 63, 0.35), transparent 60%),
    radial-gradient(50% 45% at 5% 5%, rgba(56, 189, 248, 0.28), transparent 60%),
    linear-gradient(180deg, #eaf7e6 0%, #fffdf5 30%);
  background-attachment: fixed;
  overflow-x: hidden;
}
/* rolling hills footer-ish band */
body::before {
  content: "";
  position: fixed; left: 0; right: 0; bottom: 0; height: 180px; z-index: -1;
  background:
    radial-gradient(120% 100% at 20% 100%, #a6e887 0 40%, transparent 41%),
    radial-gradient(120% 100% at 80% 100%, #8ed96f 0 38%, transparent 39%),
    linear-gradient(180deg, transparent, rgba(141, 217, 111, 0.25));
  opacity: 0.55;
}

h1, h2, h3, .brand, .gen-btn, .tier, .badge { font-family: "Baloo 2", sans-serif; }
h1, h2, h3 { line-height: 1.1; }
a { color: var(--grass-d); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: var(--grass-d); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.sr-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 245, 0.82); backdrop-filter: blur(12px); border-bottom: 2px solid var(--line); }
.nav { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.05rem; text-decoration: none; color: var(--grass-d); line-height: 1.05; }
.brand span { color: var(--sky-d); }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-weight: 800; font-size: 0.92rem; color: var(--muted); padding: 7px 13px; border-radius: 999px; transition: all 0.2s; }
.nav-links a:hover { color: #fff; background: var(--grass); }

main { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.block { padding: 44px 0; }
.block + .block { border-top: 2px dashed var(--line); }
.block h2 { font-size: clamp(1.5rem, 4.5vw, 2.2rem); margin: 0 0 8px; color: var(--grass-d); }
.block > p { max-width: 68ch; color: var(--muted); }

/* ---- hero ---- */
.hero { text-align: center; padding: 52px 0 8px; }
.hero h1 { font-size: clamp(2.2rem, 8vw, 4rem); margin: 16px auto 14px; max-width: 16ch; color: var(--grass-d); text-shadow: 0 3px 0 #fff, 0 6px 16px rgba(76, 175, 80, 0.25); }
.lede { font-size: clamp(1.05rem, 2.6vw, 1.28rem); color: var(--ink); max-width: 62ch; margin: 0 auto; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--sun-d); border: 2px solid var(--sun); font-weight: 700; padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow); }

/* ---- GENERATOR ---- */
.gen-block { text-align: center; }
.gen { max-width: 460px; margin: 0 auto; }
.gen-stage { perspective: 900px; margin-bottom: 22px; }
.gen-card {
  background: var(--paper); border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); padding: 22px; display: flex; flex-direction: column; align-items: center;
  min-height: 320px; justify-content: center; position: relative; overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.3s;
}
.gen-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 6px rgba(255,255,255,.6); pointer-events: none; }
.gen-card.pop { animation: pop 0.55s var(--ease); }
@keyframes pop { 0% { transform: scale(0.9) rotate(-2deg); opacity: 0.4; } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
.gen-card.rolling .gen-art img, .gen-card.rolling .gen-emoji { animation: shake 0.12s linear infinite; }
@keyframes shake { 0%,100%{transform:translateY(0) rotate(-3deg);} 50%{transform:translateY(-6px) rotate(3deg);} }
.gen-art { width: 160px; height: 160px; display: grid; place-items: center; margin-bottom: 14px; }
.gen-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0,0,0,.18)); }
.gen-emoji { font-size: 5rem; }
.gen-name { font-size: 1.7rem; margin: 6px 0; color: var(--ink); }
.gen-ability { color: var(--muted); margin: 0; font-size: 0.98rem; }
.placeholder .gen-name { color: var(--grass-d); }

.tier { display: inline-block; font-weight: 800; font-size: 0.8rem; padding: 4px 14px; border-radius: 999px; color: #fff; letter-spacing: .3px; }
.tier-s { background: linear-gradient(180deg, #ff8fb6, var(--berry)); }
.tier-a { background: linear-gradient(180deg, #b794ff, var(--plum)); }
.tier-b { background: linear-gradient(180deg, #7dd3fc, var(--sky-d)); }

.gen-btn {
  cursor: pointer; border: 0; color: #fff; font-weight: 800; font-size: 1.3rem;
  padding: 16px 40px; border-radius: 999px;
  background: linear-gradient(180deg, #6dd060, var(--grass-d));
  box-shadow: 0 10px 0 #1b5e20, 0 16px 26px -8px rgba(46,90,30,.6);
  transition: transform 0.12s, box-shadow 0.12s;
}
.gen-btn:hover { transform: translateY(-2px); }
.gen-btn:active { transform: translateY(6px); box-shadow: 0 4px 0 #1b5e20, 0 8px 14px -6px rgba(46,90,30,.6); }
.gen-btn:focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
.gen-btn[disabled] { filter: saturate(.6) brightness(.95); cursor: default; }
.gen-note { color: var(--muted); font-size: 0.85rem; margin-top: 14px; }

/* ---- odds table ---- */
.odds { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 18px; background: var(--paper); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.odds th, .odds td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.odds th { background: #f1f8ec; font-family: "Baloo 2"; color: var(--grass-d); }
.odds tr:last-child td { border-bottom: 0; }
.odds td:last-child, .odds th:last-child { text-align: right; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot-s { background: var(--berry); } .dot-a { background: var(--plum); } .dot-b { background: var(--sky-d); }

/* ---- pet grid ---- */
.pet-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pet-card { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s; }
.pet-card:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: var(--shadow-pop); border-color: var(--grass); }
.pet-art { background: linear-gradient(180deg, #f3faef, #e9f5e2); display: grid; place-items: center; padding: 18px; }
.pet-art img { width: 130px; height: 130px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.16)); }
.pet-body { padding: 16px 18px 18px; }
.pet-name { font-size: 1.3rem; margin: 8px 0 4px; }
.pet-ability { color: var(--muted); font-size: 0.92rem; margin: 0 0 10px; min-height: 2.4em; }
.pet-odds { font-size: 0.85rem; font-weight: 700; color: var(--grass-d); margin: 0; }
.pet-card .tier-s, .pet-card .tier-a, .pet-card .tier-b { color: #fff; }

/* ---- steps ---- */
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 12px; margin: 18px 0 0; }
.steps li { counter-increment: s; position: relative; padding: 15px 18px 15px 62px; background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-weight: 600; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: "Baloo 2"; font-weight: 800; color: #fff; background: linear-gradient(180deg, var(--sun), var(--sun-d)); box-shadow: 0 4px 10px -2px rgba(245,158,11,.6); }
.tip { margin-top: 16px; background: #fff7e0; border: 2px solid var(--sun); border-radius: var(--radius-sm); padding: 13px 18px; font-weight: 700; color: var(--sun-d); }

/* ---- FAQ ---- */
.faq { display: grid; gap: 12px; }
.faq-item { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.faq-q { margin: 0; font-size: 1.02rem; }
.faq-toggle { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit; font-family: "Baloo 2"; font-weight: 700; color: var(--ink); padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-toggle:hover { color: var(--grass-d); }
.faq-toggle:focus-visible { outline: 3px solid var(--sun); outline-offset: -3px; }
.chev { font-size: 1.5rem; color: var(--grass); transition: transform 0.25s; line-height: 1; }
.faq-toggle[aria-expanded="true"] .chev { transform: rotate(45deg); }
.faq-a { padding: 0 18px 16px; color: var(--muted); }
.faq-a p { margin: 0; }

/* ---- footer ---- */
.site-footer { max-width: var(--max); margin: 20px auto 0; padding: 30px 20px 70px; border-top: 2px dashed var(--line); color: var(--muted); }
.site-footer strong { color: var(--ink); }
.muted { color: var(--muted); } .small { font-size: 0.86rem; }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: var(--grass-d); color: #fff; padding: 12px 22px; border-radius: 999px; font-family: "Baloo 2"; font-weight: 700; opacity: 0; pointer-events: none; z-index: 80; box-shadow: var(--shadow-pop); transition: opacity 0.25s, transform 0.25s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* confetti */
.confetti { position: fixed; top: -12px; width: 10px; height: 14px; z-index: 90; pointer-events: none; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0.9; } }

.hero > * { animation: rise 0.6s var(--ease) both; }
.hero h1 { animation-delay: 0.08s; } .hero .lede { animation-delay: 0.18s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; } }

@media (max-width: 540px) { .nav-links a { padding: 6px 10px; font-size: 0.85rem; } .gen-btn { width: 100%; } }
