/* AKAMENA request-a-demo page. Form fields per the reference, styled in the
   Golden Thread language (Spectral inputs, mono labels, hairlines, gold focus). */

.demo { padding: clamp(120px, 18vh, 200px) 0 clamp(90px, 14vh, 160px); }
.demo-grid {
  display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(40px, 6vw, 100px); align-items: start;
}

/* aside */
.demo-lede { font-family: var(--serif); font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.08; color: var(--ink); max-width: 14ch; }
.demo-lede em { font-style: italic; color: var(--gold); }
.demo-intro { margin-top: clamp(20px, 3vh, 32px); font-size: 1.08rem; line-height: 1.7; max-width: 42ch; color: var(--body); }
.demo-intro em { font-style: italic; color: var(--ink); }
.demo-points { list-style: none; margin: clamp(28px, 4vh, 44px) 0 0; padding: 0; display: grid; gap: 12px; }
.demo-points li {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); display: flex; gap: 12px; align-items: baseline;
}
.demo-points li::before { content: "—"; color: var(--gold); }

/* form */
.demo-form .field { margin-bottom: 22px; }
/* first name / last name share a row on wider screens, stack on phones */
.demo-form .field-row { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
@media (max-width: 560px) { .demo-form .field-row { grid-template-columns: 1fr; column-gap: 0; } }
.demo-form label {
  display: block; font-family: var(--mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px;
}
.demo-form .optional { opacity: 0.7; letter-spacing: 0.08em; }

.demo-form input[type="text"],
.demo-form input[type="email"],
.demo-form input[type="url"],
.demo-form select,
.demo-form textarea {
  width: 100%;
  font-family: var(--text);
  font-size: 1.02rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 14px 16px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.demo-form textarea { resize: vertical; min-height: 108px; }
.demo-form ::placeholder { color: var(--muted); opacity: 1; }
.demo-form input:focus,
.demo-form select:focus,
.demo-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 152, 47, 0.14);
  outline: none;
}

/* select chevron */
.demo-form select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233C465C' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}

/* error state */
.demo-form .err { margin-top: 7px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.05em; color: #B4472E; }
.demo-form [aria-invalid="true"] { border-color: #B4472E; }
.demo-form [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 71, 46, 0.16); }

/* honeypot — visually hidden, off-screen */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.demo-consent { margin: 4px 0 22px; font-size: 0.92rem; line-height: 1.6; color: var(--muted); }
.demo-consent a { color: var(--ink); border-bottom: 1px solid var(--gold); }

.demo-submit {
  width: 100%; margin-top: 4px;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ivory); background: var(--ink); border: 1px solid var(--ink); border-radius: 2px;
  padding: 16px 24px; cursor: pointer;
  transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease);
}
.demo-submit:hover:not(:disabled) { background: var(--gold); border-color: var(--gold); color: var(--white); }
.demo-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* success state — replace the form body with a confirmation */
.demo-status { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3; color: var(--ink); }
.demo-status em { font-style: italic; color: var(--gold); }
.demo-form.is-sent .field,
.demo-form.is-sent .demo-consent,
.demo-form.is-sent .demo-submit { display: none; }
.demo-form.is-sent .demo-status { display: block; }

/* backend wiring — error state is small print, not the serif success lede */
.demo-status.is-error { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; line-height: 1.7; color: #B4472E; margin-top: 14px; }

/* reCAPTCHA badge hidden — Google requires the attribution note instead
   (rendered under the submit button when demoBackend.enabled). */
.grecaptcha-badge { visibility: hidden; }
.demo-recaptcha-note { margin: 14px 0 0; font-size: 0.78rem; line-height: 1.7; color: var(--muted); }
.demo-recaptcha-note a { color: var(--ink); border-bottom: 1px solid var(--gold); }

@media (max-width: 980px) {
  .demo-grid { grid-template-columns: 1fr; gap: clamp(32px, 6vh, 56px); }
  .demo-lede { max-width: none; }
}
