/* ============================================================
   이온랩 — Mindloop 스타일 라이트 모노크롬
   ============================================================ */

:root {
  /* monochrome scale — light */
  --bg:            hsl(0 0% 99%);
  --bg-elev:       hsl(0 0% 100%);
  --bg-sub:        hsl(0 0% 95%);
  --line:          hsl(0 0% 88%);
  --line-strong:   hsl(0 0% 78%);
  --ink:           hsl(0 0% 7%);
  --ink-2:         hsl(0 0% 30%);
  --ink-3:         hsl(0 0% 42%);
  --ink-4:         hsl(0 0% 65%);
  --hero-subtitle: 0 0% 30%;

  /* accent for serif italic emphasis only */
  --accent:        hsl(0 0% 7%);
  --accent-soft:   hsl(0 0% 95%);
  --accent-ink:    hsl(0 0% 7%);

  --pos: 150 55% 38%;
  --warn: 35 75% 50%;
  --neg:  10 70% 50%;

  /* type — Pretendard everywhere */
  --sans: "Pretendard Variable", Pretendard, -apple-system, "system-ui", sans-serif;
  --mono: "Pretendard Variable", Pretendard, -apple-system, "system-ui", sans-serif;
  --serif: "Pretendard Variable", Pretendard, -apple-system, "system-ui", sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  --shadow-1: 0 1px 0 rgba(20, 23, 30, 0.04), 0 1px 2px rgba(20, 23, 30, 0.05);
  --shadow-2: 0 6px 16px -4px rgba(20, 23, 30, 0.08), 0 12px 36px -8px rgba(20, 23, 30, 0.10);

  --nav-h: 76px;
  --max: 1280px;
  --gutter: clamp(20px, 4vw, 64px);
}

[data-theme="dark"] {
  --bg:            hsl(0 0% 0%);
  --bg-elev:       hsl(0 0% 5%);
  --bg-sub:        hsl(0 0% 10%);
  --line:          hsl(0 0% 18%);
  --line-strong:   hsl(0 0% 30%);
  --ink:           hsl(0 0% 100%);
  --ink-2:         hsl(0 0% 80%);
  --ink-3:         hsl(0 0% 62%);
  --ink-4:         hsl(0 0% 38%);
  --hero-subtitle: 0 0% 85%;
  --accent:        hsl(0 0% 100%);
  --accent-soft:   hsl(0 0% 16%);
  --accent-ink:    hsl(0 0% 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-feature-settings: "ss01", "cv11";
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  font-weight: 400;
  /* Korean: break only at spaces / punctuation, never mid-word */
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}

/* Korean phrase unit — wrap natural breath groups so they stay together.
   Use <span class="lb">…</span> around each phrase; breaks fall between them. */
.lb {
  display: inline-block;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ============================================================
   Liquid glass — light mode adaptation
   ============================================================ */
.liquid-glass {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(20, 23, 30, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(20, 23, 30, 0.04),
    0 1px 2px rgba(20, 23, 30, 0.04),
    0 8px 24px -8px rgba(20, 23, 30, 0.10);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.4) 20%,
    rgba(255,255,255,0) 40%,
    rgba(255,255,255,0) 60%,
    rgba(20,23,30,0.06) 80%,
    rgba(20,23,30,0.10) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
[data-theme="dark"] .liquid-glass {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .liquid-glass::before {
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.45) 100%);
}

/* ============================================================
   Type scale
   ============================================================ */
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .dot, .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 1px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.025em; color: var(--ink); }
h1 { font-size: clamp(44px, 7vw, 96px); line-height: 1.0; letter-spacing: -0.04em; font-weight: 600; }
h2 { font-size: clamp(32px, 4.6vw, 64px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; }
h3 { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; }
h4 { font-size: 16px; line-height: 1.4; font-weight: 600; }
p  { margin: 0; color: var(--ink-2); }

.lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--ink-2); max-width: 62ch; font-weight: 400; }
.muted { color: var(--ink-3); }

/* Accent emphasis — thin Pretendard weight for natural Korean editorial feel
   (replaces synthetic italic, which Pretendard does not have a true cut for) */
.serif-it {
  font-weight: 200;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-style: normal;
}
/* Inside heading contexts where the surrounding is weight 600, push the
   contrast a little further with a touch of negative tracking. */
h1 .serif-it, h2 .serif-it {
  font-weight: 200;
  letter-spacing: -0.045em;
}

/* ============================================================
   Containers / sections
   ============================================================ */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section.block {
  padding-top: clamp(80px, 12vw, 180px);
  padding-bottom: clamp(80px, 12vw, 180px);
}

.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(20px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-head .tag { padding-top: 8px; }
.section-head h2 { max-width: 22ch; }
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .arr { display: inline-block; transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn.secondary:hover { background: var(--bg-sub); }
.btn.glass { background: rgba(255,255,255,0.6); color: var(--ink); border: 0; }
.btn.glass:hover { background: rgba(255,255,255,0.85); }

.btn.ghost { background: transparent; color: var(--ink); border: 0; padding-left: 4px; }
.btn.ghost:hover { color: var(--accent-ink); }

.btn.sm { height: 36px; font-size: 13px; padding: 0 14px; }
.btn.lg { height: 54px; padding: 0 26px; font-size: 15px; }

/* circular glass icon button (nav social) */
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  display: inline-grid; place-items: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: color .2s ease, transform .15s ease;
}
.icon-btn:hover { color: var(--ink); transform: translateY(-1px); }

/* ============================================================
   Cards / surfaces
   ============================================================ */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
}

/* ============================================================
   Form
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.field input,
.field textarea,
.field select {
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 0;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px hsl(0 0% 90%);
}
.field textarea { resize: vertical; min-height: 120px; }
.field .err { color: hsl(var(--neg)); font-size: 12.5px; min-height: 16px; }
.field.invalid input,
.field.invalid textarea,
.field.invalid select {
  border-color: hsl(var(--neg));
  box-shadow: 0 0 0 4px hsl(10 80% 95%);
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.65,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* Scroll word reveal */
.sw-word {
  display: inline-block;
  color: hsl(0 0% 75%);
  transition: color .3s ease;
  margin-right: 0.22em;
}
.sw-word.active { color: var(--ink); }
.sw-word.accent.active { color: var(--ink); }
[data-theme="dark"] .sw-word { color: hsl(0 0% 28%); }
[data-theme="dark"] .sw-word.active { color: var(--ink); }

/* ============================================================
   Video placeholder — looping ambient gradient mesh
   ============================================================ */
.video-ph {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--bg-sub);
  isolation: isolate;
}
.video-ph .mesh,
.video-ph .mesh::before,
.video-ph .mesh::after {
  position: absolute; inset: 0;
  content: "";
}
.video-ph .mesh {
  inset: -10%;
  filter: blur(40px);
  opacity: 0.85;
  background:
    radial-gradient(40% 50% at 30% 30%, hsl(220 60% 70% / 0.55) 0%, transparent 60%),
    radial-gradient(40% 60% at 70% 65%, hsl(0 0% 25% / 0.32) 0%, transparent 65%),
    radial-gradient(35% 45% at 50% 80%, hsl(195 50% 65% / 0.4) 0%, transparent 65%),
    linear-gradient(180deg, hsl(0 0% 96%), hsl(0 0% 88%));
  animation: meshDrift 22s ease-in-out infinite alternate;
}
.video-ph .mesh::before {
  background:
    radial-gradient(50% 50% at 80% 20%, hsl(260 50% 75% / 0.3) 0%, transparent 60%),
    radial-gradient(35% 40% at 15% 75%, hsl(0 0% 15% / 0.18) 0%, transparent 70%);
  animation: meshDrift 18s ease-in-out -6s infinite alternate-reverse;
  mix-blend-mode: multiply;
}
.video-ph .grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.video-ph .label {
  position: absolute;
  left: 16px; bottom: 14px;
  z-index: 2;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20,23,30,0.55);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 10px;
  border-radius: 4px;
}
[data-theme="dark"] .video-ph .label {
  color: rgba(255,255,255,0.65);
  background: rgba(0,0,0,0.45);
}
[data-theme="dark"] .video-ph .mesh {
  background:
    radial-gradient(40% 50% at 30% 30%, hsl(220 60% 50% / 0.55) 0%, transparent 60%),
    radial-gradient(40% 60% at 70% 65%, hsl(0 0% 90% / 0.10) 0%, transparent 65%),
    radial-gradient(35% 45% at 50% 80%, hsl(195 50% 50% / 0.35) 0%, transparent 65%),
    linear-gradient(180deg, hsl(0 0% 6%), hsl(0 0% 0%));
}
@keyframes meshDrift {
  0%   { transform: translate(0,0) scale(1) rotate(0deg); }
  100% { transform: translate(-4%, 3%) scale(1.08) rotate(2deg); }
}

/* ============================================================
   Hero
   ============================================================ */
.hero-full {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-bg::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 280px;
  background: linear-gradient(to top, var(--bg) 5%, transparent 100%);
}

/* avatars row */
.avatars { display: inline-flex; align-items: center; }
.avatars .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--bg-sub);
  display: inline-block;
  margin-left: -8px;
  background-size: cover; background-position: center;
}
.avatars .avatar:first-child { margin-left: 0; }
.avatars .avatar.a1 { background: linear-gradient(135deg, hsl(220 50% 75%), hsl(220 60% 55%)); }
.avatars .avatar.a2 { background: linear-gradient(135deg, hsl(0 0% 75%), hsl(0 0% 45%)); }
.avatars .avatar.a3 { background: linear-gradient(135deg, hsl(195 50% 70%), hsl(220 50% 50%)); }

/* ============================================================
   Tabs / accordion / wordmark / pill — slimmed
   ============================================================ */
.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.wordmark .mark { width: 28px; height: 28px; display: inline-grid; place-items: center; position: relative; }
.wordmark .mark .outer { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.wordmark .mark .inner { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.pill .live {
  width: 6px; height: 6px; border-radius: 50%;
  background: hsl(var(--pos));
  box-shadow: 0 0 0 0 hsl(var(--pos));
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 hsl(var(--pos) / 0.5); }
  70%  { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs .tab {
  position: relative;
  padding: 16px 22px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-3);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.005em;
}
.tabs .tab:hover { color: var(--ink); }
.tabs .tab[aria-selected="true"] { color: var(--ink); }
.tabs .tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 2px;
  background: var(--ink);
}

.acc-item { border-top: 1px solid var(--line); padding: 22px 0; }
.acc-item:last-child { border-bottom: 1px solid var(--line); }
.acc-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  cursor: pointer;
  background: transparent;
  border: 0;
  width: 100%;
  padding: 0;
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.acc-head .plus {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  flex: 0 0 auto;
  color: var(--ink-2);
}
.acc-item[data-open="true"] .acc-head .plus {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.acc-item[data-open="true"] .acc-body { max-height: 460px; }
.acc-body-inner { padding-top: 18px; color: var(--ink-2); max-width: 70ch; font-size: 15.5px; line-height: 1.65; }

/* page fade */
.page-fade { animation: pageFade .4s ease both; }
@keyframes pageFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hr { height: 1px; background: var(--line); border: 0; margin: 0; }
.row { display: flex; align-items: center; gap: 16px; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }

.numeric { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* dot separator between nav links */
.nav-sep {
  width: 3px; height: 3px;
  background: var(--ink-4);
  border-radius: 50%;
  margin: 0 4px;
}
