/* Karuppaadu website (intro, blog, feedback, privacy, admin). The game has its own CSS in /play/. */
:root {
  --cyan: #18C8DB; --cyan-hi: #5BEAF5; --cyan-deep: #0A9DB1;
  --ink: #121318; --paper: #FFFBF2; --cream: #FFF1DC;
  --yellow: #FFD23F; --pink: #FF5D8F; --green: #3DDC97; --red: #FF4D5E;
  --spring: cubic-bezier(.2, 1.35, .35, 1);
  --font: 'Baloo Thambi 2', 'Noto Sans Tamil', system-ui, sans-serif;
  --wrap: 1120px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; line-height: 1.5; overflow-x: hidden; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(24, 200, 219, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 3px solid var(--ink); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.45rem; line-height: 1; }
.brand img { width: 42px; height: 42px; border-radius: 12px; border: 2.5px solid var(--ink); }
.brand small { display: block; font-size: .55rem; letter-spacing: .3em; opacity: .75; margin-top: 2px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 12px; }
.nav-links a:hover, .nav-links a[aria-current] { background: rgba(255, 255, 255, .45); }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border: 3px solid var(--ink); border-radius: 14px; background: var(--paper); font-size: 1.3rem; box-shadow: 0 3px 0 var(--ink); cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--cyan); border-bottom: 3px solid var(--ink); padding: 10px 16px 16px; }
  .nav.open .nav-links { display: flex; }
  .nav-links .btn { margin-top: 6px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer;
  font-weight: 800; font-size: 1.15rem; line-height: 1.1; padding: 12px 22px; min-height: 52px; border: 3px solid var(--ink); border-radius: 18px;
  background: var(--yellow); color: var(--ink); box-shadow: 0 5px 0 var(--ink); transition: transform .08s, box-shadow .08s; text-align: center; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.white { background: #fff; } .btn.ink { background: var(--ink); color: #fff; } .btn.pink { background: var(--pink); color: #fff; }
.btn.sm { min-height: 42px; font-size: 1rem; padding: 8px 16px; box-shadow: 0 4px 0 var(--ink); border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(120% 90% at 30% 0%, var(--cyan-hi), var(--cyan) 50%, var(--cyan-deep)); border-bottom: 3px solid var(--ink); overflow: hidden; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.eyebrow { display: inline-block; font-weight: 800; font-size: .9rem; padding: 4px 14px; border-radius: 999px; background: var(--ink); color: #fff; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; margin: 14px 0 6px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; background: var(--ink); color: #fff; padding: 2px 12px 0; border-radius: 14px; display: inline-block; line-height: 1.15; margin: 6px 0; transform: rotate(-1.5deg); }
.hero .en { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 700; opacity: .8; }
.hero p.lead { font-size: 1.12rem; font-weight: 500; max-width: 36em; margin: 14px 0 24px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.stat { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; padding: 6px 14px; font-weight: 700; box-shadow: 0 3px 0 var(--ink); }
.stat b { font-size: 1.2rem; }
.herd { display: flex; justify-content: center; align-items: flex-end; min-height: 260px; }
.herd .goat { width: 120px; margin: 0 -16px; animation: hop 1.6s ease-in-out infinite; }
.herd .goat:nth-child(1) { width: 96px; animation-delay: -.3s; } .herd .goat:nth-child(2) { animation-delay: -.7s; }
.herd .goat:nth-child(3) { width: 170px; z-index: 2; animation-delay: -1.1s; } .herd .goat:nth-child(4) { animation-delay: -.5s; }
.herd .goat:nth-child(5) { width: 96px; animation-delay: -.9s; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } 55% { transform: translateY(0) scaleY(.95); } }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 34px; text-align: center; } .hero p.lead { margin-inline: auto; } .btn-row, .stats { justify-content: center; } .herd { min-height: 180px; } .herd .goat { width: 84px; } .herd .goat:nth-child(3) { width: 120px; } .herd .goat:nth-child(1), .herd .goat:nth-child(5) { width: 68px; } }

/* ---------- sections ---------- */
section.band { padding: 72px 0; }
section.band.alt { background: var(--cream); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.sec-head { text-align: center; margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.1; }
.sec-head p { font-weight: 600; opacity: .7; margin-top: 6px; font-size: 1.08rem; }
.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .g4, .g2 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 3px solid var(--ink); border-radius: 24px; padding: 20px; box-shadow: 0 6px 0 var(--ink); }
.card h3 { font-size: 1.3rem; line-height: 1.15; margin-bottom: 6px; }
.card p { font-weight: 500; opacity: .8; }
.step .n { width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.6rem; border: 2.5px solid var(--ink); border-radius: 16px; background: var(--cyan); margin-bottom: 12px; }
.mode { display: flex; flex-direction: column; gap: 10px; }
.mode .tag { align-self: flex-start; font-weight: 800; font-size: .85rem; padding: 2px 12px; border-radius: 999px; background: var(--yellow); border: 2px solid var(--ink); }
.mode.dark { background: var(--ink); color: #fff; } .mode.dark p { opacity: .8; }
.mode ul { list-style: none; display: grid; gap: 4px; font-weight: 600; }
.mode li::before { content: '🐑 '; }
.cats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cat { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 2.5px solid var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 700; box-shadow: 0 3px 0 var(--ink); }
.cat small { opacity: .55; font-weight: 600; }
.marquee { overflow: hidden; margin-top: 28px; border-block: 3px solid var(--ink); background: var(--ink); color: #fff; padding: 10px 0; }
.marquee div { display: flex; gap: 30px; width: max-content; animation: scroll 60s linear infinite; font-weight: 700; font-size: 1.15rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* reviews */
.rating-big { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 22px; font-weight: 800; }
.rating-big .num { font-size: 3rem; line-height: 1; }
.starline { color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); letter-spacing: 2px; font-size: 1.4rem; }
.review p.q { font-size: 1.08rem; font-weight: 600; opacity: 1; }
.review .who { margin-top: 10px; font-weight: 800; opacity: .7; font-size: .92rem; }

/* blog */
.post-card { text-decoration: none; display: flex; flex-direction: column; gap: 6px; transition: transform .2s var(--spring); }
.post-card:hover { transform: translateY(-4px) rotate(-.5deg); }
.post-card .emoji { font-size: 2.4rem; }
.post-card .meta, .post .meta { font-weight: 700; font-size: .85rem; opacity: .55; }
.post-card .more { font-weight: 800; margin-top: auto; }
.post { max-width: 720px; margin: 0 auto; padding: 48px 20px 72px; }
.post h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin: 8px 0 10px; }
.post .dek { font-size: 1.2rem; font-weight: 600; opacity: .75; }
.post h2 { font-size: 1.55rem; margin: 34px 0 8px; line-height: 1.2; }
.post p, .post li { font-size: 1.1rem; font-weight: 500; margin-top: 12px; }
.post ul, .post ol { padding-left: 1.3em; }
.post .callout { margin-top: 26px; background: var(--cream); border: 3px solid var(--ink); border-radius: 20px; padding: 16px 18px; box-shadow: 0 5px 0 var(--ink); }
.post .callout p:first-child { margin-top: 0; }
.crumbs { font-weight: 700; font-size: .9rem; opacity: .7; }
.crumbs a { text-decoration: none; }

/* forms */
.form { display: grid; gap: 14px; }
.form label { font-weight: 800; }
.form label span { font-weight: 600; opacity: .6; font-size: .9em; }
.field { width: 100%; margin-top: 6px; padding: 12px 14px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; font-size: 1.08rem; font-weight: 600; outline: 0; }
.field:focus { box-shadow: 0 0 0 4px rgba(255, 210, 63, .8); }
textarea.field { resize: vertical; min-height: 140px; }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.kinds label { cursor: pointer; }
.kinds input { position: absolute; opacity: 0; }
.kinds span { display: inline-block; padding: 8px 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 700 !important; opacity: 1 !important; font-size: 1rem !important; }
.kinds input:checked + span { background: var(--ink); color: #fff; }
.kinds input:focus-visible + span { outline: 3px solid var(--yellow); }
.msg { font-weight: 700; min-height: 1.3em; }
.msg.err { color: #C8102E; } .msg.ok { color: #0B7A4B; }
.stars-in { display: flex; gap: 4px; }
.stars-in button { background: none; border: 0; font-size: 2.4rem; line-height: 1; color: #D9D2C3; -webkit-text-stroke: 2px var(--ink); cursor: pointer; transition: transform .2s var(--spring); }
.stars-in button.on { color: var(--yellow); transform: scale(1.1); }

/* cta + footer */
.cta { text-align: center; background: var(--ink); color: #fff; padding: 64px 0; }
.cta h2 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; }
.cta p { opacity: .8; font-weight: 600; margin: 8px 0 24px; font-size: 1.1rem; }
.cta .goat { width: 120px; margin: 0 auto 10px; }
footer { background: var(--cyan-deep); border-top: 3px solid var(--ink); padding: 34px 0; font-weight: 600; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { text-decoration: none; font-weight: 700; }
footer a:hover { text-decoration: underline; }
footer small { opacity: .75; }
footer .powered { margin-top: 18px; padding-top: 14px; border-top: 2px solid rgba(0,0,0,.15); justify-content: center; }
footer .powered a { text-decoration: underline; }
footer .powered small { text-align: center; line-height: 1.6; display: block; width: 100%; }

/* admin */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.admin-tabs button { border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 16px; background: #fff; font-weight: 800; cursor: pointer; }
.admin-tabs button.on { background: var(--ink); color: #fff; }
.table-wrap { overflow-x: auto; border: 3px solid var(--ink); border-radius: 18px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1.5px solid #eee; vertical-align: top; }
th { background: var(--cream); font-weight: 800; position: sticky; top: 0; }
td.msgcell { min-width: 260px; white-space: pre-wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 12px 16px; box-shadow: 0 4px 0 var(--ink); }
.kpi b { display: block; font-size: 2rem; line-height: 1.1; }
.pill-s { font-size: .8rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; cursor: pointer; }
.pill-s.on { background: var(--green); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------- Goat mascot ---------- */
.goat { display: block; overflow: visible; }
.goat .g-head { transform-origin: 100px 150px; animation: headBob 3.2s ease-in-out infinite; }
.goat .g-body { transform-origin: 100px 228px; animation: breathe 3.2s ease-in-out infinite; }
.goat .g-eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.goat .g-eye:nth-child(2) { animation-delay: .04s; }
.goat .g-ear-l { transform-box: fill-box; transform-origin: 90% 50%; animation: earL 3.2s ease-in-out infinite; }
.goat .g-ear-r { transform-box: fill-box; transform-origin: 10% 50%; animation: earR 3.2s ease-in-out infinite; }
.goat .g-lids { transform-box: fill-box; transform-origin: 50% 0%; transform: scaleY(0); transition: transform .35s var(--spring); }
.goat .g-pupil { transition: transform .35s var(--spring); }
.goat .m { opacity: 0; transition: opacity .15s; }
.goat.mood-idle .m-smile, .goat.mood-happy .m-smile, .goat.mood-think .m-smirk,
.goat.mood-sneaky .m-smirk, .goat.mood-shock .m-o, .goat.mood-sad .m-sad { opacity: 1; }
.goat.mood-sneaky .g-lids { transform: scaleY(1); }
.goat.mood-sneaky .g-pupil { animation: lookAround 2.6s ease-in-out infinite; }
.goat.mood-think .g-pupil { transform: translate(3px, -4px); }
.goat.mood-think .g-head { animation: thinkHead 3s ease-in-out infinite; }
.goat.mood-shock .g-eye { animation: none; transform: scale(1.22); }
.goat.mood-shock .g-pupil { transform: scale(.7); transform-box: fill-box; transform-origin: center; }
.goat.mood-shock .g-head { animation: shockHead .5s ease-in-out infinite; }
.goat.mood-sad .g-head { animation: sadHead 3s ease-in-out infinite; }
.goat.mood-sad .g-pupil { transform: translateY(4px); }
.goat.mood-sad .g-ear-l { animation: none; transform: rotate(-30deg); }
.goat.mood-sad .g-ear-r { animation: none; transform: rotate(30deg); }
.goat.mood-happy { animation: happyHop .55s ease-in-out infinite; }
.goat.mood-happy .g-eye { animation: none; }
@keyframes headBob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-2px); } }
@keyframes thinkHead { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(-4deg) translateY(-2px); } }
@keyframes shockHead { 0%, 100% { transform: translateY(-4px) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
@keyframes sadHead { 0%, 100% { transform: rotate(6deg) translateY(6px); } 50% { transform: rotate(4deg) translateY(8px); } }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 1.03); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
@keyframes earL { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg); } }
@keyframes earR { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(8deg); } }
@keyframes lookAround { 0%, 100% { transform: translateX(-4px); } 45%, 55% { transform: translateX(4px); } }
@keyframes happyHop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }


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

/* ---------- SEO landing pages ---------- */
.narrow { max-width: 780px; }
.h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.1; }
.h3 { font-size: 1.3rem; line-height: 1.15; }
.hero-sm .wrap { padding-top: 34px; padding-bottom: 44px; }
.hero-sm h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.hero-sm .herd { min-height: 200px; }
.hero .crumbs { margin-bottom: 4px; }
.prose h2 { font-size: 1.7rem; line-height: 1.2; margin: 30px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 1.1rem; font-weight: 500; margin-top: 10px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose a, .faq a { font-weight: 700; }
.faq { background: #fff; border: 3px solid var(--ink); border-radius: 18px; margin-top: 12px; box-shadow: 0 4px 0 var(--ink); }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 800; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; transition: transform .25s var(--spring); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 18px 16px; font-weight: 500; font-size: 1.05rem; }

/* DESK promo slot (card styles come from play/js/desk-ad.js) */
.desk-slot { padding-top: 28px; padding-bottom: 28px; }
.desk-slot:empty { display: none; }
.desk-slot .dk { max-width: 760px; margin: 0 auto; }
