/* GUCHHA website: one stylesheet, no external fonts or requests. Warm courtyard palette, light and dark. */
:root {
  --bg: #fff8ee;
  --bg-2: #fcefdc;
  --surface: #ffffff;
  --text: #2a1b12;
  --muted: #6b5446;
  --line: #ecdcc6;
  --clay: #b94a24;
  --clay-2: #d9693c;
  --marigold: #f2a900;
  --leaf: #2f7d4f;
  --sky: #2b6cb0;
  --earth-1: #c99a6b;
  --earth-2: #a8784d;
  --hole: #3b2416;
  --shadow: 0 10px 30px rgba(74, 40, 18, 0.12);
  --radius: 18px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110d;
    --bg-2: #1f1712;
    --surface: #241a14;
    --text: #f6ebdd;
    --muted: #c8b3a1;
    --line: #3a2b21;
    --clay: #e07650;
    --clay-2: #f08a62;
    --marigold: #ffc233;
    --leaf: #5bb784;
    --sky: #7fb3e6;
    --earth-1: #8a6444;
    --earth-2: #6f4e33;
    --hole: #0f0906;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id], h2[id] { scroll-margin-top: 84px; }   /* anchors are not hidden under the sticky header */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--clay); text-underline-offset: 3px; }
a:hover { color: var(--clay-2); }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 6px; }
[lang="ne"] { font-family: "Noto Sans Devanagari", "Mukta", var(--font); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 16px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: 0.08em; }
.brand svg { width: 34px; height: 34px; }
.brand small { font-weight: 600; letter-spacing: 0; color: var(--muted); font-size: 0.95rem; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg-2); color: var(--clay); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 14px; min-height: 44px; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 760px) {
  .js .menu-btn { display: inline-block; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .js .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font-weight: 800; text-decoration: none; border: 2px solid transparent; font-size: 1rem; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--clay); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--clay) 35%, transparent); }
.btn-primary:hover { color: #fff; background: var(--clay-2); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { color: var(--clay); }
.btn[aria-disabled="true"] { opacity: 0.75; cursor: default; transform: none; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.03em; background: color-mix(in srgb, var(--marigold) 25%, transparent); color: var(--text); }

/* Hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 48px); background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--marigold) 28%, transparent), transparent 60%), radial-gradient(900px 400px at -10% 10%, color-mix(in srgb, var(--clay) 16%, transparent), transparent 60%); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1; margin: 12px 0 6px; letter-spacing: 0.06em; }
.hero .ne { font-size: clamp(1.4rem, 3.4vw, 2rem); color: var(--clay); font-weight: 700; margin: 0 0 16px; }
.hero p.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); margin: 0 0 24px; max-width: 36ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; padding: 0; list-style: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.facts li::before { content: "● "; color: var(--leaf); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero p.lead { max-width: none; } }

/* Courtyard scene (decorative) */
.scene { position: relative; aspect-ratio: 5 / 4; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: linear-gradient(180deg, #ffd9a0 0%, #ffc988 32%, var(--earth-1) 32.5%, var(--earth-2) 100%); }
@media (prefers-color-scheme: dark) { .scene { background: linear-gradient(180deg, #2b2340 0%, #463152 32%, var(--earth-1) 32.5%, var(--earth-2) 100%); } }
.scene .wall { position: absolute; left: 0; right: 0; top: 18%; height: 15%; background: repeating-linear-gradient(90deg, #b5633f 0 46px, #a6573a 46px 48px); opacity: .9; }
.scene .wall::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 14px, rgba(0,0,0,.12) 14px 15px); }
.scene .sun { position: absolute; width: 18%; aspect-ratio: 1; right: 10%; top: 3%; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff6c9, var(--marigold)); box-shadow: 0 0 60px color-mix(in srgb, var(--marigold) 70%, transparent); }
.scene .khopi { position: absolute; left: 62%; top: 58%; width: 20%; aspect-ratio: 2.2 / 1; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, var(--hole) 55%, color-mix(in srgb, var(--hole) 40%, var(--earth-2)) 75%, transparent 76%); }
.scene .speck { position: absolute; width: 6px; height: 4px; border-radius: 50%; background: rgba(60, 35, 18, .35); }
.marble { position: absolute; width: 9%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 6px 8px rgba(0,0,0,.28); }
.marble::after { content: ""; position: absolute; left: 20%; top: 14%; width: 32%; height: 26%; border-radius: 50%; background: rgba(255,255,255,.75); filter: blur(1px); }
.m1 { background: radial-gradient(circle at 35% 30%, #a8d8ff, #2b6cb0 55%, #163d66); }
/* The pose and the CSS roll loop belong to the hero scene only — the duel marble reuses .m1 for its colour. */
.scene .m1 { left: 16%; top: 70%; animation: roll1 5.5s ease-in-out infinite; }
.m2 { background: radial-gradient(circle at 35% 30%, #ffe08a, #f2a900 55%, #9a6a00); left: 34%; top: 50%; }
.m3 { background: radial-gradient(circle at 35% 30%, #b6f0c8, #2f7d4f 55%, #174a2c); left: 48%; top: 76%; }
.m4 { background: radial-gradient(circle at 35% 30%, #ffc2b0, #b94a24 55%, #6a2510); left: 80%; top: 74%; }
@keyframes roll1 {
  0%, 15% { transform: translate(0, 0) rotate(0); opacity: 1; }
  55% { transform: translate(500%, -92%) rotate(540deg); opacity: 1; }
  62% { transform: translate(572%, -106%) scale(.8) rotate(600deg); opacity: 1; }
  70% { transform: translate(572%, -106%) scale(.2) rotate(620deg); opacity: 0; }
  72% { transform: translate(0, 0) scale(1); opacity: 0; }
  85%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .scene .m1 { animation: none; } html { scroll-behavior: auto; } }
/* When GSAP runs the hero loop it takes over .m1; the CSS loop stays as the no-JS fallback. */
.js-motion .scene .m1 { animation: none; }

/* Sections */
section { padding: clamp(40px, 6vw, 80px) 0; }
section.alt { background: var(--bg-2); }
.section-head { max-width: 680px; margin: 0 auto 32px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; margin: 8px 0 10px; }
.kicker { color: var(--clay); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 10px 0 6px; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }
.icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--marigold) 22%, transparent); }
.icon svg { width: 26px; height: 26px; color: var(--clay); }

/* Online section: two marbles exchanging turns over a khopi (decorative; GSAP moves them, CSS holds the pose). */
.duel { position: relative; height: 132px; max-width: 560px; margin: 0 auto 26px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, var(--bg-2) 0%, var(--earth-1) 62%, var(--earth-2) 100%); }
.duel-label { position: absolute; top: 10px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: 0.95rem; color: var(--muted); }
.duel .marble { top: 58%; width: 11%; box-shadow: 0 5px 7px rgba(0,0,0,.28); }
.duel-a { left: 12%; }
.duel-b { left: 77%; }
.duel-khopi { position: absolute; left: 50%; top: 66%; width: 17%; aspect-ratio: 2.2 / 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, var(--hole) 55%, color-mix(in srgb, var(--hole) 40%, var(--earth-2)) 75%, transparent 76%); }

.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); padding: 0; list-style: none; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px 70px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--clay); color: #fff; font-weight: 800; }
.steps strong { display: block; margin-bottom: 4px; }

/* Mini game */
.play { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center; }
@media (max-width: 860px) { .play { grid-template-columns: 1fr; } }
.play-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 12px; box-shadow: var(--shadow); }
#flick { width: 100%; height: auto; border-radius: 16px; touch-action: none; cursor: grab; }
#flick:active { cursor: grabbing; }
.score { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.score span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: .95rem; }
.toast { min-height: 1.6em; font-weight: 800; color: var(--leaf); margin: 8px 4px 0; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--clay); font-weight: 800; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Text pages */
.page-hero { padding: clamp(32px, 5vw, 56px) 0 8px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 6px 0 8px; line-height: 1.1; }
.prose { max-width: 780px; }
.prose h2 { font-size: 1.4rem; margin: 2em 0 .5em; }
.prose h3 { font-size: 1.1rem; margin: 1.6em 0 .4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .35em 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0 8px; }
.toc ol { margin: 6px 0 0; padding-left: 1.2em; columns: 2 220px; }
.note { border-left: 4px solid var(--marigold); background: var(--surface); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 18px 0; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .97rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.contact-card { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }
.contact-card .email { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 800; word-break: break-all; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; margin-top: 24px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--clay); }
