/* ============================================================
   HSW — refined "Engineered Editorial" system  (v2)
   Pretendard (KR) + IBM Plex Mono (technical labels)
   Clean white · deep navy ink · cobalt accent
   ============================================================ */

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

/* ===== Tokens ===== */
:root {
  --ink:        #0c1a30;
  --ink-2:      #16294a;
  --ink-soft:   #5c6b82;
  --ink-faint:  #8593a8;
  --paper:      #ffffff;
  --paper-2:    #f4f5f7;
  --surface:    #ffffff;
  --accent:     #2160e6;
  --accent-2:   #5a90fb;
  --accent-deep:#1546b0;
  --accent-tint:#e9f0fe;
  --mint:       #14b87a;
  --amber:      #e8a43c;
  --line:       #e6e8ec;
  --line-2:     rgba(12,26,48,0.09);
  --night:      #0b1526;
  --night-2:    #10203c;

  --maxw: 1180px;
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;

  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 44px; --s6: 64px; --s7: 92px; --s8: 128px;

  --sans: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --shadow-sm: 0 1px 2px rgba(12,26,48,.05), 0 4px 12px -6px rgba(12,26,48,.10);
  --shadow:    0 2px 6px rgba(12,26,48,.05), 0 24px 48px -28px rgba(12,26,48,.30);
  --shadow-hi: 0 4px 10px rgba(12,26,48,.06), 0 40px 80px -32px rgba(12,26,48,.42);
  --ease: cubic-bezier(.22,.68,.24,1);
}

/* ===== Reset / base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.62;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; word-break: keep-all; }
::selection { background: var(--accent); color: #fff; }

/* ===== Layout ===== */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s4); }
.section { padding: var(--s7) 0; position: relative; z-index: 2; }
.rule { height: 1px; background: var(--line); border: 0; }

/* ===== Section head ===== */
.section-head { max-width: 720px; margin-bottom: var(--s6); }
.section-title { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.035em; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--night); color: #cdd8ee; position: relative; z-index: 2; padding: var(--s6) 0 var(--s4); overflow: hidden; }
.site-footer__top { padding-bottom: var(--s5); }
.site-footer__word { display: flex; align-items: center; gap: 11px; font-size: 36px; font-weight: 900; letter-spacing: 0.01em; color: #fff; line-height: 1; }
.site-footer__word .logo-mark { width: 32px; height: 28px; flex-shrink: 0; }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); padding-top: var(--s3); font-size: 13px; color: #8296bb; }
.site-footer__info .sep { margin: 0 10px; color: #4d5f83; }
.site-footer__info a { color: #cdd8ee; }
.site-footer__info a:hover { color: #fff; }
.site-footer__copy { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: #64769e; }

@media (max-width: 860px) {
  .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ============================================================
   HERO — editorial, centered (no side panel)
   ============================================================ */
/* 히어로 = 화면 높이에 딱 맞게. 짧은 화면에선 내용만큼 자람 */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  min-height: 100vh; min-height: 100svh; padding: 72px 0;
  background: #eef0f3; /* 이미지 로딩 전 플레이스홀더 톤 */ }
.hero__top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding-top: 26px; }
.hero__brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; font-size: 21px; letter-spacing: 0.01em; color: var(--ink); }
.hero__brand .logo-mark { width: 21px; height: 19px; }
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url('../img/office.jpg') center 42% / cover no-repeat;
  opacity: 0; transition: opacity .6s ease-out; }
.hero__bg.is-loaded { opacity: 1; animation: hero-settle 2.6s var(--ease) both; }
@keyframes hero-settle { from { transform: scale(1.045); } to { transform: scale(1); } }
.hero__bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(62% 54% at 50% 44%, rgba(255,255,255,.28), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.84) 0%, rgba(255,255,255,.58) 40%, rgba(255,255,255,.54) 64%, rgba(255,255,255,.88) 100%);
}
.hero__inner { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero__title { font-size: clamp(42px, 7vw, 82px); letter-spacing: -0.045em; font-weight: 800; line-height: 1.22; text-shadow: 0 2px 26px rgba(255,255,255,.9), 0 1px 2px rgba(255,255,255,.7); }
.hero__subtitle { font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-2); max-width: 640px; margin: var(--s4) auto 0; line-height: 1.65; text-wrap: balance; text-shadow: 0 1px 14px rgba(255,255,255,.95); }
.hero__scroll { position: absolute; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 8px; }
.hero__scroll-line { position: relative; width: 3px; height: 44px; border-radius: 2px; background: rgba(12,26,48,.15); overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 16px; background: var(--ink);
  animation: scroll-hint 2.2s cubic-bezier(.65,.05,.35,1) infinite; }
@keyframes scroll-hint {
  0%   { transform: translateY(-18px); }
  62%  { transform: translateY(46px); }
  100% { transform: translateY(46px); }
}

/* ============================================================
   PRODUCT INDEX (home) — editorial rows, per-product accent(--pa)
   ============================================================ */
.px-list { border-top: 2px solid var(--ink); }
.px-row {
  --pa: var(--accent);
  display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 340px) 32px;
  grid-template-rows: auto auto;
  align-items: center; column-gap: var(--s4); padding: 38px 8px;
  border-bottom: 1px solid var(--line);
  transition: background .35s var(--ease);
}
.px-row:hover { background: rgba(12,26,48,.026); }
.px-row__chip { width: 11px; height: 11px; background: var(--pa); grid-column: 1; grid-row: 2; }
.px-row__label { grid-column: 2; grid-row: 1; display: flex; align-items: center; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; line-height: 1; color: var(--ink-soft); margin-bottom: 7px; }
.px-row__name { grid-column: 2; grid-row: 2; display: block; font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04; color: var(--ink); transition: color .3s; }
.px-row:hover .px-row__name { color: var(--pa); }
.px-row__kr { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--ink-faint); margin-left: 12px; }
.px-row__desc { grid-column: 3; grid-row: 1 / -1; font-size: 15px; color: var(--ink-soft); line-height: 1.62; }
.px-row__arrow { grid-column: 4; grid-row: 1 / -1; justify-self: end; font-size: 22px; line-height: 1; color: var(--ink-faint); transition: color .3s, transform .3s var(--ease); }
.px-row:hover .px-row__arrow { color: var(--pa); transform: translate(3px, -3px); }
/* 터치 기기: hover가 없으므로 컬러 화살표를 기본 표시하고 탭 피드백을 준다 */
@media (hover: none) {
  .px-row__arrow { color: var(--pa); }
  .px-row:active { background: rgba(12,26,48,.04); }
  .px-row:active .px-row__name { color: var(--pa); }
}

/* ============================================================
   ABOUT (home) — manifesto headline + domain columns
   ============================================================ */
.about-title { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.24; letter-spacing: -0.04em; max-width: 820px; }
.about-copy { font-size: 19px; line-height: 1.72; color: var(--ink-2); max-width: 600px; margin-top: 22px; text-wrap: pretty; }
.dom-label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--ink-soft); margin-top: var(--s6); margin-bottom: 14px; }
.section-head + .dom-label { margin-top: 0; }
.dom-cols { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.dom-col { padding: 26px 28px 26px 0; }
.dom-col + .dom-col { border-left: 1px solid var(--line); padding-left: 28px; }
.dom-col__idx { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--ink-faint); }
.dom-col__name { font-size: 21px; letter-spacing: -0.025em; margin: 12px 0 14px; }
.dom-col__pts li { font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--ink-soft); margin: 7px 0; }

@media (max-width: 720px) {
  .px-row { grid-template-columns: 16px 1fr 28px; column-gap: var(--s2); padding: 26px 4px; }
  .px-row__arrow { grid-row: 2; grid-column: 3; }
  .px-row__desc { grid-column: 2 / -1; grid-row: 3; margin-top: 10px; }
}

/* ============================================================
   REVEAL — 스크롤로 화면에 들어올 때 한 번만 (JS가 .is-in을 붙인다)
   ============================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.reveal, .px-list .px-row, .dom-cols .dom-col { opacity: 0; }
.reveal.is-in { animation: rise .7s var(--ease) both; }
.reveal-1 { animation-delay: .05s; } .reveal-2 { animation-delay: .13s; }
.reveal-3 { animation-delay: .21s; } .reveal-4 { animation-delay: .29s; }
.reveal-5 { animation-delay: .37s; } .reveal-6 { animation-delay: .45s; }
.reveal-group.is-in .px-row, .reveal-group.is-in .dom-col { animation: rise .6s var(--ease) both; }
.px-list > :nth-child(1), .dom-cols > :nth-child(1) { animation-delay: .05s; }
.px-list > :nth-child(2), .dom-cols > :nth-child(2) { animation-delay: .14s; }
.px-list > :nth-child(3), .dom-cols > :nth-child(3) { animation-delay: .23s; }
.px-list > :nth-child(4), .dom-cols > :nth-child(4) { animation-delay: .32s; }
.px-list > :nth-child(5), .dom-cols > :nth-child(5) { animation-delay: .41s; }

/* ===== Focus ===== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero { padding: 48px 0; }
  .dom-cols { grid-template-columns: 1fr 1fr; }
  .dom-col { border-bottom: 1px solid var(--line); }
  .dom-col + .dom-col { border-left: 0; padding-left: 0; }
  .dom-col:nth-child(even) { border-left: 1px solid var(--line); padding-left: 28px; }
}
@media (max-width: 720px) {
  .section { padding: var(--s6) 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .reveal, .px-list .px-row, .dom-cols .dom-col { opacity: 1 !important; }
}
