/* ==========================================================================
   KeetonHosting design system — ported 1:1 from the app (src/styles.css).
   ========================================================================== */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #1a1b2e;
  --bg-tertiary: #252740;
  --accent-cyan: #00d4ff;
  --accent-purple: #7c3aed;
  --text-primary: #ffffff;
  --text-secondary: #a0a3b8;
  --text-muted: #6b6f8a;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
  --glow-cyan: rgba(0, 212, 255, 0.35);
  --glow-purple: rgba(124, 58, 237, 0.55);
  --maxw: 1280px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--bg-primary); scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(0, 212, 255, 0.3); color: #fff; }

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; line-height: 1.15; }

.kh-container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .kh-container { padding: 0 24px; } }
@media (min-width: 1024px) { .kh-container { padding: 0 32px; } }

.kh-mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.kh-gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.kh-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.kh-glow { box-shadow: 0 0 40px -10px var(--glow-cyan); }

@keyframes kh-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.kh-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--success);
  animation: kh-pulse 2s ease-in-out infinite;
}

/* ---------- Buttons ---------- */
.kh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.kh-btn-primary {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  box-shadow: 0 0 30px -8px var(--glow-cyan);
}
.kh-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 46px -6px var(--glow-cyan); }
.kh-btn-secondary {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-primary);
}
.kh-btn-secondary:hover { border-color: rgba(0, 212, 255, 0.35); color: var(--accent-cyan); }
.kh-btn-full { width: 100%; justify-content: center; }

/* ---------- Status pill ---------- */
.kh-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* ---------- Header ---------- */
.kh-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.kh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.kh-brand { display: flex; align-items: center; gap: 8px; }
.kh-brand img {
  width: 32px; height: 32px;
  border-radius: 8px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px var(--glow-purple));
}
.kh-brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.kh-brand .kh-logo-mobile { display: none; }

.kh-nav { display: none; align-items: center; gap: 28px; }
@media (min-width: 900px) { .kh-nav { display: flex; } }
.kh-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.kh-nav li { position: relative; }
.kh-nav a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.kh-nav a:hover,
.kh-nav .current-menu-item > a,
.kh-nav .current_page_item > a { color: var(--accent-cyan); }
.kh-nav .menu-item-has-children > a::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.kh-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: -12px;
  min-width: 226px;
  display: block;
  flex-direction: column;
  gap: 0;
  padding: 8px;
  margin-top: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.kh-nav li:hover > .sub-menu,
.kh-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.kh-nav .sub-menu li { width: 100%; }
.kh-nav .sub-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}
.kh-nav .sub-menu a:hover { background: var(--bg-tertiary); color: var(--text-primary); }

.kh-header-actions { display: flex; align-items: center; gap: 12px; }
.kh-shop-link { font-size: 14px; font-weight: 600; color: var(--accent-cyan); }
.kh-login-link { font-size: 14px; color: var(--text-secondary); }
.kh-login-link:hover { color: var(--text-primary); }
@media (max-width: 640px) { .kh-shop-link, .kh-login-link { display: none; } }
.kh-cart {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}
.kh-cart:hover { color: var(--accent-cyan); }

/* mobile menu */
.kh-burger {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}
@media (min-width: 900px) { .kh-burger { display: none; } }
.kh-mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
  padding: 12px 0 20px;
}
.kh-mobile-nav.is-open { display: block; }
@media (min-width: 900px) { .kh-mobile-nav.is-open { display: none; } }
.kh-mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.kh-mobile-nav > ul > li > a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.kh-mobile-nav .sub-menu { padding-left: 12px; border-left: 1px solid var(--border); margin-bottom: 8px; }
.kh-mobile-nav .sub-menu a { display: block; padding: 7px 0; font-size: 14px; color: var(--text-secondary); }

/* ---------- Hero ---------- */
.kh-hero, .kh-pagehero {
  position: relative; overflow: hidden; display: flex; align-items: center; min-height: 300px;
  /* Fallback painted behind .kh-hero-bg: if the banner image 404s or is slow,
     the hero shows the brand gradient instead of bare grid squares. */
  background-color: #0a0a0f;
  background-image: radial-gradient(120% 140% at 78% 42%, rgba(0, 212, 255, 0.32) 0%, rgba(124, 58, 237, 0.28) 42%, rgba(10, 10, 15, 0.96) 78%);
  background-repeat: no-repeat;
  background-size: cover;
}
@media (min-width: 640px) { .kh-hero, .kh-pagehero { min-height: 340px; } }
@media (min-width: 768px) { .kh-hero, .kh-pagehero { min-height: 380px; } }
@media (min-width: 1536px) { .kh-hero, .kh-pagehero { min-height: 400px; } }
.kh-hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: scroll;
  /* 3:1 banner: keep the focal artwork in frame on narrow, taller viewports */
  background-position: 80% center;
  opacity: 1;
  filter: brightness(1.35) saturate(1.15);
  pointer-events: none;
}
@media (max-width: 479px) {
  .kh-hero-bg { background-position: 88% center; filter: brightness(1.5) saturate(1.2); }
}
@media (min-width: 768px) {
  .kh-hero-bg { background-position: center center; opacity: 1; }
}
@media (min-width: 1536px) {
  .kh-hero-bg { background-size: cover; background-position: center center; }
}
.kh-hero-veil {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(10, 10, 15, 0.30), rgba(10, 10, 15, 0.72));
}
.kh-hero > .kh-grid-bg,
.kh-pagehero > .kh-grid-bg { display: none; }
.kh-hero-inner { position: relative; width: 100%; padding: 64px 0 48px; text-align: center; }
@media (min-width: 768px) { .kh-hero-inner { padding: 88px 0 64px; } }

.kh-hero h1 {
  margin-top: 24px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
@media (min-width: 768px) { .kh-hero h1 { font-size: 64px; } }
.kh-hero p.kh-lede {
  margin: 24px auto 0;
  max-width: 640px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.kh-hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.kh-hero-meta {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 8px 24px;
}

/* Page hero (interior pages) — sized by its content, no forced dead space */
.kh-pagehero { border-bottom: 1px solid var(--border); min-height: 0; }
@media (min-width: 640px) { .kh-pagehero { min-height: 0; } }
@media (min-width: 768px) { .kh-pagehero { min-height: 0; } }
@media (min-width: 1536px) { .kh-pagehero { min-height: 0; } }
.kh-pagehero .kh-hero-inner { padding: 48px 0 28px; text-align: center; }

.kh-pagehero h1 { margin-top: 16px; font-size: 36px; font-weight: 700; letter-spacing: -0.02em; }
@media (min-width: 768px) { .kh-pagehero h1 { font-size: 48px; } }
.kh-pagehero p.kh-lede { margin: 18px auto 0; max-width: 680px; }
.kh-pagehero .kh-hero-actions,
.kh-pagehero .kh-hero-meta { justify-content: center; }
.kh-pagehero .kh-content { text-align: left; }

/* First section after a hero hugs it instead of leaving a large void. */
.kh-hero + .kh-section,
.kh-pagehero + .kh-section { padding-top: 24px; }
@media (min-width: 768px) {
  .kh-hero + .kh-section,
  .kh-pagehero + .kh-section { padding-top: 32px; }
}


/* ---------- Terminal card ---------- */
.kh-terminal { position: relative; max-width: 768px; margin: 64px auto 0; }
.kh-terminal-box {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  text-align: left;
}
.kh-terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.kh-tdot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.kh-terminal-body {
  padding: 20px 24px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.kh-terminal-grid { display: grid; grid-template-columns: 1fr; gap: 2px 24px; margin-top: 12px; }
@media (min-width: 640px) { .kh-terminal-grid { grid-template-columns: 1fr 1fr; } }
.kh-terminal-grid span.ok { color: var(--success); text-transform: uppercase; }

/* ---------- Sections & cards ---------- */
.kh-section { padding: 80px 0; }
@media (min-width: 768px) { .kh-section { padding: 96px 0; } }
.kh-section-tight { padding: 48px 0; }
.kh-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
.kh-h2 { margin-top: 12px; font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
@media (min-width: 768px) { .kh-h2 { font-size: 40px; } }
.kh-sub { margin-top: 16px; color: var(--text-secondary); }
.kh-center { text-align: center; }
.kh-maxw2 { max-width: 640px; }
.kh-maxw2.kh-center { margin-left: auto; margin-right: auto; }

.kh-grid { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 768px) { .kh-grid-2 { grid-template-columns: repeat(2, 1fr); } .kh-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .kh-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.kh-card {
  display: block;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 24px;
  transition: transform .2s ease, border-color .2s ease;
}
a.kh-card:hover { transform: translateY(-2px); border-color: rgba(0, 212, 255, 0.25); }
.kh-card-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--accent-cyan);
  font-size: 18px;
}
.kh-card h3 { margin-top: 20px; font-size: 20px; font-weight: 600; }
.kh-card p { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.kh-card .kh-explore { margin-top: 16px; display: inline-flex; gap: 6px; }

/* metrics */
.kh-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 48px 0; }
@media (min-width: 768px) { .kh-metrics { grid-template-columns: repeat(4, 1fr); } }
.kh-metric-value { font-size: 32px; font-weight: 600; letter-spacing: -0.01em; }

/* plans */
.kh-plan {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 24px;
}
@media (min-width: 768px) { .kh-plan { padding: 32px; } }
.kh-plan.is-featured { border-color: rgba(0, 212, 255, 0.35); box-shadow: 0 0 40px -10px var(--glow-cyan); }
.kh-plan-badge {
  position: absolute; top: -12px; left: 24px;
  border-radius: 999px;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  padding: 4px 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
}
.kh-plan-price { margin-top: 24px; display: flex; align-items: baseline; gap: 4px; }
.kh-plan-price strong { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
.kh-plan-price span { color: var(--text-muted); }
.kh-list { list-style: none; margin: 24px 0 0; padding: 0; }
.kh-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 15px; margin: 12px 0; color: var(--text-secondary);
}
.kh-check { color: var(--accent-cyan); font-weight: 700; }
.kh-plan .kh-btn { margin-top: 32px; }

/* status board */
.kh-status-board {
  margin-top: 40px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.kh-status-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.kh-status-row + .kh-status-row { border-top: 1px solid var(--border); }
.kh-status-ok {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--success);
}

/* feature panel / CTA */
.kh-panel {
  position: relative; overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 40px 24px;
}
@media (min-width: 768px) { .kh-panel { padding: 64px; } }
.kh-panel-inner { position: relative; max-width: 640px; }
.kh-split { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 768px) { .kh-split { grid-template-columns: 1.2fr 1fr; } }
.kh-tick {
  display: flex; align-items: center; gap: 12px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-primary);
  padding: 12px 16px; font-size: 15px;
}

/* ---------- Footer ---------- */
.kh-footer { border-top: 1px solid var(--border); }
.kh-footer-inner { padding: 56px 0; }
.kh-footer-grid { display: grid; gap: 40px; }
@media (min-width: 768px) { .kh-footer-grid { grid-template-columns: repeat(4, 1fr); } }
.kh-footer h4 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-secondary); font-weight: 500;
}
.kh-footer ul { list-style: none; margin: 16px 0 0; padding: 0; }
.kh-footer li { margin: 10px 0; }
.kh-footer li a { font-size: 14px; color: var(--text-secondary); }
.kh-footer li a:hover { color: var(--accent-cyan); }
.kh-footer-bottom {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
  align-items: flex-start; justify-content: space-between;
}
@media (min-width: 768px) { .kh-footer-bottom { flex-direction: row; align-items: center; } }

/* ---------- WordPress content ---------- */
.kh-content { color: var(--text-secondary); font-size: 16px; line-height: 1.7; }
.kh-content h1, .kh-content h2, .kh-content h3, .kh-content h4 {
  color: var(--text-primary); font-weight: 700; margin: 2em 0 .6em; line-height: 1.2;
}
.kh-content h1 { font-size: 2rem; }
.kh-content h2 { font-size: 1.5rem; }
.kh-content h3 { font-size: 1.25rem; }
.kh-content h4 { font-size: 1.05rem; }
.kh-content p { margin: 1em 0; }
.kh-content strong { color: var(--text-primary); font-weight: 600; }
.kh-content a { color: var(--accent-cyan); }
.kh-content a:hover { text-decoration: underline; }
.kh-content ul, .kh-content ol { margin: 1em 0; padding-left: 1.5em; }
.kh-content ul { list-style: disc; }
.kh-content ol { list-style: decimal; }
.kh-content li { margin: .35em 0; }
.kh-content li::marker { color: var(--accent-cyan); }
.kh-content blockquote {
  border-left: 3px solid var(--accent-cyan);
  padding: .25em 1em; margin: 1.5em 0;
  color: var(--text-primary); background: var(--bg-secondary);
  border-radius: 0 8px 8px 0;
}
.kh-content code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .9em; background: var(--bg-secondary);
  border: 1px solid var(--border); padding: .1em .4em;
  border-radius: 4px; color: var(--accent-cyan);
}
.kh-content pre {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 8px; padding: 1em; overflow-x: auto; margin: 1.5em 0;
}
.kh-content pre code { background: transparent; border: 0; padding: 0; color: var(--text-primary); }
.kh-content img { border-radius: 8px; border: 1px solid var(--border); margin: 1.5em 0; }
.kh-content hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.kh-content table {
  width: 100%; border-collapse: collapse; margin: 1.5em 0;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.kh-content th, .kh-content td { padding: .75em 1em; border-bottom: 1px solid var(--border); text-align: left; }
.kh-content th { background: var(--bg-secondary); color: var(--text-primary); font-weight: 600; }

/* Reseller Store plugin output, themed */
.rstore-product,
.rstore-domain-search,
.rstore-cart { color: var(--text-secondary); }
.rstore-product .rstore-product-title { color: var(--text-primary); }
.rstore button,
.rstore-product button,
.rstore-domain-search button,
input[type="submit"].rstore-button {
  background: var(--accent-cyan) !important;
  color: var(--bg-primary) !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  padding: 11px 20px !important;
}
.rstore input[type="text"],
.rstore-domain-search input[type="text"] {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: 10px !important;
  padding: 11px 14px !important;
}

/* screen-reader */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ==========================================================================
   Gradient headings — applied site-wide (v2.3.0)
   ========================================================================== */
.kh-hero h1,
.kh-pagehero h1,
.kh-h2,
.kh-content h1,
.kh-content h2,
.kh-content h3,
.kh-panel-inner h2,
.kh-plan h3 {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* keep descenders from clipping on gradient text */
  padding-bottom: 0.08em;
}

/* nested gradient span inside an already-gradient heading must not double up */
.kh-hero h1 .kh-gradient-text,
.kh-pagehero h1 .kh-gradient-text,
.kh-h2 .kh-gradient-text {
  background: none;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
}
