/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #0a8b90;
  --primary-hover: #087377;
  --primary-light: #e6f6f7;
  --primary-glow: rgba(10, 139, 144, 0.35);
  --dark-teal: #065356;
  --bg-gradient: linear-gradient(135deg, #ffffff 0%, #f0fdfd 50%, #e0f7f8 100%);
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #cbd5e1;
  --card-bg: rgba(255, 255, 255, 0.88);
  --modal-bg: rgba(255, 255, 255, 0.96);
  --shadow-lg: 0 20px 40px -10px rgba(10, 139, 144, 0.15), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 25px 50px -12px rgba(10, 139, 144, 0.25), 0 0 0 1px rgba(10, 139, 144, 0.1);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: #ffffff;
  overflow-x: hidden;
}

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Centered Layout wrapper */
.main-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.hero-card {
  max-width: 680px;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(10, 139, 144, 0.15);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Logo */
.logo-container {
  margin-bottom: 2.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-container img, .logo-container svg {
  max-width: 280px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(10, 139, 144, 0.15));
  transition: transform 0.3s ease;
}

.logo-container img:hover, .logo-container svg:hover {
  transform: scale(1.02);
}

/* Typography */
.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--dark-teal);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

/* CTA Button */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1.1rem 2.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px var(--primary-glow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.cta-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: 0.6s;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(10, 139, 144, 0.45);
  background: linear-gradient(135deg, var(--primary-hover) 0%, #043f42 100%);
}

.cta-button:hover::after {
  left: 100%;
}

.cta-button:active {
  transform: translateY(-1px);
}

.cta-button svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.cta-button:hover svg {
  transform: translateX(4px);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Content Card */
.modal-content {
  background: var(--modal-bg);
  border: 1px solid rgba(10, 139, 144, 0.2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  padding: 2.5rem;
  position: relative;
  text-align: left;
  transform: scale(0.92) translateY(30px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

/* Close Modal Button */
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #e2e8f0;
  color: var(--text-main);
  transform: rotate(90deg);
}

/* Modal Header */
.modal-header {
  margin-bottom: 1.75rem;
  padding-right: 2rem;
}

.modal-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--dark-teal);
  margin-bottom: 0.35rem;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Form Styles */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group label .required {
  color: #e11d48;
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.form-control.error {
  border-color: #e11d48;
  background-color: #fff1f2;
}

.error-text {
  font-size: 0.8rem;
  color: #e11d48;
  margin-top: 0.15rem;
  display: none;
}

.error-text.active {
  display: block;
}

/* Dynamic Field Transition */
.conditional-field {
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.conditional-field.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Modal Submit Button */
.submit-button {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-button:hover {
  background: var(--primary-hover);
  box-shadow: 0 8px 20px -4px var(--primary-glow);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

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

.submit-button.loading .spinner {
  display: block;
}
.submit-button.loading .btn-text {
  display: none;
}

/* Success View */
.success-card {
  display: none;
  text-align: center;
  padding: 1rem 0;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.2rem;
}

.success-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  color: var(--dark-teal);
  margin-bottom: 0.75rem;
}

.success-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

/* Footer / copyright minimal */
.footer-text {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #94a3b8;
  z-index: 1;
}
