/* ============================================
   Enbene Landing Page - Global Styles
   ============================================ */

:root {
  --purple: #7c3aed;
  --purple-light: #a855f7;
  --cyan: #06b6d4;
  --blue: #3b82f6;
  --bg-dark: #050510;
  --bg-card: #0d0d1f;
  --bg-input: #111128;
  --text-primary: #f1f1f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border: rgba(124, 58, 237, 0.2);
  --border-focus: rgba(124, 58, 237, 0.6);
  --gradient: linear-gradient(135deg, var(--purple), var(--cyan));
  --gradient-text: linear-gradient(135deg, var(--purple-light), var(--cyan));
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-glow: 0 0 60px rgba(124, 58, 237, 0.15), 0 0 120px rgba(6, 182, 212, 0.08);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Utility ---- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.highlight {
  color: var(--cyan);
  font-style: normal;
  font-weight: 700;
}

/* ---- Sections ---- */
.section {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: 60px 20px 40px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
    var(--bg-dark);
}

.hero-inner {
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 100px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--purple-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  animation: fadeInDown 0.8s ease;
}

.hero-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  font-weight: 400;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* Video */
.video-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.video-glow {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  background: var(--gradient);
  opacity: 0.4;
  z-index: -1;
  filter: blur(20px);
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius);
  z-index: 2;
}

.play-overlay:hover {
  background: rgba(0, 0, 0, 0.2);
}

.play-overlay svg {
  transition: transform var(--transition);
}

.play-overlay:hover svg {
  transform: scale(1.1);
}

.play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  padding: 14px 32px;
  border-radius: 100px;
  background: var(--gradient);
  color: white;
  font-size: 16px;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-large {
  padding: 18px 40px;
  font-size: 18px;
}

/* Scroll indicator */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  animation: bounce 2s infinite 1.5s;
  margin-top: 8px;
}

.scroll-indicator svg {
  animation: bounceArrow 2s infinite 1.5s;
}

/* ---- Recent Submissions ---- */
.recent-area {
  width: 100%;
  max-width: 400px;
  margin-top: 12px;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.recent-count {
  text-align: center;
  font-size: 14px;
  color: var(--cyan);
  font-weight: 700;
  margin-bottom: 10px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.recent-item .ri-name {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 48px;
}

.recent-item .ri-phone {
  color: var(--text-muted);
  font-size: 12px;
}

.recent-item .ri-phone {
  margin-left: auto;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta {
  padding: 80px 20px;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    var(--bg-dark);
}

.cta-inner {
  max-width: 480px;
  width: 100%;
}

.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-glow);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.cta-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-icon {
  animation: pulse 3s infinite;
}

.cta-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
}

.cta-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.cta-desc strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cta-contact {
  font-size: 14px;
  color: var(--text-muted);
}

.cta-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.cta-link:hover {
  text-decoration: underline;
}

/* ============================================
   FORM SECTION
   ============================================ */
.form-section {
  padding: 80px 20px;
  min-height: auto;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
    var(--bg-dark);
}

.form-inner {
  max-width: 480px;
  width: 100%;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.form-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.form-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 8px;
}

.form-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

.form-desc {
  margin-top: 16px;
  font-size: 14.84px;
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: left;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 12px;
  padding: 16px 18px;
}

.survey-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s;
}

.survey-form.visible {
  opacity: 1;
  transform: translateY(0);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 16px;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
}

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

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.7;
}

.form-error {
  font-size: 13px;
  color: #ef4444;
  min-height: 18px;
}

/* ---- Signature Pad ---- */
.signature-wrap {
  position: relative;
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  touch-action: none;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 160px;
  cursor: crosshair;
}

.signature-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  transition: opacity var(--transition);
}

.signature-placeholder.hidden {
  opacity: 0;
}

.signature-wrap.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.signature-actions {
  display: flex;
  justify-content: flex-end;
}

.btn-sig-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color var(--transition);
}

.btn-sig-clear:hover {
  color: var(--cyan);
}

.btn-submit {
  margin-top: 8px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

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

.btn-submit.loading::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-submit.loading span {
  visibility: hidden;
}

/* Success message */
.success-message {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeInUp 0.6s ease;
}

.success-icon {
  animation: scaleIn 0.5s ease;
}

.success-title {
  font-size: 28px;
  font-weight: 800;
}

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

/* ============================================
   SHARE SECTION
   ============================================ */
.share-section {
  padding: 40px 20px 20px;
  background: var(--bg-dark);
}

.share-inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.share-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-copy {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-copy:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
}

.btn-copy.copied {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

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

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

@keyframes bounceArrow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(6px);
  }
  60% {
    transform: translateY(3px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

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

/* ============================================
   RESPONSIVE - Desktop
   ============================================ */
@media (min-width: 768px) {
  .hero-title {
    font-size: 48px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .video-container {
    max-width: 320px;
  }

  .cta-title,
  .form-title {
    font-size: 34px;
  }

  .cta-desc {
    font-size: 18px;
  }

  .cta-card {
    padding: 56px 48px;
  }
}

/* ============================================
   안전 영역 (노치/홈바)
   ============================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer {
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
}
