/* ============================================================
   PROXYREALM — HOMEPAGE STYLES
   Matches panel design system (Linear/Vercel/Stripe inspired)
   ============================================================ */

:root {
  --pr-bg:        #f5f5f3;
  --pr-surface:   #ffffff;
  --pr-surface-2: #faf9f7;
  --pr-hover:     #efefed;

  --pr-border:    #e6e6e3;
  --pr-border-2:  #d8d8d4;

  --pr-text:        #0a0a0a;
  --pr-text-2:      #1a1a19;
  --pr-text-muted:  #555550;
  --pr-text-dim:    #87877f;

  --pr-accent:        #5e6ad2;
  --pr-accent-hover:  #4d57b8;
  --pr-accent-soft:   #eef0fc;
  --pr-accent-tint:   rgba(94, 106, 210, 0.10);

  --pr-shadow-xs: 0 1px 2px rgba(15,15,15,0.04), 0 0 0 1px rgba(15,15,15,0.02);
  --pr-shadow-sm: 0 2px 4px rgba(15,15,15,0.06), 0 1px 2px rgba(15,15,15,0.03);
  --pr-shadow:    0 6px 16px rgba(15,15,15,0.06), 0 2px 4px rgba(15,15,15,0.04);
  --pr-shadow-lg: 0 16px 40px rgba(15,15,15,0.10), 0 4px 8px rgba(15,15,15,0.04);

  --pr-r-xs:  4px;
  --pr-r-sm:  6px;
  --pr-r:     8px;
  --pr-r-md:  10px;
  --pr-r-lg:  12px;
  --pr-r-xl:  16px;
  --pr-r-pill: 999px;

  --pr-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --pr-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --pr-slow: 360ms cubic-bezier(0.16, 1, 0.3, 1);

  --pr-font: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --pr-container: 1200px;
  --pr-container-narrow: 860px;
}

/* ============================================================
   BASE / RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--pr-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--pr-text);
  background: var(--pr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}
a { color: inherit; text-decoration: none; transition: color var(--pr-fast); }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
p { margin: 0; }

.pr-container {
  width: 100%;
  max-width: var(--pr-container);
  margin: 0 auto;
  padding: 0 24px;
}
.pr-container-narrow { max-width: var(--pr-container-narrow); }

.pr-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--pr-accent);
  letter-spacing: 0.04em;
  padding: 4px 10px;
  background: var(--pr-accent-soft);
  border-radius: var(--pr-r-pill);
  margin-bottom: 16px;
}

.pr-h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 20px;
  color: var(--pr-text);
}

.pr-h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--pr-text);
}

.pr-lead {
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  color: var(--pr-text-muted);
  line-height: 1.55;
  max-width: 580px;
  margin-bottom: 32px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.pr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: var(--pr-r);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background var(--pr-fast), border-color var(--pr-fast), color var(--pr-fast), transform var(--pr-fast);
  user-select: none;
}
.pr-btn-lg {
  font-size: 15px;
  padding: 12px 22px;
}
.pr-btn-primary {
  background: var(--pr-text);
  color: white;
  border-color: var(--pr-text);
}
.pr-btn-primary:hover { background: #1a1a19; border-color: #1a1a19; }
.pr-btn-ghost {
  background: var(--pr-surface);
  color: var(--pr-text);
  border-color: var(--pr-border-2);
}
.pr-btn-ghost:hover { background: var(--pr-hover); border-color: var(--pr-border-2); }
.pr-btn-ghost-on-dark {
  background: rgba(255,255,255,0.08);
  color: white;
  border-color: rgba(255,255,255,0.18);
  backdrop-filter: blur(4px);
}
.pr-btn-ghost-on-dark:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.28); }

/* ============================================================
   NAV
   ============================================================ */
.pr-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,245,243,0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--pr-base), background var(--pr-base);
}
.pr-nav.is-scrolled { border-bottom-color: var(--pr-border); }
.pr-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.pr-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--pr-text);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.pr-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pr-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.pr-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--pr-text-muted);
  padding: 8px 14px;
  border-radius: var(--pr-r-sm);
  transition: color var(--pr-fast), background var(--pr-fast);
}
.pr-nav-links a:hover { color: var(--pr-text); background: var(--pr-hover); }
.pr-nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pr-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--pr-border-2);
  padding: 8px;
  border-radius: var(--pr-r-sm);
  color: var(--pr-text);
}

/* ============================================================
   HERO
   ============================================================ */
.pr-hero {
  padding: 64px 0 80px;
  position: relative;
  overflow: hidden;
}
.pr-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(94,106,210,0.07), transparent 60%),
    linear-gradient(to bottom, var(--pr-bg), var(--pr-bg));
  pointer-events: none;
  z-index: 0;
}
.pr-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
}
.pr-hero-copy { max-width: 580px; }
.pr-hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.pr-hero-trust {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--pr-text-dim);
}
.pr-trust-dot {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(22,163,74,0.18);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(22,163,74,0.18); }
  50%      { box-shadow: 0 0 0 8px rgba(22,163,74,0.10); }
}

/* Hero visual */
.pr-hero-visual {
  position: relative;
  aspect-ratio: 1 / 0.95;
  border-radius: var(--pr-r-xl);
}
.pr-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15,15,15,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,15,15,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
}
.pr-pulse-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 380px;
  background: var(--pr-surface);
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-r-lg);
  box-shadow: var(--pr-shadow-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pr-pulse-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.pr-pulse-label {
  color: var(--pr-text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pr-pulse-bar {
  height: 6px;
  background: var(--pr-hover);
  border-radius: var(--pr-r-pill);
  overflow: hidden;
}
.pr-pulse-bar-fill {
  display: block;
  height: 100%;
  width: var(--w, 50%);
  background: linear-gradient(90deg, var(--pr-accent), #7c87dd);
  border-radius: var(--pr-r-pill);
  animation: bar-grow 1.6s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes bar-grow {
  from { width: 0; }
  to   { width: var(--w, 50%); }
}
.pr-pulse-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--pr-accent);
  font-variant-numeric: tabular-nums;
}
.pr-floating-badge {
  position: absolute;
  background: var(--pr-surface);
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-r-pill);
  box-shadow: var(--pr-shadow);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}
.pr-fb-1 {
  top: 8%;
  right: 4%;
  color: #16a34a;
  animation: float-1 4s ease-in-out infinite;
}
.pr-fb-2 {
  bottom: 10%;
  left: 4%;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--pr-accent);
  animation: float-2 4.5s ease-in-out 0.5s infinite;
}
@keyframes float-1 {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* ============================================================
   STATS BAND
   ============================================================ */
.pr-stats {
  border-top: 1px solid var(--pr-border);
  border-bottom: 1px solid var(--pr-border);
  background: var(--pr-surface);
  padding: 32px 0;
}
.pr-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.pr-stat {
  text-align: center;
  padding: 4px 16px;
  position: relative;
}
.pr-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: var(--pr-border);
}
.pr-stat-num {
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pr-text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pr-stat-unit { font-size: 0.6em; font-weight: 500; }
.pr-stat-label {
  margin-top: 8px;
  font-size: 13px;
  color: var(--pr-text-muted);
  letter-spacing: 0.01em;
}

/* ============================================================
   SECTION DEFAULTS
   ============================================================ */
.pr-section {
  padding: 96px 0;
}
.pr-section-alt { background: var(--pr-surface); border-top: 1px solid var(--pr-border); border-bottom: 1px solid var(--pr-border); }
.pr-section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.pr-section-sub {
  font-size: 1.05rem;
  color: var(--pr-text-muted);
  line-height: 1.6;
}

/* ============================================================
   FEATURES
   ============================================================ */
.pr-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pr-feature {
  background: var(--pr-surface);
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-r-lg);
  padding: 28px 24px;
  transition: border-color var(--pr-base), transform var(--pr-base), box-shadow var(--pr-base);
}
.pr-feature:hover {
  border-color: var(--pr-border-2);
  transform: translateY(-2px);
  box-shadow: var(--pr-shadow);
}
.pr-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--pr-r);
  background: var(--pr-accent-soft);
  color: var(--pr-accent);
  margin-bottom: 18px;
}
.pr-feature h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--pr-text);
}
.pr-feature p {
  font-size: 14px;
  color: var(--pr-text-muted);
  line-height: 1.55;
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.pr-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pr-product {
  background: var(--pr-bg);
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--pr-base), transform var(--pr-base), box-shadow var(--pr-base);
  cursor: pointer;
}
.pr-product:hover {
  border-color: var(--pr-accent);
  transform: translateY(-3px);
  box-shadow: var(--pr-shadow);
}
.pr-product-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pr-product-head h3 {
  font-size: 1.15rem;
  color: var(--pr-text);
}
.pr-product-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--pr-accent);
  background: var(--pr-accent-soft);
  padding: 3px 8px;
  border-radius: var(--pr-r-xs);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.pr-tag-dark {
  color: white;
  background: var(--pr-text);
}
.pr-product p {
  font-size: 14px;
  color: var(--pr-text-muted);
  line-height: 1.55;
  flex: 1;
}
.pr-product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--pr-accent);
  padding-top: 10px;
  border-top: 1px solid var(--pr-border);
}
.pr-product:hover .pr-product-foot { color: var(--pr-accent-hover); }
.pr-product-enterprise {
  background: linear-gradient(135deg, #1a1a19, #0a0a0a);
  color: white;
  border-color: transparent;
}
.pr-product-enterprise h3, .pr-product-enterprise p {
  color: white;
}
.pr-product-enterprise p { color: rgba(255,255,255,0.7); }
.pr-product-enterprise .pr-product-foot {
  color: #c4ccff;
  border-top-color: rgba(255,255,255,0.12);
}
.pr-product-enterprise:hover {
  border-color: transparent;
  box-shadow: 0 16px 40px rgba(15,15,15,0.20);
}
.pr-product-enterprise:hover .pr-product-foot { color: white; }

/* ============================================================
   STEPS
   ============================================================ */
.pr-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.pr-steps::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 17%;
  right: 17%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pr-border-2) 15%, var(--pr-border-2) 85%, transparent);
  z-index: 0;
}
.pr-step {
  text-align: center;
  padding: 8px 16px;
  position: relative;
  z-index: 1;
}
.pr-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pr-surface);
  border: 1px solid var(--pr-border-2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--pr-accent);
  margin-bottom: 18px;
  box-shadow: var(--pr-shadow-sm);
}
.pr-step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.pr-step p {
  font-size: 14px;
  color: var(--pr-text-muted);
  line-height: 1.55;
  max-width: 280px;
  margin: 0 auto;
}

/* ============================================================
   FAQ
   ============================================================ */
.pr-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pr-faq-item {
  background: var(--pr-bg);
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-r-md);
  overflow: hidden;
  transition: border-color var(--pr-base);
}
.pr-faq-item[open] {
  border-color: var(--pr-border-2);
  background: var(--pr-surface);
}
.pr-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 24px;
  font-weight: 500;
  font-size: 15px;
  color: var(--pr-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
}
.pr-faq-item summary::-webkit-details-marker { display: none; }
.pr-faq-item summary::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--pr-text-muted);
  border-bottom: 1.5px solid var(--pr-text-muted);
  transform: rotate(45deg);
  transition: transform var(--pr-base);
  margin-top: -3px;
  flex-shrink: 0;
}
.pr-faq-item[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
.pr-faq-item summary:hover { color: var(--pr-text-2); }
.pr-faq-body {
  padding: 0 24px 20px;
  color: var(--pr-text-muted);
  font-size: 14px;
  line-height: 1.65;
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.pr-cta {
  background: linear-gradient(135deg, #1a1a19, #0a0a0a);
  color: white;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.pr-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(94,106,210,0.18), transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 20%, rgba(94,106,210,0.10), transparent 50%);
  pointer-events: none;
}
.pr-cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 48px;
  align-items: center;
}
.pr-cta .pr-h2 { color: white; }
.pr-cta-sub {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  max-width: 540px;
}
.pr-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
.pr-footer {
  background: var(--pr-text);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.pr-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}
.pr-footer-col h4 {
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.pr-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pr-footer-col a {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  transition: color var(--pr-fast);
}
.pr-footer-col a:hover { color: white; }
.pr-brand-dark { color: white; }
.pr-brand-dark .pr-brand-text { color: white; }
.pr-footer-tagline {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
  max-width: 320px;
}
.pr-footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}
.pr-footer-bottom a { color: rgba(255,255,255,0.7); }
.pr-footer-bottom a:hover { color: white; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .pr-hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .pr-hero-visual { max-width: 480px; margin: 0 auto; width: 100%; }
  .pr-features-grid, .pr-products-grid { grid-template-columns: repeat(2, 1fr); }
  .pr-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .pr-nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--pr-surface); border-bottom: 1px solid var(--pr-border); flex-direction: column; align-items: stretch; padding: 16px; gap: 4px; }
  .pr-nav-links.is-open { display: flex; }
  .pr-nav-links a { padding: 12px 16px; }
  .pr-nav-cta .pr-btn-ghost { display: none; }
  .pr-nav-toggle { display: inline-flex; }

  .pr-hero { padding: 48px 0 56px; }
  .pr-section { padding: 64px 0; }
  .pr-section-head { margin-bottom: 40px; }

  .pr-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .pr-stat:nth-child(2)::after { display: none; }
  .pr-stat:not(:last-child)::after { display: none; }

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

  .pr-steps { grid-template-columns: 1fr; gap: 32px; }
  .pr-steps::before { display: none; }

  .pr-cta-inner { grid-template-columns: 1fr; gap: 24px; }
  .pr-cta-actions { width: 100%; }
  .pr-cta-actions .pr-btn { flex: 1; }

  .pr-footer-grid { grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
  .pr-footer-bottom { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .pr-container { padding: 0 20px; }
  .pr-hero-cta { flex-direction: column; align-items: stretch; }
  .pr-hero-cta .pr-btn { width: 100%; }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
