/* ============================================
   MEEM'S CLASS — Y2K / Sticker / Playful theme
   ============================================ */

:root {
  --bg: #FDF6E3;
  --bg-alt: #FFF1D6;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --pink: #FF3D87;
  --blue: #3D8DFF;
  --lime: #C9F76F;
  --yellow: #FFD93D;
  --purple: #B47BFF;
  --paper: #FFFFFF;
  --border: 3px solid var(--ink);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-sm: 4px 4px 0 var(--ink);
  --radius: 18px;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'LINE Seed Sans TH', 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, sans-serif;
  font-weight: 500;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  cursor: none; /* hidden so custom cursor takes over */
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: none; }

/* ---- Custom cursor ---- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease-out, width 0.2s, height 0.2s, background 0.2s;
}
.cursor-dot {
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 50%;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition: transform 0.18s ease-out, width 0.2s, height 0.2s;
}
.cursor-ring.hover {
  width: 64px; height: 64px;
  background: var(--pink);
  mix-blend-mode: multiply;
  border-color: var(--ink);
}

/* ---- Background grid ---- */
.bg-grid::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Top nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: var(--border);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav__logo {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__logo .dot {
  width: 14px; height: 14px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.4s infinite;
}
.nav__links {
  display: flex;
  gap: 26px;
  align-items: center;
  font-weight: 700;
}
.nav__links a {
  position: relative;
  padding: 6px 0;
}
.nav__links a:hover::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 6px;
  background: var(--lime);
  z-index: -1;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 800;
  font-size: 15px;
  border: var(--border);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--ink);
}
.btn--pink { background: var(--pink); color: white; }
.btn--blue { background: var(--blue); color: white; }
.btn--lime { background: var(--lime); }
.btn--yellow { background: var(--yellow); }
.btn--lg { padding: 16px 32px; font-size: 17px; }

/* ---- Cards ---- */
.card {
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translate(-3px, -3px) rotate(-0.5deg);
  box-shadow: 9px 9px 0 var(--ink);
}

/* ---- Stickers (decorative) ---- */
.sticker {
  position: absolute;
  font-weight: 900;
  font-size: 14px;
  padding: 8px 14px;
  border: var(--border);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: var(--shadow-hard-sm);
  z-index: 5;
  pointer-events: none;
  white-space: nowrap;
}
.sticker--star {
  width: 70px; height: 70px;
  background: var(--lime);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  padding: 0;
}

/* ---- Animations ---- */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
@keyframes pop-in {
  0% { transform: scale(0) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.float { animation: float 4s ease-in-out infinite; }
.spin-slow { animation: spin-slow 12s linear infinite; }
.wiggle { animation: wiggle 2.5s ease-in-out infinite; }
.pop-in { animation: pop-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* ---- Marquee ---- */
.marquee {
  background: var(--ink);
  color: var(--bg);
  border-block: var(--border);
  padding: 16px 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.marquee__track {
  display: inline-flex;
  gap: 40px;
  animation: marquee 22s linear infinite;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
}
.marquee__track span { display: inline-flex; align-items: center; gap: 40px; }
.marquee__track .dot { width: 12px; height: 12px; background: var(--pink); border-radius: 50%; }

/* ---- Form ---- */
.input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  background: var(--paper);
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.12s ease;
}
.input:focus {
  outline: none;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.label {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 14px;
}

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-backdrop.open {
  display: flex;
  animation: fade-in 0.2s ease forwards;
}
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 32px;
  max-width: 460px;
  width: 100%;
  position: relative;
  animation: pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 38px; height: 38px;
  border: var(--border);
  border-radius: 50%;
  background: var(--paper);
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hard-sm);
}

/* ---- Footer ---- */
.footer {
  background: var(--ink);
  color: var(--bg);
  padding: 60px 32px 30px;
  margin-top: 80px;
  border-top: var(--border);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer h3 { font-size: 14px; margin-bottom: 12px; color: var(--lime); }
.footer a { display: block; padding: 4px 0; opacity: 0.85; }
.footer a:hover { opacity: 1; color: var(--yellow); }
.footer__bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px dashed rgba(255,255,255,0.2);
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Utility ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: 80px 0; position: relative; }
.section-title { font-size: clamp(32px, 5vw, 56px); font-weight: 900; line-height: 1; letter-spacing: -1.5px; margin-bottom: 16px; }
.section-sub { font-size: 18px; color: var(--ink-soft); margin-bottom: 48px; max-width: 600px; }
.tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--lime);
  border: var(--border);
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 18px;
}
.text-pink { color: var(--pink); }
.text-blue { color: var(--blue); }
.highlight {
  background: linear-gradient(transparent 60%, var(--yellow) 60%);
  padding: 0 4px;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__links.mobile-open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: var(--border); padding: 20px; }
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
  button, a { cursor: pointer; }
}
