/* Palm Pals — visual design.
 *
 * This is v1, built from the kids' drawings (see wireframes/). It is meant to
 * be argued with. The colours, the wobble, the sticker hearts and stars are all
 * fair game — that is the point of the site.
 *
 * The one thing to keep: everything must stay legible and tappable on a phone.
 * That is how their friends will see it. */

:root {
  --cream:  #FFF8F0;
  --ink:    #3B2E4A;
  --muted:  #7A6A8A;
  --pink:   #FF6FA5;
  --yellow: #FFD23F;
  --mint:   #4ECDC4;
  --lilac:  #A78BFA;
  --coral:  #FF8C61;
  --card:   #FFFFFF;
  --shadow: 0 4px 0 rgba(59, 46, 74, 0.15);
  --radius: 22px;
}

/* Each section gets its own accent, so you always know where you are. */
.theme-about       { --accent: var(--pink);   }
.theme-updates     { --accent: var(--mint);   }
.theme-shorts      { --accent: var(--lilac);  }
.theme-coming-soon { --accent: var(--coral);  }
.theme-home        { --accent: var(--yellow); }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  /* Room for the fixed menu button */
  padding-top: 68px;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; line-height: 1.15; }

a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px 80px; }

/* ── Menu button + drawer (wireframes 03, 04) ──────────────────────────────── */
.menu-btn {
  position: fixed; top: 16px; left: 16px; z-index: 60;
  width: 52px; height: 52px;
  display: flex; flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
  background: var(--card); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: var(--shadow); cursor: pointer;
}
.menu-btn span { display: block; width: 24px; height: 3px; background: var(--ink); border-radius: 2px; }

.home-btn {
  position: fixed; top: 16px; right: 16px; z-index: 60;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; text-decoration: none;
  background: var(--card);
  border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: var(--shadow);
}

.drawer {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(59, 46, 74, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
.drawer[data-open="true"] { opacity: 1; pointer-events: auto; }

.drawer-inner {
  background: var(--cream);
  border: 4px solid var(--ink); border-radius: 28px;
  padding: 28px 24px;
  width: min(520px, 100%);
  max-height: 100%; overflow-y: auto;
  text-align: center;
}
.drawer-inner h2 { margin: 0 0 20px; font-size: 28px; }

/* The four ovals the kids drew. */
.ovals { display: grid; gap: 16px; }
@media (min-width: 480px) { .ovals { grid-template-columns: 1fr 1fr; } }

.oval {
  display: block; text-decoration: none;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 50% / 32%;
  padding: 26px 18px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease;
}
.oval:hover, .oval:focus-visible { transform: translateY(-3px) rotate(-1deg); }
.oval strong { display: block; font-family: 'Fredoka', sans-serif; font-size: 21px; }
.oval small  { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; }

.oval-about       { background: #FFEAF2; }
.oval-updates     { background: #E4F8F6; }
.oval-shorts      { background: #EFE9FE; }
.oval-coming-soon { background: #FFEDE4; }

.drawer-close {
  margin-top: 22px; padding: 10px 24px;
  font: inherit; font-weight: 700;
  background: var(--ink); color: var(--cream);
  border: none; border-radius: 999px; cursor: pointer;
}

/* ── Home (wireframe 04) ───────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 40px 0 20px; }

/* Bubble writing. Fredoka with a hard offset shadow is a stand-in for the
 * hand-drawn outline caps on wireframe 04 — if the kids want the real thing it
 * should become an SVG of their own lettering. */
.bubble-title {
  font-size: clamp(40px, 11vw, 78px);
  margin: 0;
  color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 5px 0 var(--ink);
  letter-spacing: 1px;
}
.hero p { font-size: 19px; color: var(--muted); margin: 18px auto 0; max-width: 32ch; }

/* Hearts and stars. Drawn scattered freely; placed deliberately here so they
 * never land on top of the words. */
.sticker { position: absolute; font-size: 34px; opacity: 0.9; pointer-events: none; user-select: none; }
.sticker-1 { top: 10px;  left: 6%;   transform: rotate(-15deg); }
.sticker-2 { top: 54px;  right: 8%;  transform: rotate(12deg);  }
.sticker-3 { bottom: 4px; left: 16%; transform: rotate(8deg);   }
.sticker-4 { bottom: 22px; right: 18%; transform: rotate(-10deg); }
@media (max-width: 560px) { .sticker { font-size: 24px; } .sticker-2, .sticker-4 { display: none; } }

/* ── Page headings ─────────────────────────────────────────────────────────── */
.page-title { text-align: center; font-size: clamp(32px, 8vw, 48px); margin: 12px 0 4px; }
.page-title::after {
  content: ''; display: block;
  width: 120px; height: 6px; margin: 10px auto 0;
  background: var(--accent, var(--pink)); border-radius: 4px;
}
.page-sub { text-align: center; color: var(--muted); margin: 8px 0 34px; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ── About Me (wireframes 07, 08) ──────────────────────────────────────────── */
.pal-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 20px; }
.pager-btn {
  width: 54px; height: 54px; flex: none;
  font-size: 24px; font-family: inherit;
  background: var(--card); border: 3px solid var(--ink);
  border-radius: 50%; box-shadow: var(--shadow); cursor: pointer;
}
.pager-btn:disabled { opacity: 0.3; cursor: default; box-shadow: none; }
.pager-count { color: var(--muted); font-size: 14px; min-width: 60px; text-align: center; }

.pal-name { text-align: center; font-size: clamp(30px, 7vw, 44px); margin: 0 0 4px; }
.pal-tagline { text-align: center; color: var(--muted); margin: 0 0 22px; font-style: italic; }

/* Wireframe 08 asks for the portrait to be the tallest thing on the page. */
.pal-portrait {
  max-width: 340px; margin: 0 auto 26px;
  border: 4px solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; background: var(--card);
}
.pal-portrait img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.pal-portrait-empty {
  aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 15px; text-align: center; padding: 20px;
}

.pal-block { margin-bottom: 20px; }
.pal-block h3 { margin: 0 0 8px; font-size: 21px; color: var(--accent, var(--pink)); }
.pal-block p { margin: 0; white-space: pre-wrap; }

.bff-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 8px; }
.bff-list a {
  display: inline-block; padding: 5px 14px;
  background: #FFEAF2; border: 2px solid var(--ink); border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: 15px;
}

/* ── Updates (wireframe 06) ────────────────────────────────────────────────── */
.cat-columns { display: grid; gap: 22px; }
@media (min-width: 640px) { .cat-columns { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cat-columns { grid-template-columns: repeat(3, 1fr); } }

.cat h2 {
  margin: 0 0 12px; font-size: 25px;
  display: flex; align-items: center; gap: 8px;
}
.cat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cat li { }

.update-item { background: var(--card); border: 3px solid var(--ink); border-radius: 18px; padding: 14px 16px; }
.update-item h3 { margin: 0 0 4px; font-size: 18px; }
.update-item .when { color: var(--muted); font-size: 13px; }
.update-item p { margin: 8px 0 0; white-space: pre-wrap; }
.update-item img { margin-top: 10px; border-radius: 12px; border: 2px solid var(--ink); }

.pal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pal-tag {
  font-size: 12px; font-weight: 700; padding: 3px 10px;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 999px;
  text-decoration: none;
}

/* ── Shorts (wireframe 05) ─────────────────────────────────────────────────── */
.short { padding: 0; overflow: hidden; }
.short-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.short-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.short-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.short-play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.25); border: 0; cursor: pointer; color: #fff; font-size: 54px;
}
.short-body { padding: 14px 16px 16px; }
.short-body h3 { margin: 0 0 6px; font-size: 19px; }
.short-body p { margin: 0; color: var(--muted); font-size: 15px; }

/* ── Coming Soon (wireframes 09, 10) ───────────────────────────────────────── */
.project h3 { margin: 0 0 10px; font-size: 21px; }
.project img { border-radius: 14px; border: 2px solid var(--ink); margin-bottom: 12px; }
.project dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 15px; }
.project dt { font-weight: 800; color: var(--muted); }
.project dd { margin: 0; }
.release-pill {
  display: inline-block; margin-top: 12px; padding: 5px 14px;
  background: var(--coral); color: #fff; font-weight: 800; font-size: 14px;
  border: 2px solid var(--ink); border-radius: 999px;
}

/* ── Reactions ─────────────────────────────────────────────────────────────── */
.reactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.react-btn {
  font: inherit; font-size: 15px; padding: 5px 12px;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 999px;
  cursor: pointer; transition: transform 0.1s ease;
}
.react-btn:hover { transform: scale(1.08); }
.react-btn[data-mine="true"] { background: var(--yellow); }
.react-btn .n { font-weight: 800; margin-left: 4px; }

/* ── States ────────────────────────────────────────────────────────────────── */
.empty, .loading {
  text-align: center; color: var(--muted);
  padding: 50px 20px; font-size: 17px;
}
.empty strong { display: block; font-family: 'Fredoka', sans-serif; font-size: 22px; color: var(--ink); margin-bottom: 6px; }

.draft-flag {
  display: inline-block; font-size: 12px; font-weight: 800;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px;
  padding: 2px 10px; margin-left: 8px; vertical-align: middle;
}

.site-foot { text-align: center; color: var(--muted); font-size: 14px; padding: 30px 20px 50px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
