/* QMLab landing — warm paper, forest ink, one amber dot.
   Type: Pretendard Variable webfont — identical rendering on every OS
   (system Korean fonts lack the weight range this design depends on).
   The one idea: the dot of a question mark becomes the period of a sentence,
   and scattered dots become stars. */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --paper: #f4f1e8;
  --paper-soft: #faf8f2;
  --ink: #1a2420;
  --ink-soft: #55635c;
  --line: #ded9c9;
  --line-strong: #c9c3ae;
  --forest: #285448;
  --forest-deep: #1b3d34;
  --night: #11271f;
  --night-deep: #0b1c16;
  --amber: #c78635;
  --amber-bright: #e2a44e;
  --starlight: #f2efe2;
  --starlight-soft: rgba(242, 239, 226, 0.8);
  --starlight-line: rgba(242, 239, 226, 0.16);

  --font-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-display: var(--font-body);

  --shell: 1120px;
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

a,
button {
  touch-action: manipulation;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: -0.006em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper grain — barely there */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

::selection {
  background: var(--forest);
  color: var(--starlight);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.trove :focus-visible {
  outline-color: var(--starlight);
}

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4.5vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--forest-deep);
  color: var(--starlight);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  font-size: 0.9rem;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

.eyebrow {
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--forest);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 241, 232, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.logo-mark {
  width: 1.7rem;
  height: 1.7rem;
  display: block;
  color: var(--forest);
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--forest);
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--starlight);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
  padding-block: clamp(4.5rem, 11vh, 8.5rem) clamp(4.5rem, 10vh, 7.5rem);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: clamp(1.75rem, 4vh, 2.5rem);
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--amber);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.7rem, 6.2vw, 4.8rem);
  line-height: 1.16;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.keep {
  white-space: nowrap;
}

.dot-period {
  display: inline-block;
  width: 0.34em;
  height: 0.34em;
  margin-left: 0.1em;
  border-radius: 50%;
  background: var(--amber);
  transform-origin: center;
}

.hero-intro {
  max-width: 33rem;
  margin-top: clamp(1.75rem, 4vh, 2.5rem);
  display: grid;
  gap: 1.05rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin-top: clamp(2.25rem, 5vh, 3rem);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.button .arrow {
  transition: transform 0.2s ease;
}

.button:hover .arrow {
  transform: translateX(4px);
}

.button.primary {
  background: var(--forest);
  color: var(--starlight);
  box-shadow: 0 10px 28px rgba(27, 61, 52, 0.22);
}

.button.primary:hover {
  background: var(--forest-deep);
}

.button.light {
  background: var(--starlight);
  color: var(--night);
}

.button.light:hover {
  background: #fffdf4;
}

.text-link {
  font-weight: 650;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 0.4em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.text-link:hover {
  color: var(--forest);
  text-decoration-color: var(--forest);
}

/* the hero galaxy — a time-lapse of a small cosmos:
   linked stars drifting slowly, long-exposure trails, quiet twinkle */

.hero-figure {
  position: relative;
  width: 100%;
  max-width: 34rem;
  aspect-ratio: 1;
  justify-self: center;
  pointer-events: none;
}

.galaxy {
  width: 100%;
  height: 100%;
  display: block;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 88%);
  mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 88%);
}

.galaxy .field {
  transform-origin: 50% 50%;
}

.galaxy .trail {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: 0.5;
}

.galaxy .edge {
  stroke: var(--forest);
  stroke-width: 1;
  opacity: 0.25;
}

.galaxy .g-star {
  fill: var(--forest);
  opacity: 0.65;
}

.galaxy .g-star.amber {
  fill: var(--amber);
  opacity: 0.75;
}

.galaxy .g-star.dim {
  fill: var(--ink-soft);
  opacity: 0.4;
}

.js .galaxy .field {
  animation: galaxy-turn 260s linear infinite;
}

.js .galaxy .g-star {
  animation: galaxy-twinkle 5.5s ease-in-out infinite;
}

.js .galaxy .g-star:nth-of-type(3n) {
  animation-delay: 1.8s;
}

.js .galaxy .g-star:nth-of-type(4n) {
  animation-delay: 3.4s;
}

.js .galaxy .g-star:nth-of-type(5n) {
  animation-duration: 7.5s;
}

.js .galaxy .g-star.amber {
  animation-name: galaxy-twinkle-amber;
}

@keyframes galaxy-turn {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes galaxy-twinkle {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes galaxy-twinkle-amber {
  0%, 100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.js .dot-period {
  animation: dot-land 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 0.5s both;
}

@keyframes dot-land {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* ---------- flow: question to outcome ---------- */

.approach {
  border-top: 1px solid var(--line);
  padding-block: clamp(4.5rem, 10vh, 7.5rem);
}

.section-heading {
  display: grid;
  gap: 1.2rem;
  margin-bottom: clamp(3rem, 7vh, 4.5rem);
}

.section-heading h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.24;
  letter-spacing: -0.035em;
  max-width: 24em;
  text-wrap: balance;
}

.flow-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.flow-list::before {
  content: "";
  position: absolute;
  top: 0.34rem;
  left: 0.4rem;
  right: 22%;
  height: 1px;
  background: var(--line-strong);
}

.flow-list li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding-top: 1.6rem;
}

.flow-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  border: 1.5px solid var(--forest);
  background: var(--paper);
}

.flow-list li:nth-child(2) .flow-dot {
  background: radial-gradient(circle at center, var(--forest) 34%, var(--paper) 36%);
}

.flow-list li:nth-child(3) .flow-dot {
  background: radial-gradient(circle at center, var(--forest) 58%, var(--paper) 60%);
}

.flow-list li:nth-child(4) .flow-dot {
  border-color: var(--amber);
  background: var(--amber);
}

.flow-step {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}

.flow-list strong {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: -0.025em;
}

.flow-list p {
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.approach-note {
  margin-top: clamp(3rem, 7vh, 4.5rem);
  padding-top: clamp(2rem, 5vh, 3rem);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  color: var(--ink-soft);
}

.approach-note p + p {
  margin-top: 0;
}

/* ---------- trove: the night window ---------- */

.trove {
  background:
    radial-gradient(110% 70% at 82% 4%, rgba(226, 164, 78, 0.1), transparent 52%),
    radial-gradient(90% 80% at 10% 100%, rgba(40, 84, 72, 0.55), transparent 62%),
    linear-gradient(168deg, var(--night), var(--night-deep) 74%);
  color: var(--starlight);
  padding-block: clamp(5rem, 12vh, 8.5rem);
  position: relative;
  overflow: hidden;
}

.trove .eyebrow {
  color: var(--amber-bright);
}

.trove-head {
  display: grid;
  gap: 1.3rem;
  max-width: 40rem;
}

.trove-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.22;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.trove-head h2 em {
  font-style: normal;
  color: var(--amber-bright);
}

.trove-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
  margin-top: clamp(3rem, 7vh, 4.5rem);
}

.trove-copy {
  display: grid;
  gap: 1.1rem;
  color: var(--starlight-soft);
}

.trove-copy .lead {
  color: var(--starlight);
  font-size: 1.13rem;
  line-height: 1.75;
}

/* trove, in daylight */

.trove-shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(242, 239, 226, 0.16);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
}

.trove-shot figcaption {
  margin-top: 1.3rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--starlight-soft);
}

/* features */

.feature-list {
  list-style: none;
  margin-top: clamp(3.5rem, 8vh, 5rem);
  border-top: 1px solid var(--starlight-line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(2.5rem, 6vw, 5rem);
}

.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--starlight-line);
}

.feature-list li:last-child {
  border-bottom-color: transparent;
}

.star-marker {
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.5rem;
}

.star-marker path {
  fill: var(--amber-bright);
}

.feature-list strong {
  font-weight: 750;
  font-size: 1.04rem;
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 0.25rem;
}

.feature-list p {
  font-size: 0.98rem;
  color: var(--starlight-soft);
  max-width: 34rem;
}

.feature-list li:last-child {
  grid-column: 1 / -1;
}

/* closing cta */

.trove-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(3rem, 8vh, 4.5rem);
  padding-top: clamp(2.5rem, 6vh, 3.5rem);
  border-top: 1px solid var(--starlight-line);
}

.trove-cta h3 {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  line-height: 1.4;
  letter-spacing: -0.025em;
  max-width: 21em;
  text-wrap: balance;
}

.trove-cta .invite {
  margin-top: 0.9rem;
  color: var(--starlight-soft);
  font-size: 0.98rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3.25rem 3.75rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
}

.footer-wordmark {
  margin-bottom: 1rem;
}

.footer-inner > div:first-child p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 21rem;
}

.footer-meta {
  display: grid;
  gap: 0.6rem;
  justify-items: start;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.footer-meta a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer-meta a:hover {
  color: var(--forest);
  border-color: var(--forest);
}

/* ---------- scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .reveal:nth-child(3) { transition-delay: 0.16s; }
.js .reveal:nth-child(4) { transition-delay: 0.24s; }

/* ---------- legal pages ---------- */

.legal {
  padding-block: clamp(3.5rem, 8vh, 5.5rem) clamp(4rem, 9vh, 6rem);
}

.legal > * {
  max-width: 46rem;
}

.breadcrumb {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}

.legal h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.legal-lede {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.legal-doc {
  margin-top: 3rem;
}

.legal-meta {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.legal-doc h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin-top: 2.75rem;
  margin-bottom: 0.8rem;
}

.legal-doc h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-top: 2rem;
  margin-bottom: 0.7rem;
}

.legal-doc p {
  margin-bottom: 0.9rem;
  color: #3c463f;
}

.legal-doc ul {
  margin: 0.4rem 0 1.1rem 1.2rem;
  color: #3c463f;
  display: grid;
  gap: 0.45rem;
}

.legal-doc a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.legal-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 3.5rem 0 2.5rem;
}

.legal-lang {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
    padding-block: 3.5rem 4rem;
  }

  .hero-figure {
    max-width: 21rem;
    margin-inline: auto;
    margin-top: -1rem;
  }

  .flow-list {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 1.6rem;
  }

  .flow-list::before {
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.34rem;
    right: auto;
    width: 1px;
    height: auto;
  }

  .flow-list li {
    padding: 0.9rem 0;
  }

  .flow-dot {
    top: 1.15rem;
    left: -1.6rem;
  }

  .approach-note {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .trove-body {
    grid-template-columns: 1fr;
  }


  .feature-list {
    grid-template-columns: 1fr;
  }

  .feature-list li:nth-last-child(2) {
    border-bottom: 1px solid var(--starlight-line);
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  body::before {
    display: none;
  }

  .approach {
    padding-block: 3.75rem;
  }

  .approach-note {
    margin-top: 2.25rem;
    padding-top: 1.75rem;
  }

  .trove {
    padding-block: 4rem;
  }

  .trove-body {
    margin-top: 2.5rem;
  }

  .feature-list {
    margin-top: 2.75rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 10.5vw, 2.9rem);
  }

  .hero-actions .button {
    width: 100%;
    justify-content: center;
  }

  .trove-cta .button {
    width: 100%;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .dot-period,
  .js .galaxy .field,
  .js .galaxy .g-star {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .button,
  .button .arrow,
  .nav-link,
  .footer-meta a,
  .text-link {
    transition: none;
  }
}
