/* ── Reset & Variables ─────────────────────────────────────── */

html { visibility: hidden; }
html.fonts-ready { visibility: visible; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --grape: #8b6bb5;
  --grape-light: #a78bcd;
  --grape-dark: #6b4e91;
  --ocean: #4a7fb5;
  --ocean-light: #6ba3d6;
  --ocean-dark: #3a6591;
  --cream: #faf5ee;
  --warm-white: #fefcf8;
  --pencil: #4a4a4a;
  --crayon-red: #e8685a;
  --crayon-yellow: #f5c842;
  --crayon-green: #6bc26b;
  --crayon-blue: #5b9fd4;
  --crayon-orange: #f0914e;
}

/* ── Base ─────────────────────────────────────────────────── */

body {
  font-family: 'Quicksand', sans-serif;
  background-color: var(--cream);
  color: var(--pencil);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
}

/* ── Page (notebook background) ───────────────────────────── */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  background-image: repeating-linear-gradient(
    transparent,
    transparent 39px,
    rgba(180, 210, 235, 0.2) 39px,
    rgba(180, 210, 235, 0.2) 40px
  );
}

.page::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(220, 120, 120, 0.2);
}

/* ── Decorative dots ──────────────────────────────────────── */

.crayon-dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
}

/* ── Shared content wrapper ───────────────────────────────── */

.main-content {
  max-width: 600px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ── Logo ─────────────────────────────────────────────────── */

.logo {
  margin-bottom: 1rem;
}

.logo-text {
  font-family: 'Chewy', cursive;
  font-size: clamp(3rem, 8vw, 4.5rem);
  color: var(--grape);
  letter-spacing: 0.02em;
  line-height: 1.1;
  position: relative;
  display: inline-block;
}

.logo-text span {
  color: var(--ocean);
}

.logo-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: -5%;
  width: 110%;
  height: 12px;
  background: var(--crayon-yellow);
  opacity: 0.5;
  border-radius: 4px;
  transform: rotate(-0.8deg);
}

/* ── Pencils (footer decoration) ──────────────────────────── */

.pencils {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 2.5rem;
  opacity: 0.4;
}

.pencil-line {
  width: 4px;
  height: 40px;
  border-radius: 2px;
  transform-origin: bottom;
}

@keyframes pencilBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(1deg); }
}

.pencil-line:nth-child(odd) {
  animation: pencilBob 2.5s ease-in-out infinite;
}

.pencil-line:nth-child(even) {
  animation: pencilBob 2.5s ease-in-out 0.3s infinite;
}

/* ── Footer ───────────────────────────────────────────────── */

.footer {
  margin-top: 3rem;
  font-size: 0.8rem;
  color: #b5afa7;
  font-family: 'Quicksand', sans-serif;
}

.footer-links {
  margin-top: 0.5rem;
}

.footer-links a {
  color: #b5afa7;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--grape);
  text-decoration: underline;
}

.footer-links .separator {
  margin: 0 0.4rem;
  color: #d0cbc3;
}

/* ── Policy pages ─────────────────────────────────────────── */

.page--policy {
  justify-content: flex-start;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.page--policy .main-content {
  max-width: 720px;
  text-align: left;
}

.back-link {
  display: inline-block;
  font-family: 'Coming Soon', cursive;
  font-size: 0.95rem;
  color: var(--ocean);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--grape);
}

.policy-content h1 {
  font-family: 'Chewy', cursive;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  color: var(--grape);
  margin-bottom: 4px;
}

.policy-content .last-updated {
  font-family: 'Coming Soon', cursive;
  color: #b5afa7;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

.policy-content h2 {
  font-family: 'Chewy', cursive;
  font-size: 1.3rem;
  color: var(--ocean);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.policy-content h3 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--grape-dark);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.policy-content p {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.policy-content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.policy-content ul li {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

.policy-content ul ul {
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
}

.policy-content a {
  color: var(--ocean);
  text-decoration: none;
  border-bottom: 1px dashed var(--ocean-light);
  transition: color 0.2s, border-color 0.2s;
}

.policy-content a:hover {
  color: var(--grape);
  border-bottom-color: var(--grape-light);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 500px) {
  .page::before { left: 20px; }
}
