/* ============================================================
   SHARED DESIGN SYSTEM  ·  base.css
   Used by every page. The color identity lives here in :root —
   updating these tokens re-themes the entire site.
   ============================================================ */

:root {
  --ink:        #0b0b0c;
  --ink-soft:   #141416;
  --cream:      #f3efe7;
  --cream-dim:  #b9b4a9;
  --muted:      #6c6a64;
  --line:       rgba(243, 239, 231, 0.13);
  --accent:     #d7ff3e;
  --accent-deep:#b6e000;
  /* rgba echo of --accent for glows; keep channels in sync with --accent */
  --accent-rgb: 215, 255, 62;

  /* Back-compat alias so existing rules keep working */
  --acid:       var(--accent);
  --acid-deep:  var(--accent-deep);

  /* One typeface everywhere — IBM Plex Sans (full Cyrillic support).
     The roles are kept as separate tokens so the weight/style hierarchy stays:
     display = bold, serif slot = italic accent, sans = body. */
  --ff-display: "IBM Plex Sans", sans-serif;
  --ff-serif:   "IBM Plex Sans", sans-serif;
  --ff-sans:    "IBM Plex Sans", sans-serif;

  --pad: clamp(1.25rem, 5vw, 6rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--ff-sans);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none;
}
@media (hover: none) { body { cursor: auto; } }

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
::selection { background: var(--accent); color: var(--ink); }

/* accent highlight (e.g. the dash in a headline) */
.hl { color: var(--accent); font-style: normal; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%;
  z-index: 3; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(8) infinite;
}
@keyframes grain {
  0%,100%{transform:translate(0,0)} 10%{transform:translate(-5%,-5%)}
  30%{transform:translate(3%,-8%)} 50%{transform:translate(-6%,4%)}
  70%{transform:translate(5%,6%)} 90%{transform:translate(-3%,2%)}
}

/* ---------- Shutter page transition ---------- */
.shutter {
  position: fixed; inset: 0; z-index: 600; display: flex;
  pointer-events: none; visibility: hidden;
}
.shutter__col {
  flex: 1 1 0; height: 100%; background: var(--ink);
  transform: scaleY(0); will-change: transform;
}
.shutter__col + .shutter__col { border-left: 1px solid rgba(var(--accent-rgb), 0.06); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--ink);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 2rem;
}
.preloader__inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.preloader__count {
  font-family: var(--ff-display); font-weight: 700;
  font-size: clamp(4rem, 16vw, 11rem); line-height: 0.85; letter-spacing: -0.04em;
  display: flex; align-items: flex-start;
}
.preloader__count i { font-size: 0.32em; font-style: normal; color: var(--accent); margin-top: 0.4em; }
.preloader__word { overflow: hidden; display: flex; gap: 0.5ch; font-family: var(--ff-serif); font-style: italic; font-size: clamp(1rem,3vw,1.6rem); color: var(--cream-dim); }
.preloader__word span { transform: translateY(110%); }
.preloader__bar { width: min(60vw, 420px); height: 2px; background: var(--line); overflow: hidden; }
.preloader__bar i { display: block; height: 100%; width: 0%; background: var(--accent); }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 900;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); pointer-events: none;
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  transition: width .35s var(--ease), height .35s var(--ease), background .35s var(--ease);
  mix-blend-mode: difference;
}
.cursor__label {
  font-family: var(--ff-sans); font-size: 0.62rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink);
  opacity: 0; transform: scale(0.6); transition: opacity .3s, transform .3s;
}
.cursor.is-hover { width: 56px; height: 56px; background: var(--cream); mix-blend-mode: normal; }
.cursor.is-view  { width: 96px; height: 96px; background: var(--accent); mix-blend-mode: normal; }
.cursor.is-text  { width: 4px; height: 34px; border-radius: 4px; mix-blend-mode: difference; }
.cursor.is-drag  { width: 110px; height: 110px; background: var(--accent); mix-blend-mode: normal; }
.cursor.is-view .cursor__label, .cursor.is-hover .cursor__label, .cursor.is-drag .cursor__label { opacity: 1; transform: scale(1); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--pad);
  mix-blend-mode: difference;
}
.nav__brand { display: flex; align-items: center; gap: 0.7rem; }
.nav__mark {
  font-family: var(--ff-display); font-weight: 700; font-size: 1.05rem;
  border: 1.5px solid var(--cream); border-radius: 50%;
  width: 2.2rem; height: 2.2rem; display: grid; place-items: center; letter-spacing: -0.03em;
}
.nav__name { font-size: 0.78rem; letter-spacing: 0.03em; font-weight: 500; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a { font-size: 0.82rem; font-weight: 500; position: relative; }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__links a.is-active:not(.nav__cta)::after { transform: scaleX(1); }
.nav__cta { border: 1px solid var(--cream); border-radius: 100px; padding: 0.5rem 1.1rem; }
.nav__burger { display: none; background: none; border: 0; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
.nav__burger span { width: 26px; height: 2px; background: var(--cream); display: block; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--accent); --fg: var(--ink);
  position: relative; display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 1rem 1.7rem; border-radius: 100px;
  font-weight: 600; font-size: 0.92rem; letter-spacing: 0.01em;
  overflow: hidden; isolation: isolate; will-change: transform;
}
.btn__text, .btn__icon { position: relative; z-index: 2; transition: color .4s var(--ease); }
.btn__icon { transition: transform .4s var(--ease); }
.btn--primary { background: var(--bg); color: var(--fg); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: 1; background: var(--cream);
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn--primary:hover::before { transform: translateY(0); }
.btn--primary:hover .btn__icon { transform: translate(3px, 3px); }
.btn--ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); }
.btn--ghost::before {
  content: ""; position: absolute; inset: 0; z-index: 1; background: var(--accent);
  transform: scale(0); border-radius: 100px; transition: transform .5s var(--ease);
}
.btn--ghost:hover { color: var(--ink); border-color: var(--accent); }
.btn--ghost:hover::before { transform: scale(1.05); }
.btn--ghost:hover .btn__icon { transform: translateX(5px); }

/* ---------- Section heads (shared) ---------- */
.sec-head { padding: 0 var(--pad); margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.sec-head__num {
  display: inline-block; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.sec-head__title {
  font-family: var(--ff-display); font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 7rem); line-height: 0.92; letter-spacing: -0.03em;
}
.sec-head__title em, .italic-accent {
  font-family: var(--ff-serif); font-style: italic; font-weight: 400; color: var(--accent);
}

/* ---------- Kinetic title lines (shared) ---------- */
.kinetic .line { display: flex; flex-wrap: wrap; gap: 0 0.28em; overflow: hidden; }
.kinetic .w { display: inline-block; will-change: transform; }
.kinetic .italic { font-family: var(--ff-serif); font-style: italic; font-weight: 400; color: var(--accent); }

/* ---------- Marquee (reusable) ---------- */
.marquee-sec {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 2.6rem) 0; display: flex; flex-direction: column; gap: 0.5rem;
}
.marquee { overflow: hidden; white-space: nowrap; }
.marquee__track { display: inline-flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.6rem); padding-right: clamp(0.8rem,2vw,1.6rem); will-change: transform; }
.marquee[data-dir="left"]  .marquee__track { animation: scroll-l 38s linear infinite; }
.marquee[data-dir="right"] .marquee__track { animation: scroll-r 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* Each client is a small 4:3 card holding an SVG logo (swap the inner <svg>). */
.marquee__card {
  flex: 0 0 auto; aspect-ratio: 4 / 3; width: clamp(140px, 17vw, 200px);
  display: grid; place-items: center; padding: clamp(0.8rem, 1.6vw, 1.4rem);
  border: 1px solid var(--line); border-radius: 10px; background: var(--ink-soft);
  transition: border-color .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}
.marquee__card:hover { border-color: var(--accent); background: #101012; transform: translateY(-4px); }
.marquee__logo { width: 100%; height: 100%; object-fit: contain; opacity: 0.5; transition: opacity .35s; }
.marquee__card:hover .marquee__logo { opacity: 1; }
.marquee__logo text {
  font-family: var(--ff-display); font-weight: 700; font-size: 26px;
  letter-spacing: -0.02em; fill: var(--cream); transition: fill .35s;
}
.marquee__card:hover .marquee__logo text { fill: var(--accent); }
@keyframes scroll-l { to { transform: translateX(-50%); } }
@keyframes scroll-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---------- Form fields (shared) ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 3vw, 2.4rem) clamp(1.5rem, 4vw, 3rem); align-items: end; }
.field { position: relative; }
.field--full { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  color: var(--cream); font-family: var(--ff-sans); font-size: clamp(1rem, 1.6vw, 1.3rem);
  padding: 0.8rem 0; outline: none; transition: border-color .4s; resize: none;
}
.field select { cursor: none; }
.field select option { background: var(--ink-soft); color: var(--cream); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field label {
  position: absolute; left: 0; top: 0.8rem; pointer-events: none;
  color: var(--muted); font-size: clamp(1rem,1.6vw,1.3rem); transition: all .35s var(--ease);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select:focus + label, .field select:valid + label {
  top: -0.9rem; font-size: 0.72rem; color: var(--accent); letter-spacing: 0.05em;
}
.form .btn { grid-column: 1 / -1; justify-self: start; margin-top: 0.5rem; }
.form__status { grid-column: 1/-1; font-family: var(--ff-serif); font-style: italic; color: var(--accent); min-height: 1.4em; }

/* ---------- Footer (shared) ---------- */
.footer { padding: clamp(3rem,7vw,6rem) var(--pad) 2rem; border-top: 1px solid var(--line); }
.footer__big {
  position: relative; display: inline-grid; isolation: isolate;
  font-family: var(--ff-display); font-weight: 700; line-height: 0.92; letter-spacing: -0.03em;
  font-size: clamp(1.7rem, 8vw, 6.5rem); margin-bottom: 2rem; color: var(--accent);
}
/* glitch: solid accent base + two brand-color ghost layers (no red/blue) */
.footer__big .glitch__layer { grid-area: 1 / 1; }
.footer__big .glitch__layer--base { color: var(--accent); }
.footer__big .glitch__layer--a, .footer__big .glitch__layer--b {
  pointer-events: none; mix-blend-mode: screen; will-change: transform, clip-path, opacity;
}
.footer__big .glitch__layer--a { color: var(--cream); }
.footer__big .glitch__layer--b { color: var(--accent-deep); }
@media (prefers-reduced-motion: no-preference) {
  .footer__big.is-glitch .glitch__layer--a { animation: glitchA 5.5s infinite linear; }
  .footer__big.is-glitch .glitch__layer--b { animation: glitchB 5.5s infinite linear; }
}
@keyframes glitchA {
  0%, 100% { opacity: .22; transform: translate(-1.5px, 0); clip-path: inset(0 0 0 0); }
  47% { opacity: .22; transform: translate(1.5px, 0); }
  6%  { opacity: .9; transform: translate(-7px, -3px); clip-path: inset(12% 0 63% 0); }
  7%  { opacity: .9; transform: translate(6px, 2px);   clip-path: inset(58% 0 16% 0); }
  8%  { opacity: .22; transform: translate(-1.5px, 0); clip-path: inset(0 0 0 0); }
  62% { opacity: .9; transform: translate(5px, 2px);   clip-path: inset(70% 0 8% 0); }
  63% { opacity: .9; transform: translate(-6px, -2px); clip-path: inset(22% 0 52% 0); }
  64% { opacity: .22; transform: translate(1px, 0);    clip-path: inset(0 0 0 0); }
}
@keyframes glitchB {
  0%, 100% { opacity: .4; transform: translate(1.5px, 0); clip-path: inset(0 0 0 0); }
  47% { opacity: .4; transform: translate(-1.5px, 0); }
  6%  { opacity: .85; transform: translate(7px, 2px);   clip-path: inset(60% 0 12% 0); }
  7%  { opacity: .85; transform: translate(-5px, -2px); clip-path: inset(15% 0 60% 0); }
  8%  { opacity: .4; transform: translate(1.5px, 0);    clip-path: inset(0 0 0 0); }
  62% { opacity: .85; transform: translate(-6px, -1px); clip-path: inset(18% 0 58% 0); }
  63% { opacity: .85; transform: translate(6px, 2px);   clip-path: inset(66% 0 10% 0); }
  64% { opacity: .4; transform: translate(-1px, 0);     clip-path: inset(0 0 0 0); }
}
.footer__row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1.5rem; align-items: center; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.footer__mail { font-family: var(--ff-display); font-weight: 600; font-size: clamp(1.2rem, 3vw, 2rem); letter-spacing: -0.02em; }
.footer__mail:hover { color: var(--accent); }
.footer__social { display: flex; gap: 1.6rem; }
.footer__social a { font-size: 0.85rem; position: relative; }
.footer__social a:hover { color: var(--accent); }
.footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; padding-top: 1.5rem; font-size: 0.76rem; color: var(--muted); }

/* ---------- Reveal defaults ---------- */
.reveal-up, .reveal-img > *, .reveal-img { will-change: transform, opacity; }

/* ---------- Shared responsive ---------- */
@media (max-width: 720px) {
  .form { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee__track { animation: none !important; }
}

/* ============================================================
   SITE-WIDE MENU (fullscreen overlay)
   ============================================================ */

/* The overlay replaces the inline nav links + mobile burger everywhere. */
.nav__links, .nav__burger { display: none !important; }

.menu-toggle {
  background: none; border: 0; cursor: pointer; color: var(--cream);
  font-family: var(--ff-sans); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0;
}
.menu-toggle::after {
  content: ""; width: 22px; height: 9px; flex: 0 0 auto;
  border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transition: width .4s var(--ease);
}
.menu-toggle:hover::after { width: 28px; }
@media (hover: none) { .cursor { display: none; } }

/* Overlay shell */
.menu {
  position: fixed; inset: 0; z-index: 200; display: flex;
  visibility: hidden; opacity: 0;
}
.menu.is-open { pointer-events: auto; }
.menu__panel { position: relative; overflow: hidden; }

/* Left panel — big nav + contact/hours */
.menu__panel--main {
  flex: 1; background: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(5.5rem, 11vw, 9rem) clamp(1.5rem, 5vw, 5rem) clamp(2rem, 5vw, 3.5rem);
}
.menu__nav { display: flex; flex-direction: column; }
.menu__link { display: block; overflow: hidden; padding: 0.1rem 0; width: max-content; }
.menu__link span {
  display: block; font-family: var(--ff-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.8rem, 9vw, 7rem); line-height: 1.05; letter-spacing: -0.03em;
  color: var(--cream); transition: color .4s var(--ease), transform .55s var(--ease);
}
.menu__link:hover span { color: var(--accent); transform: translateX(1.4rem); }
.menu__link.is-active span { color: var(--accent); }
.menu__link.is-active::before {
  content: "→"; position: absolute; left: -1.6rem; font-family: var(--ff-serif); font-style: italic;
  color: var(--accent); font-size: 0.5em; opacity: 0; transition: opacity .4s;
}

.menu__foot {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: clamp(1.2rem, 2.5vw, 1.8rem);
}
.menu__contact {
  border: 1px solid var(--line); border-radius: 100px; padding: 0.7rem 1.5rem;
  font-weight: 500; font-size: 0.98rem; transition: background .4s var(--ease), color .4s var(--ease), border-color .4s;
}
.menu__contact:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.menu__hours { display: flex; align-items: center; gap: 0.75rem; font-size: clamp(1rem, 1.7vw, 1.45rem); font-weight: 500; }
.menu__hours b { font-weight: 500; }
.menu__dot {
  width: 12px; height: 12px; border-radius: 50%; background: #21d07a; flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(33, 208, 122, .5); animation: menu-pulse 2.2s infinite;
}
@keyframes menu-pulse {
  0% { box-shadow: 0 0 0 0 rgba(33,208,122,.5); }
  70% { box-shadow: 0 0 0 11px rgba(33,208,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(33,208,122,0); }
}

/* Right panel — close / language / brand / live env */
.menu__panel--side {
  width: clamp(260px, 26vw, 380px); background: #0e0e10; border-left: 1px solid var(--line);
  display: flex; flex-direction: column; padding: clamp(1.5rem, 3vw, 2.4rem);
}
.menu__close {
  align-self: flex-end; background: none; border: 0; cursor: pointer; color: var(--cream);
  font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; transition: color .3s;
}
.menu__close:hover { color: var(--accent); }
.menu__lang { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-top: clamp(1.5rem, 4vw, 2.8rem); }
.menu__lang a {
  color: var(--muted); font-family: var(--ff-sans); font-size: 0.84rem; letter-spacing: 0.03em; transition: color .3s;
}
.menu__lang a:hover { color: var(--cream); }
.menu__lang a.is-active { color: var(--accent); }

.menu__brand { margin-top: auto; display: flex; align-items: center; gap: 0.9rem; }
.menu__mark {
  font-family: var(--ff-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.03em;
  width: 2.8rem; height: 2.8rem; flex: 0 0 auto; display: grid; place-items: center;
  border: 1.5px solid var(--cream); border-radius: 50%;
}
.menu__brandtxt b { display: block; font-family: var(--ff-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.menu__brandtxt span { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream-dim); }

.menu__meta {
  margin-top: clamp(1.4rem, 3vw, 2rem); padding-top: 1.2rem; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.4rem;
}
.menu__loc { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-dim); }
.menu__env { font-family: var(--ff-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem; }
.menu__env i { color: var(--muted); font-style: normal; }
.menu__temp { font-family: var(--ff-display); font-weight: 700; font-size: 1.05rem; color: var(--accent); }

/* Menu responsive — stack panels */
@media (max-width: 820px) {
  .menu { flex-direction: column-reverse; overflow-y: auto; }
  .menu__panel--side { width: 100%; border-left: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
  .menu__close { order: 3; margin-left: auto; align-self: center; }
  .menu__lang { margin-top: 0; }
  .menu__brand { margin-top: 0; }
  .menu__meta { margin-top: 0; padding-top: 0; border-top: 0; width: 100%; flex-direction: row; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: baseline; }
  .menu__meta .menu__loc { flex-basis: 100%; }   /* location on its own line; date·time + temp share the next */
  .menu__panel--main { padding-top: clamp(2.5rem, 8vw, 4rem); }
}
