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

:root {
  --blue: #4a90e2;
  --blue-dark: #357abd;
  --blue-soft: #eef5fd;
  --blue-border: #b8d4f5;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #e3e8ef;
  --border-strong: #d0d7e2;
  --text: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --error: #d64545;
  --error-bg: #fdeeee;
  --success: #22a06b;
  --success-bg: #e8f7ef;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --transition: 0.18s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* —— Hero header —— */
.site-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #5ba0ea 0%, #4a90e2 55%, #3f84d8 100%);
  padding: clamp(2.5rem, 8vw, 4rem) 1.25rem clamp(2.75rem, 9vw, 4.5rem);
  text-align: center;
  box-shadow: 0 4px 20px rgba(74, 144, 226, 0.22);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  animation: float-circle 18s ease-in-out infinite alternate;
}

@keyframes float-circle {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(var(--drift-x, 20px), var(--drift-y, -40px)) scale(1.06);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.4rem, 9vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.05;
}

.hero-tagline {
  margin-top: 0.65rem;
  font-size: clamp(1rem, 3.2vw, 1.2rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
}

.hero-description {
  margin: 1.15rem auto 0;
  max-width: 560px;
  font-size: clamp(0.88rem, 2.8vw, 0.98rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

/* —— Main —— */
.site-main {
  flex: 1;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}

.form-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: -1.25rem;
  position: relative;
  z-index: 2;
}

.form-intro {
  text-align: center;
  padding: 1.5rem 0.5rem 0.25rem;
}

.form-intro-title {
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 700;
  color: var(--text);
}

.form-intro-subtitle {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.application-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.form-panel-service {
  padding: 1.5rem 1.5rem 1.35rem;
  box-shadow: var(--shadow-md);
}

.form-panel-service .field-group {
  gap: 0.35rem;
}

.field-label-accent {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue);
}

.field-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.field-select-lg {
  margin-top: 0.35rem;
  padding: 0.85rem 2.4rem 0.85rem 0.95rem;
  font-size: 0.95rem;
  background-color: #fafbfc;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
}

.field-full {
  grid-column: 1 / -1;
}

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

.field-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.required {
  color: var(--blue);
}

.field-input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fafbfc;
  color: var(--text);
  padding: 0.72rem 0.85rem;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.field-input::placeholder {
  color: #b0b8c4;
}

.field-input:hover {
  border-color: #b8c0cc;
}

.field-input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.field-textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
}

.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27 viewBox=%270 0 12 8%27%3E%3Cpath fill=%27%234a90e2%27 d=%27M1.5 1.5 6 6l4.5-4.5%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 14px) 50%;
  padding-right: 2.2rem;
  cursor: pointer;
}

.field-select option {
  background: var(--surface);
  color: var(--text);
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.consent-checkbox {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: var(--blue);
  cursor: pointer;
}

.consent-text {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.consent-text a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-text a:hover {
  color: var(--blue);
}

.form-error {
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid rgba(214, 69, 69, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-size: 0.92rem;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
  box-shadow: 0 4px 14px rgba(74, 144, 226, 0.28);
}

.btn-submit:hover:not(:disabled) {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-submit.is-loading .btn-text::after {
  content: "…";
}

.btn-arrow {
  font-size: 1.05rem;
  transition: transform var(--transition);
}

.btn-submit:hover:not(:disabled) .btn-arrow {
  transform: translateX(3px);
}

/* —— Success —— */
.success-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.success-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.success-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn-secondary {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  padding: 0.7rem 1.25rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.btn-secondary:hover {
  border-color: var(--blue-border);
  color: var(--blue-dark);
  background: var(--blue-soft);
}

/* —— Footer —— */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.25rem 1rem 1.75rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-divider {
  opacity: 0.5;
}

.footer-link {
  color: inherit;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

/* —— Legal pages —— */
.legal-header {
  background: linear-gradient(180deg, #5ba0ea 0%, #4a90e2 55%, #3f84d8 100%);
  padding: clamp(1.75rem, 5vw, 2.5rem) 1.25rem clamp(2rem, 6vw, 3rem);
  color: #fff;
}

.legal-header-inner {
  max-width: 760px;
  margin: 0 auto;
}

.legal-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.9rem;
}

.legal-back:hover {
  color: #fff;
  text-decoration: underline;
}

.legal-title {
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.legal-updated {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.82);
}

.legal-main {
  flex: 1;
  padding: 0 1.25rem 2rem;
  margin-top: -1.25rem;
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.legal-content section + section {
  margin-top: 1.75rem;
}

.legal-content h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.65rem;
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.legal-content p + p,
.legal-content ul {
  margin-top: 0.65rem;
}

.legal-content ul {
  padding-left: 1.25rem;
}

.legal-content li + li {
  margin-top: 0.35rem;
}

.legal-content a {
  color: var(--blue-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--blue);
}

@media (max-width: 720px) {
  .site-main {
    padding: 0 0.85rem 1.5rem;
  }

  .form-shell {
    margin-top: -0.75rem;
  }

  .form-intro {
    padding-top: 1.15rem;
  }

  .form-panel {
    padding: 1.1rem 1rem 1.25rem;
  }

  .form-panel-service {
    padding: 1.15rem 1rem 1.1rem;
  }

  .fields-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

