:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --blue-start: #1a8fff;
  --blue-end: #0066ff;
  --blue-strong: #0055dd;
}

* { box-sizing: border-box; }
input, button, textarea, select { font: inherit; }

body {
  margin: 0;
  font-family: "Montserrat", "Noto Sans KR", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.shell {
  width: min(1050px, 100%);
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.14);
  display: grid;
  grid-template-columns: 45% 55%;
}

.hero {
  background: linear-gradient(180deg, var(--blue-start), var(--blue-end));
  margin: 12px;
  border-radius: 16px;
  padding: 30px;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 610px;
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.hero-copy { margin-top: auto; position: relative; min-height: 300px; cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-slide h1 { margin: 0; font-size: clamp(29px, 3.6vw, 35px); line-height: 1.2; letter-spacing: -0.02em; }
.hero-slide p { margin-top: 14px; max-width: 420px; color: rgba(255, 255, 255, 0.9); font-size: 14px; line-height: 1.65; }
.testimonial { margin-top: 28px; border-radius: 14px; padding: 18px; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(2px); }
.testimonial p { margin: 0; font-size: 14px; line-height: 1.65; color: rgba(255, 255, 255, 0.92); }
.author { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.author img, .author svg { border-radius: 50%; }
.author strong { display: block; font-size: 14px; }
.author span { display: block; color: rgba(255, 255, 255, 0.76); font-size: 12px; }
.dots { margin-top: 18px; display: flex; justify-content: center; gap: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 9999px; background: rgba(255, 255, 255, 0.4); cursor: pointer; }
.dots .active { background: #fff; }
.form-wrap { display: flex; align-items: center; justify-content: center; padding: 45px 40px 32px 40px; }
.form-inner { width: 100%; max-width: 460px; }
.form-inner h2 { margin: 0; font-size: 34px; line-height: 1.2; }
.subtitle { margin: 8px 0 0; color: var(--muted); }
.social-buttons { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.social:hover { background: #f8fafc; }
.divider { margin: 14px 0; position: relative; text-align: center; }
.divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.divider span { position: relative; background: #fff; padding: 0 10px; color: var(--muted); font-size: 14px; }
form label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
form input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
form input:focus { outline: 2px solid rgba(0, 102, 255, 0.2); border-color: #0066ff; }
.password-input { position: relative; }
.password-input input { padding-right: 62px; margin-bottom: 12px; }
.toggle-btn { position: absolute; right: 8px; top: 7px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 600; padding: 6px 8px; }
.rules { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 5px; }

.rules li {
  color: #374151;
  font-size: 13px;
  line-height: 1.5;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rules li.consent-checked {
  background: #0066ff;
  border-color: #0066ff;
  color: #ffffff;
}

.rules label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  padding: 10px;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.rules input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--blue-strong);
}

.consent-text {
  display: block;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.consent-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.consent-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: #6b7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.consent-arrow-svg {
  width: 18px;
  height: 18px;
  color: #6b7280;
  display: block;
  transition: color 0.2s ease, transform 0.2s ease;
}

.consent-toggle .consent-arrow-svg {
  transition: transform 0.2s ease;
}

.rules li.is-open .consent-toggle .consent-arrow-svg {
  transform: rotate(180deg);
}

.consent-desc {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: normal;
  color: #6b7280;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.rules li.consent-checked .consent-heading,
.rules li.consent-checked .consent-desc,
.rules li.consent-checked .consent-arrow-svg {
  color: #ffffff;
}

.consent-desc-collapsible {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.28s ease, opacity 0.22s ease, margin-top 0.22s ease;
}

.rules li.is-open .consent-desc-collapsible {
  max-height: 140px;
  opacity: 1;
  margin-top: 3px;
}

.submit-btn { width: 100%; margin-top: 18px; background: #0066ff; color: #fff; border: 0; border-radius: 10px; padding: 12px 14px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.submit-btn:hover { background: var(--blue-strong); }
.login-btn-note { font-size: 10px; font-weight: 500; line-height: 1.35; letter-spacing: 0; text-transform: none; opacity: 0.92; }
.form-error { margin-top: 10px; color: #dc2626; font-size: 12px; line-height: 1.45; text-align: center; min-height: 18px; }
.login-link { margin-top: 16px; text-align: center; color: var(--muted); font-size: 12px; }
.login-link a { color: #0066ff; font-weight: 700; text-decoration: none; }
.login-link a:hover { text-decoration: underline; }

.layer-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  background: rgba(17, 24, 39, 0.58);
}

.layer-popup.is-open {
  display: flex;
}

.layer-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 32px 20px 20px 20px;
  box-shadow: 0 24px 55px rgba(17, 24, 39, 0.25);
}

.layer-card h3 {
  margin: 0;
  font-size: 20px;
  text-align: center;
}

.layer-card p {
  margin: 12px 0 0;
  color: #4b5563;
  line-height: 1.6;
  text-align: center;
}

.layer-actions {
  margin-top: 18px;
  display: flex;
  width: 100%;
}

.layer-close-btn {
  border: 0;
  border-radius: 10px;
  background: #0066ff;
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.layer-close-btn:hover {
  background: #0055dd;
}

@media (max-width: 980px) {
  .page { padding: 0; }
  .shell { border-radius: 0; }
  .shell { grid-template-columns: 1fr; }
  .hero { min-height: auto; margin: 0; border-radius: 0; }
  .brand { margin-bottom: 25px; }
  .form-wrap { padding: 30px 24px 24px 24px; }
}
