body {
    font-family: 'Switzer', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    margin: 0; padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .dm-sans {
    font-family: 'Outfit', sans-serif;
    margin: 0;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; }

/* Hero */
.hero { position: relative; min-height: 90vh; display: flex; align-items: center; padding-top: 100px; background: var(--white); overflow: hidden; }
#hero-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-content { position: relative; z-index: 10; max-width: 800px; }
.hero h1 { font-size: clamp(48px, 6vw, 84px); font-weight: 500; line-height: 1.05; letter-spacing: -0.04em; color: var(--navy); margin-bottom: 24px; }
.hero p { font-size: 22px; color: var(--text-muted); max-width: 600px; margin-bottom: 40px; line-height: 1.4; }
.hero .ctas { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.hero .secondary-link { font-weight: 500; color: var(--text-muted); transition: color 0.3s; background: none; border: none; cursor: pointer; font-size: 16px; padding: 0; }
.hero .secondary-link:hover { color: var(--navy); }

/* Ticker */
.ticker-wrap { position: absolute; bottom: 0; width: 100%; height: 48px; background: var(--light-bg); border-top: 1px solid var(--border); overflow: hidden; display: flex; align-items: center; z-index: 10; }
.ticker { display: flex; white-space: nowrap; animation: ticker 40s linear infinite; }
.ticker-item { display: inline-flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--navy); padding: 0 40px; }
.ticker-item::before { content: '•'; color: var(--amber); margin-right: 12px; font-size: 20px; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Clients */
.clients-section { padding: 32px 0; background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.clients-label { text-align: center; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 0 0 16px; }
.clients-belt { overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.clients-logos { list-style: none; margin: 0; padding: 0; }
.clients-track { display: flex; flex-wrap: nowrap; align-items: center; width: max-content; animation: clients-belt 30s linear infinite; }
.clients-belt:hover .clients-track { animation-play-state: paused; }
.clients-track li { flex: none; margin-right: 72px; }
.clients-logos img { height: 88px; width: auto; display: block; }
@keyframes clients-belt { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@media (max-width: 640px) {
    .clients-section { padding: 24px 0; }
    .clients-track li { margin-right: 48px; }
    .clients-logos img { height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
    .clients-belt { -webkit-mask-image: none; mask-image: none; }
    .clients-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; gap: 24px 48px; }
    .clients-track li { margin-right: 0; }
    .clients-track li[aria-hidden="true"] { display: none; }
}

/* Story Section (Morph) */
.story-section { position: relative; height: 200vh; background: var(--paper); }
.story-bg-grid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background-image: radial-gradient(rgba(58, 63, 85, 0.1) 1.5px, transparent 1.5px); background-size: 26px 26px; z-index: 0; }
.story-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start; z-index: 10; }
.story-header { position: absolute; top: 6vh; left: 0; width: 100%; text-align: center; z-index: 20; }
.story-header p { font-size: 20px; color: var(--text-muted); max-width: 640px; margin: 16px auto 0; }
.story-stage { position: relative; width: 100%; height: 68vh; max-width: 1240px; margin: 0 auto; margin-top: 27vh; }

.fragment { position: absolute; opacity: 1; transition: opacity 0.3s; box-shadow: 0 10px 30px rgba(0,0,0,0.08); z-index: 5; transform-origin: center center; }

.frag-chat { width: 240px; background: #E5FFDA; border-radius: 12px; padding: 0; font-size: 14px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.frag-chat .header { background: #075E54; color: white; padding: 10px 12px; font-weight: 500; }
.frag-chat .bubble { background: #DCF8C6; margin: 8px; padding: 8px 12px; border-radius: 8px; position: relative; max-width: 80%; }
.frag-chat .bubble.in { background: white; margin-left: 8px; align-self: flex-start; }
.frag-chat .bubble.out { background: #DCF8C6; margin-right: 8px; margin-left: auto; }
.frag-chat .time { font-size: 10px; color: #999; text-align: right; margin-top: 4px; }

.frag-sheet { width: 340px; background: white; border: 1px solid #ccc; font-family: 'Switzer', sans-serif; font-size: 12px; }
.frag-sheet .title { background: #217346; color: white; padding: 6px 12px; font-weight: 500; font-size: 11px; }
.frag-sheet table { width: 100%; border-collapse: collapse; }
.frag-sheet th, .frag-sheet td { border: 1px solid #eee; padding: 4px 8px; text-align: right; }
.frag-sheet th { background: #f3f3f3; color: #333; text-align: center; }
.frag-sheet td:first-child { text-align: left; }
.frag-sheet .red-flag { position: relative; background: #ffebee; }
.frag-sheet .red-flag::after { content: ''; position: absolute; top: 0; right: 0; border-left: 6px solid transparent; border-top: 6px solid #d32f2f; }

.frag-po { width: 260px; background: linear-gradient(to bottom right, #fdfbf7, #f4f0e6); padding: 24px; border: 1px solid #e0dcd3; color: #333; font-family: 'Outfit', sans-serif; position: relative; }
.frag-po::before { content: ''; position: absolute; width: 60px; height: 60px; border: 3px solid rgba(139, 69, 19, 0.15); border-radius: 50%; top: 40px; right: 20px; z-index: 1; }
.frag-po .sign { margin-top: 20px; opacity: 0.8; width: 100px; }

.frag-email { width: 280px; background: white; border-radius: 8px; border: 1px solid #e0e0e0; font-size: 13px; }
.frag-email .top { padding: 12px; border-bottom: 1px solid #eee; display: flex; gap: 10px; align-items: center; }
.frag-email .avatar { width: 32px; height: 32px; border-radius: 50%; background: #ccc; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; }
.frag-email .content { padding: 12px; color: #555; }
.frag-email .chips { display: flex; gap: 8px; margin-top: 12px; }
.frag-email .chip { background: #f5f5f5; border: 1px solid #ddd; padding: 4px 8px; border-radius: 4px; font-size: 11px; display: flex; align-items: center; gap: 4px; }

.frag-receipt { width: 200px; background: #fff; padding: 16px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: #222; text-align: center; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 95% 100%, 90% calc(100% - 8px), 85% 100%, 80% calc(100% - 8px), 75% 100%, 70% calc(100% - 8px), 65% 100%, 60% calc(100% - 8px), 55% 100%, 50% calc(100% - 8px), 45% 100%, 40% calc(100% - 8px), 35% 100%, 30% calc(100% - 8px), 25% 100%, 20% calc(100% - 8px), 15% 100%, 10% calc(100% - 8px), 5% 100%, 0 calc(100% - 8px)); background-image: linear-gradient(135deg, rgba(0,0,0,0.02) 25%, transparent 25%, transparent 50%, rgba(0,0,0,0.02) 50%, rgba(0,0,0,0.02) 75%, transparent 75%, transparent); background-size: 40px 40px; box-shadow: inset 0 0 10px rgba(0,0,0,0.05); }
.frag-receipt .dashed { border-top: 1px dashed #ccc; margin: 8px 0; }

.frag-note { width: 200px; background: #fff59d; padding: 20px; font-family: 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive; font-size: 24px; color: #333; box-shadow: 2px 4px 10px rgba(0,0,0,0.15); }

.frag-do { width: 260px; background: #ffebee; padding: 20px; border: 1px solid #ffcdd2; color: #c62828; font-family: 'Switzer', sans-serif; font-size: 12px; }

.frag-calc { width: 220px; background: #fafafa; padding: 16px; border-radius: 12px; border: 1px solid #eee; font-family: 'Switzer', sans-serif; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.frag-toast { width: 280px; background: white; padding: 16px; border-radius: 8px; border-left: 4px solid var(--amber); box-shadow: 0 4px 20px rgba(0,0,0,0.1); font-size: 13px; display: flex; align-items: flex-start; gap: 12px; }

.frag-icon { width: 80px; text-align: center; font-size: 12px; font-weight: 500; }
.frag-icon .doc { width: 60px; height: 80px; background: white; border: 2px solid #ccc; border-radius: 4px; margin: 0 auto 8px; position: relative; }
.frag-icon .doc::after { content: 'v7'; position: absolute; top: -8px; right: -8px; background: #e53935; color: white; border-radius: 10px; padding: 2px 6px; font-size: 10px; }

.bilaro-card { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) scale(0.8); opacity: 0; background: white; border-radius: 16px; box-shadow: 0 20px 40px rgba(35, 39, 82, 0.1); width: 520px; padding: 32px; z-index: 20; border: 1px solid var(--border); display: none; }
.bc-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 24px; }
.bc-title { font-family: 'Outfit', sans-serif; font-weight: 500; font-size: 24px; margin-bottom: 4px; color: var(--navy); }
.bc-subtitle { font-size: 15px; color: var(--text-muted); }
.bc-amount { font-family: ui-monospace, Consolas, monospace; font-size: 20px; color: var(--navy); font-weight: 500; }

.bc-status { display: flex; justify-content: space-between; margin-bottom: 32px; position: relative; }
.bc-status::before { content: ''; position: absolute; top: 12px; left: 10px; right: 10px; height: 2px; background: var(--border); z-index: 1; }
.bc-step { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--navy); opacity: 0.5; z-index: 2; }
.bc-step.active { opacity: 1; font-weight: 500; }
.bc-step .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); background: white; display: flex; align-items: center; justify-content: center; }
.bc-step.done .dot { background: var(--forest-green); border-color: var(--forest-green); color: white; }
.bc-step.done .dot::after { content: '✓'; font-size: 14px; }

.bc-trail { font-size: 13px; margin-bottom: 24px; }
.bc-trail-item { display: flex; gap: 16px; margin-bottom: 12px; }
.bc-trail-time { font-family: ui-monospace, Consolas, monospace; color: var(--text-muted); width: 140px; flex-shrink: 0; }
.bc-trail-action { color: var(--navy); }

.bc-attachments { display: flex; gap: 12px; }
.bc-att { padding: 8px 12px; background: var(--light-bg); border-radius: 6px; font-size: 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); }

#story-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.story-path { fill: none; stroke: var(--navy); stroke-width: 1.5; stroke-dasharray: 4 6; opacity: 0.25; stroke-dashoffset: 1000; transition: stroke-dashoffset 0.1s linear; }

/* Phones: no pinned scroll and no morph. The story is a normal section: heading, a small pile of
   four fragments, then the finished Bilaro card. home.js does no scroll work below 769px. */
@media (max-width: 768px) {
    .story-section { height: auto; padding: 72px 0 80px; }
    .story-sticky { position: static; height: auto; overflow: visible; }
    .story-header { position: static; }
    .story-header h2 { font-size: 32px; }
    .story-header p { font-size: 17px; padding: 0 4px; }
    .story-stage { display: flex; flex-direction: column; align-items: center; height: auto; margin: 40px auto 0; padding: 0 20px; }
    .story-bg-grid, #story-svg { display: none; }
    .fragment:not(.frag-chat):not(.frag-po):not(.frag-receipt):not(.frag-note) { display: none; }
    .fragment { position: relative; max-width: 86%; }
    .frag-chat { transform: rotate(-3deg) translateX(-12px); z-index: 1; }
    .frag-po { margin-top: -28px; transform: rotate(2deg) translateX(20px); z-index: 2; }
    .frag-receipt { margin-top: -40px; transform: rotate(-2deg) translateX(-24px); z-index: 3; }
    .frag-note { margin-top: -36px; width: 170px; padding: 14px; font-size: 20px; transform: rotate(4deg) translateX(60px); z-index: 4; }
    .bilaro-card { display: block; position: relative; top: auto; left: auto; transform: none; opacity: 1; width: 100%; max-width: 380px; margin-top: 36px; padding: 20px; }
    .bc-title { font-size: 18px; }
    .bc-amount { font-size: 16px; }
    .bc-status { overflow-x: auto; padding-bottom: 10px; }
    .bc-trail-time { width: 100px; font-size: 11px; }
    .bc-trail { font-size: 12px; }
    .bc-attachments { flex-wrap: wrap; }
}

/* Bento Grid */
.bento-section { padding: 140px 0; background: var(--white); }
.bento-header { margin-bottom: 80px; max-width: 600px; }
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; auto-rows: minmax(360px, auto); }
.bento-card { display: flex; flex-direction: column; text-decoration: none; background: var(--light-bg); border-radius: 24px; padding: 32px 32px 0; position: relative; overflow: hidden; transition: transform 0.4s var(--ease-out); }
.bento-card:hover { transform: translateY(-4px); }
.bento-card.span-8 { grid-column: span 6; }
.bento-card.span-4 { grid-column: span 6; }
.bento-card.span-6 { grid-column: span 6; }
@media (max-width: 1024px) {
    .bento-card.span-8, .bento-card.span-4, .bento-card.span-6 { grid-column: span 12; min-height: 360px; padding-bottom: 32px; }
}
.bc-icon { position: absolute; top: 32px; right: 32px; width: 32px; height: 32px; border: 1px solid rgba(35, 39, 82, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.3s, transform 0.3s; z-index: 10; }
.bc-icon::after { content: '→'; font-size: 14px; color: var(--navy); }
.bento-card:hover .bc-icon { background: var(--navy); transform: rotate(-45deg); }
.bento-card:hover .bc-icon::after { color: var(--white); }

.bento-title { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 500; color: var(--navy); margin-bottom: 8px; max-width: 80%; z-index: 10; position: relative; }
.bento-title span { color: var(--text-muted); display: block; font-size: 18px; font-family: 'Switzer', sans-serif; font-weight: 400; margin-top: 4px; }

.bento-image { flex: 1; margin-top: 32px; border-radius: 12px 12px 0 0; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.12); transition: transform 0.5s var(--ease-out); transform-origin: center bottom; position: relative; border: 1px solid var(--border); border-bottom: none; display: flex; flex-direction: column; }
.bento-card:hover .bento-image { transform: scale(1.02) translateY(-4px); }
.mini-app-bar { height: 28px; background: #f8f9fa; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 12px; gap: 6px; }
.mini-app-bar span { width: 8px; height: 8px; border-radius: 50%; background: #e0e0e0; }
.mini-app-content { flex: 1 0 auto; position: relative; aspect-ratio: 16 / 10; background: #f7f6f2; }
.bg-crop { position: absolute; inset: 0; background-repeat: no-repeat; background-size: 100% auto; background-position: left top; }

/* Gallery / How it works */
.gallery-section { padding: 140px 0; background: var(--paper); overflow: hidden; }
.gallery-container { display: flex; gap: 80px; position: relative; }
.gallery-track { width: 4px; background: rgba(35,39,82,0.1); position: relative; border-radius: 2px; }
.gallery-progress { position: absolute; top: 0; left: 0; width: 100%; background: var(--amber); border-radius: 2px; height: 0%; }
.gallery-content { flex: 1; }
.gallery-step { display: flex; align-items: center; justify-content: space-between; min-height: 56vh; gap: 60px; }
.gs-text { flex: 1; max-width: 400px; }
.gs-num { font-family: 'Outfit', sans-serif; font-size: 80px; font-weight: 300; color: rgba(35,39,82,0.1); transition: color 0.4s; line-height: 1; margin-bottom: 24px; }
.gallery-step.active .gs-num { color: var(--amber); }
.gs-text h3 { font-size: 32px; font-weight: 500; margin-bottom: 16px; color: var(--navy); }
.gs-text p { font-size: 18px; color: var(--text-muted); }
.gs-visual { flex: 1; position: relative; perspective: 1000px; }
.gs-visual img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 30px 60px rgba(0,0,0,0.1); transform: rotateY(-15deg) rotateX(5deg); transition: transform 0.1s linear; transform-style: preserve-3d; border: 1px solid rgba(0,0,0,0.05); }

@media (max-width: 768px) {
    .gallery-container { flex-direction: column; gap: 40px; }
    .gallery-track { display: none; }
    .gallery-step { flex-direction: column; min-height: auto; margin-bottom: 60px; gap: 32px; }
    .gs-visual img { transform: none !important; }
}

/* Videos Section */
.videos-section { padding: 140px 0; background: var(--white); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; margin-top: 60px; }
.video-slot { position: relative; border-radius: 16px; overflow: hidden; background: var(--paper); cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,0.05); aspect-ratio: 16/9; }
.video-slot video { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.7s var(--ease-out); }
.video-slot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease-out); }
.video-slot:hover video { transform: scale(1.05); }
.video-slot:hover img { transform: scale(1.05); }
.video-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.1); transition: background 0.3s; pointer-events: none; }
.video-slot:hover .video-overlay { background: rgba(0,0,0,0.2); }
.play-btn { width: 64px; height: 64px; background: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 20px rgba(0,0,0,0.1); transition: transform 0.3s; }
.video-slot:hover .play-btn { transform: scale(1.1); }
.play-btn::after { content: ''; display: block; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--navy); margin-left: 4px; }
.video-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); color: var(--white); font-weight: 500; font-size: 18px; pointer-events: none; }
.video-overlay, .video-caption { transition: opacity 0.3s; }
.video-slot.is-playing .video-overlay, .video-slot.is-playing .video-caption { opacity: 0; visibility: hidden; pointer-events: none; }

/* Dark Band */
.dark-band { background-color: var(--navy); position: relative; overflow: hidden; padding: 160px 0; text-align: center; }
#dark-band-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.2; pointer-events: none; }
.db-content { position: relative; z-index: 10; max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.db-statement { font-family: 'Outfit', sans-serif; font-size: clamp(32px, 5vw, 56px); font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 48px; }
.db-statement span:first-child { color: var(--white); display: block; }
.db-statement span:last-child { color: rgba(255,255,255,0.5); display: block; }

.final-cta { padding: 120px 0; background: var(--white); text-align: center; border-top: 1px solid var(--border); }
.final-cta h2 { font-size: clamp(48px, 6vw, 72px); letter-spacing: -0.03em; margin-bottom: 40px; }

.hero-fineprint { margin-top: 16px; font-size: 13px; color: var(--text-muted); }

/* Phones: desktop section spacing leaves long blank stretches. Kept last so it wins over the base rules. */
@media (max-width: 768px) {
    .bento-section, .gallery-section, .videos-section { padding: 80px 0; }
    .dark-band { padding: 96px 0; }
    .final-cta { padding: 72px 0; }
    .bento-header { margin-bottom: 40px; }
}

/* Hero video card (click-to-load YouTube facade, styles in site.css) */
.hero { padding-bottom: 72px; }
.hero-split { display: grid; gap: 40px; align-items: center; }
.hero-video figcaption { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: 15px; color: var(--navy); }
.hero-video .yt-link { margin-top: 0; }
@media (min-width: 1024px) {
    .hero-split { width: 100%; max-width: none; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); gap: 56px; }
}
.hero-split h1 { font-size: clamp(44px, 5vw, 72px); }
@media (max-width: 1023px) { .hero-split { padding-top: 8px; } }
