/* The Moho's door, and the form it lifts up from below: a slab of the ground under the face,
   rising slowly with its top edge torn (the clip-path is contactEdge(), set in index.astro). */

.moho-door {
  display: inline-block; margin-top: 14px; padding: 0;
  border: 0; background: none; cursor: pointer;
  color: #9FD8C6; font: 400 17px/1.6 var(--mincho);
  text-decoration: underline; text-underline-offset: 6px;
}
.moho-door:hover { text-decoration-thickness: 2px; }

.dig-sheet {
  --rise: 640ms;
  position: fixed; inset: auto 0 0; margin: 0 auto;
  width: min(640px, 100%); max-width: 100%; max-height: 92svh;
  /* the torn edge takes up to 28px off the top */
  padding: 52px clamp(20px, 6vw, 48px) 28px;
  border: 0; background: #1E2A28; color: #D6E6DF;
  overscroll-behavior: contain;
  translate: 0 100%;
  transition: translate var(--rise) cubic-bezier(.2, .9, .25, 1),
    overlay var(--rise) allow-discrete, display var(--rise) allow-discrete;
}
.dig-sheet[open] { translate: 0 0; }
@starting-style { .dig-sheet[open] { translate: 0 100%; } }

.dig-sheet::backdrop {
  background: rgb(5 8 8 / 0);
  transition: background var(--rise), overlay var(--rise) allow-discrete, display var(--rise) allow-discrete;
}
.dig-sheet[open]::backdrop { background: rgb(5 8 8 / .66); }
@starting-style { .dig-sheet[open]::backdrop { background: rgb(5 8 8 / 0); } }

.dig-sheet h2 { margin-bottom: 18px; font: 600 22px/1.4 var(--mincho); }
.dig-form, .dig-done, .dig-mail { display: grid; gap: 18px; font: 400 15px/1.6 var(--plain); }
.dig-form[hidden], .dig-done[hidden] { display: none; }
.dig-form label { display: grid; gap: 6px; color: #8EA69D; }
.dig-form input, .dig-form textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid #4A5C58; border-radius: 2px; background: #121A19;
  color: #D6E6DF; font: inherit;
}
.dig-form textarea { resize: vertical; }
.dig-form :focus-visible { outline: 2px solid #9FD8C6; outline-offset: 2px; }

.dig-note { color: #F2B8A0; }
.dig-actions { display: flex; gap: 20px; align-items: center; }
.dig-send {
  padding: 10px 28px; border: 0; border-radius: 2px; cursor: pointer;
  background: #9FD8C6; color: #0B1110; font: 600 15px/1.4 var(--plain);
}
.dig-send:disabled { opacity: .5; cursor: progress; }
.dig-close {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: #8EA69D; font: inherit; text-decoration: underline; text-underline-offset: 4px;
}
.dig-direct { color: #8EA69D; font-size: 13px; }
.dig-direct span { color: #D6E6DF; user-select: all; }
.dig-mail-to {
  color: #9FD8C6; font-size: 17px; overflow-wrap: anywhere;
  text-decoration: underline; text-underline-offset: 4px;
}
.dig-mail-to:focus-visible { outline: 2px solid #9FD8C6; outline-offset: 2px; }
