/* ============================================================
   UNGS Lab — landing styles
   ============================================================ */

:root {
  --bg:          #0A0B12;
  --bg-soft:     #0E1019;
  --card:        rgba(255, 255, 255, 0.025);
  --card-hover:  rgba(255, 255, 255, 0.045);
  --border:      rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-lit:  rgba(255, 255, 255, 0.16);

  --text:        #EAECF5;
  --text-dim:    #AAB0C6;
  --text-mute:   #6F758D;

  --brand:       #818CF8;
  --brand-2:     #C084FC;
  --cyan:        #22D3EE;

  --grad:        linear-gradient(120deg, #818CF8 0%, #C084FC 60%, #22D3EE 120%);
  --grad-solid:  linear-gradient(135deg, #6366F1, #A855F7);

  --radius:      18px;
  --radius-lg:   24px;
  --maxw:        1080px;

  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background layers */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(58% 48% at 12% -4%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(48% 42% at 96% 6%, rgba(168, 85, 247, 0.18), transparent 58%),
    radial-gradient(46% 44% at 52% 110%, rgba(34, 211, 238, 0.10), transparent 62%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 72%);
          mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 72%);
  opacity: 0.6;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(129, 140, 248, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* ============================================================
   Navbar
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 11, 18, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border-soft);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand__name { font-size: 1.06rem; }
.brand__name b { font-weight: 800; }
.brand__name span { color: var(--text-dim); font-weight: 600; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--text); background: var(--card-hover); }
.nav__cta {
  color: var(--text) !important;
  background: var(--card);
  border: 1px solid var(--border);
}
.nav__cta:hover { border-color: var(--border-lit); background: var(--card-hover) !important; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(56px, 12vw, 132px) 0 clamp(48px, 9vw, 92px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 13px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-dim);
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero__wordmark {
  margin: 0;
  font-size: clamp(3rem, 9.5vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.hero__wordmark .hw-u {
  background: var(--grad);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.hero__wordmark .hw-lab {
  color: var(--text);
  font-weight: 300;
}
.hero__tagline {
  margin: 20px 0 0;
  font-size: clamp(0.95rem, 2.4vw, 1.16rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-dim);
}
.hero__tagline b { color: var(--brand); font-weight: 700; }
.hero__motto {
  margin: 26px auto 0;
  max-width: 30ch;
  font-size: clamp(1.04rem, 3vw, 1.34rem);
  line-height: 1.5;
  color: var(--text);
  font-weight: 500;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
    background 0.2s, border-color 0.2s;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary {
  color: #fff;
  background: var(--grad-solid);
  box-shadow: 0 10px 30px -8px rgba(124, 58, 237, 0.6);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -8px rgba(124, 58, 237, 0.7); }
.btn--ghost {
  color: var(--text);
  background: var(--card);
  border-color: var(--border);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--border-lit); background: var(--card-hover); }

/* ============================================================
   Sections
   ============================================================ */
section { position: relative; }
.section {
  padding: clamp(56px, 10vw, 104px) 0;
}
.section__head {
  max-width: 640px;
  margin-bottom: clamp(34px, 6vw, 56px);
}
.section__head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.section__lead {
  margin: 16px 0 0;
  font-size: clamp(1rem, 2.3vw, 1.1rem);
  color: var(--text-dim);
}

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0;
}

/* ============================================================
   Brand meaning (U N G S)
   ============================================================ */
.ungs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ungs__item {
  padding: 26px 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.ungs__item:hover {
  transform: translateY(-4px);
  border-color: var(--border-lit);
  background: var(--card-hover);
}
.ungs__letter {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}
.ungs__word {
  margin: 14px 0 6px;
  font-size: 1.06rem;
  font-weight: 700;
}
.ungs__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-mute);
  line-height: 1.55;
}

/* ============================================================
   Apps
   ============================================================ */
.apps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.app::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 2px;
  background: var(--accent, var(--brand));
  opacity: 0;
  transition: opacity 0.3s;
}
.app:hover {
  transform: translateY(-5px);
  border-color: var(--border-lit);
  background: var(--card-hover);
}
.app:hover::before { opacity: 0.9; }

.app__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.app__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  color: var(--accent, var(--brand));
  background:
    color-mix(in srgb, var(--accent, var(--brand)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 32%, transparent);
}
.app__icon svg { width: 25px; height: 25px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--card);
  border: 1px solid var(--border);
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent, var(--brand));
}

.app h3 {
  margin: 0 0 4px;
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.app__cat {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent, var(--brand));
  text-transform: uppercase;
}
.app__desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.6;
}
.app__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.app__link svg { width: 15px; height: 15px; transition: transform 0.2s var(--ease); }
.app__link:hover svg { transform: translateX(3px); }
.app__spacer { flex: 1; }

/* ============================================================
   Legal / policies
   ============================================================ */
.legal-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.legal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.legal-row:hover {
  transform: translateY(-3px);
  border-color: var(--border-lit);
  background: var(--card-hover);
}
.legal-row__app { font-weight: 700; }
.legal-row__kind { font-size: 0.86rem; color: var(--text-mute); margin-top: 2px; }
.legal-row__go {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.legal-row__go svg { width: 16px; height: 16px; }
.legal-row:hover .legal-row__go { color: var(--text); border-color: var(--border-lit); transform: translateX(3px); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: clamp(44px, 7vw, 68px) 0 40px;
  margin-top: 20px;
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 40px;
}
.footer__brand { max-width: 320px; }
.footer__brand .brand { margin-bottom: 14px; }
.footer__motto { margin: 0; color: var(--text-mute); font-size: 0.92rem; }
.footer__col h4 {
  margin: 0 0 14px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.footer__col a, .footer__col p {
  display: block;
  margin: 0 0 9px;
  font-size: 0.94rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--text); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.84rem;
  color: var(--text-mute);
}
.footer__bottom .made { display: inline-flex; align-items: center; gap: 7px; }
.footer__bottom .made b { color: var(--text-dim); font-weight: 700; }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .ungs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .apps { grid-template-columns: 1fr; }
  .legal-list { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .ungs { grid-template-columns: 1fr; }
  .wrap { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
