/* fieldloupe.com Under Construction page (board 120). Light and dark follow the visitor's setting. */
:root {
  --ink: #102025;
  --text: #3c4a45;
  --muted: #55625d;
  --accent: #1b7a4b;
  --accent-strong: #1b7a4b;
  --on-accent: #ffffff;
  --line: #10202522;
  --panel: #ffffffd9;
  --panel-line: #10202524;
  --shadow: 0 12px 32px #1020251a;
  --grid: #10202512;
  --bg: linear-gradient(135deg, #f6f5f1 0%, #f4f6f1 45%, #dff0e6 100%);
  --ring: #22905a;
  --ring-dark: #102025;
  --wave-a: #22905a1a;
  --wave-b: #1b7a4b14;
  --glow: 0 0 0 3px #22905a40, 0 0 18px #22905a59;
  --portal-bg: #102025;
  --portal-text: #ffffff;
  --pill-on-bg: #e2efe7; --pill-on-text: #17663f; --pill-on-dot: #22905a;
  --pill-off-bg: #fdf1d6; --pill-off-text: #7a4b00; --pill-off-dot: #c9821a;
  --pill-wait-bg: #eceae4; --pill-wait-text: #4f5852; --pill-wait-dot: #9aa39e;
  --banner-bg: #fdf1d6; --banner-line: #e2c27c; --banner-text: #5c3a00;
  --gutter: max(40px, calc((100vw - 1200px) / 2));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8efec;
    --text: #b8c6c0;
    --muted: #8fa19a;
    --accent: #5fd3a0;
    --accent-strong: #2fae70;
    --on-accent: #06140f;
    --line: #e8efec22;
    --panel: #112227d9;
    --panel-line: #2a3f43;
    --shadow: none;
    --grid: #5fd3a014;
    --bg: linear-gradient(135deg, #10242a 0%, #0b1619 45%, #020404 100%);
    --ring: #5fd3a0;
    --ring-dark: #e8efec;
    --wave-a: #5fd3a012;
    --wave-b: #00000073;
    --glow: 0 0 0 3px #5fd3a040, 0 0 20px #5fd3a066;
    --portal-bg: #e8efec;
    --portal-text: #0b1619;
    --pill-on-bg: #12392a; --pill-on-text: #8fe3bb; --pill-on-dot: #5fd3a0;
    --pill-off-bg: #3a2a12; --pill-off-text: #f3c27a; --pill-off-dot: #f0a83a;
    --pill-wait-bg: #1d2c2f; --pill-wait-text: #a3b3ad; --pill-wait-dot: #6f817c;
    --banner-bg: #2a2210; --banner-line: #6b5220; --banner-text: #f6dca8;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { background: #0b1619; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  background-size: 220% 220%;
  animation: drift 30s ease-in-out infinite alternate;
  position: relative;
  overflow-x: hidden;
}
@keyframes drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

/* Backdrop: grid, loupe rings and rolling waves, behind everything */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  animation: fade-in 1.2s ease-out both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.loupe { position: absolute; width: 560px; height: 560px; right: -150px; top: -120px; animation: turn 60s linear infinite; }
.loupe circle, .loupe path { fill: none; }
.ring-a { stroke: var(--ring); stroke-opacity: .17; stroke-width: 2; }
.ring-b { stroke: var(--ring); stroke-opacity: .23; stroke-width: 1; stroke-dasharray: 4 10; }
.ring-c { stroke: var(--ring-dark); stroke-opacity: .07; stroke-width: 28; }
.ticks { stroke: var(--ring); stroke-opacity: .38; stroke-width: 2; }
@keyframes turn { to { transform: rotate(360deg); } }
.waves { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; overflow: hidden; }
.wave { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; animation: roll 24s linear infinite; }
.wave-a path { fill: var(--wave-a); }
.wave-b path { fill: var(--wave-b); }
.wave-b { animation-duration: 38s; animation-direction: reverse; }
@keyframes roll { to { transform: translateX(-50%); } }

/* Page */
.top, .banner, .hero, .foot { position: relative; z-index: 1; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px var(--gutter); }
.brand img { display: block; height: 30px; width: auto; }
.portal { display: flex; align-items: center; gap: 12px; }

.pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 15px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 4px; }
.pill[data-state="checking"] { background: var(--pill-wait-bg); color: var(--pill-wait-text); }
.pill[data-state="checking"] .dot { background: var(--pill-wait-dot); }
.pill[data-state="online"] { background: var(--pill-on-bg); color: var(--pill-on-text); }
.pill[data-state="online"] .dot { background: var(--pill-on-dot); }
.pill[data-state="offline"] { background: var(--pill-off-bg); color: var(--pill-off-text); }
.pill[data-state="offline"] .dot { background: var(--pill-off-dot); }

.btn {
  font: inherit; font-size: 14px; font-weight: 600;
  min-height: 44px; padding: 0 18px; border-radius: 8px; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: box-shadow .2s ease, transform .2s ease, background-color .2s ease;
}
.btn:hover, .btn:focus-visible { box-shadow: var(--glow); outline: none; }
.btn:active { transform: translateY(1px); }
.btn-portal { background: var(--portal-bg); color: var(--portal-text); }
.btn-portal.is-offline { background: transparent; color: var(--text); border: 1px solid var(--panel-line); }
.btn-primary { background: var(--accent-strong); color: var(--on-accent); width: 100%; }
.btn-quiet { background: transparent; color: var(--banner-text); border: 1px solid var(--banner-line); min-height: 36px; font-size: 13px; }

.banner {
  margin: 0 var(--gutter); padding: 12px 16px; border-radius: 10px;
  background: var(--banner-bg); border: 1px solid var(--banner-line); color: var(--banner-text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 1.5;
}
.banner[hidden] { display: none; }
.banner p { margin: 0; }

.hero { flex: 1; display: flex; gap: 56px; align-items: flex-start; padding: 40px var(--gutter) 64px; }
.intro { flex: 1; display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.eyebrow { margin: 0; font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0 0 6px; font-size: clamp(32px, 4.4vw, 48px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
h1 .accent { color: var(--accent); }
.intro p:not(.eyebrow) { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text); }

.contact {
  width: 380px; flex-shrink: 0; margin-top: 36px;
  background: var(--panel); border: 1px solid var(--panel-line); box-shadow: var(--shadow);
  border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 14px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.contact h2 { margin: 0; font-size: 20px; }
.contact p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.contact .small { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

.foot { display: flex; justify-content: space-between; gap: 16px; padding: 16px var(--gutter); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mono { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: 12px; }

a:focus-visible { outline: none; box-shadow: var(--glow); border-radius: 6px; }

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .top { padding-block: 18px; }
  .banner { flex-direction: column; align-items: flex-start; }
  .hero { flex-direction: column; gap: 28px; padding-block: 24px 48px; }
  .contact { width: 100%; margin-top: 0; }
  .foot { flex-direction: column; gap: 4px; }
  .loupe { width: 360px; height: 360px; right: -140px; top: -100px; }
}
@media (max-width: 480px) {
  .brand img { height: 24px; }
  .pill .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pill { padding: 0 10px; }
  .btn-portal { padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  body, .grid, .loupe, .wave { animation: none; }
  .btn { transition: none; }
}
