/* ═══════════════════════════════
   PactPal Landing — Design System
   ═══════════════════════════════ */
:root {
    --primary: #1677ff;
    --primary-dark: #0958d9;
    --primary-soft: rgba(22, 119, 255, 0.06);
    --bg: #ffffff;
    --bg-alt: #f7f8fa;
    --bg-dark: #0a0f1e;
    --text-1: #111827;
    --text-2: #4b5563;
    --text-3: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.07);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
    --shadow-primary: 0 8px 30px rgba(22,119,255,0.18);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    --mono: "SF Mono", "Fira Code", Consolas, monospace;
    --ease: cubic-bezier(.4,0,.2,1);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text-1);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 120px 0; }

/* ═══ Section Header ═══ */
.section-header { text-align: center; margin-bottom: 72px; }
.section-label {
    display: inline-block;
    font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--primary); background: var(--primary-soft);
    padding: 6px 16px; border-radius: 100px; margin-bottom: 20px;
}
.section-header h2 { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 16px; }
.section-header p { font-size: 1.15rem; color: var(--text-2); max-width: 640px; margin: 0 auto; line-height: 1.7; }

/* ═══ Navbar ═══ */
.navbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; transition: all 0.35s var(--ease); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.navbar.scrolled { background: rgba(255,255,255,0.88); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); border-bottom: 1px solid rgba(0,0,0,0.06); }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; font-weight: 800; color: var(--text-1); text-decoration: none; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--text-2); transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

/* ═══ Hero ═══ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding-top: 72px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.hero-orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(22,119,255,0.25), transparent 70%); top: -10%; right: -5%; animation: orbFloat 12s ease-in-out infinite alternate; }
.hero-orb-2 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(114,46,209,0.15), transparent 70%); bottom: 5%; left: -5%; animation: orbFloat 15s ease-in-out infinite alternate-reverse; }
@keyframes orbFloat { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(30px,-20px) scale(1.08); } }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px); background-size: 80px 80px; mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); }
.hero-content { position: relative; z-index: 1; text-align: center; padding: 80px 0; }
.hero h1 { font-size: clamp(2.8rem, 5.5vw, 4.5rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1.15; margin-bottom: 28px; }
.hero-desc { font-size: 1.2rem; color: var(--text-2); max-width: 660px; margin: 0 auto 44px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer; border: none; font-family: var(--font); transition: all 0.25s var(--ease); }
.btn-hero-primary { padding: 16px 36px; border-radius: 100px; font-size: 1.05rem; font-weight: 600; background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-hero-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 36px rgba(22,119,255,0.28); }
.btn-hero-ghost { padding: 16px 36px; border-radius: 100px; font-size: 1.05rem; font-weight: 600; background: transparent; color: var(--text-2); border: 1.5px solid var(--border); }
.btn-hero-ghost:hover { border-color: var(--primary); color: var(--primary); }
.hero-stats { display: inline-flex; align-items: center; gap: 32px; margin-top: 64px; padding: 20px 40px; background: rgba(255,255,255,0.7); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 100px; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.1rem; font-weight: 700; color: var(--text-1); font-family: var(--mono); }
.stat span { font-size: 0.8rem; color: var(--text-3); }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

/* ═══ Flip Cards ═══ */
.features { background: var(--bg); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.flip-card {
    perspective: 1000px;
    cursor: pointer;
    height: 320px;
}
.flip-inner {
    position: relative;
    width: 100%; height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }

.flip-front, .flip-back {
    position: absolute; inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius);
    padding: 40px 32px;
    display: flex; flex-direction: column;
    overflow: hidden;
}

.flip-front {
    background: var(--bg);
    border: 1px solid var(--border-light);
    z-index: 2;
    transition: box-shadow 0.35s var(--ease);
}
.flip-front::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent, var(--primary));
    opacity: 0; transition: opacity 0.35s;
}
.flip-card:not(.flipped):hover .flip-front { box-shadow: var(--shadow-md); }
.flip-card:not(.flipped):hover .flip-front::before { opacity: 1; }

.flip-back {
    transform: rotateY(180deg);
    background: var(--accent, var(--primary));
    color: #fff;
    justify-content: center;
}
.flip-back h3 { color: #fff; font-size: 1.25rem; margin-bottom: 12px; }
.flip-back p { color: rgba(255,255,255,0.88); font-size: 0.92rem; line-height: 1.7; }
.flip-back-emoji { font-size: 2.5rem; margin-bottom: 16px; }

.f-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent, var(--primary)) 8%, transparent);
    color: var(--accent, var(--primary));
    margin-bottom: 24px;
}
.flip-front h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.flip-front p { font-size: 0.95rem; color: var(--text-2); line-height: 1.7; flex: 1; }
.flip-hint {
    font-size: 0.8rem; color: var(--text-3);
    margin-top: 16px;
    opacity: 0; transition: opacity 0.3s;
}
.flip-card:hover .flip-hint { opacity: 1; }

/* ═══ Scenarios — Tabbed Layout ═══ */
.scenarios { background: var(--bg-alt); }

/* Tabs */
.sc-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
}
.sc-tab {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 28px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--text-2);
    font-size: 1rem; font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.3s var(--ease);
    position: relative;
}
.sc-tab:hover { border-color: var(--tab-c); color: var(--tab-c); }
.sc-tab.active {
    border-color: var(--tab-c);
    color: var(--tab-c);
    background: var(--bg);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--tab-c) 15%, transparent);
}
.sc-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1.5px; left: 20%; right: 20%;
    height: 3px;
    background: var(--tab-c);
    border-radius: 3px 3px 0 0;
}
.sc-tab-num {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-3);
    opacity: 0.5;
    font-family: var(--mono);
}
.sc-tab.active .sc-tab-num { color: var(--tab-c); opacity: 0.7; }

/* Panels */
.sc-panel { display: none; }
.sc-panel.active { display: block; animation: scPanelIn 0.45s var(--ease); }
@keyframes scPanelIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* Two-col grid: Before → After */
.sc-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: stretch;
}
.sc-before, .sc-after {
    display: flex;
    flex-direction: column;
}

/* Arrow column */
.sc-arrow-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 0;
    gap: 0;
}
.sc-arrow-line {
    flex: 1;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--border), transparent);
}
.sc-arrow-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--bg);
    border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    transition: all 0.3s var(--ease);
}
.sc-panel.active .sc-arrow-icon {
    border-color: var(--accent);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Phase labels */
.sc-phase-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 16px;
}
.phase-dot { width: 8px; height: 8px; border-radius: 50%; }
.phase-before { background: #ef4444; }
.phase-after { background: var(--accent, #52c41a); }

/* Chat Window (macOS-style frame) */
.chat-window {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    background: var(--bg);
    flex: 1;
    display: flex;
    flex-direction: column;
}
.chat-titlebar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 11px 16px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}
.chat-dot { width: 10px; height: 10px; border-radius: 50%; }
.chat-dot.red { background: #ff5f57; }
.chat-dot.yellow { background: #febc2e; }
.chat-dot.green { background: #28c840; }
.chat-title {
    flex: 1; text-align: center;
    font-size: 0.78rem; font-weight: 600; color: var(--text-3);
    margin-right: 40px;
}
.chat-body {
    padding: 18px 18px 22px;
    display: flex; flex-direction: column; gap: 8px;
    flex: 1;
}
.bubble {
    max-width: 82%;
    padding: 9px 14px;
    border-radius: 18px;
    font-size: 0.88rem;
    line-height: 1.5;
}
.bubble-right {
    align-self: flex-end;
    background: var(--accent, var(--primary));
    color: #fff;
    border-bottom-right-radius: 4px;
}
.bubble-left {
    align-self: flex-start;
    background: var(--bg-alt);
    color: var(--text-1);
    border-bottom-left-radius: 4px;
}
.bubble-system {
    align-self: center;
    background: none;
    color: var(--text-3);
    font-size: 0.75rem;
    font-style: italic;
    text-align: center;
    padding: 3px 0;
    max-width: 100%;
}

/* Solution Card */
.sc-solution-card {
    background: var(--bg);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.sc-solution-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #fff));
}
.sc-sol-header { padding: 28px 28px 20px; }
.sc-sol-header h3 {
    font-size: 1.35rem; font-weight: 800;
    letter-spacing: -0.02em; margin-bottom: 8px; line-height: 1.3;
}
.sc-sol-header p {
    font-size: 0.92rem; color: var(--text-2); line-height: 1.7;
}

.sc-examples {
    display: flex; flex-direction: column;
    gap: 1px; background: var(--border-light);
    border-top: 1px solid var(--border-light);
    flex: 1;
}
.sc-ex {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 28px;
    background: var(--bg);
    transition: all 0.25s var(--ease);
}
.sc-ex:hover { background: var(--accent-soft); }
.sc-ex-icon {
    font-size: 1.5rem; flex-shrink: 0;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-alt); border-radius: 10px;
}
.sc-ex strong { display: block; font-size: 0.88rem; font-weight: 700; margin-bottom: 2px; }
.sc-ex span { font-size: 0.78rem; color: var(--text-3); }

.sc-quote {
    padding: 16px 28px;
    border-top: 1px solid var(--border-light);
    font-size: 0.92rem; font-weight: 600;
    color: var(--accent);
    text-align: center;
    background: var(--accent-soft);
    line-height: 1.5;
}

/* Scenario responsive */
@media (max-width: 1024px) {
    .sc-grid { grid-template-columns: 1fr; gap: 0; }
    .sc-arrow-col { flex-direction: row; padding: 24px 0; }
    .sc-arrow-line { width: auto; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--border), transparent); }
}
@media (max-width: 768px) {
    .sc-tabs { flex-direction: column; gap: 8px; }
    .sc-sol-header { padding: 20px 16px 16px; }
    .sc-ex { padding: 14px 16px; }
    .sc-quote { padding: 14px 16px; }
    .chat-body { padding: 14px; }
}

/* ═══ Blockchain ═══ */
.blockchain {
    background: linear-gradient(180deg, #f0f5ff 0%, var(--bg-alt) 100%);
    position: relative;
    overflow: hidden;
}
.blockchain-bg {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 15% 40%, rgba(22,119,255,0.06) 0%, transparent 50%),
        radial-gradient(circle at 85% 60%, rgba(114,46,209,0.04) 0%, transparent 50%);
    pointer-events: none;
}
.blockchain .container { position: relative; z-index: 1; }

/* Flow */
.bc-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 64px;
}

.bc-step {
    flex: 1;
    max-width: 220px;
    text-align: center;
    padding: 0 8px;
}

.bc-icon-wrap {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e8ecf2;
    box-shadow: 0 2px 12px rgba(22,119,255,0.06);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    color: var(--step-c, #1677ff);
    position: relative;
    transition: all 0.4s var(--ease);
}
.bc-icon-wrap::before {
    content: '';
    position: absolute; inset: -4px;
    border-radius: 24px;
    background: radial-gradient(circle, color-mix(in srgb, var(--step-c) 8%, transparent), transparent 70%);
    z-index: -1;
}
.bc-step:hover .bc-icon-wrap {
    border-color: var(--step-c);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--step-c) 18%, transparent);
    transform: translateY(-4px);
}

.bc-label {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 8px;
}
.bc-desc {
    font-size: 0.82rem;
    color: var(--text-3);
    line-height: 1.6;
    margin-bottom: 14px;
}
.bc-hash {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e8ecf2;
    border-radius: 100px;
    padding: 5px 14px;
}
.bc-hash-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px rgba(52,211,153,0.5);
    animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.bc-hash code {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-3);
}

/* Connectors */
.bc-connector {
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 28px;
    position: relative;
}
.bc-conn-line {
    width: 100%;
    height: 1px;
    background: #dbe2ef;
}
.bc-conn-pulse {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px rgba(22,119,255,0.5);
    animation: connPulse 3s ease-in-out infinite;
}
@keyframes connPulse {
    0% { left: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { left: calc(100% - 6px); opacity: 0; }
}

/* Tech Detail Cards */
.bc-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.bc-detail {
    background: #fff;
    border: 1px solid #e8ecf2;
    border-radius: 16px;
    padding: 28px 24px;
    transition: all 0.35s var(--ease);
}
.bc-detail:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(22,119,255,0.08);
    transform: translateY(-4px);
}
.bc-d-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(22,119,255,0.08);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.bc-detail strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 6px;
}
.bc-detail span {
    font-size: 0.82rem;
    color: var(--text-3);
    line-height: 1.6;
}

/* Blockchain responsive */
@media (max-width: 1024px) {
    .bc-details { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .bc-flow { flex-direction: column; align-items: center; gap: 8px; }
    .bc-connector { flex: 0 0 32px; padding: 0; flex-direction: column; }
    .bc-conn-line { width: 1px; height: 100%; background: #dbe2ef; }
    .bc-conn-pulse { animation: connPulseV 3s ease-in-out infinite; }
    @keyframes connPulseV {
        0% { top: 0; opacity: 0; }
        20% { opacity: 1; }
        80% { opacity: 1; }
        100% { top: calc(100% - 6px); opacity: 0; }
    }
    .bc-details { grid-template-columns: 1fr; }
    .bc-step { max-width: 100%; }
}

/* ═══ Demo ═══ */
.demo { background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%); padding-bottom: 140px; }
.demo-layout { display: flex; align-items: center; gap: 80px; }
.demo-info { flex: 1; }
.demo-info h2 { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; margin-bottom: 20px; }
.demo-info > p { font-size: 1.05rem; color: var(--text-2); line-height: 1.7; margin-bottom: 40px; }
.demo-steps { display: flex; flex-direction: column; gap: 16px; }
.ds { display: flex; align-items: flex-start; gap: 16px; }
.ds-num { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); font-size: 0.85rem; font-weight: 700; color: var(--text-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.3s var(--ease); }
.ds-num.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(22,119,255,0.25); }
.ds-text strong { display: block; font-size: 0.95rem; }
.ds-text span { font-size: 0.85rem; color: var(--text-3); }
.demo-phone { flex: 0 0 auto; }

/* ═══ Phone Frame ═══ */
.phone-frame {
    width: 320px; height: 660px;
    background: #f2f2f7;
    border-radius: 44px;
    border: 8px solid #1a1a1a;
    position: relative; overflow: hidden;
    box-shadow: 0 0 0 2px #333, 0 40px 80px rgba(0,0,0,0.2), 0 0 0 12px rgba(0,0,0,0.04);
}
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 28px; background: #1a1a1a; border-radius: 0 0 18px 18px; z-index: 100; }
.phone-screen { width: 100%; height: 100%; position: relative; overflow: hidden; }

/* ═══ Phone Screens ═══ */
.ph-screen { position: absolute; inset: 0; display: none; flex-direction: column; background: #f5f7fb; z-index: 1; }
.ph-screen.active { display: flex; z-index: 2; animation: screenIn 0.35s var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

.ph-header { display: flex; align-items: center; justify-content: space-between; padding: 40px 14px 10px; background: #fff; z-index: 10; flex-shrink: 0; }
.ph-back { cursor: pointer; display: flex; align-items: center; width: 28px; }
.ph-title { font-size: 1rem; font-weight: 600; color: #333; flex: 1; text-align: center; }
.ph-capsule { width: 72px; height: 28px; border-radius: 14px; background: rgba(0,0,0,0.05); border: 0.5px solid rgba(0,0,0,0.08); flex-shrink: 0; }

.ph-scroll { flex: 1; overflow-y: auto; padding-bottom: 16px; }
.ph-card { background: #fff; margin: 10px 12px; border-radius: 12px; padding: 16px; }
.ph-field { display: flex; align-items: center; padding: 12px 0; border-bottom: 0.5px solid #f0f0f0; }
.ph-field:last-child { border: none; }
.ph-field label { width: 60px; font-size: 0.85rem; color: #999; flex-shrink: 0; }
.ph-field input { flex: 1; border: none; outline: none; font-size: 0.85rem; color: #333; background: transparent; font-family: var(--font); }
.ph-user { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: #333; }
.ph-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #818cf8); color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ═══ Mini App Screens ═══ */

/* -- Home -- */
.app-metrics { display: flex; gap: 8px; padding: 12px 12px 0; }
.metric-card { flex: 1; background: #fff; border-radius: 12px; padding: 16px 12px; text-align: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.metric-card:active { transform: scale(0.97); }
.metric-num { font-size: 1.5rem; font-weight: 800; color: var(--text-1); }
.metric-label { font-size: 0.72rem; color: var(--text-3); margin-top: 4px; }
.app-section-title { font-size: 0.85rem; font-weight: 700; color: var(--text-1); padding: 16px 16px 8px; }
.app-shortcuts { display: flex; gap: 8px; padding: 0 12px; }
.shortcut-chip { flex: 1; padding: 10px; text-align: center; background: #fff; border-radius: 10px; font-size: 0.8rem; font-weight: 600; color: var(--c); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border-left: 3px solid var(--c); transition: all 0.2s; }
.shortcut-chip:active { transform: scale(0.97); }
.app-pact-list { padding: 0 12px; }
.app-pact-item { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.03); }
.app-pact-item:active { transform: scale(0.98); }
.pact-type-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.9rem; font-weight: 800; flex-shrink: 0; }
.pact-info { flex: 1; min-width: 0; }
.pact-title { font-size: 0.88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pact-pill { font-size: 0.72rem; font-weight: 600; margin-left: 6px; }
.pact-meta { font-size: 0.72rem; color: var(--text-3); margin-top: 3px; }

/* -- Tab Bar -- */
.app-tabbar { display: flex; align-items: center; justify-content: space-around; height: 56px; background: #fff; border-top: 0.5px solid #eee; flex-shrink: 0; position: relative; }
.tab-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.65rem; color: #999; }
.tab-item.active { color: var(--primary); }
.tab-fab { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #1677ff, #7c5cff); display: flex; align-items: center; justify-content: center; margin-top: -20px; box-shadow: 0 4px 16px rgba(22,119,255,0.35); cursor: pointer; transition: transform 0.2s; }
.tab-fab:active { transform: scale(0.92) translateY(-20px); }

/* -- Create Type -- */
.type-card { display: flex; background: #fff; border-radius: 12px; margin: 10px 12px; overflow: hidden; cursor: pointer; transition: all 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.type-card:active { transform: scale(0.98); }
.type-stripe { width: 6px; background: var(--stripe); flex-shrink: 0; }
.type-body { padding: 18px 16px; flex: 1; }
.type-body .type-icon { font-size: 1.8rem; margin-bottom: 8px; }
.type-body h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.type-body p { font-size: 0.8rem; color: var(--text-3); margin-bottom: 10px; }
.type-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.type-tags span { font-size: 0.68rem; background: #f5f7fb; color: var(--text-3); padding: 3px 8px; border-radius: 4px; }

/* -- Create Form -- */
.form-progress { display: flex; justify-content: center; gap: 8px; padding: 16px 0 8px; }
.fp-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.fp-dot.active { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.3); }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
.validity-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.v-chip { padding: 8px 16px; border-radius: 8px; font-size: 0.82rem; background: #f5f7fb; color: var(--text-2); border: 1px solid transparent; cursor: default; }
.v-chip.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); font-weight: 600; }
.form-sticky-bar { display: flex; gap: 10px; padding: 16px 12px; margin-top: 24px; background: #fff; border-radius: 12px 12px 0 0; }
.form-btn-draft { flex: 1; padding: 12px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; font-size: 0.9rem; font-weight: 600; color: var(--text-2); cursor: pointer; font-family: var(--font); }
.form-btn-submit { flex: 1.5; padding: 12px; border: none; border-radius: 10px; background: linear-gradient(135deg, #1677ff, #4ba3ff); color: #fff; font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: var(--font); box-shadow: 0 4px 12px rgba(22,119,255,0.2); }

/* -- Detail -- */
.detail-hero { background: #fff; margin: 10px 12px; border-radius: 12px; padding: 20px 16px; }
.detail-eyebrow { font-size: 0.75rem; color: var(--text-3); margin-bottom: 6px; }
.detail-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.detail-status { margin-bottom: 12px; }
.detail-participants { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.detail-arrow { color: var(--text-3); font-size: 0.8rem; }
.detail-stats { display: flex; gap: 0; border-top: 1px solid #f5f5f5; padding-top: 14px; }
.detail-stats > div { flex: 1; text-align: center; }
.detail-stats strong { display: block; font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.detail-stats span { font-size: 0.7rem; color: var(--text-3); }
.card-section-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 12px; }
.action-btn-row { display: flex; gap: 8px; }
.action-btn { flex: 1; padding: 11px; border-radius: 10px; border: none; background: var(--primary); color: #fff; font-size: 0.85rem; font-weight: 600; cursor: pointer; font-family: var(--font); }
.action-btn.secondary { background: #f5f7fb; color: var(--text-2); }
.evidence-grid { display: flex; gap: 8px; margin-bottom: 12px; }
.ev-thumb { width: 56px; height: 56px; border-radius: 8px; background: linear-gradient(135deg, #ffd8a8, #ffa94d); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.ev-chain-peek { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--primary); font-weight: 600; cursor: pointer; padding: 8px 0 0; }
.mini-timeline { position: relative; padding-left: 20px; }
.tl-item { position: relative; padding-bottom: 16px; padding-left: 12px; border-left: 2px solid #f0f0f0; }
.tl-item:last-child { border: none; padding-bottom: 0; }
.tl-dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; }
.tl-content strong { display: block; font-size: 0.82rem; }
.tl-content span { font-size: 0.72rem; color: var(--text-3); }

/* -- Evidence / Chain -- */
.chain-log-list { display: flex; flex-direction: column; gap: 12px; }
.chain-log-item { padding: 12px; background: #f9fafb; border-radius: 10px; border-left: 3px solid var(--primary); }
.cl-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cl-badge { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.cl-time { font-size: 0.7rem; color: var(--text-3); }
.cl-event { font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.cl-hash { font-size: 0.72rem; color: var(--text-3); font-family: var(--mono); }
.share-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.share-url { font-size: 0.75rem; font-family: var(--mono); color: var(--text-3); background: #f5f7fb; padding: 8px 10px; border-radius: 6px; word-break: break-all; }

/* ═══ Type List Screens ═══ */
.list-summary {
    text-align: center;
    padding: 16px 0 8px;
    font-size: 0.85rem;
    color: var(--text-3);
}
.list-summary strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ac, var(--primary));
    display: block;
    line-height: 1.2;
}
.list-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 20px 16px 0;
    padding: 12px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}
.list-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.16); }

/* ═══ Gift Card Balance Panel ═══ */
.gift-balance-panel { text-align: center; }
.gift-big-num { padding: 8px 0 12px; }
.gift-big-num strong { font-size: 2.8rem; font-weight: 900; color: #fa8c16; }
.gift-big-num span { display: block; font-size: 0.75rem; color: var(--text-3); margin-top: 2px; }
.gift-bar { height: 8px; background: #f0f0f0; border-radius: 4px; margin-bottom: 16px; overflow: hidden; }
.gift-bar-fill { height: 100%; background: linear-gradient(90deg, #fa8c16, #f7c948); border-radius: 4px; }
.gift-stats-row { display: flex; justify-content: space-around; padding: 8px 0; }
.gift-stats-row > div { text-align: center; }
.gift-stats-row span { display: block; font-size: 0.7rem; color: var(--text-3); }
.gift-stats-row strong { font-size: 1rem; font-weight: 800; }

/* Redemption items */
.redeem-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.redeem-info strong { display: block; font-size: 0.88rem; }
.redeem-info span { font-size: 0.75rem; color: var(--text-3); }
.redeem-actions { display: flex; gap: 6px; }
.rbtn { padding: 6px 14px; border: none; border-radius: 8px; font-size: 0.78rem; font-weight: 600; cursor: pointer; font-family: var(--font); }
.rbtn.confirm { background: #fa8c16; color: #fff; }
.rbtn.reject { background: #f5f5f5; color: var(--text-3); }

/* ═══ Micro Contract Elements ═══ */
.mini-term { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-2); padding: 8px 12px; background: var(--bg-alt); border-radius: 8px; }
.mt-tag { font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; flex-shrink: 0; }
.term-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; font-size: 0.85rem; }
.term-row:last-child { border: none; }

.doc-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.doc-item:last-child { border: none; }
.doc-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.doc-icon.pdf { background: #ef4444; }
.doc-icon.doc { background: #3b82f6; }
.doc-item strong { display: block; font-size: 0.85rem; margin-bottom: 2px; }
.doc-item span { font-size: 0.72rem; color: var(--text-3); }

/* ═══ Footer ═══ */
.footer { background: var(--bg-dark); color: rgba(255,255,255,0.7); padding-top: 72px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 280px; color: rgba(255,255,255,0.5); }
.footer .logo span { color: #fff; }
.footer-col h4 { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col a { display: block; font-size: 0.9rem; color: rgba(255,255,255,0.5); text-decoration: none; padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding: 24px 0; font-size: 0.85rem; color: rgba(255,255,255,0.3); }

/* ═══ Animations ═══ */
.anim-up { opacity: 0; transform: translateY(32px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.anim-up.visible { opacity: 1; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .chain-detail { grid-template-columns: repeat(2, 1fr); }
    .s-panel-inner { flex-direction: column; padding: 40px 32px; }
    .demo-layout { flex-direction: column; gap: 48px; }
}
@media (max-width: 768px) {
    .section { padding: 80px 0; }
    .section-header h2 { font-size: 2rem; }
    .nav-links { display: none; }
    .feature-grid { grid-template-columns: 1fr; }
    .flip-card { height: 280px; }
    .hero-stats { flex-direction: column; gap: 16px; border-radius: var(--radius); padding: 24px; }
    .stat-divider { width: 40px; height: 1px; }
    .chain-flow { flex-direction: column; align-items: center; }
    .chain-arrow { transform: rotate(90deg); padding: 12px 0; }
    .chain-detail { grid-template-columns: 1fr; }
    .scenario-tabs { flex-wrap: wrap; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
    .demo-info h2 { font-size: 1.8rem; }
    .phone-frame { width: 280px; height: 580px; }
}