/* ═══ CRGRAm CLOUD — SITE.CSS v4 (vision-guided) ═══ */
/* Fixes: equal-height cards, consistent spacing, no dead space,
   clear hierarchy, visual polish (shadows/borders/accents) */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--green); text-decoration: underline; text-decoration-color: var(--green-soft); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--green); }
ul, ol { padding-left: 1.3em; }

:root {
  --bg: #ffffff;
  --bg-2: #f9fafb;
  --bg-3: #f3f4f6;
  --surface: #ffffff;
  --border: #e5e7eb;
  --border-2: #d1d5db;
  --ink: #09090b;
  --ink-2: #27272a;
  --ink-3: #52525b;
  --ink-4: #71717a;
  --green: #10b981;
  --green-deep: #047857;
  --green-soft: rgba(16,185,129,0.15);
  --green-tint: rgba(16,185,129,0.05);
  --amber: #d97706;
  --amber-soft: rgba(217,119,6,0.1);
  --red: #dc2626;
  --red-soft: rgba(220,38,38,0.08);
  --font-display: 'Sora', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container: 1120px;
}

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 16px; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 12px; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 54ch; }
.t-mono { font-family: var(--font-mono); font-size: 0.875em; }
.t-small { font-size: 0.8125rem; color: var(--ink-3); }
.t-meta { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.04em; }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.text-center { text-align: center; }

/* Buttons — CONSISTENT across all contexts */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 8px; border: 1px solid transparent; font-family: var(--font-sans); font-weight: 600; font-size: 0.875rem; text-decoration: none; transition: all 150ms; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--green); color: white; }
.btn-accent:hover { background: var(--green-deep); }
.btn-dark { background: var(--ink); color: white; }
.btn-dark:hover { background: #27272a; }
.btn-outline { background: white; color: var(--ink); border-color: var(--border-2); }
.btn-outline:hover { border-color: var(--ink-3); background: var(--bg-2); }
.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 13px 26px; font-size: 0.9375rem; }
.btn-block { width: 100%; }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: white; padding: 8px 14px; z-index: 10000; }
.skip-link:focus { left: 0; }

/* Header */
header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--container); margin: 0 auto; height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--ink); color: var(--green); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 0.875rem; }
.logo-word { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.logo-word .dot { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; margin: 0; }
.nav-link { padding: 6px 12px; border-radius: 6px; font-size: 0.875rem; font-weight: 500; color: var(--ink-3); text-decoration: none; transition: all 150ms; }
.nav-link:hover { color: var(--ink); background: var(--bg-2); }
.nav-link.active { color: var(--ink); background: var(--bg-2); }
.nav-cta-row { display: flex; align-items: center; gap: 8px; }
.nav-hamburger { display: none; background: transparent; border: 1px solid var(--border); border-radius: 6px; width: 34px; height: 34px; align-items: center; justify-content: center; color: var(--ink); }
#nav-drawer { position: fixed; inset: 56px 0 0 0; background: white; padding: 20px; display: flex; flex-direction: column; gap: 2px; transform: translateX(100%); transition: transform 250ms; z-index: 999; overflow-y: auto; }
#nav-drawer.open { transform: translateX(0); }
.drawer-link { display: block; padding: 12px 8px; color: var(--ink); font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--border); }
@media (max-width: 860px) { .nav-links { display: none; } .nav-hamburger { display: inline-flex; } .nav-cta-row .btn:not(.always-show) { display: none; } }

/* HERO */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.hero h1 { margin-bottom: 16px; }
.hero .lead { margin-bottom: 24px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-sub { margin-top: 20px; font-size: 0.8125rem; color: var(--ink-4); }
.hero-sub a { color: var(--ink-3); }

/* Product preview */
.product-frame { background: white; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.05); }
.product-sidebar { width: 180px; background: var(--bg-2); border-right: 1px solid var(--border); padding: 14px 10px; flex-shrink: 0; }
.product-main { flex: 1; padding: 16px; }
.product-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; }
.product-row:last-child { margin-bottom: 0; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; font-family: var(--font-mono); font-size: 0.625rem; font-weight: 600; border-radius: 4px; background: var(--bg-3); color: var(--ink-3); }
.pill.green { background: var(--green-soft); color: var(--green-deep); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }

/* Feature cards (bento) */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bento .card { padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: white; }
.bento .card.dark { background: var(--ink); color: white; }
.bento .card.dark h3 { color: white; }
.bento .card.dark p { color: #a1a1aa; }
.bento .card.span-2 { grid-column: span 2; }
@media (max-width: 768px) { .bento { grid-template-columns: 1fr; } .bento .card.span-2 { grid-column: span 1; } }

/* Step numbering */
.step-num { font-family: var(--font-mono); font-size: 0.625rem; font-weight: 600; color: var(--green-deep); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }

/* Trust list */
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-item { display: flex; gap: 10px; align-items: flex-start; }
.trust-item .check { color: var(--green-deep); font-weight: 700; flex-shrink: 0; line-height: 1.5; }

/* Pricing — EQUAL HEIGHT cards */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; padding: 24px; background: white; }
.pricing-card.popular { border: 2px solid var(--green); position: relative; }
.pricing-card .badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--green); color: white; padding: 3px 12px; border-radius: 20px; font-size: 0.6875rem; font-weight: 600; white-space: nowrap; }
.pricing-card .tier-name { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.pricing-card .price { font-family: var(--font-display); font-size: 2rem; font-weight: 700; margin-bottom: 2px; }
.pricing-card .price small { font-size: 0.8125rem; color: var(--ink-4); font-weight: 400; }
.pricing-card .desc { font-size: 0.8125rem; color: var(--ink-3); margin-bottom: 16px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 20px; flex: 1; }
.pricing-card li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 0.875rem; color: var(--ink-2); }
.pricing-card li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }

/* Sections */
.section-title { margin-bottom: 8px; }
.section-sub { color: var(--ink-2); margin-bottom: 32px; }

/* Divider */
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* Footer — BALANCED columns, no dead space */
footer { background: var(--ink); color: #a1a1aa; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid #27272a; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand h3 { font-family: var(--font-display); color: white; font-size: 1.125rem; margin: 0 0 6px; }
.footer-brand h3 .dot { color: var(--green); }
.footer-brand p { color: #71717a; font-size: 0.8125rem; max-width: 240px; line-height: 1.5; }
.footer-label { font-family: var(--font-mono); font-size: 0.625rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #71717a; margin: 0 0 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 7px; }
.footer-links a { color: #a1a1aa; font-size: 0.8125rem; text-decoration: none; }
.footer-links a:hover { color: white; }
.footer-bottom { padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.6875rem; color: #52525b; }
.footer-bottom a { color: #52525b; text-decoration: none; }
.footer-bottom a:hover { color: #a1a1aa; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); margin-bottom: 5px; }
.input, .textarea { width: 100%; background: white; border: 1px solid var(--border-2); color: var(--ink); padding: 10px 12px; border-radius: 8px; font-family: inherit; font-size: 0.875rem; }
.input:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.textarea { min-height: 80px; resize: vertical; }

/* Prose (for security/terms/privacy) */
.prose { max-width: 680px; }
.prose h2 { margin-top: 40px; margin-bottom: 12px; font-size: 1.375rem; }
.prose h3 { margin-top: 24px; margin-bottom: 8px; font-size: 1.0625rem; }
.prose p { color: var(--ink-2); line-height: 1.65; margin-bottom: 14px; }
.prose ul { color: var(--ink-2); line-height: 1.7; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--green-deep); }
.prose code { font-family: var(--font-mono); font-size: 0.85em; background: var(--bg-3); padding: 1px 5px; border-radius: 4px; }
.prose strong { color: var(--ink); }

/* Trust card (for security page) */
.trust-card { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.03); }
.trust-card h3 { margin-bottom: 6px; }
.trust-card p { color: var(--ink-3); font-size: 0.875rem; margin: 0; }

/* CTA section */
.cta-dark { background: var(--ink); color: white; padding: 56px 0; }
.cta-dark h2 { color: white; }
.cta-dark p { color: #a1a1aa; }
.cta-dark a:not(.btn) { color: var(--green); }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(6px); transition: opacity 400ms, transform 400ms; }
[data-reveal].in { opacity: 1; transform: translateY(0); }

/* Utilities */
.hidden { display: none !important; }
.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-5{margin-top:24px}.mt-6{margin-top:32px}
.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}.mb-5{margin-bottom:24px}.mb-6{margin-bottom:32px}
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }

/* Prose container for legal pages — constrained width */
.prose-page { max-width: 720px; margin: 0 auto; padding: 48px 24px; }
.prose-page h1 { font-size: 2rem; margin-bottom: 8px; }
.prose-page .meta { font-size: 0.8125rem; color: var(--ink-4); margin-bottom: 32px; }
