/* ============================================================
   ON2UP — Design tokens
   Concept: 도면(Blueprint) — 조형물도, 소프트웨어도 설계에서 시작한다.
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Color */
  --bg-dark: #0E1B2E;
  --bg-dark-alt: color-mix(in srgb, var(--bg-dark) 85%, white 15%);
  --bg-light: #F5F1E8;
  --bg-light-alt: color-mix(in srgb, var(--bg-light) 88%, black 12%);
  --ink: #131A26;
  --ink-soft: #4C5566;
  --paper-ink: #1B2130;
  --line: #6FB7C2;
  --line-soft: color-mix(in srgb, var(--line) 35%, transparent);
  --accent: #E1592A;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --white: #FDFCF9;
  --muted-on-dark: #8FA0B8;

  /* Type */
  --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --max-w: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Blueprint annotation system (signature element) ---------- */
.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.reg-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  position: relative;
  flex-shrink: 0;
}
.reg-mark::before, .reg-mark::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.reg-mark::before { width: 100%; height: 1px; top: 50%; }
.reg-mark::after { height: 100%; width: 1px; left: 50%; }

.fig-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.fig-caption .reg-mark { color: var(--line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--line);
  margin-bottom: 16px;
}
.eyebrow .reg-mark { color: var(--accent); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(19, 26, 38, 0.1);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.brand .reg-mark { color: var(--accent); }
.brand .brand-sub {
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 36px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-light);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid rgba(19,26,38,0.1);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 16px var(--gutter); border-top: 1px solid rgba(19,26,38,0.08); }
  .nav-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--bg-dark);
  color: var(--white);
  overflow: hidden;
  padding-top: 88px;
  padding-bottom: 96px;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
}
.hero-tag {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  margin-bottom: 28px;
}
.hero-tag span { display: inline-flex; align-items: center; gap: 6px; }
.hero-tag .reg-mark { color: var(--line); }

.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 4.3rem);
  line-height: 1.14;
  color: var(--white);
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--line);
}
.hero-sub {
  margin-top: 26px;
  max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--muted-on-dark);
  line-height: 1.75;
}
.hero-cta-row {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: #C9481F; border-color: #C9481F; }
.btn-ghost {
  color: var(--white);
  border-color: rgba(253,252,249,0.4);
}
.btn-ghost:hover { background: rgba(253,252,249,0.08); }
.btn-ghost-dark {
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost-dark:hover { background: var(--ink); color: var(--white); }

/* Blueprint corner dimension marks on hero */
.dim-corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted-on-dark);
  z-index: 2;
}
.dim-corner.tr { top: 32px; right: var(--gutter); text-align: right; }
.dim-corner.br { bottom: 28px; right: var(--gutter); text-align: right; }

/* ---------- Split duality section ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; }
}
.split-panel {
  padding: 72px var(--gutter);
  position: relative;
}
.split-panel.dark { background: var(--bg-dark); color: var(--white); }
.split-panel.light { background: var(--bg-light-alt); color: var(--ink); }
.split-panel .panel-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--line);
  margin-bottom: 18px;
  display: block;
}
.split-panel h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin-bottom: 16px;
}
.split-panel p {
  max-width: 40ch;
  color: inherit;
  opacity: 0.85;
  line-height: 1.75;
}
.split-panel .panel-list {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.split-panel .panel-list li {
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.split-panel .panel-list li::before {
  content: "—";
  color: var(--accent);
}

/* ---------- Section generic ---------- */
.section {
  padding: 96px 0;
}
.section.tight { padding: 64px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.25;
}
.section-head p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.75;
}

/* ---------- Cards grid (사업영역) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(19,26,38,0.12);
  border: 1px solid rgba(19,26,38,0.12);
}
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg-light);
  padding: 36px 28px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  transition: background 0.25s ease;
}
.service-card.is-software { background: var(--bg-dark); color: var(--white); }
.service-card:hover { background: var(--bg-light-alt); }
.service-card.is-software:hover { background: var(--bg-dark-alt); }

.service-card .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--line);
  margin-bottom: auto;
  padding-bottom: 28px;
}
.service-card h4 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  line-height: 1.4;
}
.service-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.service-card.is-software p { color: var(--muted-on-dark); }

/* ---------- Work grid ---------- */
.work-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(19,26,38,0.15);
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.work-tab {
  background: none;
  border: none;
  padding: 14px 22px 14px 0;
  margin-right: 34px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.work-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.work-panel { display: none; }
.work-panel.active { display: block; animation: fadein 0.35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.work-group-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin: 40px 0 20px;
}
.work-group-title:first-child { margin-top: 0; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .thumb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .thumb-grid { grid-template-columns: 1fr; } }

.thumb {
  display: block;
}
.thumb-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-light-alt);
  border: 1px solid rgba(19,26,38,0.1);
}
.thumb-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.thumb:hover .thumb-img img { transform: scale(1.05); }
.thumb-title { margin-top: 12px; font-weight: 700; font-size: 0.95rem; }
.thumb-desc { margin-top: 4px; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.6; }

.empty-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  padding: 20px 0;
}

/* Case study (software) */
.case-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(19,26,38,0.12);
  border: 1px solid rgba(19,26,38,0.12);
}
.case-card {
  background: var(--bg-light);
  padding: 40px var(--gutter);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
}
@media (max-width: 780px) { .case-card { grid-template-columns: 1fr; gap: 20px; } }
.case-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 2.1;
}
.case-meta .case-name {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.3;
}
.case-body h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--line);
  margin: 0 0 6px;
}
.case-block { margin-bottom: 20px; }
.case-block:last-child { margin-bottom: 0; }
.case-block p { color: var(--ink-soft); line-height: 1.75; font-size: 0.95rem; }
.case-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.case-tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid rgba(19,26,38,0.2);
  color: var(--ink-soft);
}

/* ---------- Timeline (연혁) ---------- */
.timeline {
  border-top: 1px solid rgba(19,26,38,0.15);
}
.timeline-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(19,26,38,0.1);
}
.timeline-row .year {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
}
.timeline-row .desc { color: var(--ink-soft); line-height: 1.7; }

/* ---------- Profile ---------- */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
}
@media (max-width: 780px) { .profile-layout { grid-template-columns: 1fr; } }
.profile-photo {
  aspect-ratio: 3/4;
  background: var(--bg-dark);
  border: 1px solid rgba(19,26,38,0.15);
}
.profile-text p { margin-bottom: 20px; color: var(--ink-soft); line-height: 1.85; }
.profile-text p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.field {
  margin-bottom: 22px;
}
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(19,26,38,0.3);
  background: transparent;
  padding: 10px 2px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 100px; }

.contact-info dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--line);
  margin-bottom: 6px;
}
.contact-info dd {
  margin: 0 0 30px;
  font-size: 1.05rem;
  color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  color: var(--muted-on-dark);
  padding: 56px 0 32px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(253,252,249,0.12);
}
.footer-brand {
  font-family: var(--font-mono);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand .reg-mark { color: var(--accent); }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ---------- Page header (non-home) ---------- */
.page-head {
  background: var(--bg-dark);
  color: var(--white);
  padding: 70px 0 56px;
}
.page-head h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 4vw, 3rem);
}
.page-head p {
  margin-top: 16px;
  color: var(--muted-on-dark);
  max-width: 52ch;
  line-height: 1.75;
}
