/* The sign-up page (/join): calm, like the admin app's Home. A slow drifting wash of her cream,
   sand, warm gold and blush; her logo breathing in gold dust; the form on a soft white card; and
   the footer wave redrawn as ribbons that drift past each other. Pure CSS motion, all of it still
   under reduced motion. The consent wording is locked (test/consent.test.ts); only its dress changes. */

.join {
  --ink-warm: #3b2f14;
  --text-warm: #5e4a1c;
  --card: rgb(255 255 255 / 0.66);
  --card-edge: rgb(255 255 255 / 0.92);
  --frame: #fffaf0;
  --radius: 14px;
  --paper-warm: #fbf8f0;
  position: relative;
  isolation: isolate;
  background: #f3ecdc;
  color: var(--text-warm);
}

/* Six stops, three screens wide, sliding on a 24-second loop; the ends match so there's no seam. */
.join::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(ellipse at center, transparent 50%, rgb(150 100 70 / 0.1) 100%),
    linear-gradient(120deg, #f6efe4 0%, #eedccb 20%, #e9c9a0 40%, #ead2c4 60%, #efe0d0 80%, #f6efe4 100%);
  background-size: 100% 100%, 300% 300%;
  background-position: center, 0% 50%;
  animation: join-drift 24s ease-in-out infinite;
}
/* A fine grain so the gradient reads as paper, not plastic. */
.join::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  opacity: 0.06;
}
@keyframes join-drift {
  0%, 100% { background-position: center, 0% 50%; }
  50% { background-position: center, 100% 50%; }
}

.join .site-header { background: rgb(255 255 255 / 0.35); border-bottom-color: var(--card-edge); }
.join .nav a { color: var(--gold-dark); }

/* ---------- The page ---------- */

.join .page { padding: 48px 0 32px; }
.join .page .wrap { max-width: 600px; }

/* Her logo in breathing dust (assets/js/dust-logo.js). The box is the logo; the canvas spills
   30% past it on every side to give the halo room. */
.join-logo { position: relative; display: block; width: 112px; height: 112px; margin: 0 auto 20px; }
.join-logo canvas { position: absolute; inset: -30%; width: 160%; height: 160%; pointer-events: none; }

.join .page h1 {
  text-align: center;
  color: var(--ink-warm);
  font-size: clamp(30px, 6vw, 44px);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.join .page .kicker {
  text-align: center;
  color: var(--text-warm);
  font-size: 19px;
  line-height: 1.5;
  max-width: 34em;
  margin: 0 auto 28px;
  text-wrap: pretty;
}

/* The form sits on one soft white card. */
.join .form,
.join .done {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: calc(var(--radius) + 6px);
  padding: 28px;
  margin-top: 0;
}
.join .form label { color: var(--gold-dark); font-weight: 400; }
.join .form input[type="text"],
.join .form input[type="email"],
.join .form input[type="tel"] {
  border-radius: var(--radius);
  border-color: #e6dcc6;
  background: rgb(255 255 255 / 0.9);
  transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
.join .form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(173 123 7 / 0.18);
}
.join .form .consent {
  border-radius: var(--radius);
  border-color: #ece3cf;
  background: rgb(255 253 247 / 0.85);
  color: var(--ink-warm);
  cursor: pointer;
  transition: border-color 160ms ease-out, background-color 160ms ease-out;
}
.join .form .consent:has(input:checked) { border-color: #d8b978; background: #fffaf0; }
.join .consent strong { color: var(--gold-dark); }
.join .consent a { color: var(--gold-dark); }

/* The button: rounded, and on hover it lifts with a soft glow and a band of light passes across. */
.join .form .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius);
  background: var(--gold-dark);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 160ms ease-out, transform 220ms ease-out, box-shadow 220ms ease-out;
}
.join .form .btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgb(255 244 214 / 0.38) 50%, transparent 70%);
  transform: translateX(-110%);
  pointer-events: none;
}
.join .form .btn:disabled { opacity: 0.6; cursor: progress; }
@media (hover: hover) {
  /* house-ignore: the glow shows only while the button lifts on hover */
  .join .form .btn:hover:not(:disabled) {
    background: #6f4f04;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px -8px rgb(138 98 5 / 0.6);
  }
  .join .form .btn:hover:not(:disabled)::after { transform: translateX(110%); transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1); }
}
.join .form .btn:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 3px; }
.join .form .fine { color: var(--text-warm); text-align: center; }
.join .form-status:empty { min-height: 0; margin: 0; }

.join .done h2 { color: var(--ink-warm); }
.join .done .logo { width: 96px; }

/* ---------- The tide: the footer wave, redrawn as ribbons drifting past each other ---------- */

.tides {
  position: relative;
  height: 240px;
  overflow: hidden;
  /* Like her footer art: cream ribbons on near-white. The paper rises out of the wash above and
     carries on into the footer, so there's no edge either side. */
  background: linear-gradient(to bottom, transparent, var(--paper-warm) 55%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
  mask-image: linear-gradient(to bottom, transparent, #000 30%);
}
/* ...and the ribbons sink into the footer's paper rather than stopping at an edge. */
.tides::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, var(--paper-warm));
}
.tide {
  position: absolute;
  inset: 0 auto 0 0;
  width: 200%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
  animation: tide-slide linear infinite;
}
.tide path { vector-effect: non-scaling-stroke; }
/* Two sets of ribbons in her wave's cream, drifting opposite ways at different speeds. Each ribbon
   is a little out of step with the next, so they bunch and fan like her footer art. */
.tide-back { stroke: #efe5cf; stroke-width: 12px; animation-duration: 120s; animation-direction: reverse; }
.tide-front { stroke: #e4d7ba; stroke-width: 13px; animation-duration: 70s; }
@keyframes tide-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.join .site-footer { background: var(--paper-warm); padding-top: 24px; }
.join .site-footer .rule { display: none; }
.join .site-footer a, .join .copyright { color: var(--gold-dark); }
.join .footer-cols > div:first-child { border-color: #e2cfa6; }

@media (max-width: 560px) {
  .join .page { padding: 28px 0 16px; }
  .join-logo { width: 88px; height: 88px; margin-bottom: 14px; }
  .join .page .kicker { font-size: 17px; }
  .join .form, .join .done { padding: 20px 16px; }
  .tides { height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .join::before { animation: none; background-position: center, 50% 50%; }
  .tide { animation: none; }
  .join .form .btn, .join .form .btn::after { transition: none; }
  .join .form .btn:hover:not(:disabled) { transform: none; }
}
