/* ==========================================================================
   LUMEN — components.css
   Preloader · Nav · Mobile menu · Cursor · Marquee · Feature card · Toast
   ========================================================================== */

/* --------------------------------------------------------------------------
   Scroll progress
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 140;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(217, 189, 146, 0), var(--gold) 30%, var(--ivory));
  will-change: transform;
}

/* --------------------------------------------------------------------------
   Custom cursor
   -------------------------------------------------------------------------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 160;
  pointer-events: none;
  visibility: hidden;
}

html.has-cursor .cursor { visibility: visible; }
html.has-cursor,
html.has-cursor * { cursor: none !important; }

.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  will-change: transform;
}

.cursor__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.cursor__ring {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  overflow: hidden;
  transition:
    width 0.45s var(--ease),
    height 0.45s var(--ease),
    border-color 0.4s var(--ease),
    background-color 0.4s var(--ease),
    opacity 0.3s var(--ease);
}

.cursor__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: #0a0b10;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}

.cursor.is-hover .cursor__ring {
  width: 54px;
  height: 54px;
  border-color: rgba(217, 189, 146, 0.85);
  background: rgba(217, 189, 146, 0.08);
}

.cursor.is-view .cursor__ring {
  width: 78px;
  height: 78px;
  border-color: transparent;
  background: var(--ivory);
}

.cursor.is-view .cursor__label {
  opacity: 1;
  transform: scale(1);
}

.cursor.is-hidden .cursor__dot,
.cursor.is-hidden .cursor__ring { opacity: 0; }

/* --------------------------------------------------------------------------
   Preloader
   -------------------------------------------------------------------------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--ink-950);
  clip-path: inset(0 0 0 0);
  transition:
    clip-path 1.05s var(--ease),
    opacity 0.6s var(--ease) 0.3s,
    visibility 0s linear 1.4s;
}

.preloader.is-done {
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__inner {
  width: min(460px, calc(100vw - 64px));
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.preloader__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ivory);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.24em;
  animation: pre-fade 1.1s var(--ease) both;
}

.preloader__brand svg {
  width: 26px;
  height: 26px;
  color: var(--gold);
  flex: none;
}

.preloader__brand sup {
  font-size: 0.42em;
  vertical-align: super;
  color: var(--gold);
  letter-spacing: 0;
  margin-left: 2px;
}

.preloader__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-mute);
  animation: pre-fade 1.1s var(--ease) 0.1s both;
}

.preloader__count {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.preloader__bar {
  height: 1px;
  width: 100%;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  animation: pre-fade 1.1s var(--ease) 0.16s both;
}

.preloader__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft));
  transition: width 0.25s linear;
}

@keyframes pre-fade {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  padding: 16px var(--gutter);
  transition: padding 0.6s var(--ease);
}

.nav__inner {
  width: min(var(--max), 100%);
  margin-inline: auto;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-inline: 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    background-color 0.6s var(--ease),
    border-color 0.6s var(--ease),
    box-shadow 0.6s var(--ease),
    padding 0.6s var(--ease),
    backdrop-filter 0.6s var(--ease);
}

.nav.is-scrolled { padding-top: 10px; }

.nav.is-scrolled .nav__inner {
  padding-inline: 18px;
  background: rgba(8, 10, 16, 0.82);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.nav.is-menu-open .nav__inner {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ivory);
  flex: none;
  transition: opacity 0.4s var(--ease);
}

.brand:hover { opacity: 0.72; }

.brand__mark {
  width: 26px;
  height: 26px;
  color: var(--gold);
  transition: transform 1s var(--ease);
}

.brand:hover .brand__mark { transform: rotate(-140deg); }

.brand__word {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
}

.brand__word sup {
  font-size: 0.5em;
  vertical-align: super;
  color: var(--gold);
  letter-spacing: 0;
  margin-left: 1px;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 5px;
  padding-block: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.4s var(--ease);
}

.nav__link em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1;
  color: var(--gold);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.55s var(--ease);
}

.nav__link:hover { color: var(--ivory); }
.nav__link:hover em { opacity: 1; transform: translateY(0); }
.nav__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__aside {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
}

.nav__clock {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.nav__cta { flex: none; }

/* Burger */
.burger {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  flex: none;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}

.burger:hover {
  border-color: rgba(217, 189, 146, 0.6);
  background: rgba(255, 255, 255, 0.04);
}

.burger span {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 1.4px;
  margin-left: -8px;
  background: var(--ivory);
  border-radius: 2px;
  transition: transform 0.5s var(--ease), opacity 0.3s var(--ease);
}

.burger span:first-child { top: 19px; }
.burger span:last-child { top: 25px; }

.burger.is-active span:first-child { transform: translateY(3px) rotate(45deg); }
.burger.is-active span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Mobile / overlay menu
   -------------------------------------------------------------------------- */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(5, 6, 10, 0.94);
  backdrop-filter: blur(26px) saturate(1.2);
  -webkit-backdrop-filter: blur(26px) saturate(1.2);
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  transition:
    clip-path 0.9s var(--ease),
    opacity 0.6s var(--ease),
    visibility 0s linear 0.9s;
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.site-menu.is-open {
  clip-path: inset(0 0 0 0);
  opacity: 1;
  visibility: visible;
  transition:
    clip-path 0.9s var(--ease),
    opacity 0.4s var(--ease),
    visibility 0s linear 0s;
}

.site-menu__inner {
  min-height: 100%;
  padding: calc(var(--nav-h) + 44px) var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}

.site-menu__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-menu__list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line-soft);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
}

.site-menu.is-open .site-menu__list a {
  opacity: 1;
  transform: translateY(0);
}

.site-menu__list li:nth-child(1) a { transition-delay: 0.14s; }
.site-menu__list li:nth-child(2) a { transition-delay: 0.2s; }
.site-menu__list li:nth-child(3) a { transition-delay: 0.26s; }
.site-menu__list li:nth-child(4) a { transition-delay: 0.32s; }

.site-menu__word {
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.site-menu__en {
  margin-left: auto;
  color: var(--gold);
  font-size: clamp(1rem, 4vw, 1.5rem);
  opacity: 0.85;
}

.site-menu__list .mono {
  color: var(--gold);
  font-size: 10px;
  align-self: flex-start;
  padding-top: 8px;
}

.site-menu__foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.5s var(--ease) 0.4s;
}

.site-menu.is-open .site-menu__foot { opacity: 1; }

.site-menu__foot a { color: var(--text); }

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */
.marquee {
  position: relative;
  background: var(--ink-950);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding-block: clamp(20px, 2.4vw, 30px);
  overflow: hidden;
}

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(48px, 8vw, 140px);
  z-index: 2;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--ink-950), rgba(5, 6, 10, 0));
}

.marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--ink-950), rgba(5, 6, 10, 0));
}

.marquee__viewport { overflow: hidden; }

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 42s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(30px, 3.6vw, 64px);
  padding-right: clamp(30px, 3.6vw, 64px);
}

.marquee__item {
  font-size: clamp(17px, 2.1vw, 28px);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.4s var(--ease);
}

.marquee__item.serif {
  font-family: var(--font-serif);
  font-style: italic;
  letter-spacing: 0.01em;
  font-size: clamp(19px, 2.35vw, 31px);
}

.marquee__item sup {
  font-size: 0.36em;
  vertical-align: super;
  color: var(--gold);
}

.marquee__track:hover .marquee__item { color: var(--text); }

.marquee--sub {
  padding-block: clamp(10px, 1.3vw, 17px);
  background: var(--ink-900);
  border-top: 0;
}

.marquee--sub .marquee__item {
  font-size: clamp(11px, 1.02vw, 13px);
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-mute);
}

.marquee--sub .marquee__sep {
  width: 3px;
  height: 3px;
  opacity: 0.35;
}

.marquee--sub::before {
  background: linear-gradient(90deg, var(--ink-900), rgba(8, 10, 17, 0));
}

.marquee--sub::after {
  background: linear-gradient(270deg, var(--ink-900), rgba(8, 10, 17, 0));
}

.marquee__track--reverse {
  animation-direction: reverse;
  animation-duration: 58s;
}

.marquee__sep {
  width: 5px;
  height: 5px;
  flex: none;
  background: var(--gold);
  opacity: 0.55;
  transform: rotate(45deg);
}

@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* --------------------------------------------------------------------------
   Featured card (hero rail)
   -------------------------------------------------------------------------- */
.feature {
  --rx: 0deg;
  --ry: 0deg;
  display: block;
  position: relative;
  border-radius: 26px;
  padding: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition:
    transform 0.7s var(--ease),
    border-color 0.6s var(--ease),
    box-shadow 0.7s var(--ease);
}

.feature:hover {
  border-color: rgba(217, 189, 146, 0.4);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5);
}

.feature__art {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 19px;
  overflow: hidden;
  background: var(--ink-950);
  isolation: isolate;
}

.feature__svg {
  width: 100%;
  height: 100%;
  transform: scale(1.01);
  transition: transform 1.4s var(--ease);
  will-change: transform;
}

.feature:hover .feature__svg { transform: scale(1.06); }

.feature__glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(70% 50% at 50% 38%, rgba(255, 236, 204, 0.22), transparent 70%),
    linear-gradient(180deg, transparent 55%, rgba(5, 6, 10, 0.55));
  pointer-events: none;
}

.feature__tag {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 2;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 10, 17, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.86);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.feature__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 6px 6px;
  font-size: 13px;
  color: var(--text-dim);
}

.feature__name { color: var(--text); font-weight: 500; }

/* --------------------------------------------------------------------------
   Misc: status, copy button, toast
   -------------------------------------------------------------------------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex: none;
  animation: status-pulse 2.6s var(--ease-soft) infinite;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 211, 193, 0.5); }
  65% { box-shadow: 0 0 0 7px rgba(63, 211, 193, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 211, 193, 0); }
}

.copy-mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  padding-inline: 24px;
  border-radius: 999px;
  border: 1px dashed rgba(22, 20, 15, 0.3);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition:
    border-color 0.45s var(--ease),
    background-color 0.45s var(--ease),
    transform 0.5s var(--ease);
}

.copy-mail svg {
  width: 16px;
  height: 16px;
  opacity: 0.55;
  transition: opacity 0.4s var(--ease);
}

.copy-mail:hover {
  border-color: rgba(22, 20, 15, 0.6);
  background: rgba(22, 20, 15, 0.05);
}

.copy-mail:hover svg { opacity: 1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 180;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 15, 24, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ivory);
  font-size: 13px;
  letter-spacing: 0.01em;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
