/* Styles taken from responsum.eu (Book a demo page) */
:root {
  --teal-dark: #005057;
  --teal-mid: #2d8591;
  --cyan: #15c6c8;
  --cyan-deep: #0f8b8b;
  --yellow: #fedb57;
  --bg-light: #f2f9fb;
  --input-bg: #f5f8fa;
  --input-border: #cbd6e2;
  --muted: #5d7c80;
  --error: #c0392b;
}

/* Honeypot field (see index.html): moved off-screen rather than display:none,
   which some bots detect and skip. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}
/* `hidden` must win over display rules like .check { display: flex } */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: 'Red Hat Display', sans-serif;
  font-size: 18px;
  color: var(--teal-dark);
  background: linear-gradient(
    120deg,
    #ffffff 0%,
    var(--bg-light) 55%,
    #dff3f4 100%
  );
  min-height: 100vh;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Same width and side padding as .hero, so the logo lines up with the title */
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 40px;
}
.logo img {
  height: 40px;
  display: block;
}
.mode-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--yellow);
  padding: 4px 10px;
  border-radius: 2px;
}

/* ---------- Hero layout ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 510px;
  gap: 72px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 90px 40px 80px;
}
h1 {
  font-size: 48px;
  line-height: 1.2;
  font-weight: 900;
  margin: 0 0 32px;
}
h1 .accent {
  color: var(--cyan);
}
.lead {
  font-size: 21px;
  line-height: 1.5;
  font-weight: 500;
  margin: 0 0 28px;
}
.usp {
  list-style: none;
  padding: 0;
  margin: 0;
}
.usp li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 17px;
}
.usp li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 9px;
  border-left: 3px solid var(--cyan);
  border-bottom: 3px solid var(--cyan);
  transform: rotate(-45deg);
}

/* ---------- Form panel ---------- */
.panel {
  background: #fff;
  border-radius: 12px;
  padding: 44px 50px;
  min-height: 420px;
}
h2 {
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 22px;
}
.step-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan-deep);
  margin: 0 0 6px;
  text-transform: uppercase;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}

input:not([type='checkbox']):not([type='color']):not([type='file']),
select {
  display: block;
  width: 100%;
  height: 40px;
  margin-bottom: 22px;
  padding: 0 15px;
  font: inherit;
  font-size: 16px;
  color: var(--teal-dark);
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 3px;
  transition: border-color 0.15s;
}
input::placeholder {
  color: #8aa0a3;
}
input:not([type='checkbox']):hover,
select:hover {
  border-color: var(--teal-mid);
}
input:focus,
select:focus {
  outline: none;
  border-color: var(--cyan);
}

/* Note right under a field, e.g. the website */
/* Same specificity as the input rule above, so this margin wins */
input.with-note:not([type='checkbox']):not([type='color']):not([type='file']) {
  margin-bottom: 6px;
}
.field-note {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 22px;
}
h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 4px 0 14px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 18px;
  line-height: 1.4;
}
.check input {
  margin-top: 3px;
  accent-color: var(--cyan-deep);
}

.errors {
  font-size: 14px;
  font-weight: 500;
  color: var(--error);
  margin-bottom: 14px;
}
.errors ul {
  margin: 0;
  padding-left: 18px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}
/* Terms checkbox above the buttons: lighter, secondary text */
.check.terms {
  margin: 4px 0 20px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.check.terms input {
  margin-top: 2px;
}
.btn-primary {
  flex-shrink: 0;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: var(--cyan-deep);
  border: 0;
  border-radius: 2px;
  padding: 12px 25px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover {
  background: var(--teal-dark);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}
.btn-link {
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan-deep);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ---------- Waiting ---------- */
.muted {
  font-size: 16px;
  color: var(--muted);
  margin: -10px 0 24px;
}
.muted a {
  color: var(--cyan-deep);
  font-weight: 700;
}
/* Support line under the login button ("already exists" page) */
.muted.result-help {
  margin-top: 22px;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #e3edf0;
  font-size: 16px;
  font-weight: 700;
}
.steps li:last-child {
  border-bottom: 0;
}
.steps li.pending {
  color: #9fb3b6;
}
.steps .icon {
  width: 20px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding-top: 3px;
}
.steps .msg {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 3px;
}
.ring {
  width: 14px;
  height: 14px;
  border: 2px solid #c9d9dc;
  border-radius: 50%;
}
.spin {
  width: 16px;
  height: 16px;
  border: 2px solid #c9eeee;
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.tick {
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--cyan);
  border-bottom: 3px solid var(--cyan);
  transform: rotate(-45deg);
  margin-top: 2px;
}
.warn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--yellow);
}
.cross {
  color: var(--error);
  font-weight: 900;
  line-height: 1;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.summary {
  margin: 20px 0 0;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg-light);
  border-left: 3px solid var(--cyan);
}

/* Progress bar on the waiting page (see app.js: PROGRESS_CURVE) */
.progress {
  height: 10px;
  background: #e3edf0;
  border-radius: 5px;
  overflow: hidden;
}
.progress-fill {
  width: 0;
  height: 100%;
  background: var(--cyan-deep);
  border-radius: 5px;
  transition: width 0.5s ease-out;
}
.progress-label {
  margin: 6px 0 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan-deep);
  text-align: right;
}

/* ---------- Result ---------- */
.login {
  margin: 0 0 26px;
}
.login dt {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.login dd {
  margin: 2px 0 14px;
  font-size: 17px;
  font-weight: 700;
  word-break: break-all;
}
a.btn-primary {
  display: inline-block;
  text-decoration: none;
}
details {
  margin-top: 30px;
  font-size: 14px;
}
summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}
details pre {
  background: var(--bg-light);
  padding: 12px;
  overflow: auto;
  max-height: 320px;
  font-size: 12px;
}

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 30px 16px 48px;
  }
  .site-header {
    padding: 16px;
  }
  h1 {
    font-size: 34px;
    margin-bottom: 16px;
  }
  .lead {
    font-size: 18px;
  }
  .panel {
    padding: 28px 22px;
  }
}
@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
