/* ============================================================
   Steorra — contact page styles (shared by /contact.html and /ja/contact.html)
   ============================================================ */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

.field input,
.field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 16px;
  font-family: 'DotGothic16', monospace;
  font-size: 16px;
  color: #ECEEF6;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(236, 238, 246, 0.14);
  border-radius: 12px;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.field textarea {
  line-height: 1.8;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(236, 238, 246, 0.7);
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 0 0 0 3px rgba(236, 238, 246, 0.12);
  outline: none;
}

/* submit: same design language as .btn (TOP/CONTACT) — white idle,
   blue on hover, hard shadow with press-in */
.submit-btn {
  align-self: center;
  margin-top: 8px;
  font-family: 'DotGothic16', monospace;
  font-size: 12px;
  cursor: pointer;
}

.form-error {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.sent-text {
  font-size: 16px;
  letter-spacing: 0.15em;
  text-align: center;
  line-height: 2;
}

.sent-link {
  font-size: 14px;
  letter-spacing: 0.25em;
}

/* ---- one-screen layout ----
   The page is exactly the viewport tall and MESSAGE absorbs whatever height
   is left over, so the form never pushes the submit button off-screen.
   overflow-y stays auto as a safety valve for viewports too short even for
   the minimum field heights (below ~570px). */
.page--contact {
  height: 100svh;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 24px;
}

.center--contact {
  flex: 1 1 0;
  /* min-content, not 0: a shrunk-to-nothing box would let the form overflow
     it and land on the copyright line */
  min-height: min-content;
  margin: 0;
  width: 100%;
  max-width: 480px;
  gap: clamp(10px, 2.6vh, 40px);
  padding: clamp(4px, 2vh, 32px) 0;
}

.contact-form {
  width: 100%;
  flex: 1 1 0;
  min-height: min-content;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vh, 24px);
}

.field--msg {
  flex: 1 1 0;
  /* label + gap + the textarea's own floor. Without it the field shrinks
     past the textarea and the textarea spills onto the submit button. */
  min-height: 82px;
}
.field--msg textarea {
  flex: 1;
  min-height: 56px;
  /* a manual resize would defeat the one-screen fit */
  resize: none;
}

.pixel-star--contact { font-size: clamp(2.6px, 0.62vh, 5px); }
/* page title: pixel gothic, not the blackletter (that stays logo-only) */
.wordmark-logo--contact {
  font-family: 'DotGothic16', monospace;
  font-size: clamp(18px, 2.8vh, 24px);
  letter-spacing: 0.45em;
  /* recenters text that trailing letter-spacing would push left */
  text-indent: 0.45em;
}

/* short viewports: tighten the masthead and the fixed field costs so the
   whole form still clears the fold */
@media (max-height: 780px) {
  .page--contact { padding-top: 20px; padding-bottom: 18px; }
  .center--contact {
    gap: clamp(8px, 1.6vh, 16px);
    padding: 4px 0;
  }
  .pixel-star--contact { font-size: clamp(2.2px, 0.42vh, 3.2px); }
  .wordmark-logo--contact { font-size: clamp(16px, 2.4vh, 20px); }
}

@media (max-height: 820px) {
  .field { gap: 6px; }
  .field input,
  .field textarea { padding: 8px 14px; }
}

@media (max-height: 700px) {
  .field input,
  .field textarea { padding: 6px 12px; }
  .field label { font-size: 11px; }
  .submit-btn { margin-top: 0; }
}

/* very short viewports (old phones, short desktop windows): shrink the
   masthead so the form still clears the fold */
@media (max-height: 620px) {
  .page--contact { padding-top: 16px; padding-bottom: 16px; }
  .center--contact { gap: 8px; padding: 2px 0; }
  .pixel-star--contact { font-size: 2.2px; }
  .wordmark-logo--contact { font-size: 16px; }
  .btn { height: 32px; }
  .field { gap: 4px; }
  .field label { font-size: 10px; }
  .field input,
  .field textarea { padding: 4px 10px; }
  .field--msg { min-height: 66px; }
  .field--msg textarea { min-height: 44px; }
}

/* 320×568-class screens (iPhone SE 1st gen): last of the masthead gives way */
@media (max-height: 580px) {
  .page--contact { padding-top: 12px; padding-bottom: 12px; }
  .center--contact { gap: 6px; padding: 0; }
  .pixel-star--contact { font-size: 1.8px; }
  .wordmark-logo--contact { font-size: 15px; }
}

/* mobile: match the hero page's type scale (13px body);
   star and "Contact" logo sizes stay as designed */
@media (max-width: 600px) {
  .field label { font-size: 12px; }
  .field input,
  .field textarea {
    font-size: 14px;
    padding: 10px 12px;
  }
  .form-error { font-size: 13px; }
  /* match .btn's mobile type size (the page style would otherwise win) */
  .submit-btn { font-size: 11px; }
  .sent-text { font-size: 14px; }
  .sent-link { font-size: 13px; }
}
