/* PHOA Water Meter System — shared site stylesheet */

:root {
  --bg: #0e1626;
  --bg-2: #15203a;
  --panel: #1a2745;
  --panel-2: #233156;
  --border: #2a3a64;
  --text: #d6deed;
  --muted: #8a96b0;
  --dim: #5b6783;
  --accent: #4dd4ff;
  --accent-dim: #2a8fb5;
  --highlight: #ff6ad5;
  --good: #6bff9e;
  --warn: #ffb84d;
  --bad: #ff6a6a;
  --code: #b6e5ff;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

code, pre, .mono { font-family: var(--font-mono); }
code { color: var(--code); background: var(--bg-2); padding: 1px 5px; border-radius: 3px; font-size: 0.92em; }
pre { background: var(--bg-2); color: var(--code); padding: 14px 16px; border-radius: 6px; overflow-x: auto; border: 1px solid var(--border); }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; margin: 1.6em 0 0.5em; color: #fff; }
h1 { font-size: 2.2rem; margin-top: 0.4em; }
h2 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
h3 { font-size: 1.15rem; color: var(--accent); }

p { margin: 0.7em 0; color: var(--text); }
p.lead { font-size: 1.15rem; color: var(--text); max-width: 720px; }
.muted { color: var(--muted); }

/* layout */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(14, 22, 38, 0.85);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 10;
}
header.site .container { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; }
header.site .brand { font-weight: 700; color: #fff; font-size: 1rem; letter-spacing: 0.5px; }
header.site .brand .dot { color: var(--highlight); }
header.site nav a { margin-left: 22px; font-size: 0.95rem; color: var(--muted); }
header.site nav a:hover, header.site nav a.active { color: var(--accent); text-decoration: none; }

main { padding: 32px 0 64px; }

footer.site {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 64px;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent); }

/* hero on device pages */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: center;
  margin: 12px 0 36px;
}
.hero .copy h1 { margin-top: 0; }
.hero .copy .tag { color: var(--accent); font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 1px; text-transform: uppercase; }
.hero .shot { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.hero .shot img { display: block; width: 100%; height: auto; border-radius: 4px; }
.hero .shot .caption { font-size: 0.8rem; color: var(--muted); padding: 8px 4px 2px; font-family: var(--font-mono); }

/* index cards */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin: 32px 0;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 120ms ease, transform 120ms ease;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.card h2 { margin-top: 0; border: none; padding: 0; font-size: 1.4rem; }
.card .role { display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; color: var(--highlight); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.card img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--border); margin-top: 14px; }
.card .more { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 500; }
.card .more::after { content: ' →'; }

/* feature lists */
.features { list-style: none; padding: 0; margin: 16px 0; }
.features li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--border); position: relative; }
.features li:last-child { border-bottom: none; }
.features li::before { content: '◆'; color: var(--accent); position: absolute; left: 0; top: 10px; font-size: 0.7rem; }
.features li strong { color: #fff; }

/* spec / endpoint tables */
table.spec {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.95rem;
}
table.spec th, table.spec td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.spec th { color: var(--accent); font-weight: 500; width: 30%; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.5px; text-transform: uppercase; }
table.spec td code { font-size: 0.9rem; }

/* diagram */
.diagram {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  white-space: pre;
  overflow-x: auto;
  margin: 24px 0;
}

/* mobile */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  h1 { font-size: 1.7rem; }
  header.site nav a { margin-left: 14px; font-size: 0.85rem; }
}
