/* Newsletter signup module: styles for all forms in this folder (form.html + the single-topic forms).
   Link it in the page's <head> after blog.css, whose paragraph rules it overrides. */

.nlteaser {
  --c-beds: var(--visual, #B47471);
  --c-ambient: var(--travel, #8A9E6A);
  --c-dance: var(--music, #EABC87);
  --line: rgba(255, 255, 255, 0.16);
  --muted: rgba(255, 255, 255, 0.72);
  --danger: #ff9a8a;
  box-sizing: border-box;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 36px);
  text-align: center;
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  color: #fff;
  background: rgba(36, 36, 36, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.nlteaser * { grid-column: auto; box-sizing: border-box; }

.nlteaser p { text-shadow: none; }

.nlteaser .nlteaser-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1.1;
  font-weight: 200;
  text-align: center;
}
.nlteaser .nlteaser-title b { font-weight: 600; color: var(--accent-col, #f2bb65); }

.nlteaser .nlteaser-text {
  margin: 0 auto 22px;
  max-width: 38ch;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 300;
  text-align: center;
}

/* --- name + email --- */
.nlteaser .nlteaser-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 14px;
  text-align: left;
}
.nlteaser .nlteaser-fields label { display: block; margin: 0; }
.nlteaser .nlteaser-fields label span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 5px;
}
.nlteaser .nlteaser-fields input {
  width: 100%;
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #fff;
  background: var(--customblack, #242424);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 15px;
  transition: border-color .2s, box-shadow .2s;
}
.nlteaser .nlteaser-fields input::placeholder { color: rgba(255, 255, 255, .35); }
.nlteaser .nlteaser-fields input:focus {
  outline: none;
  border-color: var(--accent-col, #f2bb65);
  box-shadow: 0 0 0 3px rgba(242, 187, 101, .18);
}
.nlteaser .nlteaser-fields input[aria-invalid="true"] { border-color: var(--danger); }

/* --- topics: hidden until step 2, then unfold ---
   display:none guarantees zero space in every browser (Safari included);
   the entrance is a short fade/slide animation. */
.nlteaser .nlteaser-topics { display: none; }
.nlteaser.is-open .nlteaser-topics {
  display: block;
  margin: 4px 0 16px;
  animation: nlteaser-unfold .45s ease both;
}
@keyframes nlteaser-unfold {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.nlteaser .nlteaser-topics fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.nlteaser .nlteaser-topics legend {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  text-align: left;
}

.nlteaser .nlteaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
}

/* an odd number of tiles: the last one fills its row */
.nlteaser .topic:last-child:nth-child(odd) { grid-column: 1 / -1; }

.nlteaser .topic {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 46px 15px 18px;
  background: var(--customblack, #242424);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s, background-color .2s, transform .15s;
}
.nlteaser .topic::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--topic);
  opacity: .55;
  transition: opacity .2s, width .2s;
}
.nlteaser .topic:hover { border-color: color-mix(in srgb, var(--topic) 60%, transparent); }
.nlteaser .topic:active { transform: scale(.99); }
.nlteaser .topic input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.nlteaser .tick {
  position: absolute;
  top: 14px; right: 14px;
  width: 20px; height: 20px;
  border: 1.5px solid var(--muted);
  border-radius: 6px;
  transition: background-color .2s, border-color .2s;
}
.nlteaser .tick::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 11px;
  box-sizing: border-box;
  border: solid var(--customblack, #242424);
  border-width: 0 2.5px 2.5px 0;
  transform: translate(-50%, -60%) rotate(45deg) scale(0);
  transition: transform .18s ease;
}

.nlteaser .topic-title { font-weight: 600; font-size: 16px; line-height: 1.3; }
.nlteaser .topic-text { font-size: 13px; line-height: 1.5; color: var(--muted); font-weight: 300; }

.nlteaser .topic:has(input:checked) {
  border-color: var(--topic);
  background: color-mix(in srgb, var(--topic) 16%, var(--customblack, #242424));
}
.nlteaser .topic:has(input:checked)::before { opacity: 1; width: 6px; }
.nlteaser .topic input:checked ~ .tick { background: var(--topic); border-color: var(--topic); }
.nlteaser .topic input:checked ~ .tick::after { transform: translate(-50%, -60%) rotate(45deg) scale(1); }
.nlteaser .topic input:focus-visible ~ .tick { outline: 2px solid var(--accent-col, #f2bb65); outline-offset: 3px; }

/* --- honeypot --- */
.nlteaser .nlteaser-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- error --- */
.nlteaser p.nlteaser-error {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 400;
  color: var(--danger);
  text-align: left;
}
.nlteaser p.nlteaser-error:empty { display: none; }

/* --- button --- */
.nlteaser .nlteaser-cta {
  display: block;
  width: 100%;
  font-family: 'Poppins', Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
  color: var(--customblack, #242424);
  background: var(--accent-col, #f2bb65);
  border: 0;
  border-radius: 14px;
  padding: 12px 24px 10px;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s, transform .15s;
}
.nlteaser .nlteaser-cta:hover {
  background: var(--bright, #fbe9bb);
  box-shadow: 0 10px 30px -10px rgba(242, 187, 101, .6);
}
.nlteaser .nlteaser-cta:active { transform: translateY(1px); }
.nlteaser .nlteaser-cta:focus-visible { outline: 2px solid var(--accent-col, #f2bb65); outline-offset: 3px; }
.nlteaser .nlteaser-cta[disabled] { opacity: .6; cursor: progress; }
.nlteaser .nlteaser-cta small {
  display: block;
  font-size: 12px;
  font-weight: 300;
  opacity: .75;
}
.nlteaser .nlteaser-cta.is-loading .nlteaser-cta-label::after {
  content: '';
  display: inline-block;
  width: .85em; height: .85em;
  margin-left: .55em;
  vertical-align: -.1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nlteaser-spin .8s linear infinite;
}
@keyframes nlteaser-spin { to { transform: rotate(360deg); } }

/* --- consent (step 2 only) --- */
.nlteaser p.nlteaser-consent {
  display: none;
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 300;
  color: var(--muted);
  text-align: left;
}
.nlteaser.is-open p.nlteaser-consent { display: block; }
.nlteaser p.nlteaser-consent a { color: var(--accent-col, #f2bb65); }

/* --- done --- */
.nlteaser .nlteaser-done { display: none; }
.nlteaser.is-done .nlteaser-form,
.nlteaser.is-done .nlteaser-text { display: none; }
.nlteaser.is-done .nlteaser-done { display: block; }
.nlteaser .nlteaser-done p { margin: 0 auto; max-width: 40ch; font-size: 17px; line-height: 1.5; font-weight: 300; text-align: center; }
.nlteaser .nlteaser-done p + p { margin-top: 10px; font-size: 14px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .nlteaser.is-open .nlteaser-topics { animation: none; }
}

@media (max-width: 560px) {
  .nlteaser .nlteaser-fields,
  .nlteaser .nlteaser-grid { grid-template-columns: 1fr; }
}

/* room above a form that stands between two page sections (e.g. on /lividcheese/) */
.nlteaser-section { margin-top: 5rem; }

/* --- single-topic forms (form-ambient.html, form-beds.html, form-dance.html) ---
   Same form in the topic's own colour. Each has its own class, so it can get its own design. */
.nlteaser-ambient { --topic: var(--c-ambient); }
.nlteaser-beds { --topic: var(--c-beds); }
.nlteaser-dance { --topic: var(--accent-col, #f2bb65); } /* the yellow of the Livid Cheese page, not the tile colour */

.nlteaser-single .nlteaser-title b { color: var(--topic); }
.nlteaser-single .nlteaser-cta { background: var(--topic); }
