/* ==========================================================================
   pgDesktop — Obsidian Dark Theme
   ========================================================================== */

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

:root {
  --bg:          #0a0f1a;
  --bg-surface:  #111827;
  --card-bg:     #161e2d;
  --card-border: #1e2a3e;
  --primary:     #336791;
  --primary-l:   #4a8cc2;
  --primary-d:   #264d6e;
  --accent:      #5ba7e6;
  --text:        #e2e8f0;
  --text-muted:  #8899aa;
  --text-dim:    #556677;
  --success:     #22c55e;
  --warning:     #f59e0b;
  --radius:      0.625rem;
  --radius-lg:   1rem;
  --shadow-glow: 0 0 30px rgba(51, 103, 145, 0.25);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--primary-l); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

ul { list-style: none; }

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* ==========================================================================
   Header
   ========================================================================== */

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

#site-header nav {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--text); }
.logo strong { font-weight: 700; }
.logo-icon {
  color: var(--primary-l);
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  margin-left: 1rem;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}
.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}


/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  padding: 0.625rem 1.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-l);
  color: #fff;
  box-shadow: 0 0 20px rgba(51, 103, 145, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--text);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn-block { width: 100%; }


/* ==========================================================================
   Hero
   ========================================================================== */

#hero {
  padding: 6rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero-content h1 em {
  font-style: normal;
  color: var(--primary-l);
}

.hero-sub {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 32rem;
  line-height: 1.7;
}

.hero-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.platform-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Hero mock window */
.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-window {
  width: 100%;
  max-width: 28rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--card-border);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red   { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #28c840; }
.window-title {
  margin-left: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.window-body {
  padding: 1.25rem 1.5rem;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
}
.code-line .kw  { color: var(--primary-l); font-weight: 600; }
.code-line .num { color: var(--success); }
.result-bar {
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
}


/* ==========================================================================
   Section Titles
   ========================================================================== */

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  color: #fff;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 36rem;
  margin: 0.75rem auto 0;
  line-height: 1.7;
}


/* ==========================================================================
   Features
   ========================================================================== */

#features {
  padding: 5rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}


/* ==========================================================================
   Comparison Table
   ========================================================================== */

#comparison {
  padding: 5rem 0;
}

.table-wrapper {
  margin-top: 3rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
}

table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

thead {
  background: var(--bg-surface);
}

th, td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

th {
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

td {
  color: var(--text-muted);
}

.highlight-col {
  background: rgba(51, 103, 145, 0.08);
  color: #fff !important;
}

th.highlight-col {
  color: var(--primary-l) !important;
}

.badge-native {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  background: var(--primary);
  color: #fff;
  vertical-align: middle;
  margin-left: 0.4rem;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }


/* ==========================================================================
   Pricing
   ========================================================================== */

#pricing {
  padding: 5rem 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  align-items: start;
}

.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.pricing-card:hover {
  border-color: var(--primary);
}

/* Popular card */
.pricing-card-popular {
  border-color: var(--primary);
  box-shadow: 0 0 40px rgba(51, 103, 145, 0.3), 0 0 80px rgba(51, 103, 145, 0.1);
  transform: scale(1.03);
  z-index: 2;
}

.popular-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 1rem;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-header {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--card-border);
  margin-bottom: 1.5rem;
}

.pricing-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.price {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.currency {
  font-size: 1.5rem;
  font-weight: 600;
  vertical-align: top;
  margin-right: 0.1rem;
  color: var(--text-muted);
}
.price-unit {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-period {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

.pricing-features {
  flex: 1;
  margin-bottom: 2rem;
}
.pricing-features li {
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding-left: 1.5rem;
  position: relative;
}
.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}
.pricing-features li strong {
  color: var(--text);
}


/* ==========================================================================
   CTA
   ========================================================================== */

#cta {
  padding: 5rem 0 6rem;
}

.cta-content {
  text-align: center;
}

.cta-content h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.cta-content p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin: 0.75rem 0 2rem;
}


/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  border-top: 1px solid var(--card-border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-size: 1rem;
  color: var(--text-muted);
}
.footer-brand strong { color: var(--text); font-weight: 700; }

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text); }


/* ==========================================================================
   Sandbox Ribbon
   ========================================================================== */

.sandbox-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--warning);
  color: #0a0f1a;
  text-align: center;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.has-sandbox-ribbon {
  padding-top: 2rem;
}
body.has-sandbox-ribbon #site-header {
  top: 2rem;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 64rem) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-platforms { justify-content: center; }
  .hero-actions { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-card-popular { grid-column: span 2; max-width: 24rem; margin: 0 auto; }
}

@media (max-width: 48rem) {
  .nav-links, .nav-cta { display: none; }
  .mobile-menu-toggle { display: flex; }

  /* Mobile nav open */
  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--card-border);
    padding: 1.5rem;
    gap: 1rem;
    z-index: 99;
  }
  body.nav-open .nav-cta {
    display: inline-flex;
    position: fixed;
    top: calc(4rem + 8rem);
    left: 1.5rem;
    right: 1.5rem;
    z-index: 99;
    text-align: center;
    justify-content: center;
  }

  .features-grid { grid-template-columns: 1fr; }

  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card-popular {
    grid-column: span 1;
    max-width: none;
    transform: none;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  #hero { padding: 4rem 0 3rem; }
}

@media (max-width: 30rem) {
  .hero-content h1 { font-size: 2rem; }
  .hero-window { display: none; }
}
