:root {
  --ink: #1d1e30;
  --yellow: #ffe847;
  --yellow-deep: #f0d820;
  --green: #47a06b;
  --green-deep: #2f7a4f;
  --paper: #f7f7f4;
  --white: #ffffff;
  --muted: #5a5b6a;
  --line: rgba(29, 30, 48, 0.1);
  --radius: 20px;
  --font-display: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
  --shadow: 0 20px 50px rgba(29, 30, 48, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(255, 232, 71, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 35% at 0% 100%, rgba(71, 160, 107, 0.12), transparent 50%),
    var(--paper);
  line-height: 1.55;
}

.page {
  min-height: 100vh;
}

.botcheck {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

/* —— Access password gate —— */
.access-form {
  display: grid;
  gap: 0.85rem;
  text-align: left;
  margin-top: 0.5rem;
}

.access-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.access-label input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-weight: 500;
}

.access-error {
  margin: 0;
  color: #b42318;
  font-size: 0.9rem;
  font-weight: 600;
}

.access-form .lang-btn {
  width: 100%;
  margin-top: 0.25rem;
}

/* —— Language gate —— */
.lang-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background:
    linear-gradient(160deg, var(--yellow) 0%, #ffe847 42%, #fff6a8 100%);
  animation: fadein 0.6s ease both;
}

.lang-card {
  width: min(28rem, 100%);
  text-align: center;
  padding: 2.25rem 1.75rem 2rem;
  background: var(--white);
  border-radius: 28px;
  box-shadow: var(--shadow);
  animation: rise 0.7s ease both;
}

.lang-gate .brand {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.6rem);
}

.tagline {
  margin: 0.35rem 0 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-deep);
  letter-spacing: 0.02em;
}

.lang-gate h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.lang-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.lang-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 0.9rem 1.55rem;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 999px;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 8px 20px rgba(240, 216, 32, 0.35);
}

.lang-btn:hover {
  transform: translateY(-2px);
}

.lang-btn-ghost {
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: none;
  color: var(--ink);
}

/* —— Hero (web-like yellow band) —— */
.hero {
  background: var(--yellow);
  padding: clamp(2.2rem, 5vw, 3.5rem) 1.25rem 2.4rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -30%;
  width: 42%;
  height: 160%;
  background: rgba(71, 160, 107, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
  animation: rise 0.65s ease both;
}

.brand {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.85rem, 4.5vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
}

.hero .tagline {
  margin: 0.4rem 0 1rem;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: var(--ink);
}

.lede {
  margin: 0;
  max-width: 34rem;
  color: rgba(29, 30, 48, 0.78);
  font-size: 1.05rem;
  font-weight: 500;
}

.linkish {
  margin-top: 1rem;
  appearance: none;
  border: none;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

/* —— Main form —— */
main {
  max-width: 40rem;
  margin: -1.5rem auto 0;
  padding: 0 1.25rem 3.5rem;
  position: relative;
  z-index: 2;
}

.privacy-note {
  margin: 0 0 1rem;
  padding: 0.9rem 1.05rem;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--white);
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.privacy-note a {
  color: var(--green-deep);
  font-weight: 700;
}

.block {
  margin-bottom: 1rem;
  padding: 1.45rem 1.3rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 0.55s ease both;
}

.block:nth-of-type(1) { animation-delay: 0.04s; }
.block:nth-of-type(2) { animation-delay: 0.08s; }
.block:nth-of-type(3) { animation-delay: 0.12s; }
.block:nth-of-type(4) { animation-delay: 0.16s; }
.block:nth-of-type(5) { animation-delay: 0.2s; }
.block:nth-of-type(6) { animation-delay: 0.24s; }

.block h2 {
  margin: 0 0 1.1rem;
  padding-bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  border-bottom: 3px solid var(--yellow);
  display: inline-block;
  width: 100%;
}

.grid {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid label:nth-child(1) {
    grid-column: 1 / -1;
  }
}

label,
fieldset {
  display: block;
  margin: 0 0 0.95rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

fieldset {
  border: none;
  padding: 0;
  margin-bottom: 1rem;
}

legend {
  margin-bottom: 0.55rem;
  font-weight: 600;
}

.hint {
  display: block;
  margin: 0.25rem 0 0.55rem;
  font-size: 0.86rem;
  font-weight: 450;
  color: var(--muted);
}

.branch {
  margin-top: 0.75rem;
}

.aviso {
  margin: 0.5rem 0 1rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.92rem;
  background: rgba(255, 232, 71, 0.45);
  border-radius: 12px;
  border-left: 4px solid var(--yellow-deep);
}

.legal-text {
  font-size: 0.86rem;
  font-weight: 450;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.78rem 0.9rem;
  font: inherit;
  font-weight: 450;
  color: var(--ink);
  background: #fafaf8;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--yellow-deep);
  box-shadow: 0 0 0 4px rgba(255, 232, 71, 0.45);
}

textarea {
  resize: vertical;
  min-height: 5.2rem;
}

.choice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0 0 0.4rem;
  padding: 0.7rem 0.8rem;
  font-weight: 450;
  border-radius: 12px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.choice:hover {
  background: rgba(255, 232, 71, 0.28);
  border-color: rgba(255, 232, 71, 0.8);
}

.choice:has(input:checked) {
  background: rgba(255, 232, 71, 0.4);
  border-color: var(--yellow-deep);
}

.choice input {
  margin-top: 0.2rem;
  accent-color: var(--green);
}

.consent {
  font-weight: 600;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 0.75rem;
  animation: rise 0.6s ease 0.25s both;
}

button[type="submit"] {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 1rem 1.6rem;
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-weight: 750;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(240, 216, 32, 0.4);
  transition: transform 0.15s, filter 0.15s;
}

button[type="submit"]:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.form-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

.form-status.ok {
  color: var(--green-deep);
  font-weight: 600;
}

.form-status.err {
  color: #a33a3a;
  font-weight: 600;
}

.site-footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

.site-footer a {
  color: var(--green-deep);
  font-weight: 600;
}

.app[hidden],
.lang-gate[hidden],
.branch[hidden],
.aviso[hidden],
#fieldset-gallego[hidden] {
  display: none !important;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
