/* Contact: one glass form, a slow orb of colour behind it. */

.ct {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 68px);
  display: grid;
  align-items: center;
}
.ct-orb {
  position: absolute;
  inset-block-start: 10%;
  inset-inline-end: 8%;
  width: min(46rem, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(34, 230, 255, 0.5), transparent 55%),
    radial-gradient(circle at 70% 40%, rgba(139, 92, 255, 0.55), transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(255, 61, 154, 0.4), transparent 55%);
  filter: blur(60px);
  opacity: 0.55;
  animation: orb 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes orb {
  to {
    transform: translate3d(-8%, 6%, 0) rotate(40deg) scale(1.08);
  }
}
.ct-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.ct-copy {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}
.ct-copy h1 {
  max-width: 12ch;
}
.ct-points {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.ct-points li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.75rem;
  align-items: start;
  color: var(--ink-soft);
}
.ct-points .ic {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 8px currentColor);
}

/* The card: glass with a slowly turning colour edge. */
.ct-card {
  position: relative;
  border-radius: 26px;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(13, 16, 34, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.ct-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--a, 0deg), var(--cyan), var(--violet), var(--magenta), var(--lime), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  animation: edge 8s linear infinite;
  pointer-events: none;
}
@property --a {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes edge {
  to {
    --a: 360deg;
  }
}
#ct-form {
  display: grid;
  gap: 1.1rem;
}
.field > span:first-child {
  font-weight: 500;
  font-size: 0.92rem;
}
.hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
}
#f-msg-count {
  justify-self: end;
}
.ltr {
  direction: ltr;
  text-align: start;
}
[dir='rtl'] .ltr {
  text-align: end;
}
.field-error {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.86rem;
}
.field-error .ic {
  color: var(--magenta);
}
.input[aria-invalid='true'],
.textarea[aria-invalid='true'] {
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(255, 61, 154, 0.22);
}
.ct-error-sum {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 61, 154, 0.1);
  border: 1px solid rgba(255, 61, 154, 0.5);
  font-weight: 500;
}
.ct-error-sum .ic {
  color: var(--magenta);
}

/* Honeypot: off-screen, not display:none, so naive bots still see and fill it. */
.hp {
  position: absolute;
  inset-inline-start: -10000px;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
}

/* Press and hold. */
.human {
  display: grid;
  gap: 0.4rem;
}
.hold {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  border-radius: 14px;
  border: 1px dashed var(--ink-line);
  background: rgba(13, 17, 36, 0.8);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.hold .ic {
  color: var(--cyan);
  width: 22px;
  height: 22px;
  position: relative;
}
.hold-txt {
  position: relative;
}
.hold-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(34, 230, 255, 0.35), rgba(139, 92, 255, 0.45));
  transform: scaleX(0);
  transform-origin: left;
}
[dir='rtl'] .hold-fill {
  transform-origin: right;
}
.hold.holding {
  border-color: var(--cyan);
  box-shadow: 0 0 24px -6px var(--cyan);
}
.hold.holding .hold-fill {
  transform: scaleX(1);
  transition: transform var(--hold, 1200ms) linear;
}
.hold.done {
  border-style: solid;
  border-color: var(--lime);
  box-shadow: 0 0 24px -8px var(--lime);
  cursor: default;
}
.hold.done .hold-fill {
  transform: scaleX(1);
  background: rgba(182, 255, 59, 0.14);
}
.hold.done .ic {
  color: var(--lime);
}
.ct-send {
  justify-self: start;
  min-width: 10rem;
}

/* Done. */
.ct-done {
  display: grid;
  gap: 1rem;
  justify-items: start;
  outline: none;
}
.ct-check {
  width: 64px;
  height: 64px;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ct-check circle {
  stroke: var(--lime);
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: draw 0.8s var(--ease-out) forwards;
  filter: drop-shadow(0 0 8px var(--lime));
}
.ct-check path {
  stroke: var(--lime);
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.5s 0.6s var(--ease-out) forwards;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
.ct-summary {
  margin: 0;
  display: grid;
  gap: 0.5rem;
  width: 100%;
}
.ct-summary div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding-block: 0.6rem;
  border-block-start: 1px solid var(--line);
}
.ct-summary dt {
  color: var(--ink-soft);
}
.ct-summary dd {
  margin: 0;
  font-weight: 500;
}

@media (max-width: 900px) {
  .ct-grid {
    grid-template-columns: 1fr;
  }
  .ct {
    min-height: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ct-orb,
  .ct-card::after {
    animation: none;
  }
}
.ct-error-sum[hidden],
.field-error[hidden] {
  display: none;
}
.ct-grid {
  align-items: start;
}
.ct-copy {
  padding-block-start: clamp(1rem, 6vh, 4rem);
}
@media (min-width: 901px) {
  .ct-copy {
    position: sticky;
    inset-block-start: 6rem;
  }
}
/* The form and the thank-you panel swap with the hidden attribute; never show both. */
#ct-form[hidden],
.ct-done[hidden],
.hp[hidden] {
  display: none;
}
