/* ==========================================================================
   FortiWatcher — Design System
   ========================================================================== */

:root {
  --bg: #0A0E1A;
  --panel: #121828;
  --panel-raised: #171F35;
  --line: #1E2740;
  --text: #EDEFF7;
  --text-muted: #8891AA;
  --text-dim: #5C6584;
  --signal: #5EEAD4;
  --signal-dim: #2C7A70;
  --alert: #FB7185;

  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  --max-width: 1180px;
  --gutter: 32px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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

a { color: inherit; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
}

.brand .mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-toggle button.active {
  background: var(--panel-raised);
  color: var(--signal);
}

.nav-toggle {
  display: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--signal);
  color: #06201C;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--text-dim);
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.eyebrow-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 20px;
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.6);
  animation: pulse-dot 2.4s ease-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(94, 234, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); }
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  max-width: 15ch;
}

.hero p.lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-meta {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

.hero-meta strong {
  color: var(--text);
  font-weight: 600;
}

/* signal panel */

.signal-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 22px 16px;
}

.signal-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.signal-panel-head span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.signal-svg {
  width: 100%;
  height: auto;
  display: block;
}

.signal-flag {
  fill: var(--bg);
  stroke: var(--alert);
  stroke-width: 1.5;
}

.signal-flag-text {
  fill: var(--alert);
  font-family: var(--font-mono);
  font-size: 11px;
}

.signal-line {
  fill: none;
  stroke: var(--signal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-signal 3.2s ease-out 0.3s forwards;
}

@keyframes draw-signal {
  to { stroke-dashoffset: 0; }
}

.signal-spike-marker {
  opacity: 0;
  animation: reveal-marker 0.4s ease-out 2.5s forwards;
}

@keyframes reveal-marker {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .signal-line { stroke-dashoffset: 0; animation: none; }
  .signal-spike-marker { opacity: 1; animation: none; }
}

/* ---------- Section shell ---------- */

.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-of-type {
  border-bottom: none;
}

.section-head {
  max-width: 60ch;
  margin-bottom: 44px;
}

.section-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal);
  margin-bottom: 14px;
}

.section-tag svg {
  width: 16px;
  height: 16px;
}

.section-head h2 {
  font-size: 30px;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0;
}

/* ---------- Log-line feature list ---------- */

.log-list {
  border-top: 1px solid var(--line);
}

.log-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.log-row .log-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}

.log-row .log-title .tick {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--signal-dim);
  flex-shrink: 0;
}

.log-row .log-body {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 62ch;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 48px 0;
}

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

.site-footer .foot-brand {
  color: var(--text-dim);
  font-size: 14px;
}

.site-footer .foot-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.site-footer .foot-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer .foot-links a:hover {
  color: var(--text);
}

/* ---------- Pricing page ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}

.plan.featured {
  border-color: var(--signal-dim);
  background: linear-gradient(180deg, rgba(94, 234, 212, 0.06), var(--panel) 40%);
}

.plan-name {
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-bottom: 10px;
}

.plan.featured .plan-name {
  color: var(--signal);
}

.plan-price {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 4px;
}

.plan-price .unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
}

.plan-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  min-height: 40px;
}

.plan-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  border-top: 1px solid var(--line);
}

.plan-specs li {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
}

.plan-specs li strong {
  color: var(--text);
  font-weight: 600;
}

.plan .btn {
  justify-content: center;
  margin-top: auto;
}

.plan-note {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

.plan-note strong { color: var(--text); }

/* ---------- Download / signup page ---------- */

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 0 0 28px 44px;
  border-left: 1px solid var(--line);
  margin-left: 13px;
}

.steps li:last-child {
  border-color: transparent;
  padding-bottom: 0;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -13px;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

.steps p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
}

.signup-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
}

.signup-panel h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.signup-panel .sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 26px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-muted);
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: border-color 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--signal-dim);
}

.field-hint {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 6px;
}

.field-error {
  font-size: 12.5px;
  color: var(--alert);
  margin-top: 6px;
  display: none;
}

.field.has-error input {
  border-color: var(--alert);
}

.field.has-error .field-error {
  display: block;
}

.signup-panel .btn {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}

.form-status.show { display: block; }
.form-status.ok { background: rgba(94, 234, 212, 0.1); color: var(--signal); border: 1px solid var(--signal-dim); }
.form-status.err { background: rgba(251, 113, 133, 0.1); color: var(--alert); border: 1px solid rgba(251, 113, 133, 0.4); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; max-width: none; }
  .pricing-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .log-row { grid-template-columns: 1fr; gap: 8px; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    order: 3;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a:last-child { border-bottom: none; }

  .site-header .wrap { position: relative; flex-wrap: wrap; }
  .header-actions { order: 2; }
}

@media (max-width: 560px) {
  .hero { padding: 56px 0 40px; }
  .hero-actions { flex-direction: column; }
  .hero-meta { flex-wrap: wrap; row-gap: 8px; }
  .section { padding: 56px 0; }
}
