/* Rediseña tu web con IA — la carta de presentación del gancho. Debe verse premium. */

:root {
  --bg: #0a0a0f;
  --bg-panel: #12131c;
  --bg-panel-2: #171826;
  --border: #23253a;
  --border-hi: #3a3d5c;
  --text: #eef0f7;
  --text-dim: #9498ad;
  --accent: #ff6b3d;      /* naranja cálido con carácter */
  --accent-2: #7c5cff;    /* violeta profundo de apoyo */
  --ok: #58d18b;
  --radius: 18px;
}

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

body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* --- Atmósfera de fondo --- */
.bg-atmosphere { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, var(--accent), transparent 70%); top: -140px; left: -100px; animation: float1 14s ease-in-out infinite; }
.orb-2 { width: 460px; height: 460px; background: radial-gradient(circle, var(--accent-2), transparent 70%); bottom: -160px; right: -120px; animation: float2 17s ease-in-out infinite; }
.grain {
  position: absolute; inset: 0; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px,40px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px,-30px); } }

/* --- Layout --- */
.wrap { max-width: 1120px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) 1.5rem 3rem; }

/* --- Intro --- */
.intro { text-align: center; margin-bottom: 2.8rem; }
.badge {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--accent); background: rgba(255,107,61,0.1); border: 1px solid rgba(255,107,61,0.25);
  padding: 0.35rem 0.85rem; border-radius: 100px; margin-bottom: 1.3rem;
  opacity: 0; animation: rise 0.7s ease-out 0.05s forwards;
}
.title {
  font-family: 'Fraunces', serif; font-weight: 900; font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.02; letter-spacing: -0.02em; margin-bottom: 1.1rem;
  opacity: 0; animation: rise 0.7s ease-out 0.15s forwards;
}
.title em { font-style: italic; color: var(--accent); }
.sub {
  color: var(--text-dim); max-width: 620px; margin: 0 auto; font-size: 1.08rem;
  opacity: 0; animation: rise 0.7s ease-out 0.28s forwards;
}
.sub strong { color: var(--text); font-weight: 600; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* --- Panel del formulario --- */
.panel {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; max-width: 660px; margin: 0 auto;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7);
  opacity: 0; animation: rise 0.7s ease-out 0.4s forwards;
}
.field { position: relative; margin-bottom: 1.1rem; }
.field-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-size: 1.1rem; opacity: 0.7; }
#domain {
  width: 100%; padding: 1rem 1rem 1rem 2.9rem; font-size: 1.1rem; font-family: inherit;
  border-radius: 12px; border: 1px solid var(--border-hi); background: #0b0c14; color: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#domain::placeholder { color: #565a70; }
#domain:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,61,0.15); }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 1.1rem; }
@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } }
.mode {
  display: block; padding: 1rem; border: 1px solid var(--border-hi); border-radius: 12px;
  cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.1s;
  background: rgba(255,255,255,0.01);
}
.mode:hover { transform: translateY(-2px); }
.mode input { display: none; }
.mode.selected { border-color: var(--accent); background: rgba(255,107,61,0.06); }
.mode-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.35rem; }
.mode-title { font-weight: 700; font-size: 1.02rem; }
.mode-pill {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--accent); background: rgba(255,107,61,0.14); padding: 0.15rem 0.5rem; border-radius: 100px;
}
.mode-pill.soft { color: var(--accent-2); background: rgba(124,92,255,0.14); }
.mode-desc { display: block; font-size: 0.88rem; color: var(--text-dim); }

#go {
  width: 100%; padding: 1.05rem; font-size: 1.08rem; font-weight: 700; font-family: inherit;
  border: none; border-radius: 12px; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff8a5c);
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  transition: transform 0.12s, box-shadow 0.15s; box-shadow: 0 12px 30px -10px rgba(255,107,61,0.6);
}
#go:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(255,107,61,0.7); }
#go:disabled { opacity: 0.65; cursor: default; }
.go-arrow { transition: transform 0.2s; }
#go:hover:not(:disabled) .go-arrow { transform: translateX(4px); }

/* --- Pasos en directo --- */
.progress { max-width: 660px; margin: 2.2rem auto 0; padding: 1.5rem; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); }
.steps { list-style: none; }
.step { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0; color: #5b6076; font-size: 1rem; transition: color 0.3s; }
.step.active { color: var(--text); }
.step.done { color: var(--ok); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: currentColor; flex: none; }
.step.active .dot { animation: pulse 1.1s infinite; box-shadow: 0 0 0 4px rgba(255,107,61,0.15); background: var(--accent); }
.step.done .dot::after { content: "✓"; color: #0a0a0f; font-size: 8px; display: flex; align-items: center; justify-content: center; height: 100%; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* --- Resultado antes/después --- */
.result { margin-top: 3rem; opacity: 0; animation: rise 0.6s ease-out forwards; }
.result-head { text-align: center; margin-bottom: 1.8rem; }
.result-head h2 { font-family: 'Fraunces', serif; font-weight: 900; font-size: 2rem; letter-spacing: -0.01em; }
.result-head p { color: var(--text-dim); }

.split { display: grid; grid-template-columns: 1fr 1.9fr; gap: 1.4rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .after { order: -1; } }
.col-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-dim); margin-bottom: 0.7rem; font-weight: 600; }
.col-tag.accent { color: var(--accent); }

.before-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.before-img { background: #0b0c14; }
.before-img img { width: 100%; display: block; }
.before-body { padding: 1.1rem; }
.before-name { font-weight: 700; font-size: 1.15rem; margin-bottom: 0.4rem; }
.before-desc { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.9rem; }
.swatches { display: flex; gap: 0.4rem; margin-bottom: 1rem; }
.swatch { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.15); }
.before-link { color: var(--accent); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.before-link:hover { text-decoration: underline; }

.after-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--border-hi); background: #fff; box-shadow: 0 30px 70px -25px rgba(0,0,0,0.8); }
.frame-bar { display: flex; gap: 0.4rem; padding: 0.6rem 0.9rem; background: #0b0c14; border-bottom: 1px solid var(--border); }
.frame-bar span { width: 11px; height: 11px; border-radius: 50%; background: #33374d; }
.frame-bar span:first-child { background: #ff5f57; }
.frame-bar span:nth-child(2) { background: #febc2e; }
.frame-bar span:nth-child(3) { background: #28c840; }
#preview { width: 100%; height: 600px; border: none; display: block; background: #fff; }

.after-actions { display: flex; gap: 0.7rem; margin-top: 0.9rem; }
.after-actions button {
  flex: 1; padding: 0.7rem; font-family: inherit; font-weight: 600; font-size: 0.9rem;
  border: 1px solid var(--border-hi); border-radius: 10px; background: var(--bg-panel); color: var(--text);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.after-actions button:hover { border-color: var(--accent); background: rgba(255,107,61,0.06); }

.error { max-width: 660px; margin: 1.5rem auto 0; padding: 1rem 1.2rem; border-radius: 12px; background: rgba(90,36,54,0.4); border: 1px solid #5a2436; color: #ffb3c1; text-align: center; }

.foot { text-align: center; color: #565a70; font-size: 0.85rem; margin-top: 3.5rem; }
.foot strong { color: var(--text-dim); }
