/* ============================================
   BASE.CSS — Dark Luxury Foundation
   Maja Nikolić Digital Platform
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Great+Vibes&family=Raleway:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400&display=swap');

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-light);
  color: var(--color-white);
  background-color: var(--color-dark);
  line-height: var(--leading-normal);
  overflow-x: hidden;
}

/* ── Selection ── */
::selection {
  background-color: var(--color-gold);
  color: var(--color-dark);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-dark); }
::-webkit-scrollbar-thumb { background: var(--color-white-15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-white-30); }

/* ── Focus ── */
:focus-visible {
  outline: 1px solid var(--color-gold);
  outline-offset: 2px;
}

/* ── Links ── */
a { transition: color var(--transition), opacity var(--transition); }

/* ── Headings ── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-white);
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

/* ── Paragraph ── */
p {
  color: var(--color-white-70);
  line-height: var(--leading-relaxed);
}

/* ── Blockquote ── */
blockquote {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-white-70);
  border-left: 2px solid var(--color-gold);
  padding-left: var(--space-xl);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container--narrow { max-width: var(--container-narrow); }
.container--full { max-width: 100%; padding: 0; }

/* ── Section ── */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section--sm { padding: var(--section-pad-sm) 0; }

/* ── Page transition ── */
.page-wrapper {
  opacity: 1;
  transition: opacity 0.5s var(--ease-out);
}

body.is-loading .page-wrapper { opacity: 0; }
body.is-loading { overflow: hidden; }

/*
 * LANGUAGE-CONDITIONAL BLOCKS (Phase F)
 * -------------------------------------
 * Shows an element only while the document is in one language:
 *
 *     <div data-lang-only="en"> ... </div>
 *
 * This is NOT a second language system. It is driven by the SAME
 * document.documentElement.lang that assets/js/translations.js already
 * maintains, so it follows the one language decision like everything else.
 * It exists because data-i18n swaps TEXT and cannot make a block appear or
 * disappear - which is what the legal pages need, since their Serbian text
 * is the legally binding original and only English readers need to be told
 * so.
 *
 * Written as "hide when it does not match" rather than "show when it does",
 * so a matching element keeps its natural display value instead of being
 * forced to block.
 */
html:not([lang="en"]) [data-lang-only="en"] { display: none; }
html:not([lang="sr"]) [data-lang-only="sr"] { display: none; }

/*
 * PRELOADER FAILSAFE, LAYER 2 (audit finding C-8)
 * -----------------------------------------------
 * assets/js/main.js now guarantees that body.is-loading is removed even if
 * the preloader's transitionend never fires. This rule covers the one case
 * JavaScript cannot: main.js not running at all, because it failed to load
 * or threw before initApp().
 *
 * A zero-duration animation with an 8s delay and animation-fill-mode:
 * forwards does nothing at all for eight seconds, then snaps the content
 * back to visible. On a normal page load body.is-loading is gone in well
 * under two seconds, which removes this rule entirely - so it never delays,
 * animates or affects anything a visitor can perceive.
 */
body.is-loading .page-wrapper {
  animation: mnLoadingFailsafe 0s linear 8s forwards;
}
@keyframes mnLoadingFailsafe { to { opacity: 1; } }
