/* =============================================================
   Wunderlab base styles — fun, bold, with character.
   The :root knobs are the design dials (font, size, color,
   motion). Change one value and it updates everywhere — this is
   what the kids' design questionnaire will flip.
   ============================================================= */
:root {
  /* fonts */
  --font-title: "Baloo 2", system-ui, sans-serif;   /* big & full of character */
  --font-display: "Baloo 2", system-ui, sans-serif; /* headings */
  --font-body: "Nunito", system-ui, sans-serif;      /* readable body */

  /* type scale */
  --title-size: clamp(3rem, 9vw, 5.5rem);
  --body-size: 1.08rem;

  /* color */
  --bg: #f4f3fb;
  --surface: #ffffff;
  --ink: #20223b;
  --muted: #71759a;
  --line: #ebebf5;
  --accent: #6c5ce7;
  --accent-ink: #ffffff;

  /* the title gradient — swap these for a new mood */
  --grad: linear-gradient(100deg, #6c5ce7 0%, #fd79a8 42%, #ff7675 70%, #fdcb6e 100%);

  /* shape + motion */
  --radius: 24px;
  --shadow: 0 12px 34px rgba(32, 34, 59, 0.10);
  --shadow-lg: 0 22px 50px rgba(32, 34, 59, 0.18);
  --anim-speed: 0.6s;
  --anim-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--body-size);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* soft colorful blobs for depth (sit behind everything) */
.blob { position: fixed; border-radius: 50%; filter: blur(70px); opacity: 0.45; z-index: -1; pointer-events: none; }
.blob.b1 { width: 360px; height: 360px; background: #a29bfe; top: -120px; left: -100px; }
.blob.b2 { width: 320px; height: 320px; background: #fd79a8; top: 120px; right: -120px; }
.blob.b3 { width: 300px; height: 300px; background: #fdcb6e; bottom: -120px; left: 30%; }

.wrap { max-width: 920px; margin: 0 auto; padding: 44px 20px 90px; position: relative; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; }
a { color: var(--accent); }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pop  { 0% { opacity: 0; transform: scale(0.8); } 70% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }
/* NOTE: fill-mode is "backwards" (not "both") on purpose — a filled animation
   would override :hover transforms and kill the hover effects. */
.animate { animation: rise var(--anim-speed) var(--anim-ease) backwards; }
.animate.pop { animation-name: pop; }
@media (prefers-reduced-motion: reduce) { .animate { animation: none; } }

/* =============================================================
   Homepage launcher
   ============================================================= */
.lab-header { text-align: center; margin-bottom: 30px; }

.logo-mark {
  width: 96px; height: 96px; margin: 0 auto 18px;
  display: grid; place-items: center; font-size: 3rem;
  background: var(--surface); border: 3px dashed #cfcfe6;
  border-radius: 26px; box-shadow: var(--shadow);
  transform: rotate(-3deg);
}

/* the big characterful title */
.lab-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: var(--title-size);
  letter-spacing: -0.01em;
  margin: 0.05em 0;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 0 rgba(32, 34, 59, 0.08));
}
.tagline { font-size: 1.25rem; color: var(--muted); font-weight: 700; margin: 0.2em 0 0; }

/* the two big maker cards */
.makers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 36px 0 52px; }
@media (max-width: 540px) {
  .makers { grid-template-columns: 1fr; }
  /* fair play: JS adds .swap on ~half of phone loads to flip who's on top.
     This only applies when stacked — larger screens stay Isa-left/Caio-right. */
  .makers.swap > :nth-child(1) { order: 2; }
  .makers.swap > :nth-child(2) { order: 1; }
}

.maker-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-top: 7px solid var(--who, var(--accent));
  border-radius: var(--radius); padding: 30px 22px; box-shadow: var(--shadow);
  transition: transform 0.16s var(--anim-ease), box-shadow 0.16s ease;
}
.maker-card:hover { transform: translateY(-8px) scale(1.03) rotate(-1.5deg); box-shadow: var(--shadow-lg); }
.maker-card:active { transform: translateY(-2px) scale(0.99); }
.maker-card .big-logo {
  width: 148px; height: 148px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  font-family: var(--font-title); font-weight: 800; font-size: 3.6rem; color: #fff;
  background: var(--who, var(--accent)); border: 5px dashed rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow); margin-bottom: 16px;
  transition: transform 0.16s var(--anim-ease);
}
.maker-card:hover .big-logo { transform: rotate(5deg) scale(1.06); }
/* Drop a jpg/png in (see HTML) and it fills the circle automatically. */
.big-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
/* when there's a real logo, drop the dashed placeholder ring + color fill */
.big-logo:has(img), .person .avatar:has(img) { border: none; background: none; }
/* a logo with a transparent margin (e.g. Isa's) can be zoomed to fill the circle */
.big-logo img.fill { transform: scale(1.25); }
.maker-card h2 { margin: 2px 0; font-size: 2rem; color: var(--who, var(--ink)); }
.maker-card .role { color: var(--muted); font-weight: 700; }
.maker-card .hint { margin-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; color: var(--who, var(--accent)); }

/* project grid */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.project {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.14s var(--anim-ease), box-shadow 0.14s ease;
}
.project.live:hover { transform: translateY(-8px) scale(1.02) rotate(-1deg); box-shadow: var(--shadow-lg); }
.project.live:active { transform: translateY(-2px) scale(0.99); }
.project .thumb {
  aspect-ratio: 16 / 10; display: grid; place-items: center; font-size: 3.4rem; color: #fff;
  background: var(--tile, var(--accent));
  background-image: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(255,255,255,0));
  transition: transform 0.2s var(--anim-ease);
}
.project.live:hover .thumb { transform: scale(1.12) rotate(-3deg); }
.project.hide { display: none; }
.project .body { padding: 18px 20px 22px; }
.project h3 { margin: 0 0 4px; font-size: 1.3rem; }
.project p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.project.soon { filter: grayscale(0.72); opacity: 0.6; pointer-events: none; }

.badge {
  display: inline-block; margin-top: 12px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px;
}
.badge.go { color: #fff; background: var(--accent); border-color: var(--accent); }

/* project filter toggle (All / Isa / Caio) */
.filter-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 28px; }
.filter-btn {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; cursor: pointer;
  color: var(--ink); background: var(--surface); border: 2px solid var(--line);
  border-radius: 999px; padding: 10px 20px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.filter-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.filter-btn.active { color: #fff; background: var(--who, var(--accent)); border-color: transparent; }

/* =============================================================
   About / profile pages (one per kid)
   ============================================================= */
.back-link { font-family: var(--font-display); font-weight: 700; text-decoration: none; }

.profile-hero { text-align: center; margin: 10px 0 34px; }
.profile-hero .big-logo {
  width: 210px; height: 210px; border-radius: 50%; overflow: hidden; margin: 0 auto 18px;
  display: grid; place-items: center;
  font-family: var(--font-title); font-weight: 800; font-size: 5.5rem; color: #fff;
  background: var(--who, var(--accent)); border: 6px dashed rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-lg);
}
.profile-hero h1 { font-family: var(--font-title); font-size: clamp(2.6rem, 8vw, 4rem); margin: 0; color: var(--who, var(--ink)); }
.profile-hero .role { font-size: 1.35rem; font-weight: 700; color: var(--muted); margin-top: 4px; }

.id-card { border-top: 7px solid var(--who, var(--accent)); }
.id-card .field { padding: 14px 2px; border-bottom: 1.5px dashed var(--line); }
.id-card .field:last-child { border-bottom: none; }
.id-card .q { display: block; font-family: var(--font-display); font-weight: 700; color: var(--who, var(--accent)); margin-bottom: 2px; }
.id-card .a { color: var(--ink); }

/* =============================================================
   Shared app bits (forms, buttons) — used by compliments etc.
   ============================================================= */
.subtitle { font-size: 1.2rem; color: var(--muted); margin: 0.4em 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 22px; }
label { display: block; font-family: var(--font-display); font-weight: 700; margin: 16px 0 6px; }
input[type="text"], select {
  width: 100%; padding: 14px 16px; font-size: 1.05rem; font-family: inherit; color: var(--ink);
  background: #fbfbfe; border: 2px solid var(--line); border-radius: 14px; transition: border-color 0.15s ease;
}
input:focus, select:focus { outline: none; border-color: var(--accent); }
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--accent-ink); background: var(--accent); padding: 14px 26px; border-radius: 16px;
  box-shadow: var(--shadow); transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-green { background: #00b894; }
.btn-blue { background: #4d96ff; }
.emoji { font-style: normal; }
textarea {
  width: 100%; padding: 14px 16px; font-size: 1.05rem; font-family: inherit; color: var(--ink);
  background: #fbfbfe; border: 2px solid var(--line); border-radius: 14px;
  transition: border-color 0.15s ease; resize: vertical; min-height: 60px;
}
textarea:focus { outline: none; border-color: var(--accent); }

/* =============================================================
   Homepage crew + rooms
   ============================================================= */
.section-title { font-family: var(--font-display); font-size: 1.5rem; margin: 38px 0 6px; text-align: center; }
.tiny-note { color: var(--muted); font-size: 0.95rem; text-align: center; margin: 0 0 18px; }

.crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.person {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--who, var(--accent));
  border-radius: var(--radius); padding: 20px 12px; box-shadow: var(--shadow);
  transition: transform 0.14s var(--anim-ease), box-shadow 0.14s ease;
}
.person:hover { transform: translateY(-6px) scale(1.03) rotate(-1.2deg); box-shadow: var(--shadow-lg); }
.person:active { transform: translateY(-2px) scale(0.99); }
.person .avatar {
  width: 90px; height: 90px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  font-family: var(--font-title); font-weight: 800; font-size: 2.2rem; color: #fff;
  background: var(--who, var(--accent)); border: 4px dashed rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow); transition: transform 0.16s var(--anim-ease);
}
.person:hover .avatar { transform: rotate(5deg) scale(1.05); }
.person .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.person .name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--who, var(--ink)); }
.person .role { color: var(--muted); font-size: 0.88rem; }

.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.room {
  display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
  transition: transform 0.14s var(--anim-ease), box-shadow 0.14s ease;
}
.room.open:hover { transform: translateY(-5px) rotate(-0.6deg); box-shadow: var(--shadow-lg); }
.room .ricon { font-size: 2rem; }
.room h3 { margin: 0; font-size: 1.2rem; }
.room p { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.room.soon, .room.locked { filter: grayscale(0.6); opacity: 0.6; pointer-events: none; }

/* =============================================================
   Profile page + slogan generator
   ============================================================= */
.profile-q .qlabel { display: block; font-family: var(--font-display); font-weight: 700; margin: 18px 0 6px; }
.slogan-zone { border-top: 7px solid var(--who, var(--accent)); }
.slogan-current { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; text-align: center; padding: 16px 8px; min-height: 1.4em; color: var(--who, var(--ink)); }
.slogan-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.react {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 10px 16px; transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.react:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.react:active { transform: translateY(1px); }
.slogan-list { list-style: none; padding: 0; margin: 8px 0 0; }
.slogan-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #fbfbfe; border: 1.5px dashed var(--line); border-radius: 12px; margin-bottom: 8px; }
.slogan-list .x { cursor: pointer; border: none; background: none; font-size: 1.05rem; }

/* =============================================================
   Homepage dark theme (scoped to <body class="home">)
   ============================================================= */
body.home { background: #000; color: #fff; }

body.home .lab-title {
  font-family: "Bangers", var(--font-title);
  font-weight: 400;
  letter-spacing: 0.03em;
  font-size: clamp(3.4rem, 12vw, 7rem);
  background: none;
  color: #ff2a2a;
  -webkit-text-fill-color: #ff2a2a;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-stroke: 2px #ffffff;
  paint-order: stroke fill;          /* keep the red crisp under the white edge */
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);  /* soft white border/glow */
  filter: none;
}
body.home .tagline { color: #c9c9d6; }
body.home .section-title { color: #ffffff; }
body.home .tiny-note { color: #9a9aae; }
body.home .logo-mark { background: #15151f; border-color: #34343f; }

/* Isa & Caio: huge logos, no card, no colored ring — just the logo */
body.home .makers .maker-card { background: none; border: none; box-shadow: none; padding: 8px; }
body.home .makers .maker-card:hover { box-shadow: none; }
body.home .makers .big-logo {
  width: clamp(200px, 46vw, 400px); height: clamp(200px, 46vw, 400px);
  border: none; background: none; box-shadow: none; margin-bottom: 12px;
}
body.home .makers .big-logo img.fill { transform: scale(1.25); }  /* push Isa's art to the edges to match Caio */
body.home .makers .maker-card h2 { font-size: 2.4rem; color: #ffffff; }
body.home .makers .maker-card .role { color: #c9c9d6; }

/* secondary crew + rooms as dark cards on black */
body.home .person { background: #14141d; border-color: #2a2a37; }
body.home .person .role { color: #9a9aae; }
body.home .room { background: #14141d; border-color: #2a2a37; }
body.home .room h3 { color: #ffffff; }
body.home .room p { color: #9a9aae; }

/* =============================================================
   Dark theme base (body.dark) — used by profile pages too, so they
   match the homepage. The homepage adds body.home extras above.
   ============================================================= */
body.dark { background: #000; color: #fff; }
body.dark .section-title { color: #fff; }
body.dark .tiny-note { color: #9a9aae; }
body.dark .back-link { color: #fff; }
body.dark .card { background: #14141d; border-color: #2a2a37; }
body.dark textarea { background: #0f0f17; border-color: #2a2a37; color: #fff; }
body.dark textarea::placeholder { color: #5b5b6b; }
body.dark label, body.dark .qlabel { color: #fff; }
body.dark .react { background: #1c1c28; border-color: #33333f; color: #fff; }
body.dark .slogan-list li { background: #0f0f17; border-color: #33333f; }
body.dark .slogan-current { color: var(--who, #fff); }

/* the person's name as a big comic headline in their color */
body.dark .profile-hero h1 {
  font-family: "Bangers", var(--font-title); font-weight: 400; letter-spacing: 0.03em;
  color: var(--who, #ff2a2a); -webkit-text-fill-color: var(--who, #ff2a2a);
  -webkit-text-stroke: 1.6px #fff; paint-order: stroke fill;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
body.dark .profile-hero .role { color: #c9c9d6; }

/* =============================================================
   Baseball / trading card
   ============================================================= */
.bcard {
  max-width: 360px; margin: 0 auto; text-align: center; position: relative;
  background: linear-gradient(165deg, #1c1c29, #0f0f17);
  border: 6px solid var(--who, #6c5ce7); border-radius: 24px;
  padding: 18px 18px 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.bcard-top { font-family: var(--font-display); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--who, #fff); }
.bcard-logo {
  width: 128px; height: 128px; margin: 12px auto 6px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 3rem; background: #0c0c14;
  border: 3px solid var(--who, #fff); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.bcard-logo img { width: 100%; height: 100%; object-fit: cover; }
.bcard-name {
  font-family: "Bangers", var(--font-title); font-weight: 400; font-size: 2.7rem; letter-spacing: 0.03em;
  margin: 6px 0 0; color: #ffffff; -webkit-text-stroke: 1.4px var(--who, #fff); paint-order: stroke fill;
}
.bcard-role { color: #c9c9d6; font-weight: 700; font-size: 0.95rem; margin-bottom: 12px; }
.bcard-slogan {
  background: color-mix(in srgb, var(--who, #6c5ce7) 20%, transparent);
  border: 1.5px solid var(--who, #6c5ce7); border-radius: 12px;
  color: #fff; font-weight: 700; font-style: italic; padding: 9px 12px; margin: 0 0 14px; min-height: 1em;
}
.bcard-stats { text-align: left; display: grid; gap: 0; }
.bcard-stats .stat { display: grid; grid-template-columns: 40% 1fr; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px dashed #2a2a37; }
.bcard-stats .stat:last-child { border-bottom: none; }
.bcard-stats .s { font-family: var(--font-display); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--who, #fff); }
.bcard-stats .v { color: #e8e8f0; font-size: 0.9rem; }
.bcard-foot { margin-top: 12px; font-family: var(--font-display); font-weight: 700; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: #7a7a8e; }
.card-actions { display: flex; justify-content: center; margin-top: 22px; }
