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

:root {
  --bg: #0f1419;
  --surface: #1a2028;
  --border: #2d3640;
  --text: #e8ecf0;
  --text-dim: #8b95a0;
  --accent: #1e8c6e;
  --accent-hover: #24a882;
  --error: #e74c3c;
  --success: #2ecc71;
  --radius: 8px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
}

/* Layout */
.container {
  max-width: 620px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2rem;
}

.logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.logo {
  height: auto;
}

.logo--coral {
  max-width: 200px;
}

.logo--ag {
  max-width: 130px;
}

.logo-divider {
  color: var(--text-dim);
  font-size: 1.25rem;
  font-weight: 300;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-dim);
  margin-top: 0.25rem;
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

legend {
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  padding: 0 0.5rem;
}

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

label {
  font-size: 0.9375rem;
  font-weight: 500;
}

.req { color: var(--error); }

.hint {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

input.invalid, textarea.invalid {
  border-color: var(--error);
}

/* Checkbox */
.field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.625rem;
}

.field--checkbox input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.25rem;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent);
}

.field--checkbox label {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
}

/* Drop zone */
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
  text-align: center;
}

.drop-zone:hover,
.drop-zone--active {
  border-color: var(--accent);
  background: rgba(30, 140, 110, 0.05);
}

.drop-zone__icon {
  font-size: 2rem;
}

.drop-zone__text {
  color: var(--text-dim);
  font-size: 0.875rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Previews */
.previews {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.preview-card {
  position: relative;
  width: 120px;
}

.preview-card img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
}

.preview-card__name {
  font-size: 0.6875rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.25rem;
}

.preview-card__remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--error);
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Progress bar */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.2s;
}

.progress-text {
  font-size: 0.8125rem;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 5em;
}

/* Messages */
.form-message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.form-message--success {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.form-message--error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid var(--error);
  color: var(--error);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn:hover { background: var(--accent-hover); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Turnstile */
.cf-turnstile {
  align-self: center;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* Responsive tweaks */
@media (max-width: 480px) {
  .container { padding: 1.25rem 1rem; }
  h1 { font-size: 1.5rem; }
  fieldset { padding: 1rem; }
  .logo--coral { max-width: 150px; }
  .logo--ag { max-width: 100px; }
  .preview-card { width: 90px; }
  .preview-card img { width: 90px; height: 68px; }
}
