/* ============================================
   KU Alumni Seminar — Mobile-First Design
   ============================================ */

:root {
  --crimson: #860029;
  --crimson-dark: #6a0021;
  --crimson-light: #a8003a;
  --crimson-glow: rgba(134, 0, 41, 0.15);
  --gold: #d4a843;
  --gold-light: #f0d68a;

  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1c1c1c;

  --text: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666;

  --border: #2a2a2a;
  --border-focus: var(--crimson);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 40px;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(134, 0, 41, 0.3) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 100%, rgba(134, 0, 41, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(212, 168, 67, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-bg-pattern::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image:
    radial-gradient(circle at center, rgba(134, 0, 41, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: patternDrift 20s linear infinite;
}

@keyframes patternDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  animation: fadeUp 1s ease-out;
}

.hero-emblem {
  display: block;
  width: 120px;
  height: auto;
  margin: 0 auto 48px;
  filter: drop-shadow(0 4px 24px rgba(134, 0, 41, 0.3));
  animation: fadeUp 0.8s ease-out 0.1s both;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid rgba(212, 168, 67, 0.4);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 20px;
  animation: fadeUp 1s ease-out 0.2s both;
}

.hero-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -1px;
  margin-bottom: 24px;
}

.title-line {
  display: block;
  animation: fadeUp 0.8s ease-out both;
}

.title-line:nth-child(1) { animation-delay: 0.3s; }
.title-line:nth-child(2) { animation-delay: 0.5s; }
.title-line:nth-child(3) { animation-delay: 0.7s; }

.title-line.accent {
  background: linear-gradient(135deg, var(--crimson-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--gold));
  margin: 0 auto 28px;
  border-radius: 2px;
  animation: fadeUp 0.8s ease-out 0.9s both;
}

.hero-info {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px 14px;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 36px;
  animation: fadeUp 0.8s ease-out 1s both;
}

.info-item {
  display: contents;
}

.info-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(134, 0, 41, 0.15);
  border-radius: 12px;
  color: var(--crimson-light);
  align-self: center;
}

.info-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
}

.info-value {
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  color: white;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 24px rgba(134, 0, 41, 0.4);
  animation: fadeUp 0.8s ease-out 1.2s both;
}

.hero-cta:active {
  transform: scale(0.96);
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeUp 0.8s ease-out 1.5s both;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.3; }
  50% { transform: rotate(45deg) translate(4px, 4px); opacity: 0.8; }
}

/* ============================================
   PROGRAM SECTION
   ============================================ */
.program {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--crimson-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--crimson), var(--gold), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.timeline-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  transition: var(--transition);
}

.timeline-card:active {
  background: var(--bg-card-hover);
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 24px;
  width: 14px;
  height: 14px;
  background: var(--bg);
  border: 3px solid var(--crimson);
  border-radius: 50%;
}

.timeline-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   REGISTRATION SECTION
   ============================================ */
.register {
  padding: 80px 0 100px;
}

.form-mode-toggle {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.mode-btn {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.mode-btn.active {
  background: var(--crimson);
  color: white;
  box-shadow: 0 2px 12px rgba(134, 0, 41, 0.3);
}

/* Lookup */
.lookup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.lookup-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.lookup-input-group {
  display: flex;
  gap: 8px;
}

.lookup-input-group .input {
  flex: 1;
}

.btn-lookup {
  padding: 0 24px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.btn-lookup:active {
  background: var(--border);
}

.lookup-message {
  margin-top: 12px;
  font-size: 13px;
  min-height: 20px;
}

.lookup-message.error {
  color: #ff6b6b;
}

.lookup-message.success {
  color: #51cf66;
}

.lookup-message.loading {
  color: var(--gold);
}

/* Form */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group:last-of-type {
  margin-bottom: 32px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.required {
  color: var(--crimson-light);
  margin-left: 2px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 16px; /* prevent iOS zoom */
  font-family: inherit;
  color: var(--text);
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px var(--crimson-glow);
}

.input.error {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

/* Number input suffix */
.input-suffix-wrap {
  position: relative;
}

.input-suffix-wrap .input {
  padding-right: 44px;
}

.input-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

/* Select */
.select-wrap {
  position: relative;
}

.select-wrap .input {
  padding-right: 44px;
  cursor: pointer;
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Radio cards */
.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-card {
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-align: center;
}

.radio-card input:checked + .radio-card-inner {
  border-color: var(--crimson);
  background: rgba(134, 0, 41, 0.1);
  box-shadow: 0 0 0 3px var(--crimson-glow);
}

.radio-card:active .radio-card-inner {
  transform: scale(0.97);
}

.radio-icon {
  color: var(--text-muted);
  transition: var(--transition);
}

.radio-card input:checked + .radio-card-inner .radio-icon {
  color: var(--crimson-light);
}

.radio-card-inner span {
  font-size: 15px;
  font-weight: 600;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn-submit:active::after {
  transform: translateX(100%);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success */
.success-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  animation: scaleIn var(--bounce);
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(81, 207, 102, 0.1);
  border-radius: 50%;
  color: #51cf66;
  animation: popIn var(--bounce) 0.2s both;
}

.success-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.success-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.btn-another {
  padding: 12px 28px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-another:active {
  background: var(--border);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-emblem {
  width: 64px;
  height: auto;
  margin-bottom: 16px;
  opacity: 0.7;
}

.footer-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.footer-copyright {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   DESKTOP ENHANCEMENTS
   ============================================ */
@media (min-width: 640px) {
  .hero-title {
    font-size: 52px;
  }

  .hero-emblem {
    width: 140px;
    margin-bottom: 48px;
  }

  .hero-info {
    gap: 20px 14px;
  }

  .section-title {
    font-size: 34px;
  }

  .form-card {
    padding: 36px 32px;
  }

  .timeline {
    padding-left: 32px;
  }

  .timeline-dot {
    left: -32px;
  }

  .hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(134, 0, 41, 0.5);
  }

  .timeline-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--crimson);
  }

  .btn-lookup:hover {
    background: var(--border);
  }

  .btn-submit:hover {
    box-shadow: 0 4px 24px rgba(134, 0, 41, 0.4);
  }

  .btn-another:hover {
    background: var(--border);
  }

  .radio-card:hover .radio-card-inner {
    border-color: var(--text-muted);
  }
}

/* ============================================
   SAFE AREA (notch devices)
   ============================================ */
@supports (padding: max(0px)) {
  .hero {
    padding-top: max(60px, env(safe-area-inset-top));
  }

  .footer {
    padding-bottom: max(40px, env(safe-area-inset-bottom));
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   NUMBER INPUT — hide spinners
   ============================================ */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}
