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

:root {
  --ink: #0c0c0c;
  --ink-soft: #2a2a2a;
  --muted: #6b7280;
  --muted-light: #9ca3af;
  --border: #e5e2dc;
  --border-light: #f0ede8;
  --surface: #f9f8f5;
  --accent: #1a4f30;
  --accent-vivid: #226040;
  --accent-light: #e4efe8;
  --accent-glow: rgba(26, 79, 48, 0.12);
  --brand-dark: #1a5fa8;
  --brand-mid: #2176c7;
  --brand-light: #5aabdc;
  --brand-surface: rgba(33, 118, 199, 0.08);
  --panel: #0d2318;
  --panel-mid: #112d1e;
  --white: #ffffff;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 2.5rem;
  background: rgba(26, 95, 168, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(33, 118, 199, 0.15);
}
.nav-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.nav-brand .brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.nav-brand .brand-tagline {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.nav-cta {
  background: var(--accent);
  color: var(--white);
  padding: 0.55rem 1.35rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.nav-cta:hover {
  background: var(--accent-vivid);
  transform: translateY(-1px);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.25rem 2rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(34,96,64,0.14), transparent 28%),
              radial-gradient(circle at bottom right, rgba(26,79,48,0.08), transparent 24%);
  pointer-events: none;
}
.hero-content {
  width: min(100%, 720px);
  padding: clamp(2rem, 4vw, 4rem);
  position: relative;
  z-index: 1;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s, transform 0.12s;
  margin-top: 1.75rem;
}
.hero-cta:hover {
  background: var(--accent-vivid);
  transform: translateY(-1px);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.6rem, 3.8vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1.75rem;
  color: var(--ink);
}
h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-body {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 420px;
  margin-bottom: 2.75rem;
  font-weight: 300;
  line-height: 1.75;
}

.trust-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 400;
}
.trust-icon {
  width: 20px; height: 20px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

/* ── FORM CARD ── */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.75rem 3rem;
  width: 100%;
  position: relative;
  z-index: 1;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.06),
    0 10px 28px rgba(0,0,0,0.12),
    0 28px 80px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.form-card h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.65rem;
  margin-bottom: 0.4rem;
  line-height: 1.2;
  color: var(--ink);
}
.form-card > div > p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.field { margin-bottom: 0.9rem; }
label {
  display: block;
  font-size: 0.775rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
input, select, textarea {
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input:hover, select:hover, textarea:hover {
  border-color: #c5c0b8;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: #fafffe;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
textarea { resize: vertical; min-height: 84px; }

#other-service-field {
  display: none;
}

.h-captcha {
  margin-top: 0.75rem;
}

.label-optional {
  font-weight: 400;
  color: var(--muted-light);
}

.success-note {
  margin-top: 0.25rem;
  font-size: 0.825rem;
}

.field-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.submit-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.925rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 1.75rem;
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
  letter-spacing: 0.015em;
  position: relative;
  overflow: hidden;
}
.submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.submit-btn:hover {
  background: var(--accent-vivid);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,79,48,0.28);
}
.submit-btn:active { transform: scale(0.99); }
.submit-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.form-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted-light);
  margin-top: 0.875rem;
}

/* ── SUCCESS STATE ── */
/* Fade via opacity so card size stays constant — prevents scroll jump */
#form-inner {
  transition: opacity 0.35s ease;
}
#form-inner.fading {
  opacity: 0;
  pointer-events: none;
}
.success-state {
  position: absolute;
  inset: 0;
  padding: 2.75rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease 0.2s;
}
.success-state.visible {
  opacity: 1;
  pointer-events: auto;
}
.success-icon {
  width: 60px; height: 60px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.success-icon svg { stroke: var(--accent); }
.success-state h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--ink);
}
.success-state p {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.65;
}

/* ── SERVICES ── */
.services {
  padding: 7rem 5rem;
  background: var(--surface);
  position: relative;
}
.services-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.services-header {
  margin-bottom: 3.5rem;
}
.services-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  margin-top: 0.75rem;
  letter-spacing: -0.02em;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: default;
}
.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 32px rgba(26,79,48,0.09);
  transform: translateY(-2px);
}
.service-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.25rem;
  color: var(--accent);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 1rem;
}
.service-card h3 {
  font-size: 0.975rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.service-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid rgba(33, 118, 199, 0.18);
  padding: 1.75rem 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.775rem;
  color: var(--ink-soft);
  background: var(--brand-surface);
}
footer .footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.footer-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.footer-tagline {
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-content > * {
  animation: fadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.25s; }
.hero-content > *:nth-child(4) { animation-delay: 0.35s; }
.hero-content > *:nth-child(5) { animation-delay: 0.45s; }

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal][data-reveal-delay="0"] { transition-delay: 0ms; }
[data-reveal][data-reveal-delay="100"] { transition-delay: 100ms; }
[data-reveal][data-reveal-delay="200"] { transition-delay: 200ms; }
[data-reveal][data-reveal-delay="300"] { transition-delay: 300ms; }
[data-reveal][data-reveal-delay="400"] { transition-delay: 400ms; }
[data-reveal][data-reveal-delay="500"] { transition-delay: 500ms; }

/* ── REGISTER SECTION ── */
.register-section {
  padding: 7rem 5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,255,254,0.99));
}
.register-inner {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 2.25rem;
}
.register-header {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.register-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  margin: 0.8rem 0 1rem;
  letter-spacing: -0.02em;
}
.register-header p {
  color: var(--muted);
  line-height: 1.75;
  max-width: 610px;
  margin: 0 auto;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── SERVICES ── */

.field.error input,
.field.error select,
.field.error textarea {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.field.success input,
.field.success select,
.field.success textarea {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.field-message {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}

.field.error .field-message {
  display: block;
  color: #dc2626;
}

.field.success .field-message {
  display: block;
  color: #16a34a;
}

/* ── LOADING SPINNER ── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  display: inline-block;
  margin-right: 0.5rem;
}

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

/* ── PROGRESS INDICATOR ── */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1000;
  display: none;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s ease;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero {
    padding: 4rem 1.5rem 2rem;
  }
  .hero-content {
    padding: clamp(1.75rem, 4vw, 3rem);
  }
  .trust-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }
  .services {
    padding: 4rem 1.5rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  footer {
    padding: 1.5rem 1.5rem;
    flex-direction: column;
  }
  .field-row-3 {
    grid-template-columns: 1fr;
  }
  nav {
    padding: 0.85rem 1.25rem;
  }
}

@media (max-width: 580px) {
  nav {
    padding: 0.75rem 1rem;
  }
  .hero {
    padding: 3.5rem 1rem 1.5rem;
  }
  .hero-content {
    padding: 1.5rem 0.9rem 1.5rem;
  }
  h1 {
    font-size: 2rem;
  }
  .hero-body {
    max-width: 100%;
  }
  .trust-item {
    font-size: 0.78rem;
  }
  .form-card,
  .success-state {
    padding: 1.5rem 1rem;
  }
  .services {
    padding: 3rem 1rem;
  }
  footer {
    padding: 1rem 1rem;
  }
}