/* ============================================================
   MEMTEST INDUSTRIAL — Reset & Base
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
}

/* Hide i18n text while translations load (prevents flash of default language) */
html[data-i18n-loading="1"] [data-i18n],
html[data-i18n-loading="1"] [data-i18n-html] {
  color: transparent !important;
}
html[data-i18n-loading="1"] [data-i18n] *,
html[data-i18n-loading="1"] [data-i18n-html] * {
  color: transparent !important;
  transition: none !important;
}

body {
  background: var(--ink-base);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.005em;
  min-height: 100dvh;
  min-height: 100vh; /* fallback */
  overflow-x: hidden;
  position: relative;
}

/* atmospheric grain + grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--ink-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line-soft) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
}

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

main, header, footer, section { position: relative; z-index: 1; }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
img { -webkit-user-drag: none; user-select: none; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
ul, ol { list-style: none; }

::selection { background: var(--copper); color: var(--ink-void); }

/* focus ring */
:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink-base); }
::-webkit-scrollbar-thumb { background: var(--ink-line); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--copper-deep); }
