/* ============================================
   LEXYS — En construcción
   Paleta: negro mate, hueso, bronce apagado
   ============================================ */

:root {
  --ink:        #0a0a0a;
  --ink-soft:   #141414;
  --bone:       #f3f1ec;
  --bone-dim:   #b9b6ae;
  --stone:      #6f6c66;
  --bronze:     #b08d57;
  --bronze-dim: #6e5a3c;

  --display: "Fraunces", "Times New Roman", serif;
  --body:    "Manrope", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(24px, 6vw, 72px);
}

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

html {
  color-scheme: dark;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--body);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================
   Texture: subtle grain overlay
   ============================================ */

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.05;
  mix-blend-mode: overlay;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* Soft radial vignette so center stays focal */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 60% at 50% 42%,
    rgba(176, 141, 87, 0.07),
    transparent 70%
  );
}

/* ============================================
   Frame: thin corner brackets, architectural
   ============================================ */

.frame {
  position: fixed;
  inset: var(--gutter);
  z-index: 3;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(243, 241, 236, 0.18);
  opacity: 0;
  animation: corner-in 1.1s cubic-bezier(.16,1,.3,1) forwards;
}

.corner--tl { top: 0; left: 0; border-right: none; border-bottom: none; animation-delay: 0.2s; }
.corner--tr { top: 0; right: 0; border-left: none; border-bottom: none; animation-delay: 0.35s; }
.corner--bl { bottom: 0; left: 0; border-right: none; border-top: none; animation-delay: 0.35s; }
.corner--br { bottom: 0; right: 0; border-left: none; border-top: none; animation-delay: 0.5s; }

@keyframes corner-in {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================
   Stage: centered composition
   ============================================ */

.stage {
  position: relative;
  z-index: 4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--gutter) * 1.6) var(--gutter);
  gap: 0;
}

/* ============================================
   Mark: the Lexys glyph, drawn on load
   ============================================ */

.mark {
  position: relative;
  width: clamp(64px, 9vw, 96px);
  height: clamp(64px, 9vw, 96px);
  margin-bottom: clamp(28px, 5vw, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mark__img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 0 24px rgba(176, 141, 87, 0.0));
  animation:
    mark-reveal 1.4s cubic-bezier(.16,1,.3,1) 0.6s forwards,
    mark-breathe 6s ease-in-out 2.2s infinite;
}

@keyframes mark-reveal {
  from {
    opacity: 0;
    transform: scale(0.86);
    filter: drop-shadow(0 0 0px rgba(176, 141, 87, 0));
  }
  60% {
    opacity: 1;
    filter: drop-shadow(0 0 28px rgba(176, 141, 87, 0.35));
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 0px rgba(176, 141, 87, 0));
  }
}

@keyframes mark-breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.035); opacity: 0.92; }
}

/* Rotating ring around the mark — orbits slowly, signals "in progress" */
.mark__ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(176, 141, 87, 0.55);
  border-right-color: rgba(176, 141, 87, 0.12);
  opacity: 0;
  animation:
    ring-in 0.8s ease 1.4s forwards,
    ring-spin 7s linear 2.2s infinite;
}

@keyframes ring-in {
  to { opacity: 1; }
}

@keyframes ring-spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Title: LEXYS wordmark
   ============================================ */

.title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: 0.22em;
  color: var(--bone);
  overflow: hidden;
}

.title__word {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  animation: title-rise 1s cubic-bezier(.16,1,.3,1) 0.85s forwards;
}

@keyframes title-rise {
  to { transform: translateY(0); opacity: 1; }
}

/* ============================================
   Rule: divider with "En construcción" label
   ============================================ */

.rule {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  margin-top: clamp(22px, 4vw, 34px);
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(.16,1,.3,1) 1.25s forwards;
}

.rule__line {
  display: block;
  width: clamp(28px, 6vw, 64px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze-dim));
}

.rule__line:last-child {
  background: linear-gradient(90deg, var(--bronze-dim), transparent);
}

.rule__label {
  font-family: var(--body);
  font-size: clamp(0.66rem, 1.6vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bronze);
  white-space: nowrap;
}

/* ============================================
   Lede paragraph
   ============================================ */

.lede {
  margin-top: clamp(20px, 4vw, 30px);
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(0.92rem, 2.1vw, 1.1rem);
  line-height: 1.75;
  color: var(--bone-dim);
  max-width: 32ch;
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(.16,1,.3,1) 1.4s forwards;
}

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

/* ============================================
   Progress indicator — quiet, architectural
   ============================================ */

.progress {
  margin-top: clamp(40px, 7vw, 64px);
  width: 100%;
  max-width: 280px;
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(.16,1,.3,1) 1.55s forwards;
}

.progress__track {
  position: relative;
  width: 100%;
  height: 1px;
  background: rgba(243, 241, 236, 0.12);
  overflow: hidden;
}

.progress__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--bronze-dim), var(--bronze));
  transition: width 1.8s cubic-bezier(.65,0,.35,1);
}

.progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}

.progress__value {
  color: var(--bone-dim);
  font-variant-numeric: tabular-nums;
}

/* ============================================
   Contact link — underline draws on hover
   ============================================ */

.contact {
  position: relative;
  display: inline-block;
  margin-top: clamp(44px, 8vw, 72px);
  font-family: var(--body);
  font-size: clamp(0.8rem, 1.8vw, 0.92rem);
  letter-spacing: 0.08em;
  color: var(--bone);
  text-decoration: none;
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(.16,1,.3,1) 1.7s forwards;
}

.contact__text {
  position: relative;
}

.contact__line {
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--bone-dim);
  transform-origin: left;
  transform: scaleX(0.18);
  transition: transform 0.5s cubic-bezier(.65,0,.35,1), background-color 0.4s ease;
}

.contact:hover .contact__line,
.contact:focus-visible .contact__line {
  transform: scaleX(1);
  background: var(--bronze);
}

.contact:hover .contact__text,
.contact:focus-visible .contact__text {
  color: var(--bronze);
}

.contact__text {
  transition: color 0.4s ease;
}

.contact:focus-visible {
  outline: 1px solid var(--bronze);
  outline-offset: 8px;
}

/* ============================================
   Footer
   ============================================ */

.foot {
  position: fixed;
  bottom: var(--gutter);
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(.16,1,.3,1) 1.9s forwards;
}

.foot__dot {
  color: var(--bronze-dim);
}

/* ============================================
   Reduced motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .corner,
  .mark__img,
  .mark__ring,
  .title__word,
  .rule,
  .lede,
  .progress,
  .contact,
  .foot {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .progress__fill {
    transition: none;
  }
}

/* ============================================
   Small screens
   ============================================ */

@media (max-width: 420px) {
  .title {
    letter-spacing: 0.16em;
  }
  .rule {
    gap: 10px;
  }
  .rule__line {
    width: 22px;
  }
}