/* stadig.tech: one full-screen photo of a container port, darkened toward the lower left,
   where the wordmark, a status line and one button sit. The contact form slides in over it.
   A deliberately single (dark) look: the photo sets it. */
:root {
  --ink: #0d1418;          /* night water, the darkest tone in the photo */
  --panel: rgba(14, 21, 26, .88);
  --steel: #d6dee3;        /* text */
  --muted: #93a3ad;
  --line: rgba(214, 222, 227, .18);
  --accent: #e2672b;       /* gantry-crane orange */
  --accent-hi: #f07a3f;
  --ok: #63d495;           /* container "running" green */
  --warn: #f2b63d;
  --bad: #ff8a7a;
  --display: "Saira Stencil One", Impact, "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--ink); color: var(--steel); font-family: var(--body); font-size: 16px; overflow: hidden; -webkit-font-smoothing: antialiased; }

.stage { position: relative; height: 100%; overflow: hidden; }
.stage img.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(13,20,24,.92) 0%, rgba(13,20,24,.55) 32%, rgba(13,20,24,0) 62%),
    linear-gradient(to right, rgba(13,20,24,.55) 0%, rgba(13,20,24,0) 55%),
    linear-gradient(to bottom, rgba(13,20,24,.45) 0%, rgba(13,20,24,0) 22%);
}

.mark {
  position: absolute; z-index: 2; left: 0; bottom: 0;
  display: grid; gap: 14px; justify-items: start;
  padding-left: max(28px, calc(env(safe-area-inset-left, 0px) + 16px), 5vw);
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: max(32px, calc(env(safe-area-inset-bottom, 0px) + 20px), 7vh);
  transition: opacity .2s;
}
.mark h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 9.6vw, 7.6rem); line-height: .95; color: #fff; text-transform: uppercase; }
.mark h1 .dot { color: var(--accent); }
.mark p { margin: 0; }

.status { display: inline-flex; align-items: center; gap: 13px; font-family: var(--mono); font-size: .95rem; color: var(--steel); }
.status i { position: relative; width: 13px; height: 13px; border-radius: 50%; flex: none; --c: var(--ok); --hi: #c9f7dc; --glow: 99,212,149;
  background: radial-gradient(circle at 35% 35%, var(--hi), var(--c) 60%);
  box-shadow: 0 0 6px 1px rgba(var(--glow),.8), 0 0 18px 4px rgba(var(--glow),.35); }
.status.warn i { --c: var(--warn); --hi: #ffe7a8; --glow: 242,182,61; }
/* Two rings radiating out of the dot, like a signal. */
.status i::before, .status i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c); animation: radiate 2.4s ease-out infinite; }
.status i::after { animation-delay: 1.2s; }
@keyframes radiate { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.4); opacity: 0; } }

.btn { display: inline-block; font: 500 .95rem var(--body); color: #fff; text-decoration: none; background: transparent; border: 1px solid rgba(255,255,255,.55); border-radius: 3px; padding: 10px 18px; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn.solid { background: var(--accent); border-color: var(--accent); }
.btn.solid:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn:disabled { opacity: .6; cursor: progress; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Contact panel: slides in from the right; a bottom sheet on phones. */
.panel {
  position: absolute; z-index: 4; top: 0; right: 0; height: 100%; width: min(440px, 100%);
  background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid var(--line);
  padding-block: max(28px, calc(env(safe-area-inset-top, 0px) + 20px)) max(24px, env(safe-area-inset-bottom, 0px));
  padding-left: 28px; padding-right: max(28px, calc(env(safe-area-inset-right, 0px) + 16px));
  display: flex; flex-direction: column; gap: 18px; overflow-y: auto;
  transform: translateX(105%); visibility: hidden;
  transition: transform .32s cubic-bezier(.2,.7,.2,1), visibility 0s linear .32s;
}
body.open .panel { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2,.7,.2,1); }
.panel header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel h2 { margin: 0; font: 600 1.35rem var(--body); color: #fff; }
.panel .close { background: none; border: 0; color: var(--muted); font: 500 .9rem var(--body); cursor: pointer; padding: 6px; }
.panel .close:hover { color: #fff; }
.lede { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }

form { display: grid; gap: 14px; margin-top: 14px; }
.field { display: grid; gap: 6px; }
label { font: 500 .78rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
input, textarea { font: 400 1rem var(--body); color: #fff; background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; width: 100%; }
textarea { min-height: 150px; resize: vertical; line-height: 1.45; }
.field[data-invalid] input, .field[data-invalid] textarea { border-color: var(--bad); }
.err { color: var(--bad); font-size: .85rem; }
.counter { justify-self: end; font: .78rem var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { min-height: 65px; }
.send { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.send small { color: var(--muted); font-size: .82rem; }
.form-error { margin: 0; color: var(--bad); font-size: .9rem; }
.sent { display: grid; gap: 12px; }
.sent .status { color: #fff; }

@media (max-width: 600px) {
  .stage img.photo { object-position: 58% 62%; }
  .panel {
    top: auto; bottom: 0; height: auto; max-height: 90%; width: 100%;
    border-left: 0; border-top: 1px solid var(--line); border-radius: 12px 12px 0 0;
    padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px));
    transform: translateY(105%);
  }
  body.open .mark { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .status i::before, .status i::after { animation: none; opacity: 0; } .panel, body.open .panel, .mark { transition: none; } }
