/* ─────────────────────────────────────────────────────────────
   화니의 분양공방 — 관리자 로그인
   login.css
   ───────────────────────────────────────────────────────────── */

:root {
  --bg-tone: 0.42;
  --gold: oklch(0.80 0.09 82);
  --gold-soft: oklch(0.86 0.06 82);
  --gold-deep: oklch(0.62 0.10 75);
  --ink: oklch(0.96 0.01 80);
  --ink-dim: oklch(0.78 0.01 80 / 0.72);
  --ink-faint: oklch(0.78 0.01 80 / 0.42);
  --line: oklch(1 0 0 / 0.14);
  --line-strong: oklch(1 0 0 / 0.28);
  --card-bg: oklch(0.18 0.012 260 / 0.42);
  --field-bg: oklch(1 0 0 / 0.05);
  --field-bg-focus: oklch(1 0 0 / 0.09);
  --danger: oklch(0.70 0.15 25);
  --kr: 'Noto Sans KR', system-ui, sans-serif;
  --en: 'Cormorant Garamond', 'Times New Roman', serif;
  --mono: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

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

html, body {
  height: auto;
  min-height: 100%;
  font-family: var(--kr);
  color: var(--ink);
  background: #07090d;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { overflow-y: auto; }

/* ─────── Background ─────── */
.bg {
  position: fixed; inset: 0;
  background-image: url('../images/bg-night.jpg');
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: kenBurns 32s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenBurns {
  0%   { transform: scale(1.06) translate(0, 0); }
  100% { transform: scale(1.14) translate(-1.5%, -1%); }
}

.bg-overlay {
  position: fixed; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 110%, oklch(0.16 0.04 250 / 0.85) 0%, transparent 60%),
    radial-gradient(80% 60% at 50% 0%, oklch(0.10 0.02 260 / 0.70) 0%, transparent 70%),
    linear-gradient(180deg,
      oklch(0.06 0.01 260 / calc(var(--bg-tone) + 0.18)) 0%,
      oklch(0.05 0.01 260 / var(--bg-tone)) 50%,
      oklch(0.04 0.01 260 / calc(var(--bg-tone) + 0.22)) 100%);
  pointer-events: none;
}

.bg-grain {
  position: fixed; inset: 0;
  background-image: radial-gradient(ellipse at center, transparent 50%, oklch(0 0 0 / 0.55) 100%);
  pointer-events: none;
}
.bg-grain::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.5;
}

/* ─────── Top chrome ─────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 44px;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 14px; }
.topbar .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}
.topbar .divider { color: var(--ink-faint); }

/* ─────── Page / stage ─────── */
.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.stage {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 24px 60px;
}

/* ─────── Card ─────── */
.card {
  position: relative;
  width: min(440px, 100%);
  padding: 56px 48px 44px;
  background: var(--card-bg);
  border: 0.5px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.10) inset,
    0 0 0 0.5px oklch(0 0 0 / 0.4),
    0 30px 80px -20px oklch(0 0 0 / 0.6),
    0 60px 120px -40px oklch(0 0 0 / 0.7);
  animation: cardIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 0.5px solid oklch(0.80 0.09 82 / 0.18);
  border-radius: 10px;
  pointer-events: none;
}

/* ─────── Brand ─────── */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 38px;
}
.mark {
  width: 56px; height: 56px;
  position: relative;
  animation: markIn 1.4s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes markIn {
  from { opacity: 0; transform: scale(0.6) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
.mark svg { width: 100%; height: 100%; display: block; }
.mark .stroke { stroke: var(--gold); }
.mark .fill { fill: var(--gold); }

.brand-en {
  font-family: var(--en);
  font-style: italic;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  padding-bottom: 4px;
  border-bottom: 0.5px solid oklch(0.80 0.09 82 / 0.35);
}
.brand-kr {
  font-family: var(--kr);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-align: center;
  word-spacing: 0.05em;
}
.brand-kr .accent { color: var(--gold); font-weight: 600; }
.brand-sub {
  font-family: var(--kr);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* ─────── Form ─────── */
form { display: flex; flex-direction: column; gap: 16px; }
.field { position: relative; display: flex; flex-direction: column; }
.field label {
  font-family: var(--kr);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.32em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 2px;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .icon {
  position: absolute;
  left: 14px;
  width: 14px; height: 14px;
  color: var(--ink-faint);
  pointer-events: none;
  transition: color 0.3s ease;
}
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 40px;
  background: var(--field-bg);
  border: 0.5px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--kr);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.field input::placeholder { color: oklch(1 0 0 / 0.28); font-weight: 300; }
.field input:focus {
  border-color: oklch(0.80 0.09 82 / 0.55);
  background: var(--field-bg-focus);
  box-shadow: 0 0 0 4px oklch(0.80 0.09 82 / 0.08);
}
.field:focus-within .icon { color: var(--gold); }

.form-msg {
  min-height: 0;
  font-size: 12px;
  color: var(--danger);
  letter-spacing: 0.02em;
  padding-left: 2px;
}
.form-msg:not(:empty) { min-height: 18px; margin-top: -4px; }

/* ─────── Submit ─────── */
.submit {
  margin-top: 14px;
  position: relative;
  height: 50px;
  border: none;
  background: linear-gradient(180deg, oklch(0.84 0.09 82) 0%, oklch(0.70 0.10 78) 100%);
  color: oklch(0.18 0.02 80);
  font-family: var(--kr);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.42em;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease, opacity 0.2s ease;
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.4) inset,
    0 -1px 0 oklch(0 0 0 / 0.15) inset,
    0 12px 30px -10px oklch(0.80 0.09 82 / 0.5);
}
.submit:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.4) inset,
    0 -1px 0 oklch(0 0 0 / 0.15) inset,
    0 18px 40px -10px oklch(0.80 0.09 82 / 0.65);
}
.submit:active { transform: translateY(0); }
.submit:disabled { opacity: 0.7; cursor: wait; }
.submit::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.5), transparent);
  transition: left 0.7s ease;
}
.submit:hover::after { left: 130%; }
.submit .arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.3s ease;
}
.submit:hover .arrow { transform: translateX(3px); }

/* ─────── Helper ─────── */
.helper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  font-family: var(--kr);
  font-size: 11.5px;
  color: var(--ink-faint);
}
.helper a {
  color: var(--ink-dim);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
.helper a:hover { color: var(--gold); }
.helper .sep { width: 1px; height: 10px; background: var(--line); }

/* ─────── Footer ─────── */
.footer {
  position: relative;
  z-index: 4;
  padding: 28px 44px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, transparent, oklch(0.04 0.01 260 / 0.45) 60%);
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--ink-faint); }
.footer-brand .mini-mark { width: 18px; height: 18px; }
.footer-brand .mini-mark svg { width: 100%; height: 100%; }
.footer-brand .name {
  font-family: var(--en);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
}
.footer-copy {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

/* ─────── Side rules ─────── */
.side-rule {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  pointer-events: none;
}
.side-rule.left  { left: 30px; }
.side-rule.right { right: 30px; }
.side-rule .line {
  width: 1px;
  height: 80px;
  background: linear-gradient(180deg, transparent, var(--line-strong), transparent);
}
.side-rule .label { writing-mode: vertical-rl; transform: rotate(180deg); }

/* ─────── Responsive ─────── */
@media (max-width: 640px) {
  .topbar { padding: 18px 22px; font-size: 10px; }
  .topbar .right .hide-sm { display: none; }
  .stage { padding: 90px 20px 40px; }
  .card { padding: 44px 28px 32px; }
  .brand-kr { font-size: 22px; }
  .footer { padding: 16px 22px 18px; flex-direction: column; gap: 8px; align-items: center; }
  .side-rule { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bg, .topbar .dot, .card, .mark { animation: none !important; }
}
