@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/outfit-400.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./assets/fonts/outfit-600.woff2") format("woff2");
}

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./assets/fonts/outfit-700.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/ibm-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./assets/fonts/ibm-500.woff2") format("woff2");
}

:root {
  --bg: #0c0a0a;
  --bg-elevated: #161212;
  --bg-soft: #1c1616;
  --text: #f2e9e9;
  --text-muted: #a89898;
  --accent: #c41e2a;
  --accent-soft: #8f1a22;
  --accent-glow: rgba(196, 30, 42, 0.35);
  --line: rgba(242, 233, 233, 0.12);
  --radius: 12px;
  --max: 1120px;
  --font-sans: "Outfit", "Apple SD Gothic Neo", "Noto Sans KR", "PingFang SC", "Hiragino Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --z-nav: 40;
  --z-grain: 50;
}

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

html {
  scroll-behavior: smooth;
  overflow-wrap: break-word;
}

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

/* Korean: wrap at eojeol (spaces), not mid-syllable; still break long Latin tokens */
html[lang="ko"] {
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: anywhere;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(196, 30, 42, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(196, 30, 42, 0.06), transparent 50%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

code {
  overflow-wrap: anywhere;
  word-break: break-all;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.04;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 10, 10, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.site-header__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.brand span {
  color: var(--accent);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

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

.lang-switch__select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 2rem;
  padding: 0.3rem 1.85rem 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    var(--bg-elevated)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a89898' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 0.65rem center;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.25s var(--ease);
}

.lang-switch__select:hover,
.lang-switch__select:focus-visible {
  border-color: rgba(196, 30, 42, 0.55);
  outline: none;
}

.lang-switch__pills {
  display: none;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elevated);
}

.lang-switch__btn {
  min-height: 1.7rem;
  padding: 0.2rem 0.45rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease);
}

.lang-switch__btn:hover,
.lang-switch__btn:focus-visible {
  color: var(--text);
  outline: none;
}

.lang-switch__btn.is-active {
  background: rgba(196, 30, 42, 0.18);
  color: var(--text);
}

@media (min-width: 900px) {
  .lang-switch__select {
    display: none;
  }

  .lang-switch__pills {
    display: flex;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
}

.nav a {
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.nav__cta {
  color: var(--text) !important;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    transform 0.15s var(--ease);
}

.nav__cta:hover,
.nav__cta:focus-visible {
  border-color: var(--accent);
  background: rgba(196, 30, 42, 0.12);
}

.nav__cta:active {
  transform: scale(0.98);
}

.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-content: end;
  padding: 0 0 4.5rem;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 10, 10, 0.35) 0%, rgba(12, 10, 10, 0.55) 42%, rgba(12, 10, 10, 0.96) 100%),
    radial-gradient(ellipse 70% 50% at 50% 40%, transparent 20%, rgba(12, 10, 10, 0.55) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding-top: 5rem;
  max-width: 40rem;
}

.hero__brand {
  margin: 0 0 0.75rem;
  font-size: clamp(3.25rem, 9vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.hero__brand span {
  color: var(--accent);
}

.hero__lead {
  margin: 0 0 0.65rem;
  max-width: min(100%, 40rem);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.45;
}

.hero__motif {
  margin: 0 0 1.75rem;
  max-width: min(100%, 40rem);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  color: #c9a0a3;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

html[lang="ko"] .hero__motif,
html[lang="zh"] .hero__motif,
html[lang="ja"] .hero__motif {
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition:
    transform 0.15s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff5f5;
  box-shadow: 0 10px 30px var(--accent-glow);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #d92634;
}

.btn--ghost {
  background: rgba(22, 18, 18, 0.55);
  border-color: var(--line);
  color: var(--text);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: rgba(196, 30, 42, 0.55);
  background: rgba(196, 30, 42, 0.1);
}

.section {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding: 5.5rem 0;
}

.section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section__body {
  margin: 0 0 2rem;
  max-width: min(100%, 52rem);
  color: var(--text-muted);
  font-size: 1.05rem;
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.arch-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f4f4f4;
  transition:
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.arch-link:hover,
.arch-link:focus-visible {
  border-color: rgba(196, 30, 42, 0.55);
  box-shadow: 0 20px 50px rgba(196, 30, 42, 0.18);
  transform: translateY(-2px);
}

.arch-link:active {
  transform: scale(0.995);
}

.arch-link img {
  width: 100%;
  height: auto;
}

.arch-link__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.arch-link__meta strong {
  color: var(--text);
  font-weight: 500;
}

.pipeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  max-width: 52rem;
}

.pipeline__list li {
  display: grid;
  gap: 0.35rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
  .pipeline__list li {
    grid-template-columns: 11rem 1fr;
    gap: 1.5rem;
    align-items: baseline;
  }
}

.pipeline__list h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pipeline__list p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.links-strip {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .links-strip {
    grid-template-columns: 1fr 1fr;
  }
}

.link-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    transform 0.15s var(--ease);
}

.link-tile:hover,
.link-tile:focus-visible {
  border-color: rgba(196, 30, 42, 0.55);
  background: var(--bg-soft);
}

.link-tile:active {
  transform: scale(0.98);
}

.link-tile strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.link-tile span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
}

.site-footer__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer__meta {
  display: grid;
  gap: 0.35rem;
}

.site-footer__meta p,
.site-footer__inner > p {
  margin: 0;
}

.site-footer__credit {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.site-footer a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(196, 30, 42, 0.55);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: rise 0.8s var(--ease) forwards;
  }

  .reveal-d1 { animation-delay: 0.08s; }
  .reveal-d2 { animation-delay: 0.16s; }
  .reveal-d3 { animation-delay: 0.24s; }

  @keyframes rise {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero__brand span {
    animation: pulse-red 3.6s var(--ease) infinite;
  }

  @keyframes pulse-red {
    0%, 100% { color: var(--accent); }
    50% { color: #e43a45; }
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 860px) {
  .nav a:not(.nav__cta) {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 92dvh;
    padding-bottom: 3rem;
  }

  .hero__content {
    padding-top: 4rem;
  }

  .section {
    padding: 4rem 0;
  }

  .lang-switch__select {
    font-size: 0.7rem;
    padding-inline: 0.55rem 1.7rem;
  }
}
