/* 센터인 홈페이지 + 관장·직원 로그인 위젯 (2026-09-30)
 * 흔들림 수정: 예전엔 화면 전체를 세로 가운데 정렬(min-height:100vh + justify-content:center)해서
 *  오류 문구가 나타나거나 사라질 때 로고·카드가 약 24px 위아래로 튀었다. 지금은
 *  ① 페이지를 위쪽 기준으로 쌓고(가운데 정렬 없음) ② 오류 문구 자리를 항상 비워 둔다(.error min-height). */
:root {
  --navy: #071a3d;
  --navy-2: #0b2a5e;
  --blue: #0b5bd3;
  --cyan: #12b8ea;
  --ink: #0f1b33;
  --muted: #5b6b86;
  --line: #dfe6f1;
  --field: #f5f8fc;
  --danger: #d93a3a;
  --card: #ffffff;
  --page: #f4f7fb;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* ── 상단 바 ─────────────────────────────────────────────── */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.top-in { max-width: 1160px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.brand img { border-radius: 9px; background: #fff; }
.brand b { color: #6fd6ff; font-weight: 800; }
.nav { display: flex; gap: 22px; }
.nav a { color: rgba(255, 255, 255, .78); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.nav a:hover { color: #fff; }

/* ── 히어로 + 위젯 ───────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.bg { position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(1200px 700px at 10% -10%, #123a80 0%, transparent 60%),
              radial-gradient(900px 600px at 105% 110%, #0a3a6e 0%, transparent 55%),
              linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); }
.bg::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 40% 40%, #000 30%, transparent 75%); }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .42; }
.g1 { width: 420px; height: 420px; background: var(--cyan); top: -140px; right: 12%; }
.g2 { width: 360px; height: 360px; background: var(--blue); bottom: -160px; left: 4%; }

.hero-in {
  position: relative; z-index: 1; max-width: 1160px; margin: 0 auto;
  padding: 120px 24px 88px;
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px;
  align-items: start;                       /* 위쪽 기준 — 위젯 높이가 바뀌어도 위치가 흔들리지 않는다 */
}
.pitch { padding-top: 28px; }
.eyebrow { margin: 0 0 14px; font-size: 14px; font-weight: 700; letter-spacing: .6px; color: #7fdcff; }
.hero h1 { margin: 0; font-size: 52px; line-height: 1.15; font-weight: 800; letter-spacing: -1.2px; }
.lead { margin: 22px 0 0; font-size: 17px; line-height: 1.7; color: rgba(255, 255, 255, .74); }
.chips { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .88); }

.widget {
  background: var(--card); color: var(--ink); border-radius: 22px; padding: 30px 28px 22px;
  box-shadow: 0 30px 70px rgba(2, 10, 30, .45), 0 2px 0 rgba(255, 255, 255, .6) inset;
}
.widget h2 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.3px; }
/* 단일 폼. 오류 문구 자리(.error min-height)를 항상 확보해 표시/숨김으로 높이가 변하지 않는다.
 * flow-root: 첫 요소의 위 여백이 폼 밖으로 새는 것을 막는다. */
.panel { display: flow-root; }
.sub { margin: 6px 0 20px; font-size: 13.5px; color: var(--muted); }

.field { display: block; margin-bottom: 4px; }
.label { display: block; font-size: 12.5px; font-weight: 650; color: #33415c; margin-bottom: 7px; }
.input-wrap { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px;
  background: var(--field); border: 1.5px solid var(--line); border-radius: 13px;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.input-wrap:focus-within { background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11, 91, 211, .12); }
.input-wrap svg { width: 18px; height: 18px; flex: none; fill: #8a9ab5; }
.input-wrap:focus-within svg { fill: var(--blue); }
.input-wrap input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.input-wrap input::placeholder { color: #a3b0c5; }

/* 오류 문구 자리는 항상 확보(비어 있어도 높이 유지) — 표시/숨김으로 레이아웃이 움직이지 않는다 */
.error { min-height: 40px; margin: 6px 0 8px; font-size: 13px; line-height: 1.45; color: var(--danger); display: flex; align-items: center; }

button { position: relative; width: 100%; height: 52px; border: 0; border-radius: 13px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .3px;
  background: linear-gradient(95deg, var(--blue) 0%, #1283e6 55%, var(--cyan) 100%);
  box-shadow: 0 10px 22px rgba(11, 91, 211, .32); transition: box-shadow .15s, filter .15s; }
button:hover { filter: brightness(1.05); box-shadow: 0 14px 28px rgba(11, 91, 211, .38); }
button:disabled { cursor: default; filter: saturate(.7); }
.spinner { display: none; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
button.loading .btn-text { visibility: hidden; }
button.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.note { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }

/* ── 소개 섹션 ───────────────────────────────────────────── */
.sec-in { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.features { padding: 84px 0 64px; }
.sec-title { margin: 0 0 30px; font-size: 30px; font-weight: 800; letter-spacing: -.6px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid #e3e9f3; border-radius: 18px; padding: 26px 24px; box-shadow: 0 6px 18px rgba(15, 27, 51, .05); }
.card svg { width: 30px; height: 30px; fill: var(--blue); }
.card h3 { margin: 14px 0 8px; font-size: 18px; font-weight: 750; }
.card p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--muted); }

.member-app { padding: 20px 0 84px; }
.app-in { display: flex; align-items: center; gap: 22px; background: #fff; border: 1px solid #e3e9f3; border-radius: 20px; padding: 28px 30px; }
.app-in img { border-radius: 16px; flex: none; }
.app-in .sec-title { font-size: 22px; margin-bottom: 8px; }
.app-in p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }
.foot { padding: 26px 24px 40px; text-align: center; font-size: 12.5px; color: #8a97ad; }

/* ── 반응형: 좁은 화면은 위젯을 위로 ─────────────────────── */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 88px 16px 56px; }
  .widget { order: -1; width: 100%; max-width: 440px; }
  .pitch { padding-top: 4px; }
  .hero h1 { font-size: 38px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .br-wide { display: none; }
}
@media (max-width: 560px) {
  .top-in { padding: 16px; }
  .nav { gap: 14px; }
  .nav a { font-size: 13.5px; }
  .widget { padding: 26px 20px 20px; border-radius: 20px; }
  .hero h1 { font-size: 32px; }
  .lead { font-size: 15.5px; }
  .sec-in { padding: 0 16px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .app-in { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
}
