/* ════════════════════════════════════════════════════════════════════
   PLATMA Bank 6.0 — Demo Site main stylesheet
   ──────────────────────────────────────────────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Brand colours from PLATMA PDF */
    --brand: #1356E8;
    --brand-dark: #0E40B0;
    --brand-light: #4F86F0;
    --accent: #06B6D4;
    --green: #10B981;
    --orange: #F59E0B;
    --red: #EF4444;
    --bg: #FFFFFF;
    --bg-alt: #F7F9FC;
    --bg-dark: #0A1628;
    --surface: #FFFFFF;
    --border: #E5E7EB;
    --text: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --container-w: 1240px;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.10);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Typography ── */
h1, h2, h3, h4, h5 {
    color: var(--text);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 22px; }
h4 { font-size: 17px; }
p  { font-size: 16px; color: var(--text); }

@media (max-width: 768px) {
    h1 { font-size: 34px; }
    h2 { font-size: 28px; }
}

/* ── Top navigation ── */
.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.topnav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-logo {
    width: 32px;
    height: 32px;
    background: var(--brand);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
}
.topnav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}
.topnav-links a {
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s, background 0.15s;
}
.topnav-links a:hover {
    color: var(--text);
    background: var(--bg-alt);
    text-decoration: none;
}
.topnav-links a.active { color: var(--brand); }

.topnav-cta {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ── Language switcher ── */
.lang-switch {
    position: relative;
    display: inline-block;
}
.lang-switch-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
}
.lang-switch-btn:hover { border-color: var(--text-muted); }
.lang-switch-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    min-width: 180px;
    display: none;
    z-index: 200;
}
.lang-switch.open .lang-switch-menu { display: block; }
.lang-switch-menu a {
    display: block;
    padding: 10px 14px;
    color: var(--text);
    font-size: 13px;
}
.lang-switch-menu a:hover {
    background: var(--bg-alt);
    text-decoration: none;
}
.lang-switch-menu a.active { color: var(--brand); font-weight: 600; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: var(--brand);
    color: white;
}
.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: var(--shadow-md);
}
.btn-ghost {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--text-muted);
    background: var(--bg-alt);
}
.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}
.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

/* ── Sections ── */
.section {
    padding: 80px 0;
}
.section-tight { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); color: white; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: white; }
.section-dark p { color: #CBD5E1; }

.section-header {
    text-align: center;
    margin-bottom: 56px;
}
.section-header .eyebrow {
    display: inline-block;
    color: var(--brand);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.section-header h2 {
    margin-bottom: 14px;
}
.section-header p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 680px;
    margin: 0 auto;
}

/* ── Hero ── */
.hero {
    padding: 80px 0 60px;
}
.hero h1 {
    font-size: 56px;
    line-height: 1.08;
    margin-bottom: 22px;
    letter-spacing: -0.02em;
}
.hero .lead {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 640px;
    line-height: 1.55;
}
.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.hero-note {
    color: var(--text-light);
    font-size: 13px;
}

@media (max-width: 768px) {
    .hero h1 { font-size: 38px; }
    .hero .lead { font-size: 17px; }
}

/* ── Proven results section (replaces live-stats — banker-friendly numbers) ── */
.proven-section {
    margin-top: -40px;
    position: relative;
    z-index: 2;
}
.proven-header {
    text-align: center;
    margin-bottom: 24px;
}
.proven-eyebrow {
    font-size: 12px;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 8px;
}
.proven-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}
.proven-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.proven-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 22px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: default;
    box-shadow: var(--shadow-sm);
}
.proven-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(19, 86, 232, 0.25);
}
.proven-card-primary {
    background: linear-gradient(135deg, #1356E8 0%, #0E40B0 100%);
    border-color: transparent;
    color: white;
}
.proven-card-primary:hover {
    box-shadow: 0 12px 32px rgba(19, 86, 232, 0.30);
}
.proven-tag {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 10px;
}
.proven-card-primary .proven-tag {
    color: rgba(255, 255, 255, 0.7);
}
.proven-figure {
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}
.proven-card-primary .proven-figure {
    color: white;
}
.proven-figure-unit {
    font-size: 28px;
    font-weight: 700;
    color: var(--brand);
    margin-left: 2px;
}
.proven-card-primary .proven-figure-unit {
    color: rgba(255, 255, 255, 0.85);
}
.proven-figure-plus {
    font-size: 28px;
    font-weight: 600;
    color: var(--brand);
    margin-left: 2px;
    vertical-align: top;
    line-height: 1.4;
}
.proven-card-primary .proven-figure-plus {
    color: rgba(255, 255, 255, 0.85);
}
.proven-caption {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
}
.proven-card-primary .proven-caption {
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 900px) {
    .proven-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .proven-grid { grid-template-columns: 1fr; }
}

/* ── Legacy live-stats styles (kept for backwards compat) ── */
.stats-strip {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 32px 24px;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}
.stats-strip-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.live-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: livePulse 2s infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.stat-cell {
    text-align: center;
    padding: 4px;
}
.stat-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Skeleton loading animation */
.stat-num.skeleton {
    background: transparent;
}
.skel-bar {
    display: block;
    width: 64px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(15, 23, 42, 0.04) 0%,
        rgba(15, 23, 42, 0.10) 50%,
        rgba(15, 23, 42, 0.04) 100%);
    background-size: 200% 100%;
    animation: skelShimmer 1.4s ease-in-out infinite;
}
@keyframes skelShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Cards ── */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.18s, box-shadow 0.18s;
}
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(19, 86, 232, 0.18);
}
.card .icon {
    width: 44px;
    height: 44px;
    background: rgba(19, 86, 232, 0.08);
    color: var(--brand);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}
.card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}
@media (max-width: 900px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ── Logo bar (clients/investors) ── */
.logo-bar {
    text-align: center;
    padding: 36px 0;
}
.logo-bar-title {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 24px;
    font-weight: 600;
}
.logo-bar-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 36px;
}
.logo-item {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.01em;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.logo-item:hover { opacity: 1; }

/* ── Tour steps ── */
.tour-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.tour-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 22px;
    align-items: start;
}
.tour-num {
    width: 44px;
    height: 44px;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.tour-content {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
}
.tour-content h3 {
    margin-bottom: 6px;
    font-size: 19px;
}
.tour-role {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}
.role-owner { background: #FEF3C7; color: #92400E; }
.role-banker { background: #DBEAFE; color: #1E40AF; }
.role-ops { background: #D1FAE5; color: #065F46; }

.tour-content p {
    color: var(--text-muted);
    margin-bottom: 14px;
    font-size: 14.5px;
}
.tour-feats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.feat-pill {
    background: var(--bg-alt);
    color: var(--text);
    padding: 5px 11px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}
.tour-cta { margin-top: 16px; }

@media (max-width: 700px) {
    .tour-item { grid-template-columns: 1fr; }
}

/* ── Comparison table ── */
.compare-table {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.compare-table table {
    width: 100%;
    border-collapse: collapse;
}
.compare-table th, .compare-table td {
    padding: 14px 18px;
    text-align: center;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}
.compare-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}
.compare-table th:first-child, .compare-table td:first-child {
    text-align: left;
    font-weight: 500;
}
.compare-table .col-highlight {
    background: rgba(19, 86, 232, 0.04);
    color: var(--brand);
}
.compare-table .check { color: var(--green); font-weight: 700; }
.compare-table .cross { color: var(--red); font-weight: 700; }

/* ── Footer ── */
.footer {
    background: var(--bg-dark);
    color: #94A3B8;
    padding: 60px 0 28px;
    margin-top: 80px;
}
.footer h4 {
    color: white;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid #1E293B;
}
.footer a { color: #94A3B8; font-size: 14px; line-height: 1.9; }
.footer a:hover { color: white; text-decoration: none; }
.footer-tagline {
    color: #CBD5E1;
    font-size: 14px;
    margin-top: 14px;
    line-height: 1.6;
    max-width: 320px;
}
.footer-bottom {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.footer-brand-mark {
    color: white;
    font-weight: 700;
    font-size: 16px;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ── Architecture diagram ── */
.arch-diagram {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin: 20px 0;
}

/* ── Embedded Node-RED preview ── */
.nodered-frame {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-md);
    position: relative;
}

/* ── Custom flow viewer (replaces real Node-RED iframe) ── */
.flow-viewer {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-md);
}
.flow-viewer-header {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}
.flow-viewer-body {
    padding: 24px 20px 16px;
    background: linear-gradient(180deg, #FAFBFC 0%, white 100%);
    position: relative;
    background-image:
        radial-gradient(circle, rgba(15,23,42,0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0;
}
.flow-viewer-body .flow-node {
    cursor: help;
    transition: filter 0.15s;
}
.flow-viewer-body .flow-node:hover {
    filter: drop-shadow(0 4px 8px rgba(19, 86, 232, 0.18));
}
.flow-viewer-body .flow-node rect {
    transition: stroke-width 0.15s;
}
.flow-viewer-body .flow-node:hover rect {
    stroke-width: 3;
}
.flow-viewer-footer {
    padding: 12px 18px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.flow-tooltip {
    position: absolute;
    background: #0F172A;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    max-width: 280px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    pointer-events: none;
    z-index: 10;
}
.flow-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 10px;
    height: 10px;
    background: #0F172A;
    transform: rotate(45deg);
}
.nodered-frame-header {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}
.nodered-frame-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 500;
}
.nodered-frame-dots {
    display: flex;
    gap: 6px;
}
.nodered-frame-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.nodered-frame-dots span:nth-child(1) { background: #FF5F56; }
.nodered-frame-dots span:nth-child(2) { background: #FFBD2E; }
.nodered-frame-dots span:nth-child(3) { background: #27C93F; }
.nodered-frame iframe {
    width: 100%;
    height: 560px;
    border: 0;
    display: block;
}

/* ── CTA block ── */
.cta-block {
    background: var(--brand);
    color: white;
    padding: 56px 40px;
    border-radius: var(--radius-lg);
    text-align: center;
}
.cta-block h2 {
    color: white;
    margin-bottom: 14px;
}
.cta-block p {
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 26px;
    font-size: 17px;
}
.cta-block .btn-primary {
    background: white;
    color: var(--brand);
}
.cta-block .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}
.cta-block .btn-ghost {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.cta-block .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: white;
}

/* ── Metric callout ── */
.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px 0;
}
.metric-cell {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.metric-num {
    font-size: 42px;
    font-weight: 800;
    color: var(--brand);
    line-height: 1;
    letter-spacing: -0.02em;
}
.metric-label {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.metric-sub {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 12px;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .metric-row { grid-template-columns: 1fr; }
}

/* ── Utility ── */
.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
.muted { color: var(--text-muted); }

.hidden { display: none; }

/* ── Print-friendly hide ── */
@media (max-width: 600px) {
    .topnav-links { display: none; }
}
