/* ═══════════════════════════════════════════════════════════════════
   public.css — Styles for all public-facing pages
   (index, features, pricing, docs, contact, register, track-order,
    privacy, security, terms, support, status, accept-invite)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Reset & Base ────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* ═══════════════════════════════════════════════════════════════════
   Phase 34 S14 — WCAG 2.1 AA accessibility primitives.
   Used by every public marketing page.
   ═══════════════════════════════════════════════════════════════════ */

/* Skip-to-content link — keyboard users tab to it first and jump
   straight to the main content, bypassing the navbar.  Position is
   off-screen by default; focus-visible (Tab key) brings it on-screen
   anchored to the top-left.  Required for WCAG 2.1 SC 2.4.1
   "Bypass Blocks". */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 12px 24px;
    background: #10b981;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}
.skip-to-content:focus,
.skip-to-content:focus-visible {
    left: 0;
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* Screen-reader-only utility — invisible to sighted users, available
   to AT.  Used for newsletter form labels and any other visually
   redundant labels.  Required for WCAG 2.1 SC 1.3.1 / 4.1.2. */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Restore a visible focus indicator for keyboard users.  The Tailwind
   utility ``focus:outline-none`` is sprinkled across every form input
   and button on the public pages — without a replacement focus ring,
   keyboard users have NO IDEA where the focus is, failing WCAG 2.1
   SC 2.4.7 "Focus Visible".  ``:focus-visible`` matches only keyboard
   focus (not mouse clicks), so the green outline doesn't appear on
   click. */
.public-page :focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* ── Navigation ──────────────────────────────────────────────────── */
.navbar-shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }

/* ── Gradients ───────────────────────────────────────────────────── */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}
.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(16,185,129,0.15) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(59,130,246,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.dark-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
.cta-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* ── Feature Cards ───────────────────────────────────────────────── */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255,255,255,0.15) !important;
}
.feature-card-accent {
    position: relative;
    overflow: hidden;
}
.feature-card-accent::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
}
.feature-card-accent.accent-emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }
.feature-card-accent.accent-blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.feature-card-accent.accent-orange::before { background: linear-gradient(90deg, #f97316, #fb923c); }
.feature-card-accent.accent-green::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.feature-card-accent.accent-red::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.feature-card-accent.accent-purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* ── Use-Case Cards ──────────────────────────────────────────────── */
.use-case-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}
.use-case-card:hover {
    border-left-color: #10b981;
    transform: translateX(4px);
}

/* ── Testimonial Cards ───────────────────────────────────────────── */
.testimonial-card {
    transition: transform 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-2px);
}

/* ── Integration Cards ───────────────────────────────────────────── */
.integration-card {
    transition: all 0.3s ease;
}
.integration-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.15) !important;
}

/* ── Step Connectors ─────────────────────────────────────────────── */
.step-connector {
    position: relative;
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 12px;
}
@media (max-width: 768px) {
    .step-connector { display: none; }
}

/* ── Workflow Steps ──────────────────────────────────────────────── */
.workflow-step {
    position: relative;
}
.workflow-step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 40px;
    height: 2px;
    background: rgba(16,185,129,0.3);
}
.workflow-step:last-child::after {
    display: none;
}
@media (max-width: 768px) {
    .workflow-step::after { display: none; }
}

/* ── FAQ Items ───────────────────────────────────────────────────── */
.faq-item summary {
    cursor: pointer;
    padding: 16px;
    background: rgba(255,255,255,0.04); color: #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
    user-select: none;
}
.faq-item summary:hover {
    background: rgba(255,255,255,0.08);
}
.faq-item[open] summary {
    background: rgba(16,185,129,0.12);
    color: #34d399;
}
.faq-item p {
    padding: 0 16px 16px 16px;
    line-height: 1.6;
}

/* ── Mock Dashboard (index.html) ─────────────────────────────────── */
.mock-dashboard {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
}
.stat-box {
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #10b981;
    margin-bottom: 10px;
}

/* ── Category Tabs (index.html) ──────────────────────────────────── */
.category-tab {
    cursor: pointer;
    padding: 12px 20px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    color: #94a3b8;
    font-weight: 500;
}
.category-tab:hover {
    color: #e2e8f0;
}
.category-tab.active {
    color: #34d399;
    border-bottom-color: #10b981;
}
.category-content {
    display: none;
    animation: fadeIn 0.3s ease;
}
.category-content.active {
    display: block;
}

/* ── Comparison Table ────────────────────────────────────────────── */
.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    align-items: center;
}
.comparison-row:last-child {
    border-bottom: none;
}
.comparison-header {
    grid-template-columns: 2fr 1fr 1fr;
    background: rgba(16,185,129,0.1);
    font-weight: 600;
}
.badge-check {
    color: #10b981;
}
.badge-x {
    color: #94a3b8;
}
@media (max-width: 768px) {
    .comparison-row {
        grid-template-columns: 1fr;
    }
    .comparison-header {
        grid-template-columns: 1fr;
    }
}

/* ── Stat Counter ────────────────────────────────────────────────── */
.stat-counter { font-variant-numeric: tabular-nums; }

/* ── Animations ──────────────────────────────────────────────────── */
.glow-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: glow 2s infinite;
}
@keyframes glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; box-shadow: 0 0 8px currentColor; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

/* ── Spotlight Dashboard (features.html) ─────────────────────────── */
.spotlight-dashboard {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.spotlight-header {
    width: 100%;
    height: 32px;
    background: #2d3748;
    border-radius: 8px 8px 0 0;
    display: flex;
    gap: 8px;
    padding: 6px;
}
.spotlight-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ── Docs — Code & Endpoints ─────────────────────────────────────── */
.code-block {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.8125rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    border: 1px solid rgba(255,255,255,0.08);
}
.code-block code { color: #e2e8f0; }

.endpoint-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}
.endpoint-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
}
.endpoint-card.card-get { border-left-color: #3b82f6; }
.endpoint-card.card-post { border-left-color: #10b981; }
.endpoint-card.card-put { border-left-color: #f59e0b; }
.endpoint-card.card-patch { border-left-color: #a855f7; }
.endpoint-card.card-delete { border-left-color: #ef4444; }

.method-badge {
    display: inline-block;
    padding: 0.3rem 0.625rem;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.75rem;
    font-family: 'Monaco', 'Menlo', monospace;
    letter-spacing: 0.025em;
}
.method-get { background: rgba(59,130,246,0.15); color: #60a5fa; }
.method-post { background: rgba(16,185,129,0.15); color: #34d399; }
.method-put { background: rgba(245,158,11,0.15); color: #fbbf24; }
.method-patch { background: rgba(168,85,247,0.15); color: #c084fc; }
.method-delete { background: rgba(239,68,68,0.15); color: #f87171; }

.auth-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}
.auth-badge.required { background: rgba(239,68,68,0.12); color: #fca5a5; }
.auth-badge.public { background: rgba(16,185,129,0.12); color: #6ee7b7; }

.section-header { scroll-margin-top: 5rem; }

/* ── Docs — Collapsible TOC Groups ───────────────────────────────── */
.toc-group { margin-bottom: 0.125rem; }
.toc-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    width: 100%;
    padding: 0.375rem 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: opacity 0.15s ease;
}
.toc-group-toggle:hover { opacity: 0.8; }
.toc-chevron {
    transition: transform 0.2s ease;
    transform: rotate(90deg);
    flex-shrink: 0;
}
.toc-group.collapsed .toc-chevron { transform: rotate(0deg); }
.toc-group-items {
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    opacity: 1;
}
.toc-group.collapsed .toc-group-items {
    max-height: 0;
    opacity: 0;
}

/* ── Docs — Table of Contents ────────────────────────────────────── */
.toc-section a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-size: 0.8125rem;
}
.toc-section a:hover, .toc-section a.active {
    background: rgba(16,185,129,0.1);
    color: #34d399;
}
.toc-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(148,163,184,0.4); flex-shrink: 0;
    transition: background 0.2s ease;
}
.toc-section a:hover .toc-dot, .toc-section a.active .toc-dot {
    background: #10b981;
}
.toc-subsection {
    padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.08);
    margin-left: 0.5rem;
}
.toc-subsection a {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
    color: #94a3b8;
}
.toc-subsection a:hover, .toc-subsection a.active {
    color: #34d399;
    background: rgba(16,185,129,0.08);
}

.quick-ref-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
}
.quick-ref-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
}

/* ── Docs — Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Docs — Responsive Sidebar ───────────────────────────────────── */
@media (max-width: 1023px) {
    .docs-sidebar {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        top: 64px;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        z-index: 40;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
        border-right: 1px solid rgba(255,255,255,0.08);
    }
    .docs-sidebar.active { display: block; }
    .docs-main { width: 100%; }
}
.hamburger-btn {
    display: none;
}
@media (max-width: 1023px) {
    .hamburger-btn { display: block; }
}

/* ── Contact — Forms ─────────────────────────────────────────────── */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.form-input.success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}
.form-input-dark { transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.form-input-dark:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }

/* ── Contact — CTA & Cards ───────────────────────────────────────── */
.cta-button {
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.cta-button:hover {
    transform: translateY(-2px);
}
.cta-button:active {
    transform: translateY(0);
}
.contact-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.success-message {
    animation: slideDown 0.5s ease;
}
.social-link {
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-link:hover {
    color: #10b981;
    transform: translateY(-2px);
}

/* ── Pricing ─────────────────────────────────────────────────────── */
.pricing-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}
.pricing-card.featured {
    border: 2px solid #10b981;
    position: relative;
}
.badge-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Track-Order — Timeline ──────────────────────────────────────── */
.timeline-step { position: relative; padding-left: 36px; padding-bottom: 24px; }
.timeline-step::before { content: ''; position: absolute; left: 11px; top: 28px; bottom: 0; width: 2px; background: rgba(255,255,255,0.08); }
.timeline-step:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.timeline-dot.active { background: #10b981; color: white; }
.timeline-dot.inactive { background: rgba(255,255,255,0.08); color: #94a3b8; }
.timeline-dot.current { background: #10b981; color: white; animation: pulse 2s infinite; }

/* ── Register — Responsive Grid ──────────────────────────────────── */
@media (max-width: 768px) {
    .register-grid { grid-template-columns: 1fr !important; max-width: 440px !important; }
}
