/* ================= Themes: dark (default) + light "rice paper" ================= */
:root { --ink-rgb: 246,239,228; --hl-rgb: 255,240,220; --glass-rgb: 16,12,10; --bg-deep: #070605; color-scheme: dark; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6eee1; --bg-2: #efe3d0; --bg-3: #fffaf2; --bg-deep: #ecdfca;
  --ink: #1d1310; --ink-rgb: 29,19,16; --muted: #786656;
  --line: rgba(80,40,10,.1); --line-2: rgba(80,40,10,.2);
  --hl-rgb: 120,60,20; --glass-rgb: 255,250,242;
  --gold: #a26d18; --gold-2: #8a5508; --gold-3: #6f4510;
  --gold-grad: linear-gradient(120deg, #b67a14 0%, #8a5508 40%, #c8202f 75%, #a26d18 100%);
}
:root[data-theme="light"] body { background: var(--bg); }
:root[data-theme="light"] .grain { opacity: .07; mix-blend-mode: multiply; }
:root[data-theme="light"] .hero__clouds { opacity: .12; }
:root[data-theme="light"] .hero__glow { background: radial-gradient(700px 520px at 74% 42%, rgba(200,32,47,.14), transparent 70%), radial-gradient(500px 380px at 76% 70%, rgba(224,180,94,.22), transparent 70%); }
:root[data-theme="light"] .hero__bgword { -webkit-text-stroke-color: rgba(162,109,24,.2); }
:root[data-theme="light"] .nav.is-solid { box-shadow: 0 10px 30px -18px rgba(80,40,10,.4); }
:root[data-theme="light"] .chip, :root[data-theme="light"] .visit__card, :root[data-theme="light"] .faq__item, :root[data-theme="light"] .rv, :root[data-theme="light"] .promise__item { box-shadow: 0 20px 40px -26px rgba(80,40,10,.35); }
:root[data-theme="light"] .visit__map iframe { filter: none; }
:root[data-theme="light"] .foot { background: linear-gradient(180deg, var(--bg), var(--bg-deep)); }
:root[data-theme="light"] .foot__word { background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(200,32,47,.9), rgba(162,109,24,.5) 35%, transparent 65%), linear-gradient(180deg, rgba(29,19,16,.14), rgba(29,19,16,0) 85%); }
:root[data-theme="light"] .big-num { background: linear-gradient(120deg, #c8202f, #a26d18); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="light"] .faq__char, :root[data-theme="light"] .promise__num { color: rgba(200,32,47,.18); }
:root[data-theme="light"] .mcat__cn { text-shadow: none; }
:root[data-theme="light"] .cats.stuck { background: linear-gradient(rgba(246,238,225,.95), rgba(246,238,225,.88)); }
:root[data-theme="light"] .busy__bars i::after { background: #1d1310; color: #fff; }
:root[data-theme="light"] .cursor { background: var(--red-2); box-shadow: 0 0 10px rgba(226,58,58,.6); }
:root[data-theme="light"] .cursor-ring { border-color: rgba(200,32,47,.5); }

/* parts that sit on photos or lacquer stay dark in both themes */
:root[data-theme="light"] :is(.fav, .hero__arch, .chip--c, .cta, .story__img, .g-item, .lb, .map-load, .loader, .menu-panel, .modal, .marquee, .about__frame, .toast) {
  --ink: #f6efe4; --ink-rgb: 246,239,228; --muted: #a3988b; --hl-rgb: 255,240,220; --glass-rgb: 16,12,10;
  --line: rgba(255,240,220,.08); --line-2: rgba(255,240,220,.15);
  --gold: #e0b45e; --gold-2: #f6d98e; --gold-grad: linear-gradient(120deg, #fbe6ad 0%, #e0b45e 35%, #a77c2f 62%, #f6d98e 100%);
  color: var(--ink);
}
:root[data-theme="light"] .fav { background: #1a1411; }
:root[data-theme="light"] .marquee span:nth-of-type(odd) { color: #f6efe4; }
:root[data-theme="light"] .menu-open .burger span { background: #f6efe4; }

/* ---------- theme switch (yin-yang style) ---------- */
.theme-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; flex: none;
  transition: border-color .3s, transform .6s var(--ease), background .3s; }
.theme-btn:hover { border-color: var(--gold); transform: rotate(180deg); background: rgba(var(--hl-rgb), .06); }
.theme-btn svg { position: absolute; width: 18px; height: 18px; transition: transform .6s var(--ease), opacity .4s; }
.theme-btn .sun { transform: translateY(30px) rotate(-90deg); opacity: 0; color: var(--gold); }
.theme-btn .moon { color: var(--gold-2); }
:root[data-theme="light"] .theme-btn .sun { transform: none; opacity: 1; }
:root[data-theme="light"] .theme-btn .moon { transform: translateY(-30px) rotate(90deg); opacity: 0; }
/* circular reveal when switching (View Transitions where supported) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-in .8s cubic-bezier(.65,0,.35,1); }
@keyframes theme-in { from { clip-path: circle(0 at var(--tx, 50%) var(--ty, 50%)); } to { clip-path: circle(150% at var(--tx, 50%) var(--ty, 50%)); } }

/* ---------- Grub24 platform block in the footer ---------- */
.grub { margin-top: 30px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: rgba(var(--hl-rgb), .02); }
.grub > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-size: 14px; color: var(--muted); transition: color .3s, background .3s; }
.grub > summary::-webkit-details-marker { display: none; }
.grub > summary:hover { color: var(--ink); background: rgba(var(--hl-rgb), .03); }
.grub > summary b { color: var(--ink); font-weight: 600; }
.grub > summary i { margin-left: auto; font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); transition: transform .5s var(--ease); }
.grub[open] > summary i { transform: rotate(45deg); }
.grub__in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; padding: 6px 20px 22px; font-size: 14px; animation: grub-in .6s var(--ease); }
@keyframes grub-in { from { opacity: 0; transform: translateY(-8px); } }
.grub__in h5 { font-family: var(--display); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; font-weight: 600; }
.grub__in p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.grub__in ul { list-style: none; display: grid; gap: 6px; }
.grub__in a { color: rgba(var(--ink-rgb), .8); transition: color .3s; } .grub__in a:hover { color: var(--gold-2); }
.grub__soc { display: flex; gap: 8px; margin-top: 14px; }
.grub__soc a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); transition: border-color .3s, transform .5s var(--ease), background .3s; }
.grub__soc a:hover { border-color: var(--gold); transform: translateY(-3px) rotate(-8deg); background: rgba(var(--hl-rgb), .06); }
.grub__soc svg { width: 16px; height: 16px; }
.grub__copy { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .grub__in { grid-template-columns: 1fr 1fr; } .grub__in > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 600px) { .theme-btn { width: 38px; height: 38px; } }

@media (max-width: 420px) { .nav__right > .btn--sm { display: none; } }
