/* Layout concept: one continuous dark set — a lit stage at the top, then
   editorial type moving through darkness, with rare champagne highlights. */
:root {
  color-scheme: dark;
  --obsidian: #08090B;
  --carbon: #111318;
  --graphite: #1C1F25;
  --white: #F4F2ED;
  --silver: #A6A9B0;
  --silver-dim: #6F737B;
  --gold: #C7A66A;
  --gold-hi: #E5C58B;
  --ice: #AFC7D8;
  --line: rgba(244, 242, 237, 0.09);
  --line-strong: rgba(244, 242, 237, 0.18);

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", Arial, system-ui, sans-serif;

  --t-label: 0.72rem;
  --t-small: 0.875rem;
  --t-body: 1.0625rem;
  --t-lead: clamp(1.15rem, 1.4vw, 1.35rem);
  --t-h3: clamp(2rem, 3.4vw, 3.4rem);
  --t-h2: clamp(2.8rem, 6.2vw, 6.4rem);
  --t-display: clamp(3.4rem, 9.5vw, 10.5rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-pad: clamp(7rem, 16vh, 12rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--obsidian); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--white);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body.is-loading { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ol, ul { list-style: none; margin: 0; padding: 0; }
em { font-style: italic; }
::selection { background: var(--gold); color: var(--obsidian); }

:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 4px; }

[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 200;
  background: var(--white); color: var(--obsidian); padding: .7rem 1rem;
  font-size: var(--t-small); font-weight: 600;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 1rem); }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow--ice { color: var(--ice); }
.section-head { display: grid; gap: 1.4rem; margin-bottom: clamp(3.5rem, 8vh, 6rem); }
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-h2);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-title em, .worlds__title em, .manifesto__title em, .ai__title em { color: var(--gold-hi); }

.mask, .mline { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.mask > span, .mline > span { display: inline-block; will-change: transform; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 1.6rem;
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid rgba(199, 166, 106, 0.5);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  transition: color .5s var(--ease), border-color .5s var(--ease);
  will-change: transform;
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, var(--gold) 0%, var(--gold-hi) 55%, #b8955a 100%);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform .6s var(--ease);
  z-index: -1;
}
.btn:hover, .btn:focus-visible { color: var(--obsidian); border-color: var(--gold-hi); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn__arrow { display: inline-block; transition: transform .6s var(--ease); font-size: 1rem; letter-spacing: 0; }
.btn:hover .btn__arrow { transform: translateX(5px); }
.btn--line { padding: .85rem 1.25rem; border-color: var(--line-strong); }
.btn--gold { border-color: var(--gold); }
.btn--large { padding: 1.4rem 2.3rem; font-size: .78rem; }
.btn__text, .btn__arrow { position: relative; }

.link-cta {
  display: inline-flex; gap: .6rem; align-items: center;
  font-size: var(--t-label); font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--white);
  padding-bottom: .4rem;
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 1px no-repeat;
  transition: background-size .6s var(--ease);
}
.link-cta span { transition: transform .6s var(--ease); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 150;
  background: var(--obsidian);
  display: grid; place-items: center;
}
.preloader__inner { display: grid; justify-items: center; gap: 1.4rem; }
.preloader__mark { width: 74px; height: auto; opacity: .92; animation: markBreath 2.4s var(--ease-in-out) infinite; }
@keyframes markBreath { 50% { opacity: .55; } }
.preloader__label { font-size: .64rem; letter-spacing: .5em; text-transform: uppercase; color: var(--silver); margin-right: -.5em; }
.preloader__bar { width: 140px; height: 1px; background: var(--line); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; }
.preloader__count { font-size: .7rem; letter-spacing: .2em; color: var(--silver-dim); font-variant-numeric: tabular-nums; min-width: 3ch; text-align: center; }
.preloader.is-done { pointer-events: none; }

/* ---------- Cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
  .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 190; }
  .cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; will-change: transform; }
  .cursor__dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--white); }
  .cursor__ring {
    width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border: 1px solid rgba(244,242,237,.35);
    display: grid; place-items: center;
    transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background-color .5s var(--ease), border-color .5s var(--ease);
  }
  .cursor__label { font-size: .58rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--obsidian); opacity: 0; transition: opacity .3s; margin-right: -.22em; }
  .cursor.is-label .cursor__ring { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: rgba(229,197,139,.92); border-color: transparent; }
  .cursor.is-label .cursor__label { opacity: 1; transition-delay: .12s; }
  .cursor.is-label .cursor__dot { opacity: 0; }
  .cursor.is-link .cursor__ring { width: 52px; height: 52px; margin: -26px 0 0 -26px; border-color: rgba(229,197,139,.6); }
  .cursor.is-hidden { opacity: 0; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; left: 0; right: 0; top: 0; z-index: 60;
  display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem);
  padding: calc(env(safe-area-inset-top, 0px) + 1.7rem) var(--gutter) 1.7rem;
  border-bottom: 1px solid transparent;
  transition: padding .6s var(--ease), background-color .6s var(--ease), border-color .6s var(--ease), opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.site-header.is-hidden-intro { opacity: 0; transform: translateY(-8px); }
.site-header.is-scrolled {
  padding-top: calc(env(safe-area-inset-top, 0px) + .9rem);
  padding-bottom: .9rem;
  background: rgba(8, 9, 11, 0.75);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  border-bottom-color: var(--line);
}
.brand img { width: auto; height: 34px; transition: height .6s var(--ease); }
.site-header.is-scrolled .brand img { height: 28px; }
.nav { margin-left: auto; display: flex; gap: clamp(1.4rem, 2.6vw, 2.6rem); }
.nav a {
  position: relative;
  font-size: .7rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
  color: var(--silver);
  padding-block: .4rem;
  transition: color .4s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: .26em; bottom: 0; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .6s var(--ease);
}
.nav a:hover, .nav a.is-current { color: var(--white); }
.nav a:hover::after, .nav a.is-current::after { transform: scaleX(1); transform-origin: 0 50%; }
.header-cta { font-size: .66rem; }
.menu-toggle { display: none; margin-left: auto; font-size: .7rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; padding: .8rem 0 .8rem 1rem; }

.mobile-nav {
  position: fixed; inset: 0; z-index: 55;
  background: var(--obsidian);
  padding: calc(env(safe-area-inset-top, 0px) + 7rem) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 2.5rem);
  display: flex; flex-direction: column; gap: 2.5rem;
}
.mobile-nav nav { display: grid; gap: .3rem; }
.mobile-nav nav a { font-family: var(--serif); font-size: clamp(2.6rem, 11vw, 4rem); line-height: 1.1; }
.mobile-nav__reach { margin-top: auto; font-size: var(--t-label); letter-spacing: .26em; text-transform: uppercase; color: var(--silver); }

@media (max-width: 900px) {
  .nav, .header-cta { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
}

/* ---------- Language switcher (EN / ES / RO) ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: .15rem; }
.lang-switch button {
  position: relative; padding: .45rem .42rem; font-size: .64rem; font-weight: 600; letter-spacing: .2em;
  color: var(--silver-dim); transition: color .35s var(--ease), transform .35s var(--ease);
}
.lang-switch button + button::before {
  content: ""; position: absolute; left: -.1rem; top: 50%; width: 1px; height: .7em; transform: translateY(-50%);
  background: var(--line-strong);
}
.lang-switch button::after {
  content: ""; position: absolute; left: .42rem; right: calc(.42rem + .2em); bottom: .2rem; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform .45s var(--ease);
}
.lang-switch button:hover, .lang-switch button:focus-visible { color: var(--gold-hi); outline: none; }
.lang-switch button:hover { transform: translateY(-1px); }
.lang-switch button:focus-visible::after, .lang-switch button.is-current::after { transform: scaleX(1); }
.lang-switch button.is-current { color: var(--gold-hi); }
.lang-switch--header { margin-left: -.6rem; }
@media (max-width: 1180px) {
  .nav { gap: clamp(1rem, 1.6vw, 1.6rem); }
  .nav a { letter-spacing: .2em; }
}
@media (max-width: 900px) { .lang-switch--header { display: none; } }
.mobile-nav__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.mobile-nav__foot .mobile-nav__reach { margin-top: 0; }
.lang-switch--mobile button { font-size: .78rem; padding: .7rem .6rem; }
.lang-switch--mobile button::after { left: .6rem; right: calc(.6rem + .2em); }

/* metallic headings clip their gradient to their own box: leave room under the
   baseline so descenders (g, j, p, q, y) are never cut, without moving the layout */
.worlds__title, .section-title, .philosophy__title, .ai__title, .contact__title, .concept-modal__title,
.manifesto__title .mline > span, .disc__name > span, .sheet__title, .done__title, .moment__word span {
  padding-bottom: .14em; margin-bottom: -.14em;
}
