/* =============================================================================
   MetaField Labs — landing site
   ---------------------------------------------------------------------------
   Tone: laboratory at night. The orb pulses. The mirrors are polished
   one by one. The user is a Witness.
   ============================================================================= */

:root {
  /* ── PALETTE ── */
  --void:        #050810;        /* the deep dark of the lab */
  --void-soft:   #0B1226;
  --ink:         #1A2840;
  --cream:       #FAF6EC;        /* the parchment / washi text */
  --cream-soft:  #E6DFCD;
  --silver:      #8A98AE;
  --mute:        #4C5874;
  --gold:        #D4AF37;        /* the Hanko echo */
  --aml-cyan:    rgba(0, 180, 255, 0.7);
  --aml-glow:    rgba(0, 200, 255, 1);

  /* ── TYPE ── */
  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Inter', -apple-system, system-ui, sans-serif;
  --font-jp:     'Noto Serif JP', 'Yu Mincho', serif;

  /* ── MOTION ── */
  --ease-out:    cubic-bezier(.2, .8, .3, 1);
}

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

body {
  font-family: var(--font-sans);
  color: var(--cream);
  background: var(--void);
  background-image:
    radial-gradient(ellipse at 50% 0%,   rgba(0,120,200,0.10), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(212,175,55,0.06), transparent 60%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Founder strip (top-left, very subtle) ─── */
.mfl-founder-strip {
  position: absolute;
  top: 22px; left: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  opacity: 0.85;
}
.mfl-founder-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
}
.mfl-founder-aml {
  animation: founder-spin 60s linear infinite;
}
@keyframes founder-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.mfl-founder-text {
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-soft);
  opacity: 0.85;
}

/* ═════════════════════════════════════════════════════════════════════════
   HERO — the breathing orb
   ═════════════════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 60px;
  position: relative;
  text-align: center;
}

.hero-text {
  margin-bottom: 48px;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  color: var(--cream);
  text-shadow: 0 0 30px rgba(0, 200, 255, 0.18);
}
.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(15px, 2.1vw, 20px);
  color: var(--silver);
  margin: 0;
  letter-spacing: 0.02em;
}

/* ─── The orb ─── */
.orb-wrapper {
  position: relative;
  width: 340px; height: 340px;
  margin: 20px auto 40px;
  flex-shrink: 0;
}

.orb {
  position: absolute;
  width: 260px; height: 260px;
  top: 40px; left: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
                              #0F1A2F 0%,
                              #050810 60%,
                              #000000 100%);
  box-shadow:
    0 0 40px rgba(0, 150, 255, 0.6),
    inset 0 0 60px rgba(0, 100, 200, 0.15);
  animation: orb-pulse 4s ease-in-out infinite;
  transition: box-shadow 0.4s var(--ease-out),
              transform 0.4s var(--ease-out);
}
.orb-wrapper:hover .orb {
  transform: scale(1.04);
  box-shadow:
    0 0 90px rgba(0, 220, 255, 0.95),
    inset 0 0 80px rgba(0, 150, 220, 0.25);
}
@keyframes orb-pulse {
  0%, 100% {
    box-shadow:
      0 0 40px rgba(0, 150, 255, 0.6),
      inset 0 0 60px rgba(0, 100, 200, 0.15);
  }
  50% {
    box-shadow:
      0 0 80px rgba(0, 200, 255, 0.95),
      inset 0 0 80px rgba(0, 130, 220, 0.22);
  }
}

/* Rotating rings */
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 180, 255, 0.45);
  box-shadow:
    0 0 18px rgba(0, 180, 255, 0.3),
    inset 0 0 18px rgba(0, 180, 255, 0.1);
  animation: ring-spin 12s linear infinite;
  pointer-events: none;
}
.ring1 { width: 300px; height: 300px; top: 20px; left: 20px; }
.ring2 {
  width: 330px; height: 330px; top: 5px; left: 5px;
  animation-duration: 22s;
  animation-direction: reverse;
  border-color: rgba(0, 140, 200, 0.30);
}
@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Greek symbols around the orb */
.symbol {
  position: absolute;
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  color: #6EC8FF;
  text-shadow: 0 0 12px rgba(0, 180, 255, 0.7);
  animation: sym-breathe 3.5s ease-in-out infinite;
  pointer-events: none;
}
.symbol.psi   { top: -4px;    left: 50%; transform: translateX(-50%); }
.symbol.phi   { top: 50%;     left: 4px;  transform: translateY(-50%); }
.symbol.delta { top: 50%;     right: 4px; transform: translateY(-50%); }
.symbol.xi    { bottom: -4px; left: 50%; transform: translateX(-50%); }
.symbol.omega { top: 50%;     left: 50%;
                transform: translate(-50%, -50%);
                font-size: 32px;
                color: var(--gold);
                text-shadow: 0 0 14px rgba(212, 175, 55, 0.7); }
@keyframes sym-breathe {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
/* Stagger each symbol's breath */
.symbol.phi   { animation-delay: 0.6s; }
.symbol.delta { animation-delay: 1.2s; }
.symbol.xi    { animation-delay: 1.8s; }
.symbol.omega { animation-delay: 0.3s; animation-duration: 4.5s; }

/* Frequency lines */
.freq {
  position: absolute;
  width: 280px; height: 2px;
  background: linear-gradient(90deg,
                              transparent,
                              var(--aml-cyan),
                              transparent);
  top: 50%;
  transform-origin: center;
  pointer-events: none;
  opacity: 0.7;
  transition: transform 0.08s linear, height 0.3s var(--ease-out);
}
.freq.left  { left: -300px; }
.freq.right { right: -300px; }

/* Particle sparks */
.spark {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #5DDFFF;
  box-shadow: 0 0 10px #00ffff;
  opacity: 0;
  pointer-events: none;
}

/* ─── Hero foot ─── */
.hero-foot {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.hero-creed {
  font-family: var(--font-serif);
  font-size: clamp(13px, 1.8vw, 17px);
  color: var(--silver);
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0.04em;
}
.hero-enter {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--gold);
  text-decoration: none;
  padding: 10px 22px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 30px;
  letter-spacing: 0.08em;
  transition: all 0.3s var(--ease-out);
}
.hero-enter:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

/* ═════════════════════════════════════════════════════════════════════════
   GALLERY — the instruments
   ═════════════════════════════════════════════════════════════════════════ */
.gallery {
  padding: 100px 24px 80px;
  max-width: 1320px;
  margin: 0 auto;
}
.gallery-head {
  text-align: center;
  margin-bottom: 60px;
}
.gallery-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(28px, 4.5vw, 44px);
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}
.gallery-sub {
  font-family: var(--font-serif);
  color: var(--silver);
  font-size: clamp(14px, 1.8vw, 17px);
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* ─── Instrument card ─── */
.card {
  position: relative;
  background:
    linear-gradient(180deg,
                    rgba(255, 255, 255, 0.04) 0%,
                    rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 30px 24px 28px;
  text-align: center;
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
}
.card::before {
  /* Top accent bar */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent, var(--silver));
  opacity: 0.5;
  transition: opacity 0.4s var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 16px 40px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px var(--accent);
}
.card:hover::before { opacity: 1; }
.card.card-vision,
.card.card-coming { opacity: 0.85; }
.card.card-vision:hover,
.card.card-coming:hover { opacity: 1; }

/* Whispered — softer, more mysterious than "coming" */
.card.card-whispered {
  opacity: 0.72;
  border-style: dashed;
  background:
    linear-gradient(180deg, rgba(176,138,62,0.06), rgba(0,0,0,0)),
    var(--panel);
}
.card.card-whispered:hover { opacity: 0.92; }
.card.card-whispered .card-status {
  background: rgba(176,138,62,0.12);
  color: #d9b876;
  border-color: rgba(176,138,62,0.45);
  border-style: dashed;
}
.card.card-whispered .card-name-jp { color: rgba(220, 190, 130, 0.7); }
.card.card-whispered .card-desc em { color: #d9b876; }

/* Status pill */
.card-status {
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--accent);
  border: 1px solid var(--accent);
}
.card-live .card-status {
  background: var(--accent);
  color: var(--void);
  box-shadow: 0 0 14px var(--accent);
}

/* Glyph (icon image OR text-kanji placeholder) */
.card-glyph {
  width: 110px; height: 110px;
  margin: 12px auto 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 24px -8px var(--accent);
  transition: transform 0.5s var(--ease-out);
}
.card:hover .card-glyph {
  transform: scale(1.06) rotate(-2deg);
}
.card-glyph-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.card-glyph-text {
  /* Placeholder glyph until brush calligraphy exists for this instrument */
  background:
    radial-gradient(circle at 30% 30%,
                    rgba(255,255,255,0.95),
                    rgba(245,238,220,0.9));
}
.card-kanji {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.05;
  color: var(--void);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Names */
.card-name-jp {
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.08em;
  margin: 0 0 2px;
  color: var(--cream);
}
.card-name-rom {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  margin: 0 0 6px;
  letter-spacing: 0.04em;
}
.card-en {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--silver);
  margin: 0 0 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card-desc {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.55;
  color: var(--cream-soft);
  margin: 0 0 22px;
  opacity: 0.9;
}

/* Enter button */
.card-enter {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 22px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: all 0.3s var(--ease-out);
  font-family: var(--font-serif);
}
.card-enter:hover {
  background: var(--accent);
  color: var(--void);
  box-shadow: 0 0 18px -2px var(--accent);
}
.card-enter.card-coming,
.card-enter:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.card-enter.card-coming:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

/* ═════════════════════════════════════════════════════════════════════════
   FOOTER
   ═════════════════════════════════════════════════════════════════════════ */
.mfl-footer {
  padding: 60px 24px 50px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}
.mfl-footer-marks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}
.mfl-footer-hanko {
  width: 36px; height: 36px;
  border-radius: 50%;
}
.mfl-footer-name {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--cream-soft);
  letter-spacing: 0.04em;
}
.mfl-footer-creed {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--silver);
  margin: 0 0 16px;
  letter-spacing: 0.04em;
}
.mfl-footer-fine {
  font-size: 11px;
  color: var(--mute);
  margin: 0;
  letter-spacing: 0.04em;
}
.mfl-story-link {
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.03em;
  margin: 0 0 20px;
  opacity: 0.85;
  transition: opacity 0.3s var(--ease-out);
}
.mfl-story-link:hover { opacity: 1; text-decoration: underline; }

/* ═════════════════════════════════════════════════════════════════════════
   STORY PAGE — "Our Story"
   ═════════════════════════════════════════════════════════════════════════ */
.story-back {
  position: absolute;
  top: 22px; right: 22px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--silver);
  text-decoration: none;
  letter-spacing: 0.04em;
  opacity: 0.8;
  z-index: 10;
}
.story-back:hover { opacity: 1; color: var(--gold); }

.story-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 170px 24px 40px;
}
.story-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 0 0 40px;
  color: var(--cream);
  text-shadow: 0 0 30px rgba(0, 200, 255, 0.12);
}
.story-body p {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.85;
  color: var(--cream-soft);
  margin: 0 0 26px;
  letter-spacing: 0.01em;
}
.story-body h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 20px;
  color: var(--gold);
  margin: 44px 0 18px;
  letter-spacing: 0.02em;
}
.story-signed {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 56px 0 8px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.story-signed-hanko { width: 44px; height: 44px; border-radius: 50%; }
.story-signed-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--cream-soft);
  letter-spacing: 0.03em;
}
.story-signed-text strong { color: var(--cream); font-style: normal; }

@media (max-width: 560px) {
  .story-wrap { padding: 130px 20px 30px; }
  .story-back { top: 16px; right: 16px; font-size: 12px; }
}

/* ═════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═════════════════════════════════════════════════════════════════════════ */
@media (max-width: 560px) {
  .mfl-founder-strip { top: 16px; left: 16px; }
  .mfl-founder-img   { width: 26px; height: 26px; }
  .mfl-founder-text  { font-size: 11px; }

  .hero { padding: 100px 18px 60px; }

  .orb-wrapper { width: 270px; height: 270px; }
  .orb         { width: 210px; height: 210px; top: 30px; left: 30px; }
  .ring1       { width: 240px; height: 240px; top: 15px; left: 15px; }
  .ring2       { width: 264px; height: 264px; top: 3px;  left: 3px;  }
  .symbol      { font-size: 28px; }
  .symbol.omega{ font-size: 26px; }
  .freq        { display: none; }     /* hide the side rails on narrow */

  .gallery { padding: 70px 18px 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .ring, .symbol, .mfl-founder-aml { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   MFL LOGO PROTECTION · applied to every brand mark and glyph
   Passive layer — active layer lives in mfl.js (right-click + drag)
   ═══════════════════════════════════════════════════════════════════ */
.mfl-lock {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}
img.mfl-lock,
.mfl-lock img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}
