/* L Universe Company — site styles
   Palette: paper / ink / life (apricot) / link (teal) / layer (violet) */

:root {
  --paper: #F4F2EE;
  --paper-deep: #ECE8E1;
  --ink: #26221E;
  --ink-soft: #5F5A52;
  --ink-faint: #8C8579;
  --line: #D8D2C6;
  --life: #F08A4B;
  --link: #2E6E8E;
  --layer: #6C5BB5;
  --life-soft: rgba(240, 138, 75, 0.16);
  --link-soft: rgba(46, 110, 142, 0.14);
  --layer-soft: rgba(108, 91, 181, 0.14);

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 10vw, 8.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-feature-settings: "ss01", "cv01";
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
svg { display: block; }

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: .5rem .75rem;
  background: var(--ink);
  color: var(--paper);
  z-index: 100;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */

.top { padding-block: 1.25rem; }
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mark { width: 28px; height: 28px; mix-blend-mode: multiply; }
.mark-life { fill: var(--life); opacity: .8; }
.mark-link { fill: var(--link); opacity: .7; }
.mark-layer { fill: var(--layer); opacity: .7; }

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: .95rem;
  color: var(--ink-soft);
}
.nav a {
  text-decoration: none;
  padding-block: .25rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.menu-btn {
  display: none;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .9rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .menu-btn { display: inline-block; }
  .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: .25rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
    margin-top: .75rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding-block: .5rem; }
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 6rem) var(--section); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.slogan {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: var(--ink-soft);
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 34em;
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-block;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  border: 1px solid var(--ink);
  transition: background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #3A352F; border-color: #3A352F; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper-deep); }

.hero-art { max-width: 520px; width: 100%; margin-inline: auto; }
.hero-art svg { width: 100%; height: auto; }
.orbit { fill: none; stroke: var(--line); stroke-width: 1; }
.plane { mix-blend-mode: multiply; }
.plane-life  { fill: var(--life);  opacity: .62; }
.plane-link  { fill: var(--link);  opacity: .52; }
.plane-layer { fill: var(--layer); opacity: .52; }
.core { fill: var(--ink); }

/* one page-load moment: planes drift in and settle into overlap */
@media (prefers-reduced-motion: no-preference) {
  .plane { animation: settle 1.4s cubic-bezier(.2, .7, .2, 1) both; }
  .plane-life  { --dx: -60px; --dy: -50px; }
  .plane-link  { --dx:  60px; --dy: -50px; animation-delay: .08s; }
  .plane-layer { --dx:   0px; --dy:  70px; animation-delay: .16s; }
  @keyframes settle {
    from { transform: translate(var(--dx), var(--dy)); opacity: 0; }
    to   { transform: translate(0, 0); }
  }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 340px; order: -1; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); border-top: 1px solid var(--line); }

.section-head { max-width: 40em; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-head p { margin-top: 1rem; color: var(--ink-soft); }

/* ---------- Values ---------- */

.value-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.value {
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}
.value h3 { font-size: 1.5rem; margin-top: 1.25rem; }
.value p { margin-top: .6rem; color: var(--ink-soft); }
.glyph { width: 56px; height: 56px; }

.value-life .glyph circle { fill: var(--life); }
.value-life .glyph .halo { fill: var(--life-soft); }
.value-link .glyph .edge { fill: none; stroke: var(--link); stroke-width: 2; stroke-linejoin: round; }
.value-link .glyph circle { fill: var(--link); }
.value-layer .glyph rect { stroke: var(--layer); stroke-width: 1.5; }
.value-layer .glyph .l1 { fill: var(--layer); }
.value-layer .glyph .l2 { fill: var(--layer-soft); }
.value-layer .glyph .l3 { fill: var(--paper); }

@media (max-width: 720px) {
  .value-list { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Universe map ---------- */

.universe-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.map svg { width: 100%; height: auto; font-family: var(--sans); }
.map figcaption {
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--ink-faint);
}

.map-orbit { fill: none; stroke: var(--line); stroke-width: 1; }
.map-edge { stroke: var(--ink); stroke-opacity: .35; stroke-width: 1.5; }
.map-edge-dashed { stroke-dasharray: 4 6; }
.map-boundary { fill: none; stroke: var(--ink); stroke-opacity: .45; stroke-width: 1; stroke-dasharray: 3 5; }

.map-center circle { fill: var(--ink); }
.map-center-name { fill: var(--paper); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.map-center-sub { fill: var(--paper); fill-opacity: .7; font-size: 11.5px; }

.map-node { text-decoration: none; cursor: pointer; }
.map-node circle { stroke: var(--paper); stroke-width: 4; transition: transform .2s ease; transform-box: fill-box; transform-origin: center; }
.map-node:hover circle, .map-node:focus-visible circle { transform: scale(1.06); }
.map-node-name { font-size: 14px; font-weight: 700; fill: #fff; letter-spacing: -0.01em; }
.map-node-sub { font-size: 12px; fill: var(--ink-soft); }
.node-life circle { fill: var(--life); }
.node-link circle { fill: var(--link); }
.node-layer circle { fill: var(--layer); }
.node-internal circle { fill: var(--paper); stroke: var(--ink-faint); stroke-width: 1; stroke-dasharray: 3 4; }
.node-internal .map-node-name { fill: var(--ink-soft); font-size: 12.5px; }
.node-internal .map-node-sub { fill: var(--ink-faint); }

.brand-rail { border-left: 1px solid var(--line); }
.rail-item { position: relative; padding: 1rem 0 1rem 1.75rem; }
.rail-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 1.45rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--ink);
}
.rail-life::before { border-color: var(--life); }
.rail-link::before { border-color: var(--link); }
.rail-layer::before { border-color: var(--layer); }
.rail-internal::before { border-color: var(--ink-faint); border-style: dashed; border-width: 1.5px; }
.rail-item a, .rail-item div { display: block; text-decoration: none; }
.rail-item strong { display: block; font-size: 1.1rem; }
.rail-item span { display: block; margin-top: .2rem; font-size: .95rem; color: var(--ink-soft); }
.rail-item a:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.rail-internal strong { color: var(--ink-soft); }

@media (max-width: 860px) {
  .universe-grid { grid-template-columns: 1fr; }
  .map { display: none; }
}

/* ---------- Featured (Lohtu) ---------- */

.featured { background: var(--paper-deep); }
.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
}
.lead-line { color: var(--life); font-weight: 600; }
.featured-intro h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-top: .5rem; }
.latin { font-family: var(--serif); font-weight: 400; font-style: italic; color: var(--ink-soft); }
.featured-quote {
  margin-top: 1.5rem;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.5;
  max-width: 22em;
}
.featured-body p { color: var(--ink-soft); }
.featured-body .btn { margin-top: 2rem; }

.facts { margin: 1.75rem 0 0; display: grid; gap: .75rem; }
.facts div { display: grid; grid-template-columns: 6.5em 1fr; gap: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.facts dt { color: var(--ink-faint); font-size: .9rem; margin: 0; }
.facts dd { margin: 0; font-size: .95rem; }

@media (max-width: 860px) {
  .featured-grid { grid-template-columns: 1fr; }
}

/* ---------- Other worlds ---------- */

.world-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
.world { padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.world-link { border-top-color: var(--link); }
.world-layer { border-top-color: var(--layer); }
.world h3 { font-size: 1.6rem; }
.world-line { margin-top: .5rem; font-size: 1.1rem; }
.world .facts { margin-top: 1.5rem; }
.text-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .25em;
  text-decoration-thickness: 1px;
}
.text-muted { margin-top: 1.5rem; color: var(--ink-faint); font-size: .95rem; }

@media (max-width: 720px) {
  .world-grid { grid-template-columns: 1fr; }
}

/* ---------- Closing ---------- */

.closing-inner { max-width: 36em; }
.closing h2 { font-size: clamp(2rem, 4vw, 3rem); }
.closing p { margin-top: 1rem; color: var(--ink-soft); }
.mail {
  display: inline-block;
  margin-top: 1.75rem;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-underline-offset: .2em;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--life);
}

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: .9rem; color: var(--ink-soft); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: baseline; }
.foot-brand { display: flex; flex-direction: column; }
.foot-brand strong { color: var(--ink); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; text-underline-offset: .2em; }
.foot-note { flex-basis: 100%; color: var(--ink-faint); }
