/* PowerWAF Landing Pages — Shared Styles */

/* ── Reset & Base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary: #2e8555;
  --color-primary-hover: #257a4a;
  --color-cta: #25c281;
  --color-cta-hover: #1ea86e;
  --color-danger: #dc3545;
  --color-bg: #fff;
  --color-bg-alt: #f8f9fa;
  --color-text: #1c1e21;
  --color-text-secondary: #555;
  --color-text-muted: #666;
  --color-border: #e0e0e0;
  --color-card-bg: #fff;
  --color-card-shadow: rgba(0, 0, 0, 0.06);
  --color-card-shadow-hover: rgba(0, 0, 0, 0.1);
  --color-code-bg: #fff3f3;
  --color-code-text: #c0392b;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;
  --max-width: 1100px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1b1b1d;
    --color-bg-alt: #242526;
    --color-text: #e3e3e3;
    --color-text-secondary: #bbb;
    --color-text-muted: #aaa;
    --color-border: #444;
    --color-card-bg: #242526;
    --color-card-shadow: rgba(0, 0, 0, 0.2);
    --color-card-shadow-hover: rgba(0, 0, 0, 0.35);
    --color-code-bg: #3a2020;
    --color-code-text: #f5a0a0;
  }
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Minimal Header ──────────────────────────────── */
.lp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.lp-header-logo img {
  height: 32px;
  width: auto;
}

.lp-header-cta {
  display: inline-block;
  background: var(--color-cta);
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}
.lp-header-cta:hover { background: var(--color-cta-hover); color: #fff; text-decoration: none; }

/* ── Hero ────────────────────────────────────────── */
.hero {
  padding: 5rem 0;
  text-align: center;
  background: rgb(2, 93, 121);
  background: radial-gradient(circle, rgba(2, 93, 121, 1) 0%, rgba(0, 52, 76, 1) 100%);
  color: #fff;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  background: var(--color-cta);
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover {
  background: var(--color-cta-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.hero-limited {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.75;
  letter-spacing: 0.3px;
}

/* ── Sections ────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-alt { padding: 4rem 0; background: var(--color-bg-alt); }

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* ── Threat Intro ────────────────────────────────── */
.threat-intro {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.threat-intro p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.owasp-badge {
  display: inline-block;
  background: var(--color-danger);
  color: #fff;
  padding: 0.3rem 0.9rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.stat {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-danger);
  display: block;
  margin: 1.5rem 0 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* ── Card Grids ──────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (max-width: 996px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

/* 5-card grid: last 2 cards centered */
.card-grid-five {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (min-width: 997px) {
  .card-grid-five {
    grid-template-columns: repeat(6, 1fr);
  }
  .card-grid-five > :nth-child(1) { grid-column: 1 / 3; }
  .card-grid-five > :nth-child(2) { grid-column: 3 / 5; }
  .card-grid-five > :nth-child(3) { grid-column: 5 / 7; }
  .card-grid-five > :nth-child(4) { grid-column: 2 / 4; }
  .card-grid-five > :nth-child(5) { grid-column: 4 / 6; }
}
@media (max-width: 996px) { .card-grid-five { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid-five { grid-template-columns: 1fr; } }

/* ── Attack Cards (red accent) ───────────────────── */
.attack-card {
  background: var(--color-card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid var(--color-danger);
  box-shadow: 0 2px 8px var(--color-card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.attack-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--color-card-shadow-hover);
}
.attack-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.attack-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.attack-card p { font-size: 0.9rem; color: var(--color-text-secondary); margin-bottom: 0.6rem; line-height: 1.5; }
.attack-example {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  display: block;
  overflow-x: auto;
}

/* ── Solution Cards (green accent) ───────────────── */
.solution-card {
  background: var(--color-card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 2px 8px var(--color-card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.solution-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--color-card-shadow-hover);
}
.solution-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.solution-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; color: var(--color-primary); }
.solution-card p { font-size: 0.9rem; color: var(--color-text-secondary); line-height: 1.5; }
.solution-maps { font-size: 0.8rem; color: #888; margin-top: 0.5rem; font-style: italic; }

/* ── Deploy Steps ────────────────────────────────── */
.deploy-steps {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.deploy-step {
  text-align: center;
  flex: 1;
  min-width: 200px;
  max-width: 260px;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.deploy-step h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.deploy-step p { font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.5; }

.deploy-arrow {
  font-size: 1.5rem;
  color: var(--color-primary);
  padding-top: 1rem;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .deploy-steps { flex-direction: column; align-items: center; }
  .deploy-arrow { transform: rotate(90deg); padding-top: 0; }
}

.deploy-highlight {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* ── FAQ Accordion ───────────────────────────────── */
.faq-section {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  padding: 1.2rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: #888;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] summary::after { content: '\2212'; }

.faq-answer {
  padding: 0 0 1.2rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ── CTA Section ─────────────────────────────────── */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  background: rgb(2, 93, 121);
  background: radial-gradient(circle, rgba(2, 93, 121, 1) 0%, rgba(0, 52, 76, 1) 100%);
  color: #fff;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.cta-limited {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  opacity: 0.7;
  letter-spacing: 0.3px;
}

/* ── Footer ──────────────────────────────────────── */
.lp-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.lp-footer a { color: var(--color-primary); }

.lp-footer-eu {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

/* ── Breadcrumbs ─────────────────────────────────── */
.breadcrumbs {
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-bg);
}

.breadcrumbs a { color: var(--color-primary); }
.breadcrumbs span { margin: 0 0.4rem; color: var(--color-border); }

/* ── Attack Log Visualization ────────────────────── */
.attack-log {
  max-width: 720px;
  margin: 0 auto;
  background: #0d1117;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.attack-log-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}

.attack-log-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.attack-log-dot--red { background: #ff5f57; }
.attack-log-dot--yellow { background: #febc2e; }
.attack-log-dot--green { background: #28c840; }

.attack-log-title {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: #8b949e;
  font-family: var(--font-mono);
}

.attack-log-body {
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.8;
  overflow-x: auto;
  color: #c9d1d9;
}

.log-time { color: #8b949e; }
.log-blocked { color: #f85149; font-weight: 700; }
.log-allowed { color: #3fb950; font-weight: 700; }
.log-ip { color: #d2a8ff; }
.log-path { color: #79c0ff; }
.log-label { color: #8b949e; }

.attack-log-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 1.5rem;
  font-style: italic;
}

/* ── OWASP Reference ────────────────────────────── */
.owasp-refs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.owasp-ref-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.owasp-ref-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

/* ── Stats Cards ─────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto 3rem;
}

@media (max-width: 600px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  text-align: center;
  background: var(--color-card-bg);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  box-shadow: 0 2px 8px var(--color-card-shadow);
}

.stat-card-number {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.stat-card-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ── Real-World Scenarios ────────────────────────── */
.scenarios-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--color-text-muted);
}

.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto 3rem;
}

@media (max-width: 996px) { .scenarios-grid { grid-template-columns: 1fr; } }

.scenario-card {
  background: var(--color-card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 2px 8px var(--color-card-shadow);
}

.scenario-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--color-text);
}

.scenario-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin: 0;
}

.scenario-card code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

/* ── Compatible Platforms ────────────────────────── */
.compat-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--color-text-muted);
}

.compat-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 800px;
  margin: 0 auto;
}

.compat-item {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg);
}

/* ── Related Pages ───────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (max-width: 996px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .related-grid { grid-template-columns: 1fr; } }

.related-link {
  display: block;
  background: var(--color-card-bg);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 8px var(--color-card-shadow);
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--color-primary);
}

.related-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--color-card-shadow-hover);
  text-decoration: none;
  color: var(--color-text);
}

.related-link h3 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: var(--color-primary);
}

.related-link p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Responsive Hero ─────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 3rem 1rem; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1.05rem; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 1.7rem; }
  .section { padding: 3rem 0; }
  .section-alt { padding: 3rem 0; }
  .cta-section { padding: 3.5rem 0; }
  .stat-card-number { font-size: 2rem; }
}
