/* ============================================================
   WSTORY AI & IoT — Design System
   Deep-navy industrial dark theme with cyan signature accent
   ============================================================ */

:root {
  /* Color */
  --bg-0: #060e20;
  --bg-1: #0b1326;
  --bg-2: #131b2e;
  --bg-3: #171f33;
  --line: rgba(120, 160, 220, 0.14);
  --line-strong: rgba(120, 160, 220, 0.28);
  --cyan: #00d0f0;
  --cyan-soft: rgba(0, 208, 240, 0.12);
  --cyan-glow: rgba(0, 208, 240, 0.45);
  --ink: #e8f0fa;
  --ink-dim: #9db0c8;
  --ink-faint: #5f7492;

  /* Type */
  --font-display: "Archivo", "Pretendard", sans-serif;
  --font-body: "Pretendard", "Apple SD Gothic Neo", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;

  /* Layout */
  --max-w: 1200px;
  --nav-h: 72px;
}

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

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

body {
  background: var(--bg-1);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* wrap Korean at word boundaries, not mid-word */
  word-break: keep-all;
  overflow-wrap: break-word;
}

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

::selection { background: var(--cyan); color: var(--bg-0); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ----------------------------------------------------------
   Navigation
   ---------------------------------------------------------- */
.gnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.gnav.scrolled {
  background: rgba(6, 14, 32, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
}

.gnav__inner {
  width: min(var(--max-w), 92%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.gnav__logo {
  display: flex;
  align-items: center;
}
.gnav__logo-img {
  height: 30px;
  width: auto;
}
.gnav__logo-footer {
  height: auto;
}

.gnav__menu {
  display: flex;
  gap: 4px;
}
.gnav__menu a {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-dim);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.gnav__menu a:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.gnav__menu a.active {
  color: var(--cyan);
}
.gnav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bg-0);
  background: var(--cyan);
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.gnav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--cyan-glow);
}

/* Mobile menu button */
.gnav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.gnav__toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  transition: 0.3s;
}
.gnav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gnav__toggle.open span:nth-child(2) { opacity: 0; }
.gnav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------
   Shared components
   ---------------------------------------------------------- */
.section {
  width: min(var(--max-w), 92%);
  margin: 0 auto;
  padding: 110px 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
}
.kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--cyan);
}

.h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.h2 em { font-style: normal; color: var(--cyan); }

.lead {
  color: var(--ink-dim);
  font-size: 17px;
  max-width: 620px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 15px 32px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}
.btn--primary {
  background: var(--cyan);
  color: var(--bg-0);
}
.btn--primary:hover {
  box-shadow: 0 8px 32px var(--cyan-glow);
  transform: translateY(-2px);
}
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(255,255,255,0.02);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-soft);
}
.btn--ghost:hover .btn-arrow { transform: translateX(4px); border-color: var(--cyan); }
.btn-arrow {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  transition: transform 0.25s, border-color 0.25s;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 60px;
}

/* Tag chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  border: 1px solid rgba(0, 208, 240, 0.3);
  border-radius: 999px;
  background: var(--cyan-soft);
}

/* ----------------------------------------------------------
   CTA section (shared across all pages)
   ---------------------------------------------------------- */
.cta {
  padding: 130px 0;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 65% at 50% 110%, rgba(0, 208, 240, 0.14), transparent 72%);
}
.cta__inner {
  position: relative;
  text-align: center;
  width: min(760px, 92%);
  margin: 0 auto;
}
.cta__inner .kicker {
  display: flex;
  justify-content: center;
}
.cta__inner .kicker::before {
  content: none;
}
.cta__inner .kicker::after {
  content: "";
  width: 28px; height: 1px;
  background: var(--cyan);
}
.cta .h2 { font-size: clamp(32px, 4.6vw, 54px); margin-bottom: 22px; }
.cta p { color: var(--ink-dim); margin-bottom: 40px; }
.cta__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  background: var(--bg-0);
}
.footer__inner {
  width: min(var(--max-w), 92%);
  margin: 0 auto;
  padding: 56px 0 40px;
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.footer__logo {
  height: 40px;
  width: auto;
}
.footer__brand em { font-style: normal; color: var(--cyan); }
.footer__tagline {
  color: var(--ink-faint);
  font-size: 14px;
  margin-top: 10px;
  max-width: 400px;
}
.footer__links {
  display: flex;
  gap: 64px;
}
.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.footer__col a {
  display: block;
  color: var(--ink-dim);
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--cyan); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 13px;
}
.footer__bottom a:hover { color: var(--cyan); }

/* ----------------------------------------------------------
   Scroll reveal
   ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 900px) {
  .gnav__menu {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    background: rgba(6, 14, 32, 0.97);
    backdrop-filter: blur(20px);
    padding: 24px 6% 32px;
    gap: 0;
    border-bottom: 1px solid var(--line);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
  }
  .gnav__menu.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .gnav__menu a {
    padding: 14px 8px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .gnav__toggle { display: flex; }
  .gnav__cta { padding: 9px 16px; font-size: 12px; }
  .section { padding: 80px 0; }
  .footer__links { gap: 36px; flex-wrap: wrap; }
}
