/* Public marketing site stylesheet. Loaded after admin.css; shares
   resets / button / card / form rules and overrides where the
   public look needs to differ from the admin look.
   Color palette tuned for a hosting-product audience: deep blue
   primary, warm accent, lots of breathing room. No dependencies. */

:root {
  --c-bg: #fafbfc;
  --c-surface: #ffffff;
  --c-text: #111827;
  --c-muted: #6b7280;
  --c-border: #e5e7eb;
  --c-primary: #1e3a8a;
  --c-primary-hover: #172554;
  --c-accent: #f59e0b;
  --c-success: #10b981;
  --c-warn: #f59e0b;
}

body.public { background: var(--c-bg); color: var(--c-text); }

/* --- Public nav --- */
.public-nav {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 50;
}
.public-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 1em 1.5em;
  display: flex; align-items: center; gap: 2em;
}
.public-nav .brand {
  font-weight: 700; font-size: 1.25em; color: var(--c-text);
  text-decoration: none; letter-spacing: -0.01em;
}
.public-nav .links { flex: 1; display: flex; gap: 1.75em; }
.public-nav .links a {
  color: var(--c-muted); text-decoration: none; font-weight: 500;
  font-size: 0.95em; padding: 0.25em 0;
}
.public-nav .links a:hover { color: var(--c-text); }
.public-nav .links a.active { color: var(--c-primary); }
.public-nav .user { display: flex; gap: 0.75em; }

/* --- Buttons (public-grade) --- */
.btn { display: inline-block; padding: 0.55em 1.1em; border-radius: 6px; font-weight: 500;
       font-size: 0.95em; line-height: 1.2; text-decoration: none; border: 1px solid transparent;
       cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.btn.primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn.primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.btn.ghost { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn.ghost:hover { background: #f3f4f6; }
.btn.lg { padding: 0.75em 1.4em; font-size: 1.05em; }
.btn.full { width: 100%; text-align: center; }

/* --- Hero --- */
.hero { padding: 5em 1.5em 3em; }
.hero-inner {
  max-width: 880px; margin: 0 auto; text-align: center;
}
.hero h1 {
  font-size: clamp(2em, 5vw, 3.4em); line-height: 1.1; margin: 0 0 0.5em;
  letter-spacing: -0.02em; font-weight: 700;
}
.hero .lead {
  font-size: 1.2em; color: var(--c-muted); max-width: 640px; margin: 0 auto 1.75em;
  line-height: 1.55;
}
.cta-row { display: flex; gap: 0.75em; justify-content: center; flex-wrap: wrap; margin-bottom: 1em; }

/* --- Sections --- */
.section { padding: 4em 1.5em; }
.section.alt { background: var(--c-surface); border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); text-align: center; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-inner.narrow { max-width: 740px; }
.section h2 {
  font-size: 1.8em; margin: 0 0 1em; letter-spacing: -0.01em;
}
.section.alt h2 { margin-bottom: 0.5em; }
.section h3 { margin-top: 1.5em; }
.section .lead { font-size: 1.1em; color: var(--c-muted); max-width: 640px; margin: 0 auto 1.5em; }

/* --- Three-col card grid --- */
.three-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5em; }
.three-col .card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px;
  padding: 1.5em; box-shadow: 0 1px 2px rgba(0,0,0,0.02); margin: 0;
}
.three-col h3 { margin: 0 0 0.5em; font-size: 1.15em; color: var(--c-primary); }
.three-col p { margin: 0; color: var(--c-muted); line-height: 1.6; }

/* --- Checklist --- */
.checklist { list-style: none; padding: 0; columns: 2; column-gap: 2em; }
.checklist li { padding: 0.4em 0 0.4em 1.5em; position: relative; break-inside: avoid; line-height: 1.45; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; color: var(--c-success); font-weight: 700;
}
@media (max-width: 700px) { .checklist { columns: 1; } }

/* --- Page header --- */
.page-header { background: var(--c-surface); border-bottom: 1px solid var(--c-border); padding: 3em 1.5em; }
.page-header-inner { max-width: 880px; margin: 0 auto; }
.page-header h1 { margin: 0 0 0.4em; font-size: 2.2em; letter-spacing: -0.01em; }
.page-header .lead { color: var(--c-muted); font-size: 1.1em; max-width: 640px; }

/* --- Pricing --- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5em; }
.plan-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px;
  padding: 2em 1.75em; box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  display: flex; flex-direction: column;
}
.plan-card.main { border-color: var(--c-primary); border-width: 2px; }
.plan-card h2 { margin: 0; font-size: 1.4em; }
.plan-card .tagline { margin: 0.25em 0 1.25em; color: var(--c-muted); font-size: 0.95em; }
.plan-card .price { margin: 0.5em 0 1em; }
.plan-card .price .amount { font-size: 2.2em; font-weight: 700; letter-spacing: -0.01em; }
.plan-card .price .period { color: var(--c-muted); margin-left: 0.25em; }
.plan-card .trial-banner {
  background: #fef3c7; color: #92400e; padding: 0.5em 0.75em; border-radius: 6px;
  font-size: 0.85em; margin: 0 0 1em; text-align: center;
}
.plan-card .desc { color: var(--c-muted); line-height: 1.55; margin: 0 0 1em; }
.plan-card .bullets { list-style: none; padding: 0; margin: 0 0 1.5em; }
.plan-card .bullets li {
  padding: 0.4em 0 0.4em 1.5em; position: relative; line-height: 1.45;
  font-size: 0.95em;
}
.plan-card .bullets li::before {
  content: "✓"; position: absolute; left: 0; color: var(--c-success); font-weight: 700;
}
.plan-card .full { margin-top: auto; }
.plan-card .center { text-align: center; margin-top: 0.75em; }
.muted { color: var(--c-muted); }

/* --- Card variations --- */
.card.warn { background: #fffbeb; border-color: #fde68a; }

/* --- Footer --- */
.public-foot { background: #0f172a; color: #cbd5e1; padding: 3em 1.5em 2em; margin-top: 4em; }
.public-foot a { color: #cbd5e1; }
.public-foot a:hover { color: #fff; }
.public-foot-inner { max-width: 1100px; margin: 0 auto; }
.public-foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2em; margin-bottom: 2em; }
.public-foot .cols div { display: flex; flex-direction: column; gap: 0.4em; }
.public-foot .cols strong { color: #fff; margin-bottom: 0.25em; font-size: 0.9em; text-transform: uppercase; letter-spacing: 0.05em; }
.public-foot .cols a, .public-foot .cols .linkish { color: #94a3b8; text-decoration: none; font-size: 0.95em; }
.public-foot .cols a:hover { color: #fff; }
.public-foot .copyright { color: #64748b; border-top: 1px solid #1e293b; padding-top: 1.5em; }

/* --- Docs --- */
.docs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25em; }
.docs-card {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px;
  padding: 1.5em; text-decoration: none; color: inherit; transition: transform 0.1s, box-shadow 0.1s;
  display: block;
}
.docs-card:hover {
  transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  border-color: var(--c-primary);
}
.docs-card h3 { margin: 0 0 0.5em; color: var(--c-primary); font-size: 1.1em; }
.docs-card p { margin: 0; color: var(--c-muted); font-size: 0.95em; line-height: 1.5; }

.docs-layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 0;
  max-width: 1200px; margin: 0 auto; min-height: 70vh;
}
.docs-sidebar {
  background: var(--c-surface); border-right: 1px solid var(--c-border);
  padding: 2em 0;
}
.docs-sidebar-inner { padding: 0 1.5em; position: sticky; top: 5em; }
.docs-sidebar .docs-back {
  display: block; color: var(--c-muted); font-size: 0.9em; margin-bottom: 1.5em;
  text-decoration: none;
}
.docs-sidebar .docs-back:hover { color: var(--c-text); }
.docs-sidebar nav { display: flex; flex-direction: column; gap: 0.4em; }
.docs-sidebar nav a {
  color: var(--c-text); text-decoration: none; padding: 0.4em 0.6em; border-radius: 4px;
  font-size: 0.95em; line-height: 1.3;
}
.docs-sidebar nav a:hover { background: #f3f4f6; }
.docs-sidebar nav a.active { background: var(--c-primary); color: #fff; }

.docs-article { padding: 2.5em 1.5em 4em; }
.docs-article-inner { max-width: 760px; margin: 0 auto; line-height: 1.7; }
.docs-article h1 { font-size: 2.2em; margin-top: 0; letter-spacing: -0.01em; }
.docs-article h2 { font-size: 1.5em; margin-top: 2em; padding-bottom: 0.3em; border-bottom: 1px solid var(--c-border); }
.docs-article h3 { font-size: 1.2em; margin-top: 1.75em; }
.docs-article p, .docs-article li { font-size: 1.02em; }
.docs-article ul, .docs-article ol { padding-left: 1.5em; }
.docs-article code {
  background: #f3f4f6; padding: 0.15em 0.4em; border-radius: 3px;
  font-size: 0.92em;
}
.docs-article pre {
  background: #0f172a; color: #e2e8f0; padding: 1em 1.25em; border-radius: 8px;
  overflow-x: auto; line-height: 1.5; margin: 1em 0;
}
.docs-article pre code { background: transparent; padding: 0; color: inherit; font-size: 0.9em; }
.docs-article blockquote {
  border-left: 3px solid var(--c-primary); padding-left: 1em; margin-left: 0;
  color: var(--c-muted); font-style: italic;
}
.docs-article table { border-collapse: collapse; margin: 1em 0; }
.docs-article table th, .docs-article table td { border: 1px solid var(--c-border); padding: 0.5em 0.8em; }
.docs-article table th { background: #f9fafb; }
.docs-article a { color: var(--c-primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.docs-article a:hover { text-decoration-thickness: 2px; }

@media (max-width: 800px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { border-right: none; border-bottom: 1px solid var(--c-border); padding: 1em 0; }
  .docs-sidebar-inner { position: static; }
  .docs-sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 0.25em; }
}

/* --- Mobile --- */
@media (max-width: 700px) {
  .public-nav-inner { flex-wrap: wrap; gap: 1em; }
  .public-nav .links { order: 3; flex-basis: 100%; gap: 1em; flex-wrap: wrap; }
  .hero { padding: 3em 1em 2em; }
  .section { padding: 2.5em 1em; }
}
