/* Shared stylesheet for every page of myggv.com. */

:root {
  --green: #5bc46d;
  --green-dark: #4aa85c;
  --green-deep: #2e7d3f;
  --yellow: #ffd666;
  --ink: #1a1a2e;
  --text: #333;
  --muted: #555;
  --glass: rgba(255, 255, 255, 0.65);
  --glass-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

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

body {
  font-family: "Madimi One", sans-serif;
  color: var(--text);
  line-height: 1.7;
  min-height: 100svh;
  min-height: 100dvh;
}

/* Responsive village background, fixed behind the scrolling content. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2; /* below the .leaves canvas */
  background: url("images/background-mobile-sm.webp") center / cover no-repeat;
}
@media (min-width: 481px) {
  body::before {
    background-image: url("images/background-mobile-lg.webp");
  }
}
@media (min-width: 768px) {
  body::before {
    background-image: url("images/background-tablet.webp");
  }
}
@media (min-width: 1024px) {
  body::before {
    background-image: url("images/background-tablet-landscape.webp");
  }
}
@media (min-width: 1366px) {
  body::before {
    background-image: url("images/background-laptop.webp");
  }
}
@media (min-width: 1920px) {
  body::before {
    background-image: url("images/background-desktop.webp");
  }
}

/* Falling leaves (leaves.js): above the background, below all page content. */
.leaves {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Hidden until animations.js reveals them; the class is only set when motion is allowed. */
.motion [data-reveal] {
  opacity: 0;
}

a {
  color: var(--green);
  transition: color 0.3s ease;
}
a:hover {
  color: var(--green-dark);
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--glass-shadow);
}

/* ---------- Single centered card: home and referral pages ---------- */

.page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.solo {
  border-radius: 32px;
  padding: 56px 48px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  line-height: 1.5;
}

.logo {
  display: inline-block;
  margin-bottom: 24px;
}
.logo img {
  display: block;
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(91, 196, 109, 0.3));
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}
.logo img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 12px 24px rgba(91, 196, 109, 0.4));
}

.title {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}
.title img {
  max-height: 160px;
  max-width: 270px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.tagline {
  color: var(--muted);
  margin-bottom: 36px;
}

.store-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.store-badge {
  display: block;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.store-badge:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.store-badge:active {
  transform: translateY(-1px);
}
.store-badge img {
  display: block;
  height: 52px;
  width: auto;
}

/* ---------- Footer navigation, shared by every page ---------- */

.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 0.95rem;
}
.links a {
  position: relative;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.links a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--yellow));
  border-radius: 2px;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}
.links a:hover,
.links a[aria-current="page"] {
  color: var(--green-dark);
  background: rgba(91, 196, 109, 0.12);
}
.links a:hover::after,
.links a[aria-current="page"]::after {
  width: 60%;
}

/* ---------- Document pages: privacy, child safety, account deletion ---------- */

.doc {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
}

.doc-hero {
  border-radius: 32px;
  padding: 40px 32px;
  margin-bottom: 24px;
  text-align: center;
}
.doc-hero .logo {
  margin-bottom: 16px;
}
.doc-hero .logo img {
  max-width: 140px;
}
.doc-hero h1 {
  color: var(--ink);
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 8px;
}
.doc-hero p {
  color: var(--muted);
}
.doc-hero .update-date {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(91, 196, 109, 0.15);
  color: var(--green-deep);
  font-size: 0.9rem;
}

.card {
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 24px;
}
.card h2 {
  color: var(--ink);
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.card p,
.card ul,
.card ol {
  margin-bottom: 16px;
}
.card ul,
.card ol {
  margin-left: 24px;
}
.card li {
  margin-bottom: 8px;
}
.card > :last-child {
  margin-bottom: 0;
}

.doc-nav {
  border-radius: 24px;
  padding: 12px;
}

/* ---------- Referral landing (i/) ---------- */

.referral h1 {
  color: var(--ink);
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.referral p {
  color: var(--muted);
  margin-bottom: 20px;
}
.code-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.code-row {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.code {
  flex: 1;
  font-size: 1.6rem;
  letter-spacing: 3px;
  color: var(--green-deep);
  background: rgba(255, 255, 255, 0.8);
  border: 2px dashed var(--green);
  border-radius: 12px;
  padding: 12px 8px;
  user-select: all;
}
.btn,
.copy {
  font: inherit;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  background: var(--green-deep);
  text-decoration: none;
}
.btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  font-size: 1rem;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}
.btn:hover {
  color: #fff;
  box-shadow: 0 8px 24px rgba(46, 125, 63, 0.35);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
}
.btn-secondary:hover {
  color: var(--ink);
}
.copy {
  flex: 0 0 64px;
  font-size: 0.85rem;
}
.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 16px;
}
.hidden {
  display: none;
}

@media (max-width: 480px) {
  .solo {
    padding: 40px 28px;
    border-radius: 24px;
  }
  .logo img {
    max-width: 180px;
  }
  .solo .links {
    flex-direction: column;
    gap: 4px;
  }
  .doc {
    padding: 24px 14px;
  }
  .doc-hero {
    padding: 32px 20px;
    border-radius: 24px;
  }
  .doc-hero h1 {
    font-size: 1.7rem;
  }
  .card {
    padding: 24px 20px;
  }
}
