/* Hostnasi Security — landing page styles */

:root {
  --purple: #6d4fd1;
  --purple-dark: #5638b0;
  --purple-light: #efe9fd;
  --purple-tint: #8f73e8;
  --ink: #16131f;
  --ink-soft: #4a4659;
  --bg: #faf9fc;
  --bg-alt: #f1eef9;
  --card: #ffffff;
  --border: #e6e1f3;
  --good: #16a34a;
  --good-bg: #e8f8ee;
  --warn: #d97706;
  --warn-bg: #fef3e2;
  --bad: #dc2626;
  --bad-bg: #fdeaea;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(28, 14, 71, 0.08);
  --shadow-lg: 0 18px 48px rgba(28, 14, 71, 0.14);
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--purple-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--purple-light);
  color: var(--purple-dark);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  font-size: 0.92em;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  background: #1c1730;
  color: #f1eefb;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.88rem;
}
pre code { background: none; color: inherit; padding: 0; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--purple);
  color: #fff;
  padding: 0.7rem 1rem;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

h1, h2, h3, h4 {
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 800;
}
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.section { padding: 4.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { max-width: 640px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 6px 18px rgba(109, 79, 209, 0.35);
}
.btn-primary:hover { background: var(--purple-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--purple); color: var(--purple-dark); }

.btn-lg { padding: 0.9rem 1.7rem; font-size: 1.02rem; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.88rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-logo { height: 26px; width: auto; }
.brand-tag {
  font-size: 0.78rem;
  background: var(--purple-light);
  color: var(--purple-dark);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  gap: 1.6rem;
}
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.94rem;
}
.main-nav a:hover, .main-nav a.active { color: var(--purple-dark); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 0.8rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(circle at 85% -10%, rgba(109, 79, 209, 0.16), transparent 55%),
    linear-gradient(180deg, #fbfaff 0%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--purple-dark);
  margin-bottom: 0.6em;
}

.hero h1 { font-size: clamp(2rem, 4vw, 2.85rem); }
.hero .lead { font-size: 1.1rem; max-width: 56ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.6rem 0 1rem; }
.hero-meta { font-size: 0.85rem; color: var(--ink-soft); }

.hero-visual { display: flex; justify-content: center; }

.score-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 1.8rem;
  width: 100%;
  max-width: 380px;
}
.score-card hr { border: none; border-top: 1px dashed var(--border); margin: 1.3rem 0; }
.score-card-title { font-weight: 700; color: var(--ink); margin-bottom: 0.7em; }
.score-card-note { font-size: 0.85rem; margin: 0.6em 0 0; }

.score-row { display: flex; align-items: center; gap: 1rem; }

.score-ring {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  border: 5px solid;
}
.score-ring-bad { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }
.score-ring-warn { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.score-ring-good { border-color: var(--good); color: var(--good); background: var(--good-bg); }

.score-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  overflow: hidden;
}
.score-bar { height: 100%; border-radius: 999px; }
.score-bar-bad { background: var(--bad); }
.score-bar-good { background: var(--good); }

/* ---------- Stats ---------- */
.stats { padding: 2.2rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--card); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stat { display: flex; flex-direction: column; gap: 0.3rem; }
.stat-num { font-size: 1.9rem; font-weight: 800; color: var(--purple-dark); }
.stat-label { font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin: 2.2rem 0;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.feature-card h3 { margin-bottom: 0.3em; }
.feature-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--purple-dark);
  margin-bottom: 0.9em;
}
.feature-card ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.93rem; }
.feature-card li { margin-bottom: 0.4em; }

.builtin-title { margin-top: 2.5rem; }
.check-list { padding-left: 1.2rem; color: var(--ink-soft); }
.check-list li { margin-bottom: 0.5em; }
.check-list.two-col {
  columns: 2;
  column-gap: 2.5rem;
}

/* ---------- Dashboard section ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.legend-list { list-style: none; padding: 0; margin: 0 0 1em; }
.legend-list li { display: flex; align-items: center; gap: 0.6em; margin-bottom: 0.5em; color: var(--ink-soft); }
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.dot-good { background: var(--good); }
.dot-warn { background: var(--warn); }
.dot-bad { background: var(--bad); }

.callout {
  border-left: 4px solid var(--warn);
  background: var(--warn-bg);
  padding: 0.8rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  color: #7a4d05;
}

.dashboard-mock { display: flex; justify-content: center; }
.mock-window {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-titlebar {
  display: flex;
  gap: 6px;
  padding: 0.7rem 0.9rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.mock-titlebar span { width: 10px; height: 10px; border-radius: 50%; background: #d8d2ec; }
.mock-body { padding: 1.4rem; }
.mock-score { text-align: center; margin-bottom: 1.2rem; }
.mock-score .score-ring { margin: 0 auto 0.5rem; }
.mock-score p { margin: 0; font-weight: 700; color: var(--warn); font-size: 0.85rem; }

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  gap: 0.8rem;
}
.mock-row:last-of-type { border-bottom: none; }

.mock-btn {
  background: var(--good);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: default;
  flex: none;
}

.mock-info {
  margin-top: 1rem;
  background: var(--good-bg);
  color: #156238;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.83rem;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.badge-good { background: var(--good-bg); color: #146c38; }
.badge-warn { background: var(--warn-bg); color: #93620a; }
.badge-manual { background: #ece8f7; color: #5a4f88; }
.badge-muted { background: var(--bg-alt); color: var(--ink-soft); font-weight: 700; }
.badge-critical { background: var(--bad-bg); color: #a31c1c; }
.badge-high { background: var(--warn-bg); color: #93620a; }

/* ---------- Installation ---------- */
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0 2.5rem;
}
.install-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow);
}
.install-badge {
  position: absolute;
  top: -11px;
  left: 1.5rem;
  background: var(--purple);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}
.install-card ol { padding-left: 1.2rem; color: var(--ink-soft); }
.install-card li { margin-bottom: 0.5em; }

.table-wrap { margin: 2rem 0; overflow-x: auto; }
.req-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.req-table th, .req-table td {
  text-align: left;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.req-table th { background: var(--purple-light); color: var(--purple-dark); font-weight: 800; }
.req-table tr:last-child td { border-bottom: none; }

.cta-inline { text-align: center; margin: 2.5rem 0; }

/* ---------- Accordion ---------- */
.accordion {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--purple);
  flex: none;
}
.accordion[open] summary::after { content: "\2212"; }
.accordion summary .badge { margin-left: auto; }
.accordion summary span.badge { margin-left: 0; }
.accordion-body {
  padding: 0 1.4rem 1.4rem;
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}
.accordion-body h4 { margin-top: 1.3em; }
.accordion-body h4:first-child { margin-top: 0; }
.accordion-body ol { padding-left: 1.2rem; color: var(--ink-soft); }
.accordion-body li { margin-bottom: 0.4em; }

.check-item { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.check-item:last-child { border-bottom: none; }
.check-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; margin-bottom: 0.35em; }
.check-item p { margin: 0; font-size: 0.93rem; }

.security-note {
  font-size: 0.88rem;
  background: var(--purple-light);
  color: var(--purple-dark);
  padding: 1rem 1.2rem;
  border-radius: 10px;
  margin-top: 1.5rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--purple) 0%, var(--purple-tint) 100%);
  color: #fff;
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2, .cta-band p { color: #fff; margin: 0; }
.cta-band p { opacity: 0.9; }
.cta-band .btn-primary { background: #fff; color: var(--purple-dark); box-shadow: 0 10px 26px rgba(0,0,0,0.18); }
.cta-band .btn-primary:hover { background: #f3effd; }

/* ---------- Footer ---------- */
.site-footer { background: #1c1730; color: #cfc9e6; padding: 3.5rem 0 1.5rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-brand .brand-logo { height: 24px; margin-bottom: 0.8rem; filter: brightness(1.15); }
.footer-brand p { color: #a39ec4; font-size: 0.9rem; max-width: 32ch; }
.footer-col h4 { color: #fff; font-size: 0.92rem; margin-bottom: 0.9em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.6em; }
.footer-col a { color: #b8b1d9; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #312a4f;
  padding-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #837db0;
}
.footer-bottom p { margin: 0; color: inherit; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-mock { order: -1; margin-bottom: 1rem; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .install-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav a { padding: 0.85rem 1.5rem; border-bottom: 1px solid var(--border); }
  .main-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .header-actions .btn-sm { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .check-list.two-col { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band-inner { text-align: center; justify-content: center; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
