@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,800&family=Inter+Tight:wght@400;500;600;700&display=swap');

:root {
  --brand-500: #fd510d;
  --brand-600: #e2390a;
  --brand-700: #b62709;
  --ink-50:  #faf3eb;
  --ink-100: #f3e3d4;
  --ink-300: #c9aa97;
  --ink-700: #3d2a20;
  --ink-800: #2a1a13;
  --ink-900: #1a0f0a;
  --surface: #ffffff;
  --border:  #ecdfd2;
  --border-strong: #d9c4ad;
  --danger:  #b3261e;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --r-md: 10px;
  --r-lg: 18px;
  --shadow-3: 0 28px 60px rgba(36, 18, 10, 0.22), 0 8px 24px rgba(36, 18, 10, 0.08);
  --shadow-brand: 0 12px 30px rgba(253, 81, 13, 0.32);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-body);
  color: var(--ink-800);
  background: var(--ink-50);
  -webkit-font-smoothing: antialiased;
}

body {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

/* ----- Brand panel (left) ----- */
.brand-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 0% 0%, #ff8a3a 0%, transparent 55%),
    radial-gradient(100% 90% at 100% 100%, #8a1505 0%, transparent 60%),
    linear-gradient(135deg, #fd510d 0%, #c9261a 60%, #7a1305 100%);
  color: #fff;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand-panel::before {
  /* subtle warm grain */
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.brand-panel::after {
  /* decorative oversized typographic mark */
  content: "C";
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 56vh;
  color: rgba(255,255,255,0.07);
  bottom: -8vh;
  right: -4vw;
  line-height: 0.8;
  pointer-events: none;
  user-select: none;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.brand-mark img {
  height: 64px;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.brand-mark .wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.brand-mark .wordmark small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.78);
  margin-top: 6px;
}

.brand-tagline {
  position: relative;
  z-index: 1;
  max-width: 460px;
}
.brand-tagline h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.brand-tagline h1 em {
  font-style: italic;
  font-weight: 500;
  color: #ffd9c2;
}
.brand-tagline p {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  margin: 0;
  max-width: 38ch;
}

.brand-footer {
  position: relative;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

/* ----- Form panel (right) ----- */
.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--ink-50);
  position: relative;
}
.form-panel::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 80% 12%, rgba(253,81,13,0.06), transparent 45%),
    radial-gradient(circle at 12% 88%, rgba(253,81,13,0.05), transparent 50%);
  pointer-events: none;
}

.form-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px 36px 32px;
  box-shadow: var(--shadow-3);
}

.form-card .eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 12px;
}
.form-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink-900);
}
.form-card .lede {
  font-size: 14px;
  color: var(--ink-700);
  margin: 0 0 28px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus {
  outline: 0;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(253,81,13,0.18);
}

.field-row {
  display: flex;
  gap: 14px;
}
.field-row .field { flex: 1; }

.submit {
  width: 100%;
  margin-top: 8px;
  padding: 13px 16px;
  background: var(--brand-500);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  border: 0;
  border-radius: var(--r-md);
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  transition: background .15s ease, transform .06s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.submit:hover  { background: var(--brand-600); }
.submit:active { transform: translateY(1px); }
.submit[disabled] { opacity: 0.7; cursor: progress; }

.submit .spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.submit.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

#mensaje {
  margin: 14px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--danger);
  text-align: left;
}

.form-foot {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-700);
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.04em;
}

/* ----- Responsive ----- */
@media (max-width: 880px) {
  body { grid-template-columns: 1fr; }
  .brand-panel {
    padding: 36px 28px;
    min-height: 220px;
  }
  .brand-panel::after { font-size: 36vh; bottom: -12vh; }
  .brand-tagline h1 { font-size: 32px; }
  .form-panel { padding: 28px 20px; }
  .form-card  { padding: 28px 22px; }
}
