/* ==========================================================================
   Sentinel — mdlsentinel.com
   "Night watch" design system: the product watches your Moodle sites at 2am,
   so the site lives in that hour. Deep ink-navy ground, phosphor status
   accents, editorial serif display over a humanist body, mono for readouts.
   Fonts: Fraunces (display) · Atkinson Hyperlegible (body) · IBM Plex Mono.
   No JavaScript anywhere.
   ========================================================================== */

:root {
  /* ground */
  --ink-0: #070b14;        /* page background           */
  --ink-1: #0b1120;        /* raised panels              */
  --ink-2: #111a2e;        /* cards                      */
  --ink-3: #1a2540;        /* hover / table stripes      */
  --line: #20294a;         /* hairline borders           */
  --line-soft: #182138;

  /* text */
  --text-hi: #e9edf6;
  --text-mid: #aab4c8;
  --text-low: #6b7790;

  /* status language */
  --ok: #46d68c;
  --ok-dim: rgba(70, 214, 140, 0.14);
  --warn: #e8a33d;
  --warn-dim: rgba(232, 163, 61, 0.14);
  --down: #e05d5d;
  --down-dim: rgba(224, 93, 93, 0.14);

  /* brand accent — signal green, used sparingly */
  --accent: #46d68c;
  --accent-ink: #070b14;  /* near-black, not dark green — green-on-green text is unreadable */

  --serif: "Fraunces", "Georgia", serif;
  --sans: "Atkinson Hyperlegible", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "Menlo", monospace;

  --radius: 10px;
  --radius-lg: 16px;
  --measure: 64ch;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- reset-ish ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text-mid);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* the faint operations-grid texture behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(70, 214, 140, 0.07), transparent 60%),
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), rgba(0,0,0,.12) 40rem, rgba(0,0,0,.12));
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 560;
  color: var(--text-hi);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-variation-settings: "opsz" 90; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-variation-settings: "opsz" 60; }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--text-hi); text-decoration-color: var(--text-low); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); color: #fff; }

strong { color: var(--text-hi); font-weight: 700; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.4em;
  color: var(--text-hi);
}

ul { padding-left: 1.2rem; }
li { margin-bottom: 0.45em; max-width: var(--measure); }
li::marker { color: var(--accent); }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.muted { color: var(--text-low); }
.fine {
  font-size: 0.88rem;
  color: var(--text-low);
  max-width: var(--measure);
}

/* ---------- status dot vocabulary ---------- */

.dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: none;
}
.dot--ok   { background: var(--ok);   box-shadow: 0 0 0 4px var(--ok-dim); }
.dot--warn { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-dim); }
.dot--down { background: var(--down); box-shadow: 0 0 0 4px var(--down-dim); }

.dot--pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--ok-dim); }
  50%      { box-shadow: 0 0 0 8px rgba(70, 214, 140, 0.05); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4.25rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand svg { align-self: center; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-hi);
}
.brand-by {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-low);
}

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a {
  font-size: 0.95rem;
  color: var(--text-mid);
  text-decoration: none;
}
.site-nav a:hover { color: var(--text-hi); }
.site-nav a[aria-current="page"] { color: var(--accent); }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.62em 1.4em;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--solid {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 24px rgba(70, 214, 140, 0.25);
}
.btn--solid:hover { box-shadow: 0 0 32px rgba(70, 214, 140, 0.4); color: var(--accent-ink); }

.btn--ghost {
  color: var(--text-hi);
  border-color: var(--line);
  background: var(--ink-1);
}
.btn--ghost:hover { border-color: var(--text-low); color: #fff; }

.site-nav .btn { padding: 0.5em 1.2em; }
/* .site-nav a outranks .btn--solid, so re-assert the button text color */
.site-nav a.btn--solid, .site-nav a.btn--solid:hover { color: var(--accent-ink); }

/* ---------- hero ---------- */

.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero p.lede {
  font-size: 1.18rem;
  max-width: 38ch;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.8rem 0 1rem; }

.hero-sub {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-low);
}

/* ---------- product mockups (pure CSS/HTML, no images) ---------- */

.console {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  font-size: 0.85rem;
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-low);
}
.console-bar::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: 14px 0 0 var(--line), 28px 0 0 var(--line);
  margin-right: 1.6rem;
}

.fleet-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
}
.fleet-row:last-child { border-bottom: 0; }

.fleet-site { color: var(--text-hi); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fleet-note { font-family: var(--mono); font-size: 0.72rem; color: var(--text-low); white-space: nowrap; }
.fleet-note--warn { color: var(--warn); }
.fleet-note--down { color: var(--down); }
.fleet-up { font-family: var(--mono); font-size: 0.72rem; color: var(--text-mid); }

/* floating alert-email card overlapping the console */
.alert-card {
  position: relative;
  margin: -1.6rem 0 0 clamp(1rem, 4vw, 3rem);
  max-width: 24rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  font-size: 0.82rem;
}
.alert-card-from {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-low);
  margin-bottom: 0.35rem;
}
.alert-card-subject { color: var(--text-hi); font-weight: 700; margin-bottom: 0.3rem; }
.alert-card-body { color: var(--text-mid); margin: 0; }

/* ---------- sections ---------- */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--line { border-top: 1px solid var(--line-soft); }

.section-head { max-width: 46rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }

/* numbered steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  counter-reset: step;
}
.step {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.2rem;
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: 0.4em; }
.step p { font-size: 0.95rem; margin: 0; }
.step code { font-size: 0.78em; }

/* four axes — asymmetric editorial list */
.axes { display: grid; gap: 0; }
.axis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: 1.8rem 0;
  border-top: 1px solid var(--line-soft);
}
.axis:last-child { border-bottom: 1px solid var(--line-soft); }
.axis h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin: 0;
}
.axis h3 .axis-no {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--text-low);
  margin-bottom: 0.5rem;
}
.axis p { margin: 0; }

.analogy {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: clamp(1.5rem, 4vw, 2.2rem) clamp(1.5rem, 4vw, 2.5rem);
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-style: italic;
  color: var(--text-hi);
  line-height: 1.5;
  max-width: 54rem;
}
.analogy em { color: var(--accent); font-style: normal; }

/* feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}
.feature {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1.1rem;
}
.feature h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}
.feature p { font-size: 0.93rem; margin: 0; color: var(--text-mid); }

/* ---------- pricing ---------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  align-items: stretch;
}

.tier {
  display: flex;
  flex-direction: column;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem 1.6rem;
}
.tier--featured {
  border-color: rgba(70, 214, 140, 0.45);
  background: linear-gradient(180deg, rgba(70, 214, 140, 0.06), transparent 35%), var(--ink-1);
  box-shadow: 0 0 50px rgba(70, 214, 140, 0.08);
}

.tier-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-low);
  margin-bottom: 0.7rem;
}
.tier--featured .tier-kicker { color: var(--accent); }

.tier h3 { font-size: 1.35rem; margin-bottom: 0.2em; }

.tier-price {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--text-hi);
  margin: 0.4rem 0 0.1rem;
}
.tier-price small {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-low);
  margin-left: 0.3rem;
}

.tier-tag { font-size: 0.88rem; color: var(--text-low); margin-bottom: 1rem; }

.tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  font-size: 0.94rem;
}
.tier li {
  padding-left: 1.3rem;
  position: relative;
  margin-bottom: 0.55em;
}
.tier li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.tier .btn { margin-top: auto; text-align: center; }

.hero p.lede--wide { max-width: 58ch; }
.gap-top { margin-top: 1.8rem; }

/* deep-dive offering sections on /pricing */
.offering--first { border-top: 0; padding-top: 0; }
.offering {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(2rem, 5vw, 3rem) 0;
  border-top: 1px solid var(--line-soft);
}
.offering-price {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: 0.6rem;
}
.offering h2 { margin-bottom: 0.2em; }
.offering .lede { font-size: 1.12rem; color: var(--text-hi); }

/* ---------- FAQ ---------- */

.faq { max-width: 50rem; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-1);
  margin-bottom: 0.8rem;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.2rem;
  font-weight: 700;
  color: var(--text-hi);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.1rem;
  flex: none;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 1.2rem 1.1rem; font-size: 0.97rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- plugin page extras ---------- */

.badge-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0; }
.badge {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-mid);
  border: 1px solid var(--line);
  background: var(--ink-1);
  border-radius: 999px;
  padding: 0.3em 0.9em;
  white-space: nowrap;
}
.badge--ok { color: var(--ok); border-color: rgba(70, 214, 140, 0.35); }

/* "Action needed" plugin mockup */
.action-list { font-size: 0.85rem; }
.action-item {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.66rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
}
.action-item:last-child { border-bottom: 0; }
.action-item .dot { transform: translateY(-1px); }
.action-text { color: var(--text-hi); }
.action-link {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-low);
  white-space: nowrap;
}

.upsell {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2.2rem);
  border: 1px dashed rgba(70, 214, 140, 0.4);
  border-radius: var(--radius-lg);
  background: rgba(70, 214, 140, 0.04);
}
.upsell p { font-size: 1.05rem; color: var(--text-hi); margin: 0; max-width: none; }

/* two-column copy blocks */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

/* ---------- comparison table ---------- */

.compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.compare thead th {
  font-family: var(--sans);
  color: var(--text-hi);
  border-bottom: 1px solid var(--line);
}
.compare tbody th {
  font-weight: 400;
  color: var(--text-low);
  font-family: var(--mono);
  font-size: 0.78rem;
  white-space: nowrap;
}
.compare td { color: var(--text-mid); }
.compare td strong { white-space: nowrap; }

/* ---------- contact band ---------- */

.contact-band {
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse 60% 90% at 50% 110%, rgba(70, 214, 140, 0.1), transparent 65%),
    var(--ink-1);
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.contact-band h2 { margin-bottom: 0.3em; }
.contact-band p { margin: 0 auto 1.6rem; }
.contact-band .hero-ctas { justify-content: center; margin: 0 0 1rem; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 2.2rem 0 2.6rem;
  font-size: 0.85rem;
  color: var(--text-low);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.5rem;
  justify-content: space-between;
}
.site-footer a { color: var(--text-mid); }
.footer-legal { max-width: 46rem; }
.footer-legal p { margin: 0 0 0.4em; max-width: none; }

/* ---------- responsive ---------- */

@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero p.lede { max-width: var(--measure); }
  .steps, .features, .tiers { grid-template-columns: 1fr; }
  .axis, .offering, .split { grid-template-columns: 1fr; gap: 0.6rem; }
  .axis { padding: 1.4rem 0; }
  .alert-card { margin-left: 0.5rem; }

  /* stack the comparison table into cards */
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; background: var(--ink-1); }
  .compare tbody th { border-bottom: 0; padding-bottom: 0.2rem; }
  .compare td { border-bottom: 0; padding-top: 0.2rem; }
  .compare td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.15rem;
  }
}

@media (max-width: 40rem) {
  .site-header .wrap { gap: 0.7rem; height: 3.8rem; }
  .site-nav { gap: 0.7rem; }
  .site-nav a:not(.btn) { font-size: 0.85rem; }
  .site-nav .btn { padding: 0.45em 0.9em; font-size: 0.85rem; }
  .brand { gap: 0.45rem; }
  .brand-name { font-size: 1.15rem; }
  .brand-by { display: none; }
  .fleet-up { display: none; }

  /* keep the CSS mockups inside the viewport */
  .fleet-row { grid-template-columns: auto minmax(0, 1fr); }
  .fleet-note { grid-column: 2; white-space: normal; }
  .alert-card { max-width: calc(100% - 1.5rem); }
  .action-link { display: none; }
}
