/* ============================================================
   LUNARAY // Interactive Media — corporate one-pager
   Palette: pure black #000, white, RGB ray accents
   ============================================================ */

:root {
  --bg: #000;
  --bg-alt: #0a0a0a;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --faint: rgba(255, 255, 255, 0.14);
  --red: #e5484d;
  --green: #3ddc84;
  --blue: #4682f4;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--bg); }

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

em { font-family: var(--serif); font-style: italic; font-weight: 500; }

/* ================= NAV ================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 32px;
  border-bottom-color: var(--faint);
}

.nav-brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
}

.nav-brand .lam-sm { font-weight: 700; }
.nav-brand em { font-size: 19px; letter-spacing: 0; }
.brand-dot { color: var(--red); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.nav-links a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 280px at 50% 42%, rgba(255, 255, 255, 0.06), transparent 70%),
    radial-gradient(280px 160px at 42% 58%, rgba(229, 72, 77, 0.10), transparent 70%),
    radial-gradient(280px 160px at 58% 58%, rgba(70, 130, 244, 0.10), transparent 70%);
  pointer-events: none;
}

.wordmark { position: relative; }

.wm {
  font-weight: 800;
  font-size: clamp(64px, 13vw, 168px);
  line-height: 1;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  animation: rise 1.1s var(--ease) both;
}

.wm-sans { letter-spacing: -0.01em; }

.wm-lam {
  position: relative;
  font-weight: 700;
  margin: 0 0.02em;
}

.wm-serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 0.94em;
  margin-left: 0.06em;
}

.wm-tm {
  font-size: clamp(12px, 1.4vw, 18px);
  font-weight: 600;
  align-self: flex-start;
  margin-top: 0.35em;
  opacity: 0.85;
}

/* RGB rays under the Λ */
.rays {
  position: absolute;
  left: 50%;
  bottom: -0.12em;
  transform: translateX(-50%);
  width: 0.62em;
  height: 0.24em;
  display: block;
}

.rays-svg { width: 100%; height: 100%; overflow: visible; }

.ray {
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw 0.9s var(--ease) forwards;
}

.r-red   { stroke: var(--red);   animation-delay: 0.7s; }
.r-green { stroke: var(--green); animation-delay: 0.85s; }
.r-blue  { stroke: var(--blue);  animation-delay: 1.0s; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tagline {
  margin-top: clamp(20px, 3.5vw, 44px);
  font-size: clamp(12px, 1.6vw, 20px);
  font-weight: 700;
  letter-spacing: 0.62em;
  text-indent: 0.62em; /* visually recenter letterspaced text */
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  animation: fade 0.9s var(--ease) 0.9s forwards;
}

@keyframes fade { to { opacity: 1; } }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 56px;
  background: var(--faint);
  overflow: hidden;
}

.scroll-hint span {
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: drip 2.2s var(--ease) infinite;
}

@keyframes drip {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ================= SECTIONS ================= */
.section { padding: clamp(96px, 14vw, 168px) 0; }

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
}

.sec-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.sec-label::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--muted);
  vertical-align: middle;
  margin-right: 14px;
}

.sec-title {
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 18em;
}

.sec-title.big { font-size: clamp(36px, 6vw, 72px); }

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 56px;
  max-width: 980px;
}

.cols p { color: var(--muted); font-size: 16px; }

/* stats */
.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--faint);
}

.stats strong {
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stats span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* clients */
.clients {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 44px;
  margin-top: 64px;
}

.clients li {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.32);
}

/* services */
.services { list-style: none; margin-top: 64px; }

.services li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--faint);
  transition: padding-left 0.35s var(--ease);
}

.services li:last-child { border-bottom: 1px solid var(--faint); }
.services li:hover { padding-left: 14px; }

.svc-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--muted);
}

.services h3 {
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.services p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 560px;
}

/* work grid */
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 64px;
}

.card {
  display: block;
  text-decoration: none;
  color: var(--ink);
}

.card-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--faint);
  overflow: hidden;
  transition: transform 0.45s var(--ease);
}

.card:hover .card-visual { transform: translateY(-6px); }

.v1 { background: radial-gradient(120% 140% at 20% 20%, rgba(70, 130, 244, 0.35), #060606 62%); }
.v2 { background: radial-gradient(120% 140% at 80% 25%, rgba(61, 220, 132, 0.28), #060606 62%); }
.v3 { background: radial-gradient(140% 120% at 25% 85%, rgba(229, 72, 77, 0.30), #060606 62%); }
.v4 { background: radial-gradient(120% 140% at 75% 75%, rgba(255, 255, 255, 0.16), #060606 62%); }

.card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55));
}

.chip {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}

.card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px 0;
}

.card-meta h3 { font-size: 19px; font-weight: 700; }
.card-meta p { color: var(--muted); font-size: 13px; letter-spacing: 0.08em; }

/* contact */
.section-contact { text-align: center; }

.section-contact .sec-title.big { margin: 0 auto; }

.contact-sub {
  margin-top: 24px;
  color: var(--muted);
}

.contact-mail {
  display: inline-block;
  margin-top: 40px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 4.4vw, 48px);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--faint);
  padding-bottom: 8px;
  transition: border-color 0.3s, color 0.3s;
}

.contact-mail:hover { border-color: var(--ink); }

.socials {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 56px;
}

.socials a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.socials a:hover { color: var(--ink); }

/* footer */
.footer {
  border-top: 1px solid var(--faint);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.foot-brand { font-weight: 800; letter-spacing: 0.06em; }
.foot-brand em { font-size: 15px; }
.foot-brand sup { font-size: 9px; }
.foot-copy { color: var(--muted); font-size: 13px; }
.foot-top {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: color 0.25s;
}
.foot-top:hover { color: var(--ink); }

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ray { animation: none; stroke-dashoffset: 0; }
  .wm, .tagline { animation: none; opacity: 1; }
  .scroll-hint span { animation: none; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 760px) {
  .nav { padding: 18px 20px; }
  .nav.scrolled { padding: 12px 20px; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
  }

  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links a { font-size: 16px; letter-spacing: 0.34em; }

  .cols { grid-template-columns: 1fr; gap: 24px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .work-grid { grid-template-columns: 1fr; }
  .services li { grid-template-columns: 56px 1fr; padding: 26px 0; }
}
