@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&family=Noto+Sans+KR:wght@300;400;500;600;700&family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap");

:root {
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", "Courier New", monospace;
  --font-serif: "Instrument Serif", Georgia, serif;

  /* Shared layout tokens */
  --shell-max: 1200px;
  --shell-gutter: 40px;
  --shell-gutter-mobile: 24px;
  --header-h: 64px;
  --section-pad-y: 96px;
  --section-pad-y-mobile: 64px;

  --background: #111218;
  --foreground: #f0f0f2;
  --card: #16171e;
  --panel: #0e0f14;
  --panel-alt: #13141a;
  --muted: #a0a4ad;
  --muted-deep: #6b7280;
  --dim: #4b5563;
  --border: #232530;
  --border-soft: #1e2028;
  --primary: #00c2b6;
  --primary-bright: #00d9cc;
  --accent: #7952b3;
  --accent-warm: #ffb347;
  --green: #28c840;
  --syntax-string: #f97316;
  --syntax-blue: #6dd7ee;
  --syntax-mint: #6af0c4;
  --syntax-purple: #c88fff;
}

html[lang="ko"] body { font-family: "Geist", "Noto Sans KR", sans-serif; }
html[lang="vi"] body { font-family: "Be Vietnam Pro", "Geist", sans-serif; }

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0, 194, 182, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(121, 82, 179, 0.04) 0%, transparent 50%),
    var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.menu-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

::selection {
  background: rgba(0, 194, 182, 0.2);
  color: var(--primary);
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-gutter);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(17, 18, 24, 0.92);
  backdrop-filter: blur(12px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 22px;
}

.desktop-nav a,
.desktop-actions a,
.mobile-menu a,
.footer-nav a,
.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--foreground);
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  background: url("favicon.png") center/contain no-repeat;
}

.brand:hover,
.desktop-nav a:hover,
.desktop-actions a:hover,
.mobile-menu a:hover,
.footer-nav a:hover,
.footer-links a:hover {
  color: var(--primary);
}

.desktop-nav,
.desktop-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.desktop-nav a {
  color: var(--muted);
  padding: 8px 10px;
  transition: color 0.2s ease;
}

.desktop-actions {
  gap: 16px;
}

.desktop-actions a,
.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.outline-link {
  border: 1px solid var(--border);
  padding: 8px 10px;
}

.outline-link:hover {
  border-color: var(--primary);
}

/* Language switcher (shared with difisoft) */
.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lang-trigger:hover {
  border-color: var(--primary);
  color: var(--foreground);
}

.lang-trigger .lang-flag {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.lang-trigger .chev {
  font-size: 9px;
  opacity: 0.6;
  transition: transform 0.25s ease;
}

.lang-switcher.open .lang-trigger .chev {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 144px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(17, 18, 24, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.lang-switcher.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--foreground);
}

.lang-item.active {
  color: var(--primary);
}

.lang-item .label {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0;
}

[data-i18n], [data-i18n-html] {
  transition: opacity 0.15s ease;
}

body.lang-switching [data-i18n],
body.lang-switching [data-i18n-html] {
  opacity: 0.3;
}

.menu-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  height: 1px;
  width: 18px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-open span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-toggle.is-open span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border-soft);
  background: rgba(17, 18, 24, 0.98);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px var(--shell-gutter);
}

.mobile-menu a {
  color: var(--muted);
}

.mobile-divider {
  display: block;
  height: 1px;
  background: var(--border-soft);
}

.primary-text {
  color: var(--primary) !important;
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  overflow: hidden;
}

.section-border {
  border-bottom: 1px solid var(--border-soft);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.04;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: calc(100svh - var(--header-h) - 20px);
  padding: calc(var(--header-h)) var(--shell-gutter) 80px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid rgba(0, 194, 182, 0.25);
  border-radius: 100px;
  background: rgba(0, 194, 182, 0.08);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 32px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  flex: 0 0 auto;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0 0 22px;
  max-width: 600px;
  color: var(--foreground);
  font-size: 60px;
  line-height: 1.08;
  font-weight: 700;
}

h2 {
  margin-bottom: 16px;
  max-width: 790px;
  color: var(--foreground);
  font-size: 40px;
  line-height: 1.18;
  font-weight: 700;
}

h3 {
  color: var(--foreground);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.gradient-serif {
  display: inline;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.hero-desc {
  max-width: 430px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.hero-note,
.section-quote,
.final-note {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  color: var(--dim);
}

.hero-note {
  max-width: 520px;
  margin-bottom: 34px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button-primary {
  background: var(--primary);
  color: var(--background);
}

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

.button-secondary {
  border-color: var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.button-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.terminal {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-alt);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.terminal-dot.red {
  background: #ff5f57;
}

.terminal-dot.yellow {
  background: #febc2e;
}

.terminal-dot.green {
  background: var(--green);
}

.terminal-title {
  min-width: 0;
  margin-left: 6px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.terminal-body {
  padding: 16px 18px;
  color: #c9cdd6;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  overflow-x: auto;
}

.t-comment { color: var(--dim); }
.t-string { color: var(--syntax-string); }
.t-key { color: var(--syntax-blue); }
.t-arrow { color: var(--syntax-mint); }
.t-purple { color: var(--syntax-purple); }
.t-white { color: var(--foreground); }
.t-dim { color: var(--dim); }
.t-live { color: var(--green); }

.section {
  padding: var(--section-pad-y) 0;
}

.section-index,
.panel-num,
.tech-note,
.cta-eyebrow,
.feature-heading span,
.channel-status {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-deep);
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-index {
  margin-bottom: 28px;
}

.section-desc {
  max-width: 590px;
  margin-bottom: 56px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.section-desc.small {
  margin-bottom: 28px;
  font-size: 14px;
}

.section-desc.tight {
  margin-bottom: 10px;
}

.section-desc.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.panel-grid {
  display: grid;
  border: 1px solid var(--border-soft);
}

.panel-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  padding: 30px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.2s ease;
}

.panel:hover,
.feature-row:hover,
.compare-row:hover {
  background: var(--card);
}

.panel:hover h3,
.feature-row:hover h3,
.channel-card:hover h3 {
  color: var(--primary);
}

.panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.panel-num {
  display: block;
  margin-bottom: 22px;
}

.panel-grid.three .panel:nth-child(3n),
.panel-grid.two .panel:nth-child(2n),
.panel-grid.four .panel:nth-child(4n) {
  border-right: 0;
}

.panel-grid.three .panel:nth-last-child(-n + 3),
.panel-grid.two .panel:nth-last-child(-n + 2),
.panel-grid.four .panel:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 64px;
  align-items: start;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  transition: gap 0.2s ease;
}

.arrow-link:hover {
  gap: 10px;
}

.feature-list {
  border: 1px solid var(--border-soft);
}

.feature-row {
  padding: 20px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.2s ease;
}

.feature-row:last-child {
  border-bottom: 0;
}

.feature-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.feature-heading h3 {
  margin-bottom: 0;
}

.feature-row p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.feature-row code {
  display: block;
  border-left: 2px solid var(--primary);
  background: var(--panel);
  color: var(--syntax-mint);
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
}

.tech-note {
  display: block;
  margin-top: 18px;
  color: var(--dim);
  text-transform: none;
}

.compare-table {
  border: 1px solid var(--border-soft);
  overflow-x: auto;
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(116px, 0.55fr) minmax(136px, 0.65fr);
  align-items: center;
  gap: 16px;
  min-width: 640px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.2s ease;
}

.compare-row:last-child {
  border-bottom: 0;
}

.compare-head {
  background: var(--panel-alt);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.compare-head div:nth-child(2) {
  color: var(--primary);
}

.compare-row div {
  min-width: 0;
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.45;
}

.compare-row div:nth-child(2),
.compare-row div:nth-child(3) {
  text-align: center;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 16px;
  line-height: 1;
}

.mark.yes {
  color: var(--primary);
}

.mark.yes.soft {
  color: var(--muted-deep);
}

.mark.no {
  color: var(--border);
}

.mark.no.muted {
  color: var(--muted-deep);
}

.section-quote {
  max-width: 700px;
  margin-bottom: 44px;
}

.channel-card h3 {
  margin-top: 16px;
  font-size: 20px;
}

.channel-card:not(.live) h3 {
  color: var(--muted-deep);
}

.channel-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.channel-status > span:first-child {
  flex: none;
  width: 8px;
  height: 8px;
  border: 1px solid var(--dim);
  border-radius: 50%;
  background: var(--border);
}

.channel-card.live .channel-status > span:first-child {
  border-color: var(--green);
  background: var(--green);
}

.trust-grid {
  margin-bottom: 48px;
}

.quote-block {
  margin: 0;
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--primary);
  background: var(--panel);
  padding: 30px;
}

.quote-block blockquote {
  margin: 0 0 12px;
  color: var(--syntax-mint);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
}

.quote-block figcaption {
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 12px;
}

.cta-section {
  padding: calc(var(--section-pad-y) + 32px) 0;
  text-align: center;
}

.cta-eyebrow {
  margin-bottom: 24px;
}

.cta-section h2 {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  font-size: 68px;
  line-height: 1.1;
}

.cta-actions {
  justify-content: center;
  margin-top: 34px;
}

.final-note {
  margin-top: 36px;
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--border-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  gap: 30px;
  align-items: center;
  padding: 40px var(--shell-gutter) 30px;
}

.footer-brand span {
  display: block;
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.footer-brand p,
.footer-bottom p {
  margin: 6px 0 0;
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}

.footer-nav a {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border-soft);
  padding: 22px var(--shell-gutter) 28px;
}

.footer-bottom p:last-child {
  color: var(--border);
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

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

@media (max-width: 940px) {
  .desktop-nav,
  .desktop-actions {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding: calc(var(--header-h) + 32px) var(--shell-gutter) 64px;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  h1 {
    font-size: 46px;
  }

  h2 {
    font-size: 34px;
  }

  .panel-grid.three,
  .panel-grid.two,
  .panel-grid.four {
    grid-template-columns: 1fr;
  }

  .panel,
  .panel-grid.three .panel:nth-child(3n),
  .panel-grid.two .panel:nth-child(2n),
  .panel-grid.four .panel:nth-child(4n) {
    border-right: 0;
  }

  .panel-grid.three .panel:nth-last-child(-n + 3),
  .panel-grid.two .panel:nth-last-child(-n + 2),
  .panel-grid.four .panel:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--border-soft);
  }

  .panel-grid .panel:last-child {
    border-bottom: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .footer-links {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 0 var(--shell-gutter-mobile);
  }

  .mobile-menu-inner {
    padding: 24px var(--shell-gutter-mobile);
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    min-height: auto;
    padding: calc(var(--header-h) + 32px) var(--shell-gutter-mobile) 56px;
    gap: 36px;
  }

  .section {
    padding: var(--section-pad-y-mobile) 0;
  }

  .cta-section {
    padding: calc(var(--section-pad-y-mobile) + 16px) 0;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 30px;
  }

  .cta-section h2 {
    font-size: 44px;
  }

  .section-desc {
    margin-bottom: 38px;
  }

  .panel,
  .quote-block {
    padding: 24px;
  }

  .compare-row {
    min-width: 560px;
    grid-template-columns: minmax(180px, 1fr) minmax(96px, 0.55fr) minmax(112px, 0.7fr);
    padding: 12px 16px;
  }

  .compare-row div {
    font-size: 12px;
  }

  .terminal-body {
    font-size: 11px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px var(--shell-gutter-mobile) 28px;
  }

  .footer-grid {
    padding: 40px var(--shell-gutter-mobile) 30px;
  }
}
