/* ==========================================================================
   Wicker — the data deletion request page
   Layout and form controls only. Tokens, type, buttons and pills come from
   base.css; nav, drawer and footer from site.css.
   ========================================================================== */

.request {
  /* The nav is fixed; clear it, as the docs page does. */
  padding-top: var(--nav-h);
  background: var(--c-bg);
  color: var(--c-ink);
}

/* --------------------------------------------------------------------------
   Hero — the docs hero, with the same copper glow
   -------------------------------------------------------------------------- */

.request-hero {
  border-bottom: 1px solid var(--line-dark-soft);
  padding-block: clamp(2.75rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
  position: relative;
  overflow: clip;
}

.request-hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  width: min(1100px, 120%);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 50%, rgba(217, 124, 80, 0.07), transparent 70%);
  pointer-events: none;
}

.request-hero__inner {
  position: relative;
  max-width: 960px;
}

.request-hero__title { margin-top: 1.25rem; }

.request-hero .lead {
  margin-top: 1.25rem;
  max-width: 62ch;
}

.request-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

/* --------------------------------------------------------------------------
   Body — explanation on the left, the form on the right
   -------------------------------------------------------------------------- */

.request-body { padding-block: clamp(3rem, 6vw, 5.5rem); }

.request-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.request-aside h2 { margin-top: 2.25rem; }
.request-aside h2:first-child { margin-top: 0; }
.request-aside p { margin-top: 0.75rem; }

.request-steps {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.1rem;
}

.request-steps li {
  position: relative;
  padding-left: 2.6rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--c-mute);
  counter-increment: step;
}

.request-steps li strong {
  display: block;
  color: var(--c-ink);
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.request-steps li::before {
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--c-accent);
}

.request-warn {
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--copper);
  background: rgba(217, 124, 80, 0.06);
}

.request-warn strong { color: var(--c-ink); }

/* --------------------------------------------------------------------------
   The panel the form sits in
   -------------------------------------------------------------------------- */

.request-panel {
  position: relative;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  padding: clamp(1.5rem, 2.6vw, 2.5rem);
  background: rgba(255, 255, 255, 0.015);
  isolation: isolate;
}

.request-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 120% at 50% 110%, rgba(217, 124, 80, 0.07), transparent 62%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */

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

/* The form is hidden once the request is filed. `display: grid` above would
   otherwise beat the hidden attribute and leave the form on screen, with a
   dimmed "Sending…" button, under the "We have it" panel. */
.form[hidden] { display: none; }
.form__row { display: grid; gap: 1.35rem; }
.form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.field { display: grid; gap: 0.45rem; align-content: start; }

.field__label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--c-ink);
}

.field__req { color: var(--c-accent); }

.field__opt {
  margin-left: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0 0.85rem;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--on-navy);
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.field input,
.field select { height: 46px; }

.field textarea {
  padding-block: 0.75rem;
  line-height: 1.55;
  resize: vertical;
  min-height: 7.5rem;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--gray-500); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(217, 124, 80, 0.55);
  background: rgba(217, 124, 80, 0.03);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* The browser's own invalid styling is suppressed until the field is
   touched or the form is submitted; the JS adds .is-invalid. */
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: rgba(255, 107, 94, 0.7); }

.field__select { position: relative; }

.field__select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.4rem;
  cursor: pointer;
}

.field__select select:invalid { color: var(--gray-500); }

.field__select::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--gray-300);
  border-bottom: 1.5px solid var(--gray-300);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.field select option { background: var(--navy-light); color: var(--on-navy); }

.field__hint {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--gray-500);
}

/* The honeypot. Off-screen, not display:none, so the simplest bots still
   "see" it. People cannot tab to it (tabindex=-1) and readers skip it. */
.form__hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Checkbox */

.check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  cursor: pointer;
}

.check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.check__box {
  width: 20px;
  height: 20px;
  margin-top: 0.1rem;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  position: relative;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.check__box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: rotate(45deg) scale(0);
  transition: transform 0.25s var(--ease-out-expo);
}

.check input:checked + .check__box {
  background: var(--copper);
  border-color: var(--copper);
}

.check input:checked + .check__box::after { transform: rotate(45deg) scale(1); }

.check input:focus-visible + .check__box {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.check.is-invalid .check__box { border-color: rgba(255, 107, 94, 0.7); }

.check__text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--c-mute);
}

/* Messages and actions */

.form__error {
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--bad);
  background: rgba(255, 107, 94, 0.08);
  color: var(--c-ink);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form__error[hidden] { display: none; }

.form__actions {
  display: grid;
  gap: 1rem;
  margin-top: 0.25rem;
}

.form__fine { font-size: 0.8125rem; }

.btn[disabled],
.btn[aria-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

/* The success state */

.form-done { display: grid; gap: 1rem; }
.form-done[hidden] { display: none; }
.form-done__title { margin-top: 0.25rem; }

.form-done__ref {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--c-mute);
  width: fit-content;
}

.form-done__ref strong {
  color: var(--c-accent);
  font-weight: 700;
}

.form-done__actions { margin-top: 0.5rem; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .request-grid { grid-template-columns: 1fr; }
  .request-aside { order: 2; }
  .request-panel { order: 1; }
}

@media (max-width: 600px) {
  .form__row--2 { grid-template-columns: 1fr; }
}
