/* ==========================================================================
   MOTRIX — Base: reset, element defaults, layout primitives, utilities
   Mobile-first. Every wider layout is added with min-width media queries.
   ========================================================================== */

/* ------------------------------------------------------------------ RESET */
*,
*::before,
*::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text-soft);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;               /* belt-and-braces against h-scroll */
}

/* Locks scroll while the mobile menu overlay or a modal is open. */
body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--c-text);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

img, svg, video, iframe {
  display: block;
  max-width: 100%;
}

img { height: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

/* ------------------------------------------------------------ FOCUS STATE */
:focus-visible {
  outline: 3px solid var(--c-lime);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Never remove focus rings; only normalise the mouse-click case. */
:focus:not(:focus-visible) { outline: none; }

/* Keyboard-only skip link. */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: calc(var(--z-header) + 10);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-lime);
  color: var(--c-ink);
  font-weight: 700;
  border-radius: var(--r-pill);
  transition: top var(--t-base);
}

.skip-link:focus { top: var(--sp-4); }

/* ---------------------------------------------------------------- LAYOUT */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }

.section {
  position: relative;
  padding-block: var(--sp-section);
}

.section--tight { padding-block: clamp(0.5rem, 5vw, 1rem); }

/* Alternating background bands. */
.section--raised { background: var(--c-bg-raised); }
.section--deep { background: var(--c-bg-deep); }

/* Soft purple glow behind hero-ish sections. */
.section--glow::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 70%;
  background: var(--g-glow);
  pointer-events: none;
  z-index: 0;
}

.section--glow > * { position: relative; z-index: 1; }

/* Vertical stack helper — the layout workhorse on mobile. */
.stack { display: flex; flex-direction: column; }
.stack--2 { gap: var(--sp-2); }
.stack--3 { gap: var(--sp-3); }
.stack--4 { gap: var(--sp-4); }
.stack--5 { gap: var(--sp-5); }
.stack--6 { gap: var(--sp-6); }
.stack--7 { gap: var(--sp-7); }

/* -------------------------------------------------------------- TYPE ROLES */

/* Uppercase monospace micro-label — "EXPERIENȚE MOTRIX", "București · Zona Unirii" */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-text-soft);
  margin: 0;
}

.eyebrow--plain { text-transform: none; letter-spacing: 0.08em; }

/* Two-tone headline: white first clause, lime second clause. */
.headline { font-size: var(--fs-display-lg); }
.headline--xl { font-size: var(--fs-display-xl); }
.headline--md { font-size: var(--fs-display-md); }
.headline--sm { font-size: var(--fs-display-sm); }

.headline .accent,
.accent { color: var(--c-lime); }

.lead {
  font-size: var(--fs-lead);
  color: var(--c-text-soft);
  line-height: 1.5;
}

.fine {
  font-size: var(--fs-fine);
  color: var(--c-text-mute);
}

.text-soft { color: var(--c-text-soft); }
.text-white { color: var(--c-text); }

/* Inline text link with the lime underline treatment. */
.link-underline {
  color: var(--c-lime);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

@media (hover: hover) {
  .link-underline:hover { color: var(--c-lime-bright); }
}

/* --------------------------------------------------------------- UTILITY */
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: 46ch; }
.measure-wide { max-width: 58ch; }
.center.measure,
.center.measure-wide { margin-inline: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Hide once the desktop layout takes over. Left at its natural display
   value below the breakpoint so flex/grid children are not flattened. */
@media (min-width: 1120px) {
  .hide-desktop { display: none !important; }
}

/* The mirror: content that only exists in the desktop layout. */
.hide-mobile { display: none; }

@media (min-width: 1120px) {
  .hide-mobile { display: block; }
}

/* Button + link pair: stacked and full-width on mobile, inline from 640px.
   This is why buttons look edge-to-edge on a phone, as in the screenshots. */
.cta-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-3);
}

@media (min-width: 640px) {
  .cta-row {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-5);
  }
  .cta-row--center { justify-content: center; }
}

/* ------------------------------------------------------- SCROLL REVEAL */
/* [data-reveal] elements are VISIBLE BY DEFAULT. This matters because the
   reveal behavior lives in assets/js/animations.js, which main.js loads
   lazily after the window `load` event — so for a real stretch of time
   after first paint, no reveal script has run yet. Defaulting to hidden
   (opacity:0 until JS says otherwise) would leave content invisible during
   that window on anything but a very fast connection.

   Instead, animations.js opts individual OFF-SCREEN elements into the
   hidden pre-animation state by adding .reveal-pending, then removes it
   (revealing, via the transition below) once they scroll into view.
   Elements already on screen when the script loads are left alone entirely
   — no flash, no animation, nothing to undo. See assets/js/animations.js. */
[data-reveal] {
  transition: opacity var(--t-slow), transform var(--t-slow);
}

[data-reveal].reveal-pending {
  opacity: 0;
  transform: translateY(24px);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal].reveal-pending { opacity: 1; transform: none; }
}
