/* NLL public home — desktop & mobile are intentionally different compositions */

.home {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Desktop (≥901px) ---------- */
.home-mobi { display: none; }

.home-desk {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 85% 20%, rgba(217, 119, 6, 0.18), transparent 55%),
    radial-gradient(900px 600px at 10% 90%, rgba(90, 140, 200, 0.16), transparent 50%),
    linear-gradient(135deg, #0b1c33 0%, #153356 48%, #1a4068 100%);
}

.desk-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.desk-wash {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse at 70% 40%, rgba(255, 255, 255, 0.06), transparent 45%),
    radial-gradient(ellipse at 30% 70%, rgba(15, 39, 68, 0.4), transparent 50%);
  animation: deskWash 14s ease-in-out infinite alternate;
}

.desk-grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(232, 238, 246, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 238, 246, 0.35) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 35%, #000 100%);
  animation: deskGrid 28s linear infinite;
}

.desk-art {
  position: absolute;
  right: -4%;
  top: 50%;
  width: min(58vw, 820px);
  height: auto;
  transform: translateY(-50%);
}

.tide {
  transform-origin: center;
  transform-box: fill-box;
}
.tide-a { animation: tideDrift 10s ease-in-out infinite; }
.tide-b { animation: tideDrift 13s ease-in-out infinite reverse; }
.tide-c { animation: tideDrift 8s ease-in-out infinite; }
.star { animation: starTwinkle 3.8s ease-in-out infinite; }
.star-2 { animation-delay: 0.8s; }
.star-3 { animation-delay: 1.6s; }

.desk-arc {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: arcDraw 3.2s ease forwards 0.4s;
}

.desk-dot {
  opacity: 0;
  animation: dotIn 0.6s ease forwards 3.2s, dotPulse 3.5s ease-in-out infinite 3.8s;
}

.desk-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5.5rem);
  max-width: 34rem;
}

.home-mark {
  margin: 0 0 1rem;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 0.95rem;
  letter-spacing: 0.35em;
  color: rgba(232, 238, 246, 0.62);
  animation: riseIn 1s ease both;
}

.desk-brand {
  margin: 0;
  font-family: Fraunces, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(5.5rem, 14vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: #f4f7fb;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  animation: brandIn 1.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.desk-line {
  margin: 1.35rem 0 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 600;
  color: #f0c27a;
  letter-spacing: 0.28em;
  animation: riseIn 1s ease 0.25s both;
}

.desk-sub {
  margin: 1.1rem 0 0;
  max-width: 18em;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(232, 238, 246, 0.72);
  animation: riseIn 1s ease 0.4s both;
}

/* ---------- Mobile (≤900px) — different composition ---------- */
@media (max-width: 900px) {
  .home-desk { display: none; }
  .home-mobi {
    display: flex;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 1.35rem calc(2.4rem + env(safe-area-inset-bottom));
    overflow: hidden;
    background:
      linear-gradient(180deg, #163455 0%, #0f2744 42%, #1c334f 100%);
  }

  .mobi-stage {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .mobi-ribbon {
    position: absolute;
    left: 12%;
    top: -20%;
    width: 2px;
    height: 140%;
    background: linear-gradient(180deg, transparent, rgba(217, 119, 6, 0.75), transparent);
    animation: ribbonFall 5.5s ease-in-out infinite;
  }

  .mobi-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
  }

  .mobi-orb-1 {
    width: 46vw;
    height: 46vw;
    top: 8%;
    right: -12%;
    background: radial-gradient(circle at 35% 35%, rgba(240, 194, 122, 0.35), transparent 65%);
    animation: orbDrift 10s ease-in-out infinite alternate;
  }

  .mobi-orb-2 {
    width: 58vw;
    height: 58vw;
    bottom: 18%;
    left: -22%;
    background: radial-gradient(circle at 60% 40%, rgba(120, 170, 220, 0.22), transparent 68%);
    animation: orbDrift 12s ease-in-out infinite alternate-reverse;
  }

  .mobi-path {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .mobi-stroke {
    stroke-dasharray: 180;
    stroke-dashoffset: 180;
    animation: pathDraw 2.8s ease forwards 0.3s, pathPulse 4s ease-in-out infinite 3.2s;
  }

  .mobi-copy {
    position: relative;
    z-index: 2;
    text-align: left;
  }

  .mobi-letters {
    display: flex;
    flex-direction: column;
    gap: 0.05em;
    margin-bottom: 1.6rem;
    font-family: Fraunces, "Times New Roman", serif;
    font-weight: 700;
    font-size: clamp(4.6rem, 22vw, 6.4rem);
    line-height: 0.9;
    letter-spacing: 0.04em;
    color: #f4f7fb;
  }

  .mobi-letters span {
    display: block;
    opacity: 0;
    transform: translateY(1.1rem);
    animation: letterUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  .mobi-letters span:nth-child(1) { animation-delay: 0.1s; }
  .mobi-letters span:nth-child(2) { animation-delay: 0.28s; }
  .mobi-letters span:nth-child(3) { animation-delay: 0.46s; }

  .mobi-line {
    margin: 0;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #f0c27a;
    animation: riseIn 0.9s ease 0.55s both;
  }

  .mobi-sub {
    margin: 0.7rem 0 0;
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 0.98rem;
    color: rgba(232, 238, 246, 0.7);
    animation: riseIn 0.9s ease 0.7s both;
  }
}

/* ---------- Keyframes ---------- */
@keyframes deskWash {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 1.5%, 0) scale(1.04); }
}

@keyframes deskGrid {
  from { background-position: 0 0, 0 0; }
  to { background-position: 64px 64px, 64px 64px; }
}

@keyframes tideDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-14px, -10px) scale(1.04); }
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes arcDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes dotIn {
  to { opacity: 1; }
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}

@keyframes brandIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); letter-spacing: 0.12em; }
  to { opacity: 1; transform: translateY(0) scale(1); letter-spacing: 0.02em; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ribbonFall {
  0%, 100% { transform: translateY(-6%) scaleY(1); opacity: 0.55; }
  50% { transform: translateY(4%) scaleY(1.05); opacity: 0.9; }
}

@keyframes orbDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-4%, 6%, 0); }
}

@keyframes pathDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes pathPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.9; }
}

@keyframes letterUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .desk-arc, .mobi-stroke { stroke-dashoffset: 0; }
  .desk-dot, .mobi-letters span { opacity: 1; transform: none; }
}
