/* ============================================================
   HaNull Studio 포털 — 스타일
   색은 스튜디오 로고에서 뽑았다 (배경 #F6F6F2 · 디스크 인디고 #21276C)
   ============================================================ */

:root {
  --bg: #F6F6F2;
  --surface: #FFFFFF;
  --surface-2: #EFEFEA;

  --ink: #1A1B2E;
  --ink-2: #474B5C;
  --ink-3: #626675;

  --line: #E2E2DA;
  --line-strong: #C9C9C0;

  --indigo: #2A2F7A;
  --indigo-deep: #21276C;

  --live: #15803D;
  --live-bg: #E9F7EE;
  --pending: #B45309;
  --pending-bg: #FDF3E7;
  --archived: #64646E;
  --archived-bg: #EDEDE8;

  --radius: 16px;
  --radius-lg: 22px;
  --container: 64rem;

  --font: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          'Malgun Gothic', '맑은 고딕', sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* 한국어는 단어 중간에서 줄이 바뀌지 않도록 한다 */
  word-break: keep-all;
  overflow-wrap: break-word;
}

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

/* ============ 다국어 ============ */
html:not([lang="ko"]) body { word-break: normal; }
html.i18n-pending body { visibility: hidden; }
.lang-bar { display: flex; justify-content: flex-end; padding: 14px 0 0; }
.lang-switch { display: inline-flex; align-items: center; }
.lang-select {
  min-height: 44px; padding: 8px 34px 8px 12px;
  font-family: inherit; font-size: .92rem; font-weight: 500;
  color: var(--ink); background-color: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%232A2F7A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 15px;
}
.lang-select:hover { border-color: var(--indigo); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--indigo); color: #fff;
  padding: 12px 18px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============ 히어로 ============ */
.hero {
  text-align: center;
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse at 50% -10%, #E9E9F5 0%, rgba(233,233,245,0) 62%),
    var(--bg);
}

.hero-mark {
  width: 112px; height: 112px;
  margin: 0 auto 26px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.hero h1 strong { font-weight: 700; }

.hero-sub {
  margin: 0 auto;
  max-width: 34rem;
  font-size: 1.06rem;
  color: var(--ink-2);
}

.hero-rule {
  width: 44px; height: 3px;
  margin: 30px auto 0;
  border-radius: 2px;
  background: var(--indigo);
  opacity: 0.45;
}

/* ============ 제품 목록 ============ */
.products { padding: 8px 0 76px; }

.products-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.products-head h2 {
  margin: 0;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3);
}
.products-count { font-size: 0.88rem; color: var(--ink-3); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 18px;
  margin: 0; padding: 0; list-style: none;
}

.product-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 26px 22px;
  text-decoration: none;
  overflow: hidden;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
/* 상단 강조선 — 제품 고유색 */
.product-card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent, var(--indigo));
}
.product-card:hover,
.product-card:focus-visible {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(26,27,46,0.09);
}

.product-top {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.product-logo {
  width: 46px; height: 46px;
  flex-shrink: 0;
  object-fit: contain;
}
.product-name {
  margin: 0;
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: -0.02em;
}
.product-tagline {
  margin: 2px 0 0;
  font-size: 0.9rem; color: var(--ink-2);
}

.product-desc {
  margin: 0 0 20px;
  font-size: 0.95rem; color: var(--ink-2);
  flex-grow: 1;
}

.product-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.product-audience {
  font-size: 0.82rem; color: var(--ink-3);
}
.product-go {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.95rem; font-weight: 700;
  color: var(--indigo);
}
.product-go svg { width: 1em; height: 1em; transition: transform .16s; }
.product-card:hover .product-go svg { transform: translateX(3px); }

/* 상태 배지 */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem; font-weight: 700;
  white-space: nowrap;
}
.badge-live     { background: var(--live-bg);     color: var(--live); }
.badge-pending  { background: var(--pending-bg);  color: var(--pending); }
.badge-archived { background: var(--archived-bg); color: var(--archived); }

.product-badges {
  position: absolute; top: 22px; right: 22px;
}

/* ============ 푸터 ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  background: var(--surface-2);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-size: 0.9rem; color: var(--ink-2);
}
.footer a { color: var(--indigo); font-weight: 500; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.footer-brand img { width: 26px; height: 26px; }

/* ============ 문의 · 제휴 ============ */
.contact {
  border-top: 1px solid var(--line);
  padding: 56px 0 60px;
  text-align: center;
}
.contact h2 { margin: 0 0 12px; font-size: 1.45rem; font-weight: 700; }
.contact p  { margin: 0 auto 22px; max-width: 32rem; color: var(--ink-2); line-height: 1.75; }
.contact-mail {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 26px;
  border: 2px solid var(--indigo); border-radius: 999px;
  color: var(--indigo); font-weight: 700; font-size: 1.05rem;
  text-decoration: none; word-break: break-all;
}
.contact-mail:hover, .contact-mail:focus-visible { background: var(--indigo); color: #fff; }

/* ============ 404 ============ */
.notfound { text-align: center; padding: 96px 0 72px; }
.notfound .code {
  font-size: 3.4rem; font-weight: 700; letter-spacing: -0.03em;
  color: var(--indigo); margin: 0 0 8px;
}
.notfound h1 { margin: 0 0 12px; font-size: 1.6rem; font-weight: 700; }
.notfound p { margin: 0 auto 28px; max-width: 30rem; color: var(--ink-2); }
.btn-home {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; min-height: 52px;
  background: var(--indigo); color: #fff;
  border-radius: 12px; font-weight: 700; text-decoration: none;
}
.btn-home:hover { background: var(--indigo-deep); }

/* ============ 반응형 ============ */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 52px 0 42px; }
  .hero h1 { font-size: 1.95rem; }
  .hero-mark { width: 92px; height: 92px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { padding: 24px 20px 20px; }
  .product-badges { position: static; margin-bottom: 14px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
