/* SecurIoT landing, direction: industrial site-plan / control-room fusion.
   See .impeccable/surfaces/index-html.md for the direction contract. */

:root {
  --bg-0: #0f1116;
  --bg-1: #12151a;
  --bg-2: #171b21;
  --bg-3: #1e232b;
  --line-soft: rgba(238, 241, 244, 0.08);
  --line-amber: rgba(245, 166, 35, 0.4);

  --ink: #eef1f4;
  --ink-dim: #a9b2bf; /* tinted blue-gray off the graphite hue, not plain gray */
  --ink-faint: #8b93a0; /* still tinted off the graphite hue; brightened to clear 4.5:1 on --bg-0 and --bg-2 */

  --amber: #f5a623;
  --amber-strong: #ffb838;
  --amber-ink: #1a1305; /* text on amber surfaces */

  --danger: #ef4444;
  --ok: #3ecf8e;

  --font-display: "Big Shoulders Display", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --measure: 68ch;
  --radius: 3px;
  --focus-ring: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--amber-strong);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg-1);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

/* Text-spacing survival (WCAG 1.4.12): never clip or overlap when a user
   forces line-height 1.5, paragraph spacing 2x, letter/word spacing up. */
* { line-height: 1.5; }
p, li { max-width: var(--measure); }

::selection { background: var(--amber); color: var(--amber-ink); }

/* Tabular numerals for any status/telemetry-style figure */
.mono, .pipeline__index, .status-chip, .dashboard-mock * { font-variant-numeric: tabular-nums; }

/* ---------- Focus & keyboard ---------- */
a, button {
  font: inherit;
  cursor: pointer;
}
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary {
  background: var(--amber);
  color: var(--amber-ink);
}
.btn--primary:hover { background: var(--amber-strong); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-soft);
}
.btn--ghost:hover { border-color: var(--amber); color: var(--amber-strong); }
.btn--small { min-height: 40px; padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn--large { min-height: 56px; padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 22, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand__mark { color: var(--amber); display: inline-flex; }
.brand__accent { color: var(--amber); }

.primary-nav ul {
  display: flex;
  gap: 1.75rem;
}
.primary-nav a {
  text-decoration: none;
  color: var(--ink-dim);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover { color: var(--ink); border-color: var(--line-amber); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  margin-left: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang-switch__btn {
  min-width: 44px;
  min-height: 44px;
  padding-inline: 0.6rem;
  border: none;
  border-left: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.lang-switch__btn:first-child { border-left: none; }
.lang-switch__btn:hover { color: var(--amber-strong); }
.lang-switch__btn[aria-pressed="true"] { color: var(--amber-ink); background: var(--amber); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  order: 3;
}
.nav-toggle__bars { display: block; width: 18px; height: 12px; position: relative; }
.nav-toggle__bars span {
  position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5px; }
.nav-toggle__bars span:nth-child(3) { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 5.5rem;
  padding-inline: 1.5rem;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-0);
}
.hero__scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__plan { width: 100%; height: 100%; }
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15,17,22,0.92) 0%, rgba(15,17,22,0.72) 38%, rgba(15,17,22,0.28) 68%, rgba(15,17,22,0.55) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding-block: 3rem 2rem;
  max-width: 640px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
  font-weight: 700;
  color: var(--ink);
}
.hero__subhead {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--ink-dim);
  max-width: 52ch;
}
.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__status {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-soft);
  background: rgba(15, 17, 22, 0.6);
  padding: 1rem 1.5rem 1.25rem;
}
.hero__status-caption {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-bottom: 0.6rem;
}
.status-strip {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.status-chip--alert { color: var(--ink); }
.status-chip__dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.status-chip__dot--ok { background: var(--ok); }
.status-chip__dot--alert { background: var(--danger); }
@media (prefers-reduced-motion: no-preference) {
  .status-chip__dot--alert { animation: pulse-dot 1.6s ease-in-out infinite; }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

/* Hero SVG motion: static by default, animated only when motion is allowed */
.sensor-node__ring { opacity: 0.6; }
.fov-sweep { transform-origin: 230px 300px; }
@media (prefers-reduced-motion: no-preference) {
  .sensor-node__ring { animation: sensor-pulse 2.8s ease-out infinite; transform-origin: center; }
  .sensor-node--delay1 .sensor-node__ring { animation-delay: 0.9s; }
  .sensor-node--delay2 .sensor-node__ring { animation-delay: 1.8s; }
  .sensor-node--alert .sensor-node__ring--alert { animation: sensor-pulse-alert 1.6s ease-out infinite; }
  .fov-sweep { animation: fov-sweep 14s ease-in-out infinite; }
}
@keyframes sensor-pulse {
  0% { r: 6; opacity: 0.9; }
  100% { r: 22; opacity: 0; }
}
@keyframes sensor-pulse-alert {
  0% { r: 6; opacity: 1; }
  100% { r: 26; opacity: 0; }
}
@keyframes fov-sweep {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(10deg); }
}

/* ---------- Problem (before/after) ---------- */
.problem { padding: 5rem 0; background: var(--bg-1); }
.problem__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2.5rem;
  align-items: start;
}
.problem__divider {
  width: 1px;
  align-self: stretch;
  background: var(--line-soft);
}
.problem__before h2, .problem__after h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.problem__before p, .problem__after p {
  margin-top: 1rem;
  color: var(--ink-dim);
}
.problem__list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.problem__list li {
  position: relative;
  padding-left: 1.3rem;
  font-size: 0.95rem;
  color: var(--ink-dim);
}
.problem__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 6px; height: 1px;
  background: var(--ink-faint);
}
.problem__list--accent li { color: var(--ink); }
.problem__list--accent li::before { background: var(--amber); width: 10px; height: 2px; }

/* ---------- Pipeline (how it works) ---------- */
.pipeline { padding: 5.5rem 1.5rem; background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.pipeline h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  max-width: 30ch;
}
.pipeline__steps {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.pipeline__steps::before {
  content: "";
  position: absolute;
  top: 1.35rem;
  left: 0; right: 0;
  height: 1px;
  background: var(--line-soft);
}
.pipeline__step {
  position: relative;
  padding: 0 1.5rem 0 0;
  border-left: 1px solid var(--line-soft);
  padding-left: 1.5rem;
}
.pipeline__step:first-child { border-left: none; padding-left: 0.5rem; }
.pipeline__index {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--ink-faint);
  background: var(--bg-2);
  padding-right: 0.5rem;
  position: relative;
  z-index: 1;
}
.pipeline__step--emphasis .pipeline__index { color: var(--amber); }
.pipeline__step h3 {
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.pipeline__step--emphasis h3 { color: var(--amber-strong); }
.pipeline__step p {
  margin-top: 0.65rem;
  font-size: 0.92rem;
  color: var(--ink-dim);
}

/* ---------- Stakeholders ---------- */
.stakeholders { padding: 5.5rem 0; background: var(--bg-1); }
.stakeholders h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  max-width: 26ch;
}
.stakeholders__grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.5rem;
}
.stakeholder-card {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 2rem;
}
.stakeholder-card--wide { border-color: var(--line-amber); }
.stakeholder-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}
.stakeholder-card--wide h3 { color: var(--amber-strong); }
.stakeholder-card p { margin-top: 0.85rem; color: var(--ink-dim); font-size: 0.95rem; }

/* ---------- Dashboard glimpse ---------- */
.dashboard-glimpse { padding: 5.5rem 1.5rem; background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.dashboard-glimpse__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}
.dashboard-glimpse__copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
}
.dashboard-glimpse__copy p { margin-top: 1rem; color: var(--ink-dim); }
.dashboard-glimpse__note {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-style: italic;
}

.dashboard-mock {
  background: var(--bg-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.dashboard-mock__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
.dashboard-mock__live { color: var(--ok); }
.dashboard-mock__body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.dashboard-mock__site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
}
.dashboard-mock__pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.25rem 0.55rem;
  border-radius: 2px;
  letter-spacing: 0.04em;
}
.dashboard-mock__pill--ok { background: rgba(62, 207, 142, 0.14); color: var(--ok); }
.dashboard-mock__pill--alert { background: rgba(239, 68, 68, 0.14); color: var(--danger); }

/* ---------- About ---------- */
.about { padding: 4rem 0; background: var(--bg-1); }
.about__inner { max-width: 62ch; }
.about h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}
.about p { margin-top: 1rem; color: var(--ink-dim); }

/* ---------- Final CTA ---------- */
.final-cta {
  padding: 6rem 1.5rem;
  background: var(--bg-0);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.final-cta__inner { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  max-width: 24ch;
  letter-spacing: 0.01em;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--line-soft); padding: 3rem 0; }
.site-footer__inner { display: flex; flex-direction: column; gap: 0.75rem; }
.site-footer__brand p { color: var(--ink-faint); font-size: 0.85rem; margin-top: 0.25rem; }
.site-footer__legal, .site-footer__meta { color: var(--ink-faint); font-size: 0.78rem; max-width: 70ch; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .primary-nav.is-open {
    display: block;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line-soft);
    padding: 1rem 1.5rem 1.5rem;
  }
  .primary-nav.is-open ul { flex-direction: column; gap: 0.25rem; }
  .primary-nav.is-open a { display: block; padding: 0.75rem 0.25rem; }

  .problem__grid { grid-template-columns: 1fr; }
  .problem__divider { display: none; }

  .pipeline__steps { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .pipeline__step:nth-child(3) { border-left: none; padding-left: 0; }

  .stakeholders__grid { grid-template-columns: 1fr; }

  .dashboard-glimpse__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero { min-height: auto; padding-bottom: 2rem; }
  .hero__content { padding-block: 2.5rem 1.5rem; }
  .pipeline__steps { grid-template-columns: 1fr; }
  .pipeline__step { border-left: none; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 1.5rem; }
  .pipeline__step:first-child { border-top: none; padding-top: 0; }
  .pipeline__steps::before { display: none; }
}

/* Zoom / reflow at 320px: no horizontal scroll, wrap gracefully */
@media (max-width: 340px) {
  .wrap { width: calc(100% - 1.5rem); }
}
