/* =============================================
   Brian 💜 Paula — Login Page
   Paleta: crema / blanco / morado
   ============================================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream:       #fdf8f0;
  --cream-dark:  #f5ede0;
  --purple-deep: #3d0066;
  --purple:      #7b2cbf;
  --purple-mid:  #9d4edd;
  --purple-light:#c77dff;
  --purple-pale: #e9d5ff;
  --purple-soft: #f3e8ff;
  --text-main:   #2d1b42;
  --text-muted:  #9a57c0;
  --white:       #ffffff;
}

/* ── BODY ── */
body {
  min-height: 100vh;
  background-color: var(--cream);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(196,149,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(123,44,191,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 60% 30%, rgba(253,248,240,0) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Jost', sans-serif;
  overflow: hidden;
  position: relative;
  cursor: default;
}

/* Textura sutil de grano */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── PÉTALOS ── */
.petals, .particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -20px;
  border-radius: 60% 0 60% 0;
  opacity: 0;
  animation: petalFall var(--dur, 9s) ease-in var(--delay, 0s) infinite;
}

@keyframes petalFall {
  0%   { opacity: 0;   transform: translateY(0) rotate(0deg) translateX(0); }
  8%   { opacity: 0.55; }
  88%  { opacity: 0.25; }
  100% { opacity: 0;   transform: translateY(108vh) rotate(320deg) translateX(var(--dx, 50px)); }
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat var(--pd, 6s) ease-in-out var(--pdelay, 0s) infinite;
}

@keyframes particleFloat {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  20%  { opacity: 0.6; transform: translateY(-30px) scale(1); }
  80%  { opacity: 0.3; transform: translateY(-90px) scale(0.8); }
  100% { opacity: 0; transform: translateY(-130px) scale(0.2); }
}

/* ── PAGE WRAP ── */
.page-wrap {
  position: relative;
  z-index: 10;
  padding: 24px;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ── CARD ── */
.card {
  background: var(--white);
  border: 2px solid rgba(159, 55, 238, 0.5);
  border-radius: 28px;
  padding: 52px 44px 44px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow:
    0 2px 0 0 rgba(199,125,255,0.2),
    0 12px 40px rgba(123,44,191,0.1),
    0 40px 80px rgba(123,44,191,0.06);
  opacity: 0;
  transform: translateY(28px);
  animation: cardReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
  position: relative;
  overflow: hidden;
}

/* Brillo interno */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(199,125,255,0.6), transparent);
}

@keyframes cardReveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  background: var(--purple-soft);
  border: 2pt solid rgba(199, 125, 255, 0.76);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 26px;
  animation: cardReveal 0.9s cubic-bezier(0.22,1,0.36,1) 0.3s both;
}

/* ── CORAZÓN ── */
.heart-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  animation: cardReveal 0.9s cubic-bezier(0.22,1,0.36,1) 0.4s both;
}

.heart-glow {
  position: absolute;
  inset: -14px;
  background: radial-gradient(circle, rgba(199,125,255,0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: heartGlow 2.4s ease-in-out infinite;
}

@keyframes heartGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.25); }
}

.heart-svg {
  width: 64px;
  height: 64px;
  position: relative;
  z-index: 1;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15%       { transform: scale(1.14); }
  30%       { transform: scale(1); }
  45%       { transform: scale(1.07); }
  60%       { transform: scale(1); }
}

/* ── TÍTULO ── */
h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  font-weight: 500;
  color: var(--text-main);
  letter-spacing: 0.04em;
  animation: cardReveal 0.9s cubic-bezier(0.22,1,0.36,1) 0.45s both;
}

h1 em {
  font-style: italic;
  color: var(--purple);
  font-weight: 400;
}

/* ── ORNAMENTO ── */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px 0;
  animation: cardReveal 0.9s cubic-bezier(0.22,1,0.36,1) 0.5s both;
}

.ornament .line {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(199,125,255,0.5));
}

.ornament .line:last-child {
  background: linear-gradient(270deg, transparent, rgba(199,125,255,0.5));
}

.ornament .dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(199,125,255,0.6);
}

/* ── SUBTITLE ── */
.subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  animation: cardReveal 0.9s cubic-bezier(0.22,1,0.36,1) 0.55s both;
}

/* ── FORM ── */
form {
  animation: cardReveal 0.9s cubic-bezier(0.22,1,0.36,1) 0.6s both;
}

.field {
  position: relative;
  margin-bottom: 14px;
}

.field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple-light);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.3s;
}

.field input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  background: var(--cream);
  border: 1.5px solid rgba(199, 125, 255, 0.836);
  border-radius: 14px;
  color: #000000;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.06em;
  outline: none;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.field input::placeholder {
  color: rgba(0, 0, 0, 0.5);
  font-style: italic;
  
}

.field input:focus {
  border-color: var(--purple-mid);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(157,78,221,0.08);
}

.field input:focus + .field-icon,
.field:focus-within .field-icon {
  color: var(--purple);
}

/* ── BOTÓN ── */
.btn {
  position: relative;
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: var(--white);
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.12em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(123,44,191,0.35);
  margin-top: 4px;
}

.btn-shine {
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(123,44,191,0.45);
}

.btn:hover .btn-shine {
  left: 150%;
}

.btn:active {
  transform: translateY(0);
}

/* ── ERROR ── */
.error-msg {
  color: #9d174d;
  background: #fdf2f8;
  border: 1px solid rgba(157,23,77,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-style: italic;
  margin-top: 16px;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(3px); }
}

/* ── FOOTER ── */
.footer-note {
  margin-top: 30px;
  font-size: 11px;
  font-style: italic;
  color: rgb(104, 41, 141);
  letter-spacing: 0.06em;
  animation: cardReveal 0.9s cubic-bezier(0.22,1,0.36,1) 0.7s both;
}

/* ── RESPONSIVE ── */
@media (max-width: 440px) {
  .card { padding: 44px 28px 36px; }
  h1 { font-size: 28px; }
}

.field input[type="password"] {
  font-family: monospace;
  font-size: 13px;
}