:root {
  --pws-navy: #1B3A5C;
  --pws-steel: #4682B4;
  --pws-red: #E1251B;
  --pws-text: #FFFFFF;
  --pws-muted: rgba(255, 255, 255, 0.62);
  --pws-line: rgba(255, 255, 255, 0.26);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--pws-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Full-bleed mill photograph, fixed behind the content. The navy scrim is what
   keeps the logo and links legible over the bright strip in the upper left. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 24px;
  background:
    linear-gradient(rgba(12, 26, 43, 0.74), rgba(12, 26, 43, 0.86)),
    url("/img/mill-strip.jpg") center / cover no-repeat fixed,
    var(--pws-navy);
}

main {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  flex: 1;
  justify-content: center;
}

.logo {
  width: 400px;
  max-width: 84vw;
  height: auto;
  display: block;
}

.portals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 520px;
}

.portal-btn {
  display: block;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  text-decoration: none;
  border: 1px solid var(--pws-line);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}

.portal-btn:hover,
.portal-btn:focus-visible {
  border-color: #FFFFFF;
  background: #FFFFFF;
  color: var(--pws-navy);
  outline: none;
}

.portal-btn--solo {
  grid-column: 1 / -1;
  justify-self: center;
  width: 50%;
  min-width: 220px;
}

.contact {
  text-align: center;
  font-size: 14px;
  color: var(--pws-muted);
  line-height: 1.8;
}

.contact a {
  color: #FFFFFF;
  text-decoration: none;
  border-bottom: 1px solid var(--pws-line);
}

.contact a:hover {
  border-bottom-color: #FFFFFF;
}

footer {
  font-size: 12px;
  color: var(--pws-muted);
  text-align: center;
  letter-spacing: 0.04em;
  margin-top: 48px;
}

/* ---------------------------------------------------------------------------
   Parts request page. Same photograph and scrim as the front page; the form
   sits on a darker card so the field text stays legible over the mill.
   --------------------------------------------------------------------------- */

body.page-form { justify-content: flex-start; }

.form-main {
  max-width: 760px;
  gap: 32px;
  justify-content: flex-start;
  flex: 0 1 auto;
}

.form-logo-link { display: block; }

.form-logo {
  width: 360px;
  max-width: 80vw;
  height: auto;
  display: block;
}

.card {
  width: 100%;
  background: rgba(9, 20, 34, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--pws-line);
  border-radius: 10px;
  padding: 36px 34px;
}

.card h1 {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lede {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--pws-muted);
  max-width: 58ch;
}

.lede a {
  color: #FFFFFF;
  text-decoration: none;
  border-bottom: 1px solid var(--pws-line);
}

.lede a:hover { border-bottom-color: #FFFFFF; }

fieldset {
  border: 0;
  border-top: 1px solid var(--pws-line);
  margin: 0 0 26px;
  padding: 22px 0 0;
}

legend {
  padding: 0 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pws-steel);
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.row--three { grid-template-columns: 1fr 1fr 1fr; }

.field { margin-bottom: 18px; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
}

.req { color: var(--pws-red); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--pws-line);
  border-radius: 5px;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 120ms ease, background 120ms ease;
}

textarea { resize: vertical; min-height: 72px; }

/* The native picker arrow renders dark-on-dark in some browsers, so the
   options are forced back to a readable pairing. */
select option { background: #0E1F33; color: #FFFFFF; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--pws-steel);
  background: rgba(255, 255, 255, 0.11);
}

input.invalid, select.invalid, textarea.invalid { border-color: var(--pws-red); }

.hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--pws-muted);
}

.hint--block { margin: 0 0 14px; }

input[type="file"] { font-size: 14px; color: var(--pws-muted); }

.photo-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--pws-muted);
}

.photo-list li {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.photo-list li.too-big { color: #FF9B95; }

/* Honeypot. Off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.submit-btn {
  padding: 15px 44px;
  background: var(--pws-red);
  color: #FFFFFF;
  border: 1px solid var(--pws-red);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 120ms ease, opacity 120ms ease;
}

.submit-btn:hover:not(:disabled) { background: #C51D14; border-color: #C51D14; }
.submit-btn:disabled { opacity: 0.55; cursor: default; }

.status { margin: 0; font-size: 14px; text-align: center; min-height: 20px; }

/* Quieter than the form itself — present for anyone who looks, not competing. */
.privacy-note {
  margin: 4px 0 0;
  max-width: 62ch;
  font-size: 12px;
  line-height: 1.6;
  color: var(--pws-muted);
  text-align: center;
}

.privacy-note strong { color: rgba(255, 255, 255, 0.82); font-weight: 600; }
.status.error { color: #FF9B95; }
.status.working { color: var(--pws-muted); }

.done h2 { margin: 0 0 12px; font-size: 22px; font-weight: 600; }
.done p { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.86); }
.done a, .back-link { color: #FFFFFF; border-bottom: 1px solid var(--pws-line); text-decoration: none; }
.done a:hover, .back-link:hover { border-bottom-color: #FFFFFF; }

@media (max-width: 480px) {
  body {
    padding: 32px 20px;
    /* iOS ignores background-attachment: fixed and stretches the image badly. */
    background-attachment: scroll;
  }
  main { gap: 36px; }
  .portals { grid-template-columns: 1fr; max-width: 320px; }
  .portal-btn { padding: 16px 18px; }

  .card { padding: 26px 20px; }
  .row, .row--three { grid-template-columns: 1fr; gap: 0; }
  .form-main { gap: 24px; }
  .submit-btn { width: 100%; }
}
