:root {
  --bg: #0a0a0b;
  --bg2: #141416;
  --ink: #f2efe9;
  --muted: #9a9590;
  --magenta: #ff2d6a;
  --coral: #ff6b4a;
  --accent: #ff2d6a;
  --accent-ink: #0a0a0b;
  --line: rgba(242, 239, 233, 0.12);
  --glow: rgba(255, 45, 106, 0.28);
  --font: "Work Sans", system-ui, sans-serif;
  --display: "Bebas Neue", "Archivo Black", Impact, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 85% -5%, var(--glow), transparent 55%),
    radial-gradient(ellipse 45% 35% at 5% 90%, rgba(255, 107, 74, 0.18), transparent 50%),
    linear-gradient(160deg, var(--bg) 0%, #121214 45%, var(--bg2) 100%);
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift {
  from { filter: hue-rotate(0deg) brightness(1); }
  to { filter: hue-rotate(8deg) brightness(1.05); }
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}
.top nav { display: flex; gap: 0.75rem; align-items: center; }
.top nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.top nav a:not(.btn):hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border-radius: 2px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn.buy {
  background: linear-gradient(135deg, var(--magenta), var(--coral));
  color: var(--accent-ink);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover:not(:disabled) { border-color: var(--magenta); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.hero {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
  max-width: 42rem;
  position: relative;
}
.brand-hero {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.2rem, 12vw, 5.5rem);
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
  line-height: 0.92;
  background: linear-gradient(100deg, var(--ink) 40%, var(--magenta) 75%, var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brandIn 0.7s ease-out both;
}
@keyframes brandIn {
  from { opacity: 0; transform: translateY(12px); letter-spacing: 0.12em; }
  to { opacity: 1; transform: translateY(0); letter-spacing: 0.04em; }
}
.hero h1 {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  max-width: 24ch;
  animation: fadeUp 0.6s 0.15s ease-out both;
}
.lede {
  color: var(--muted);
  margin: 0 0 1.75rem;
  max-width: 38ch;
  animation: fadeUp 0.6s 0.28s ease-out both;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fadeUp 0.6s 0.4s ease-out both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.strip {
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  max-width: 42rem;
}
.strip h2 {
  font-family: var(--display);
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
}
.strip ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.strip li { margin-bottom: 0.4rem; }

.foot {
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.foot a { color: var(--coral); }

/* —— App —— */
.app-body .workspace {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.status {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}
.status.unlocked { color: var(--coral); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.form-grid .full { grid-column: 1 / -1; }

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
input, textarea, select {
  font: inherit;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.7rem 0.8rem;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--magenta);
  box-shadow: 0 0 0 2px rgba(255, 45, 106, 0.2);
}
select { cursor: pointer; }

.hooks {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.25rem 0 0;
}
.hook {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--magenta);
  background: rgba(255, 255, 255, 0.03);
  animation: hookIn 0.35s ease-out both;
}
.hook:nth-child(2) { animation-delay: 0.04s; border-left-color: var(--coral); }
.hook:nth-child(3) { animation-delay: 0.08s; }
.hook:nth-child(4) { animation-delay: 0.12s; border-left-color: var(--coral); }
.hook:nth-child(5) { animation-delay: 0.16s; }
.hook:nth-child(6) { animation-delay: 0.2s; border-left-color: var(--coral); }
.hook:nth-child(7) { animation-delay: 0.24s; }
.hook:nth-child(8) { animation-delay: 0.28s; border-left-color: var(--coral); }
@keyframes hookIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.hook p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
}
.hook-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.hook-actions button {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.hook-actions button:hover { border-color: var(--magenta); color: var(--magenta); }
.hook-actions button.fav-on {
  border-color: var(--coral);
  color: var(--coral);
}

.watermark {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}
.empty-hooks {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
  padding: 1.25rem;
  border: 1px dashed var(--line);
  text-align: center;
}

.favorites-panel {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: none;
}
.favorites-panel.show { display: block; }
.favorites-panel h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.65rem;
  font-weight: 400;
}
.fav-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}
.fav-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}
.fav-list button {
  font: inherit;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  border: none;
  color: var(--magenta);
  cursor: pointer;
  flex-shrink: 0;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg2);
  color: var(--ink);
  padding: 1.25rem;
  max-width: 22rem;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
dialog h2 {
  font-family: var(--display);
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  font-weight: 400;
}
dialog p { color: var(--muted); font-size: 0.9rem; }
.err { color: #ff8f8f; font-size: 0.85rem; }

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.55rem 1rem;
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 50;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 560px) {
  .top { flex-wrap: wrap; gap: 0.75rem; }
  .form-grid { grid-template-columns: 1fr; }
  .hook {
    grid-template-columns: 1fr;
  }
  .hook-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
