/* ================================================================
   platoshin. — DARK cinematic theme (grid homepage)
   Warm near-black paper, bone foreground, signal red.
   Rubik only. Pairs with site.js.
   ================================================================ */

:root {
  --bg: #0D0D0D;          /* neutral deep */
  --bg-2: #161616;        /* card well */
  --panel: #1A1813;
  --ink: #F4EFE6;         /* bone (foreground) */
  --ink-soft: #C9C2B5;
  --fg-dim: #8A8378;
  --line: #2A2722;
  --line-soft: #211E19;
  --red: #E8332B;         /* signal — overridable accent */
  --red-deep: #C2261F;

  --pad-x: 56px;
  --pad-x-mob: 20px;
  --easing: cubic-bezier(.2,.7,.1,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
  letter-spacing: -0.005em;
  transition: background-color .6s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img, video { display: block; max-width: 100%; }

.mono { font-family: 'Rubik', sans-serif; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }

/* film grain */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/></svg>");
  opacity: 0.06; mix-blend-mode: overlay;
}

/* ---------- LOADER ---------- */
.loader { position: fixed; inset: 0; background: var(--bg); z-index: 200; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 26px; }
.loader-mark { width: 84px; height: 84px; }
.loader-mark .mark-clip { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--easing); }
.loader-pct { font-family: 'Rubik', sans-serif; color: var(--ink); font-feature-settings: "tnum"; }
.loader-pct b { color: var(--red); font-weight: 800; }

/* ---------- DUAL-RING CURSOR ---------- */
.cursor { position: fixed; top: 0; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); pointer-events: none; z-index: 100; transform: translate(-50%, -50%); transition: width .4s var(--easing), height .4s var(--easing), background-color .4s ease, opacity .3s ease; }
.cursor.hide { opacity: 0; }
.cursor.is-hover { width: 0; height: 0; background: var(--red); }
.cursor-ring { position: fixed; top: 0; left: 0; width: 30px; height: 30px; border: 1px solid rgba(244,239,230,0.6); border-radius: 50%; pointer-events: none; z-index: 99; transform: translate(-50%, -50%); transition: width .5s var(--easing), height .5s var(--easing), opacity .35s ease, background-color .35s ease, border-color .35s ease; opacity: .4; }
.cursor-ring.is-hover { width: 52px; height: 52px; opacity: 1; border-color: var(--red); }
.cursor-ring.is-view { width: 52px; height: 52px; opacity: 1; background: transparent; border-color: var(--red); }

/* ---------- NAV ---------- */
nav.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 22px var(--pad-x); display: flex; justify-content: space-between; align-items: center; transition: background-color .4s ease, padding .4s ease, border-color .4s ease; border-bottom: 1px solid transparent; }
nav.site-nav.scrolled { background: rgb(from var(--bg) r g b / 0.82); backdrop-filter: blur(16px); padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-word { font-family: 'Rubik', sans-serif; font-weight: 800; letter-spacing: -0.04em; font-size: 22px; color: var(--ink); display: inline-flex; align-items: baseline; }
.brand-word .dot { color: var(--red); }
nav.site-nav ul { display: flex; gap: 28px; list-style: none; align-items: center; }
nav.site-nav ul a { display: inline-flex; gap: 8px; align-items: baseline; padding: 8px 2px; font-size: 14px; font-weight: 500; color: var(--ink); transition: color .35s ease; position: relative; }
nav.site-nav ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--easing); }
nav.site-nav ul a:hover { color: var(--ink); }
nav.site-nav ul a:hover::after { transform: scaleX(1); }
nav.site-nav ul a.is-current { color: var(--ink); }
nav.site-nav ul a.is-current::after { transform: scaleX(1); }

/* ---------- LANGUAGE SWITCH (underline, matches nav) ---------- */
.lang-li { margin-left: 4px; }
.lang-switch { display: inline-flex; align-items: center; gap: 10px; }
.lang-opt {
  position: relative; background: none; border: none; cursor: none; outline: none;
  font-family: 'Rubik', system-ui, sans-serif; font-size: 14px; letter-spacing: -0.005em;
  font-weight: 500; color: var(--ink); text-transform: lowercase;
  padding: 8px 2px; transition: color .35s ease; will-change: transform;
}
.lang-opt::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--easing);
}
.lang-opt:hover { color: var(--ink); }
.lang-opt:hover::after { transform: scaleX(1); }
.lang-opt.is-active { color: var(--ink); }
.lang-opt.is-active::after { transform: scaleX(1); }

/* i18n fallback fade — only when GSAP isn't driving the swap (.lang-fade path) */
body.lang-fade [data-i18n], body.lang-fade [data-i18n-html] { opacity: 0; transition: opacity .2s ease; }

/* ---------- BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: background-color .4s ease, color .4s ease, border-color .4s ease; will-change: transform; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--ink); color: var(--bg); }
.btn .arrow { display: inline-flex; align-items: center; transition: transform .4s var(--easing); }
.btn .arrow svg { width: 18px; height: 18px; display: block; }
.btn:hover .arrow { transform: translateX(6px); }

/* ---------- FOOTER (slim) ---------- */
footer.site-footer { padding: 70px var(--pad-x) 34px; border-top: 1px solid var(--line); margin-top: 60px; }
.footer-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.footer-row .brand-word { font-size: 26px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--ink); font-size: 14px; display: inline-flex; gap: 6px; align-items: baseline; transition: color .3s ease; position: relative; padding-bottom: 3px; }
.footer-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--easing); }
.footer-links a:hover { color: var(--ink); }
.footer-links a:hover::after { transform: scaleX(1); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; margin-top: 30px; border-top: 1px solid var(--line-soft); color: var(--fg-dim); flex-wrap: wrap; gap: 14px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
  :root { --pad-x: var(--pad-x-mob); }
  nav.site-nav { padding: 13px var(--pad-x-mob); }
  nav.site-nav ul { gap: 12px; }
  nav.site-nav ul a { padding: 6px 2px; font-size: 12px; }
  .footer-row { align-items: flex-start; }
}

/* ---------- TOUCH / SMALL SCREENS ---------- */
@media (max-width: 640px) {
  nav.site-nav li.nav-social { display: none; }
  nav.site-nav ul { gap: 14px; }
  .brand-word { font-size: 20px; }
}
@media (max-width: 480px) {
  nav.site-nav ul { gap: 10px; }
  nav.site-nav ul a { font-size: 12px; }
  .lang-opt { font-size: 12px; }
  .brand-word { font-size: 18px; }
}
/* notch / home-indicator safe areas */
nav.site-nav { padding-left: max(var(--pad-x), env(safe-area-inset-left)); padding-right: max(var(--pad-x), env(safe-area-inset-right)); }
footer.site-footer { padding-bottom: max(34px, env(safe-area-inset-bottom)); }
