/* Modbus Field website. Plain CSS, no build step. */

:root {
  --bg: #0b0d11;
  --bg-raised: #14171d;
  --bg-card: #181c23;
  --line: #262b34;
  --text: #f3f4f6;
  --text-dim: #a3a9b4;
  --text-faint: #6b7280;
  --accent: #fc7a2e;
  --accent-soft: rgba(252, 122, 46, 0.14);
  --green: #34c759;
  --blue: #3b82f6;
  --radius: 20px;
  --max: 1120px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f7f9;
    --bg-raised: #ffffff;
    --bg-card: #ffffff;
    --line: #e4e7ec;
    --text: #0f1115;
    --text-dim: #4b5260;
    --text-faint: #8a909c;
    --accent: #e8661b;
    --accent-soft: rgba(232, 102, 27, 0.10);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--text-dim); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--bg-raised); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 48px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 720px;
  background: radial-gradient(closest-side, rgba(252, 122, 46, 0.28), transparent 70%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero .app-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45); }

.eyebrow {
  display: inline-block;
  margin: 20px 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.lead { margin: 0 0 30px; font-size: 20px; color: var(--text-dim); max-width: 34em; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-center { justify-content: center; margin-top: 32px; }
.cta-note { margin-top: 16px; font-size: 14px; color: var(--text-faint); }

.phone {
  justify-self: center;
  width: min(290px, 72vw);
  padding: 10px;
  border-radius: 54px;
  background: #1d2027;
  box-shadow: 0 0 0 1px #2c313b, 0 40px 90px rgba(0, 0, 0, 0.55);
}
.phone img { border-radius: 44px; }

/* Sections */

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.section-lead { margin: 0 0 40px; color: var(--text-dim); font-size: 19px; max-width: 40em; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.feature h3 { margin: 16px 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 16px; }
.tile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
}
.tile svg { width: 24px; height: 24px; }
.t-orange { background: linear-gradient(160deg, #ff9a4d, #f2661a); }
.t-blue { background: linear-gradient(160deg, #5b9dff, #2f6fe0); }
.t-yellow { background: linear-gradient(160deg, #ffd84d, #f5b400); }
.t-green { background: linear-gradient(160deg, #4cd97b, #22a94f); }
.t-purple { background: linear-gradient(160deg, #d36bff, #9b3fe0); }
.t-teal { background: linear-gradient(160deg, #3fd6d0, #13a3a0); }

/* Screenshot strip */

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 250px;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img {
  border-radius: 32px;
  border: 6px solid #1d2027;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.shots figcaption { margin-top: 12px; font-size: 14px; color: var(--text-dim); text-align: center; }

/* Pricing */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.plan {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.plan.pro { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.plan h3 { margin: 0 0 4px; font-size: 22px; }
.plan .price { margin: 0 0 18px; color: var(--text-dim); }
.plan ul { margin: 0; padding: 0; list-style: none; }
.plan li { position: relative; padding: 6px 0 6px 28px; color: var(--text-dim); }
.plan li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

.privacy-band {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
}
.privacy-band p { margin: 0; color: var(--text-dim); }
.privacy-band h3 { margin: 0 0 4px; font-size: 21px; }

/* Text pages (support, privacy) */

.page { padding: 64px 0 80px; }
.page .wrap { max-width: 780px; }
.page h1 { font-size: clamp(36px, 5vw, 52px); }
.page h2 { font-size: 26px; margin-top: 48px; }
.page p, .page li { color: var(--text-dim); }
.page strong { color: var(--text); }
.updated { color: var(--text-faint); font-size: 15px; margin-top: -6px; }

.contact-card {
  margin: 28px 0 8px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.contact-card p { margin: 0; }
.contact-card .grow { flex: 1 1 260px; }

details {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: 16px;
  padding: 0 20px;
  margin: 10px 0;
}
summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 28px 18px 0;
  font-weight: 600;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 22px;
  font-weight: 400;
  color: var(--text-faint);
}
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 18px; }
details p { margin: 0 0 10px; }

kbd {
  font: 600 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text);
}

/* Footer */

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--text-faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--text-dim); }
.site-footer .legal { flex-basis: 100%; }

/* Responsive */

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { gap: 14px; font-size: 14px; }
  .nav .hide-sm { display: none; }
  .features, .plans { grid-template-columns: 1fr; }
  .privacy-band { flex-direction: column; align-items: flex-start; }
  section { padding: 56px 0; }
  .lead { font-size: 18px; }
}
