:root {
  color-scheme: dark;
  --ink: #e7edf0;
  --muted: #b1bdc6;
  --blue: #adc4d4;
  --paper: #151515;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 100%;
  line-height: 1.55;
}
@media (min-width: 961px) and (orientation: landscape) {
  :root { font-size: clamp(100%, min(1.2vw, 2.2vh), 125%); }
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #080808; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }

.landing {
  isolation: isolate;
  min-height: 100vh;
  padding: clamp(16px, 2.85vh, 32px) clamp(16px, 1.7vw, 36px);
}
.landing::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: #0b1012 url("./refinery-dew.webp") center center / cover no-repeat;
}
.contact-panel {
  width: 100%;
  max-width: 31.85rem;
  padding: .8rem .95rem 1.05rem;
  background: rgba(9, 12, 13, .99);
  border: 1px solid #637785;
}
.panel-heading { margin-bottom: .3rem; }
h1 {
  margin: 0 0 .3rem;
  color: #f5f7f8;
  font-size: 2.5rem;
  line-height: 1.08;
  letter-spacing: -.01em;
}
.specialty {
  margin: 0;
  padding-bottom: .45rem;
  border-bottom: .25rem solid #d4dfe7;
  font-size: 1.05rem;
  line-height: 1.3;
  color: #edf1f3;
}
#contact-form, .success-message { margin: 0 .35rem 0 .5rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .65rem; min-width: 0; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; }
label { font-size: .9rem; line-height: 1.4; font-weight: 700; }
.optional { font-weight: 400; color: var(--muted); }
input, select, textarea { color: var(--ink); background: #0d0d0d; width: 100%; min-height: max(44px, 2.5rem); border: 1px solid #607482; border-radius: 2px; padding: .35rem .625rem; }
textarea { min-height: 4.85rem; resize: vertical; line-height: 1.4; }

:focus-visible { outline: 3px solid #b7d3e5; outline-offset: 3px; }
input:focus-visible, textarea:focus-visible { border-color: var(--blue); outline: 2px solid #b7d3e5; outline-offset: 1px; }
button { border: 1px solid var(--blue); border-radius: 2px; padding: .35rem 1rem; min-height: max(44px, 2.5rem); background: var(--blue); color: #172a37; font-weight: 700; }
button:hover:not(:disabled) { background: #c4d7e3; border-color: #c4d7e3; }
button:disabled { background: #526573; border-color: #526573; color: #edf1f3; }
.form-status { margin: 0 0 10px; font-size: .9375rem; color: #f0bea4; }
.form-status:empty { display: none; }
#spam-check:not(:empty) { margin-bottom: 10px; min-height: 65px; }
.success-message { padding-block: 24px 12px; }
.success-message h3 { font-size: 1.35rem; margin: 0 0 12px; font-weight: 500; }
.success-message p { color: var(--muted); }
.secondary-button { background: transparent; color: var(--blue); margin-top: 12px; }
.secondary-button:hover:not(:disabled) { color: #172a37; }

.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link { position: fixed; top: 10px; left: 10px; padding: 12px 18px; background: #151515; z-index: 3; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.noscript-note { font-size: .9375rem; }
@media (max-width: 960px), (orientation: portrait) {
  .landing { min-height: 100svh; padding: 0 0 1rem; background: #0b1012; }
  .landing::before {
    display: block;
    position: static;
    height: clamp(120px, 40vw, 290px);
    background-position: 75% 57%;
  }
  .contact-panel {
    position: relative;
    max-width: 36rem;
    width: calc(100% - 1.25rem);
    margin: -.75rem auto 0;
    padding: 1rem;
  }
  h1 { font-size: clamp(1.6rem, 6.1vw, 2.3rem); }
  .specialty { font-size: 1rem; }
  #contact-form, .success-message { margin: 0; }
  .field { margin-bottom: .7rem; }
}
@media (max-width: 480px) {
  .field-pair { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

#message-count { color: #cdd5db; font-size: .8125rem; font-variant-numeric: tabular-nums; }

.message-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.callback-pair { grid-template-columns: minmax(0, 1.35fr) calc(6ch + 12px) minmax(0, 1.6fr); align-items: end; }
#email-hint { overflow-wrap: anywhere; }
#email-hint button { padding: 4px; background: transparent; color: var(--blue); font-size: .8125rem; }
.extension-field input { padding-inline: 5px; }
@media (max-width: 480px) {
  .callback-pair { grid-template-columns: minmax(0, 2fr) calc(6ch + 12px); }
  .callback-window { grid-column: 1 / -1; }
}
