:root {
  --primary: #111111;
  --secondary: #ffffff;
  --accent: #d6b36a;
  --bg: #f7f7f7;
  --text: #222222;
  --border: rgba(17, 17, 17, 0.12);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container {
  width: min(100% - 2rem, 1220px);
  margin: 0 auto;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  color: var(--primary);
  text-decoration: none;
  font-weight: 800;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero {
  padding: 3rem 0 2rem;
}

.hero h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.hero p {
  max-width: 760px;
  margin: 0;
}

.layout {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 1rem;
  align-items: start;
  padding-bottom: 3rem;
}

.form {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1rem;
}

#informacion-proyecto {
  scroll-margin-top: 90px;
}

.card h3 {
  margin: 0 0 0.8rem;
}

.card-desc {
  margin: -0.3rem 0 0.9rem;
  color: #555;
  font-size: 0.9rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

label,
fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

textarea {
  resize: vertical;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem;
}

legend {
  padding: 0 0.2rem;
  font-weight: 600;
}

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.8rem;
}

.checks label {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
}

.checks input {
  width: auto;
}

.btn {
  border: 1px solid var(--primary);
  background: #fff;
  color: var(--primary);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

#status {
  margin: 0.4rem 0 0;
  width: 100%;
  font-size: 0.92rem;
}

#files-summary {
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  color: #444;
}

.preview {
  position: sticky;
  top: 88px;
}

.success-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.success-modal.is-open {
  display: block;
}

.success-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.62);
  backdrop-filter: blur(4px);
}

.success-modal__card {
  position: relative;
  width: min(92vw, 820px);
  margin: min(10vh, 90px) auto 0;
  background: #fff;
  border-radius: 14px;
  padding: 2.3rem 1.6rem 2.6rem;
  text-align: center;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.success-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  border: 0;
  background: transparent;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  color: #222;
}

.success-modal__logo {
  width: min(270px, 72%);
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.success-modal__card h3 {
  margin: 0.5rem 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.success-modal__card p {
  margin: 0.2rem 0;
  color: #444;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .preview {
    position: static;
  }
}

@media (max-width: 680px) {
  .grid,
  .checks {
    grid-template-columns: 1fr;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .success-modal__card {
    margin-top: 8vh;
    padding: 2rem 1rem;
  }

  .success-modal__close {
    top: 0.4rem;
    right: 0.7rem;
    font-size: 2rem;
  }
}
