﻿/* ============================================================================
   MERIDIAN — gateway
   The first screen. Full-bleed receding grid on black, the word set very
   large, and a single way in.

   Palette here is NB: the monochrome ramp from the owner's artwork
   (black -> charcoal -> ash -> silver). No gold on this screen.
   ========================================================================== */

.gw-body {
  margin: 0;
  min-height: 100vh;
  background: #05060700;
  background-color: #050607;
  color: #e8eaed;
  font-family: Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ------------------------------------------------------------- the field */
.gw-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.gw-field canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 62%, #000 30%, rgba(0,0,0,.5) 72%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 62%, #000 30%, rgba(0,0,0,.5) 72%, transparent 100%);
}

.gw-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(232,234,237,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,234,237,.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent 40%, #000 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 40%, #000 100%);
}

.gw-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 85% 70% at 50% 45%, transparent 40%, rgba(5,6,7,.75) 100%);
}

/* ---------------------------------------------------------------- stage */
.gw-stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 6vh 24px 12vh;
  text-align: center;
}

/* ----------------------------------------------------------------- mark */
.gw-mark {
  margin-bottom: clamp(22px, 4vh, 46px);
  animation: gw-rise 1.1s cubic-bezier(.22,1,.36,1) both;
}
.gw-mark img {
  width: clamp(38px, 5.2vh, 56px);
  height: clamp(38px, 5.2vh, 56px);
  filter: drop-shadow(0 0 26px rgba(200, 200, 210, .18));
  animation: gw-mark-breathe 9s ease-in-out infinite;
}
@keyframes gw-mark-breathe {
  0%, 100% { transform: rotate(-3deg) scale(1);    opacity: .82; }
  50%      { transform: rotate(3deg)  scale(1.045); opacity: 1; }
}

/* ------------------------------------------------------------ the word */
/* Very large, very wide-tracked, hairline weight. Each letter rises on its
   own beat so the word assembles rather than simply appearing. */
.gw-word {
  position: relative;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: clamp(1px, .5vw, 5px);
  font-size: clamp(44px, 13.5vw, 210px);
  font-weight: 200;
  line-height: .92;
  letter-spacing: .06em;
}

.gw-letter {
  display: inline-block;
  background: linear-gradient(178deg, #ffffff 6%, #d8dce2 34%, #7d838d 62%, #34383f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateY(38px);
  filter: blur(10px);
  animation: gw-letter .95s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes gw-letter {
  to { opacity: 1; transform: none; filter: blur(0); }
}
/* staggered by index — set inline in markup order */
.gw-letter:nth-child(1) { animation-delay: .18s; }
.gw-letter:nth-child(2) { animation-delay: .26s; }
.gw-letter:nth-child(3) { animation-delay: .34s; }
.gw-letter:nth-child(4) { animation-delay: .42s; }
.gw-letter:nth-child(5) { animation-delay: .50s; }
.gw-letter:nth-child(6) { animation-delay: .58s; }
.gw-letter:nth-child(7) { animation-delay: .66s; }
.gw-letter:nth-child(8) { animation-delay: .74s; }

/* a hairline that draws itself under the word */
.gw-rule {
  position: absolute;
  left: 50%;
  bottom: clamp(-30px, -3.4vh, -18px);
  width: 0;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(232,234,237,.30) 22%, rgba(232,234,237,.30) 78%, transparent);
  animation: gw-rule 1.5s 1.05s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes gw-rule { to { width: min(560px, 74vw); } }

/* ----------------------------------------------------------------- line */
/* TODO(owner): the supporting line. Deliberately plain until the wording
   is decided. */
.gw-line {
  margin: clamp(30px, 5vh, 54px) 0 0;
  font-size: clamp(11px, 1.5vh, 13px);
  font-weight: 400;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: #6e747d;
  opacity: 0;
  animation: gw-fade 1.2s 1.35s ease forwards;
}
@keyframes gw-fade { to { opacity: 1; } }

/* --------------------------------------------------------------- actions */
.gw-actions {
  margin-top: clamp(34px, 6vh, 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  opacity: 0;
  animation: gw-fade 1.2s 1.55s ease forwards;
}

.gw-enter {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 12px 0 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background-image:
    linear-gradient(150deg, rgba(58, 64, 72, .58), rgba(10, 12, 16, .82)),
    linear-gradient(150deg, rgba(232, 234, 237, .30), rgba(232, 234, 237, .05) 48%, rgba(190, 200, 214, .20));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: #e8eaed;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  transition: transform .42s cubic-bezier(.22,1,.36,1), box-shadow .42s ease;
}
.gw-enter:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 20px 44px -22px rgba(0,0,0,.95);
}
.gw-enter:active { transform: translateY(0) scale(.985); }
.gw-enter:focus-visible { outline: 2px solid #cdd3db; outline-offset: 4px; }

/* the label runs out, the arrow sits in its own disc */
.gw-enter-label { padding-right: 6px; }

.gw-enter-arrow {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-left: 6px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(210,218,228,.20), rgba(120,130,145,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .42s cubic-bezier(.22,1,.36,1), background .3s ease;
}
.gw-enter-arrow svg { width: 15px; height: 15px; }
.gw-enter:hover .gw-enter-arrow { transform: translateX(4px); background: linear-gradient(150deg, rgba(225,232,242,.32), rgba(140,150,168,.1)); }

/* a sheen crossing the button */
.gw-enter::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -140%;
  width: 48%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.12), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.gw-enter:hover::before { animation: gw-sheen .9s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes gw-sheen { to { left: 165%; } }

.gw-secondary {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #6e747d;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}
.gw-secondary:hover { color: #e8eaed; border-bottom-color: rgba(232,234,237,.28); }
.gw-secondary:focus-visible { outline: 2px solid #cdd3db; outline-offset: 4px; }

/* --------------------------------------------------------------- footer */
.gw-foot {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px 24px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #4d525a;
  opacity: 0;
  animation: gw-fade 1.4s 2s ease forwards;
}
.gw-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #4d525a;
}

/* ------------------------------------------------------------- entrance */
@keyframes gw-rise {
  from { opacity: 0; transform: translateY(24px) scale(.9); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 700px) {
  .gw-word { letter-spacing: .03em; }
  .gw-enter { height: 52px; padding-left: 28px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .gw-letter { animation: none !important; opacity: 1; transform: none; filter: none; }
  .gw-rule { animation: none !important; width: min(560px, 74vw); }
  .gw-mark, .gw-line, .gw-actions, .gw-foot { animation: none !important; opacity: 1; }
  .gw-mark img, .gw-enter-arrow, .gw-enter::before { animation: none !important; transition: none !important; }
}