/* =====================================================================
   TPxi Software — site styles
   ===================================================================== */

:root {
    --c-bg: #ffffff;
    --c-bg-soft: #f7f8fb;
    --c-bg-tint: #eef2ff;
    --c-text: #0f172a;
    --c-text-muted: #475569;
    --c-text-soft: #64748b;
    --c-border: #e2e8f0;
    --c-border-soft: #eef0f4;
    --c-primary: #2563eb;
    --c-primary-dark: #1d4ed8;
    --c-secondary: #7c3aed;
    --c-accent: #06b6d4;
    --c-warm: #f59e0b;
    --c-success: #10b981;
    --c-card: #ffffff;
    --c-card-hover-shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.18);
    --c-card-shadow: 0 4px 20px -8px rgba(15, 23, 42, 0.08);

    --grad-brand: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --grad-soft: linear-gradient(180deg, rgba(37, 99, 235, 0.04) 0%, rgba(124, 58, 237, 0.0) 100%);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.55;
}

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

a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color 120ms ease;
}
a:hover { color: var(--c-primary-dark); }

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

.text-gradient {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-primary);
    margin: 0 0 12px 0;
}

h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }

.section { padding: 96px 0; position: relative; }
.section + .section { border-top: 1px solid var(--c-border-soft); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .lede { color: var(--c-text-muted); margin-top: 12px; font-size: 17px; }

/* =====================================================================
   Header
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
.site-header.scrolled {
    border-bottom-color: var(--c-border);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--c-text);
    font-weight: 700;
    font-size: 16px;
}
.brand:hover { color: var(--c-text); }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-nav a {
    color: var(--c-text-muted);
    font-weight: 500;
    font-size: 15px;
}
.site-nav a:hover { color: var(--c-text); }
.site-nav .nav-cta {
    color: white;
    background: var(--c-text);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.site-nav .nav-cta:hover { background: #1e293b; color: white; }

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--c-text);
    border-radius: 2px;
    transition: transform 200ms ease, opacity 200ms ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    flex-direction: column;
    background: white;
    border-top: 1px solid var(--c-border-soft);
    padding: 8px 24px 16px;
}
.mobile-nav a {
    color: var(--c-text);
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid var(--c-border-soft);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav.open { display: flex; }

@media (max-width: 768px) {
    .site-nav { display: none; }
    .nav-toggle { display: flex; }
}

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
    position: relative;
    padding: 96px 0 80px;
    overflow: hidden;
    background: var(--grad-soft), var(--c-bg);
}
.hero-inner {
    text-align: center;
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--c-border);
    color: var(--c-text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.eyebrow .dot {
    width: 8px;
    height: 8px;
    background: var(--c-success);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.hero-title { max-width: 880px; margin: 0 auto; }
.hero-sub {
    max-width: 660px;
    margin: 24px auto 0;
    color: var(--c-text-muted);
    font-size: 17px;
}
.hero-sub strong { color: var(--c-text); }
.hero-sub em {
    color: var(--c-secondary);
    font-style: normal;
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 120ms ease, box-shadow 200ms ease, background-color 200ms ease, color 200ms ease;
}
.btn-primary {
    background: var(--grad-brand);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}
.btn-ghost {
    background: white;
    color: var(--c-text);
    border-color: var(--c-border);
}
.btn-ghost:hover {
    color: var(--c-text);
    border-color: var(--c-text);
}

.hero-stats {
    display: flex;
    gap: 36px;
    justify-content: center;
    margin-top: 48px;
    color: var(--c-text-muted);
    font-size: 14px;
    flex-wrap: wrap;
}
.hero-stats strong {
    color: var(--c-text);
    font-weight: 700;
    margin-right: 4px;
}

.hero-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.10), transparent 40%),
        radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.10), transparent 40%);
    z-index: 1;
}

/* =====================================================================
   Products
   ===================================================================== */
.section-products { background: var(--c-bg-soft); }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 32px 28px 28px;
    box-shadow: var(--c-card-shadow);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
    position: relative;
    overflow: hidden;
}
.product-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--grad-brand);
    opacity: 0.9;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--c-card-hover-shadow);
    border-color: transparent;
}

.product-card-go::before    { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.product-card-cache::before { background: linear-gradient(135deg, #7c3aed, #db2777); }
.product-card-race::before  { background: linear-gradient(135deg, #f59e0b, #ef4444); }

.product-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--c-bg-tint);
    color: var(--c-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.product-card-cache .product-icon { background: #f3e8ff; color: var(--c-secondary); }
.product-card-race .product-icon  { background: #fef3c7; color: var(--c-warm); }

.product-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.product-blurb {
    color: var(--c-text-muted);
    margin: 0 0 18px 0;
    font-size: 15px;
}

.product-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 22px 0;
}
.product-meta li {
    color: var(--c-text-soft);
    font-size: 13.5px;
    padding: 4px 0;
    padding-left: 18px;
    position: relative;
}
.product-meta li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-primary);
    opacity: 0.7;
}
.product-card-cache .product-meta li::before { background: var(--c-secondary); }
.product-card-race  .product-meta li::before { background: var(--c-warm); }

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}

/* =====================================================================
   Open Source
   ===================================================================== */
.section-os {
    background:
        radial-gradient(circle at 80% 30%, rgba(37, 99, 235, 0.06), transparent 60%),
        var(--c-bg);
}
.os-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
}
.os-copy h2 { margin-bottom: 16px; }
.os-copy .lede { color: var(--c-text-muted); margin-bottom: 16px; font-size: 17px; }
.os-copy .btn { margin-top: 12px; }

.os-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.os-card {
    background: white;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.os-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--c-card-shadow);
}
.os-card .os-emoji { font-size: 22px; }
.os-card strong { font-size: 14px; color: var(--c-text); }
.os-card span { font-size: 13px; color: var(--c-text-muted); line-height: 1.5; }

@media (max-width: 880px) {
    .os-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 480px) {
    .os-cards { grid-template-columns: 1fr; }
}

/* =====================================================================
   About
   ===================================================================== */
.section-about { background: var(--c-bg-soft); }
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 56px;
    align-items: center;
}
.about-copy h2 { margin-bottom: 18px; }
.about-copy p {
    color: var(--c-text-muted);
    font-size: 16px;
    margin: 0 0 14px 0;
}
.about-copy p strong { color: var(--c-text); }
.about-copy p.quiet {
    color: var(--c-text-soft);
    font-size: 15px;
    border-left: 3px solid var(--c-primary);
    padding-left: 16px;
    margin-top: 24px;
}

.about-card {
    background: white;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--c-card-shadow);
}
.about-card-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-text-soft);
    margin: 0 0 8px 0;
}
.about-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--c-text);
}
.about-card-role {
    color: var(--c-text-muted);
    font-size: 14px;
    margin: 0 0 16px 0;
}
.about-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.about-links a {
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 880px) {
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* =====================================================================
   Contact
   ===================================================================== */
.contact-inner {
    text-align: center;
    max-width: 880px;
    margin: 0 auto;
}
.contact-inner h2 { margin-bottom: 18px; }
.contact-inner .lede {
    color: var(--c-text-muted);
    font-size: 17px;
    margin: 0 auto 40px;
    max-width: 580px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    text-align: left;
}
.contact-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px;
    background: white;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-text);
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.contact-card:hover {
    color: var(--c-text);
    transform: translateY(-2px);
    box-shadow: var(--c-card-shadow);
    border-color: var(--c-primary);
}
.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--c-bg-tint);
    color: var(--c-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}
.contact-card strong { font-size: 15px; }
.contact-card span { font-size: 14px; color: var(--c-text-muted); }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
    background: var(--c-text);
    color: #cbd5e1;
    padding: 56px 0 32px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    align-items: start;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.footer-brand strong { color: white; font-size: 16px; }
.footer-meta {
    color: #94a3b8;
    font-size: 13px;
}
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.footer-meta-line {
    display: block;
    color: #64748b;
    font-size: 12px;
    padding: 4px 0;
}
.footer-h {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 12px 0;
}
.footer-links a {
    display: block;
    color: #cbd5e1;
    padding: 4px 0;
    font-size: 14px;
}
.footer-links a:hover { color: white; }
.footer-legal {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 16px;
    color: #64748b;
    font-size: 12.5px;
    text-align: center;
    line-height: 1.6;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/* Trademark superscripts — small, subtle, non-distracting.
   .tm = ™ (own marks). .rm = ® (third-party, used with attribution). */
.tm,
.rm {
    font-size: 0.5em;
    font-weight: 600;
    vertical-align: super;
    margin-left: 1px;
    color: inherit;
    opacity: 0.7;
}

@media (max-width: 720px) {
    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .footer-links { grid-template-columns: 1fr 1fr; }
}

/* TouchPoint credit line under the open-source button */
.touchpoint-credit {
    margin: 20px 0 0 0;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--c-text-muted);
    display: inline-block;
}
.touchpoint-credit a {
    font-weight: 600;
}

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