/* bancaOS landing page.
   One theme (dark, the brand's identity), one accent (blue), one radius rule:
   buttons and pills are full-pill, tiles and the phone are 24px, inputs are 12px. */

@font-face { font-family: Geist; src: url(assets/fonts/geist-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: Outfit; src: url(assets/fonts/outfit-200-latin.woff2) format("woff2"); font-weight: 200; font-display: swap; }

:root {
  --bg: #07080A;
  --bg-2: #0D0F13;
  --tile: #12151B;
  --line: rgba(255, 255, 255, 0.09);
  --text: #F3F4F6;
  --muted: #A3A8B3;
  --accent: #3B9CFF;
  --accent-soft: rgba(59, 156, 255, 0.14);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --r-tile: 24px;
  --r-input: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
/* Fine grain on a fixed layer, never on scrolling containers */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
.wrap { width: min(1280px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: 16px; top: -56px; z-index: 40; padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); transition: transform 160ms var(--ease-out); }
.skip:focus { transform: translateY(72px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Wordmark: Outfit 200, "banca" white, "OS" blue */
.wordmark { font-family: Outfit, Geist, sans-serif; font-weight: 200; font-size: 30px; letter-spacing: -0.5px; text-decoration: none; }
.wordmark span { color: var(--accent); }

/* Header: transparent over the hero, frosted once it scrolls (class set by an observer) */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; transition: background-color 200ms ease, border-color 200ms ease; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(7, 8, 10, 0.72); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border-color: var(--line); }
.nav-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; }
.nav nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav nav a:not(.btn) { color: rgba(243, 244, 246, 0.78); text-decoration: none; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .nav nav a:not(.btn):hover { color: var(--text); } }
@media (max-width: 640px) { .nav nav a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--text); color: #07080A; font: 600 16px/1 Geist, sans-serif;
  text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-small { height: 40px; padding: 0 18px; font-size: 14px; }
/* Frosted glass button over the photo: a web approximation, with a solid fallback */
.btn-glass {
  background: rgba(255, 255, 255, 0.1); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #FFFFFF; }
  .btn-glass:hover { background: rgba(255, 255, 255, 0.18); }
}
@media (prefers-reduced-transparency: reduce) { .btn-glass { background: #1E2229; backdrop-filter: none; } }

/* Hero: full-bleed photograph with the copy on the dark side */
.hero { position: relative; min-height: min(100dvh, 920px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; animation: settle 1600ms var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
.hero-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(7, 8, 10, 0.94) 0%, rgba(7, 8, 10, 0.78) 34%, rgba(7, 8, 10, 0.2) 64%, rgba(7, 8, 10, 0.35) 100%),
  linear-gradient(180deg, rgba(7, 8, 10, 0.5) 0%, transparent 22%, transparent 70%, var(--bg) 100%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 40px; align-items: end; padding: 120px 0 72px; }
.pill { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: #8CC6FF; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(59, 156, 255, 0.28); }
h1 { margin-top: 22px; font-size: clamp(44px, 6.4vw, 88px); font-weight: 650; letter-spacing: -0.045em; line-height: 1; max-width: 12ch; text-wrap: balance; }
.lead { margin-top: 22px; max-width: 34ch; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: rgba(243, 244, 246, 0.8); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.enter { opacity: 0; transform: translateY(10px); animation: enter 520ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 70ms + 120ms); }
@keyframes enter { to { opacity: 1; transform: none; } }

/* Notifications: the agent's finished work, arriving one by one */
/* Notifications: a fixed two-slot stack. Toasts are absolutely placed and moved
   with transform only, so a new one arriving never changes the layout (no jumps). */
.toasts { --toast-h: 92px; --toast-gap: 10px; position: relative; list-style: none; margin: 0; padding: 0; justify-self: end; align-self: end; width: min(360px, 100%); height: calc(var(--toast-h) * 2 + var(--toast-gap)); }
.toast {
  position: absolute; top: 0; left: 0; right: 0; height: var(--toast-h); box-sizing: border-box; overflow: hidden;
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start;
  padding: 14px 16px; border-radius: 20px;
  background: rgba(20, 24, 31, 0.78); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 18px 50px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(-14px) scale(0.98); transform-origin: top center;
  transition: opacity 420ms var(--ease-out), transform 520ms var(--ease-out);
  will-change: transform, opacity;
}
.toast.in { opacity: 1; }
.toast.out { opacity: 0; transition-duration: 240ms; }
.toast p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast .orb { width: 36px; height: 36px; }
.toast b { display: block; font-size: 14px; }
.toast p { font-size: 15px; line-height: 1.35; color: rgba(243, 244, 246, 0.86); }
.toast time { font-size: 13px; color: var(--muted); }

.orb { display: block; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #A8E2FF, var(--accent) 52%, #0B2A8F); }

/* Marquee: one per page, the breadth of what customers can ask */
.asks { padding: 28px 0; border-block: 1px solid var(--line); background: var(--bg); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.track { display: flex; gap: 14px; width: max-content; list-style: none; margin: 0; padding: 0; animation: slide 46s linear infinite; }
.track li { padding: 12px 22px; border-radius: 999px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; white-space: nowrap; }
.track li::before { content: "“"; color: var(--accent); margin-right: 2px; }
.track li::after { content: "”"; color: var(--accent); margin-left: 2px; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) { .marquee:hover .track { animation-play-state: paused; } }

/* Story: copy scrolls, the phone stays and acts out each step */
.story { padding: 140px 0 120px; }
.story-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.story h2 { font-size: clamp(48px, 6vw, 84px); font-weight: 650; letter-spacing: -0.045em; line-height: 0.98; margin-bottom: 16vh; }
.story-copy { padding-bottom: 30vh; }
.step { min-height: 46vh; padding-top: 4px; opacity: 0.32; transition: opacity 320ms ease; }
.step.on { opacity: 1; }
.step h3 { font-size: clamp(30px, 3vw, 40px); font-weight: 600; letter-spacing: -0.03em; }
.step h3::before { content: ""; display: inline-block; width: 28px; height: 3px; margin: 0 14px 0 0; vertical-align: middle; border-radius: 3px; background: var(--accent); }
.step p { margin-top: 12px; max-width: 34ch; font-size: 20px; color: var(--muted); }
.story-phone { position: sticky; top: max(88px, calc(50vh - 330px)); justify-self: center; }
/* Short windows: shrink the phone so it never runs off the screen while pinned */
@media (min-width: 961px) and (max-height: 820px) {
  .story-phone .phone { transform: scale(0.8); transform-origin: top center; }
}
@media (min-width: 961px) and (max-height: 640px) {
  .story-phone .phone { transform: scale(0.66); }
}

.phone { position: relative; width: 320px; height: 660px; border-radius: 54px; padding: 11px; background: #1C1F25; box-shadow: 0 0 0 2px #343842, 0 50px 120px rgba(0, 0, 0, 0.55), 0 0 120px rgba(59, 156, 255, 0.12); }
.island { position: absolute; left: 50%; top: 21px; width: 96px; height: 28px; margin-left: -48px; border-radius: 16px; background: #000; z-index: 3; }
.screen { position: relative; height: 100%; border-radius: 44px; overflow: hidden; background: #F2F3F6; color: #15171C; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 64px 22px 0; }
.chat-head .orb { width: 38px; height: 38px; }
.chat-head b { display: block; font-size: 17px; }
.chat-head small { display: block; font-size: 13px; color: #7C818C; }
.chat { position: absolute; left: 14px; right: 14px; bottom: 26px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 84%; padding: 11px 15px; font-size: 15px; line-height: 1.35; opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out); }
.msg.in { opacity: 1; transform: none; }
.me { align-self: flex-end; background: #0A84FF; color: #fff; border-radius: 20px 20px 6px 20px; transform-origin: 100% 100%; }
.bot { align-self: flex-start; background: #fff; border-radius: 20px 20px 20px 6px; transform-origin: 0 100%; }
.box { align-self: stretch; max-width: none; background: #fff; border-radius: 20px; padding: 14px 16px; transform-origin: 0 100%; }
.box .t { font-weight: 600; }
.box .s { color: #7C818C; font-size: 14px; }
.box .v { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; margin-top: 4px; }
.approve { margin-top: 12px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: #15171C; color: #fff; font-weight: 600; font-size: 15px; transition: transform 160ms var(--ease-out), background-color 220ms ease, color 220ms ease; }
.approve span { transition: filter 200ms ease, opacity 200ms ease; }
.approve.pressed { transform: scale(0.97); }
.approve.swap span { filter: blur(2px); opacity: 0; }
.approve.done { background: #30D158; color: #04300E; }

/* For banks: asymmetric grid, 5 tiles for 5 messages */
.banks { padding: 40px 0 72px; }
.banks h2, .contact h2 { font-size: clamp(38px, 4.6vw, 64px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.02; max-width: 16ch; }
.bento { margin-top: 48px; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(220px, auto); gap: 16px; }
.tile { position: relative; overflow: hidden; border-radius: var(--r-tile); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.tile h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.tile p { color: var(--muted); max-width: 36ch; }
.tile-wide { grid-column: span 8; grid-row: span 2; }
.tile-accent { grid-column: span 4; background: radial-gradient(120% 120% at 100% 0%, rgba(59, 156, 255, 0.45), rgba(59, 156, 255, 0.08) 55%, var(--tile) 80%); }
.bento > .tile:nth-child(3) { grid-column: span 4; }
.tile-tall { grid-column: span 5; grid-row: span 2; }
.tile-start { grid-column: span 7; grid-row: span 2; justify-content: center; align-items: flex-start; background: linear-gradient(160deg, #10213B 0%, var(--tile) 60%); }
.tile-start h3 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.035em; }
.tile-start .btn { margin-top: 18px; }
.tile-photo { padding: 0; }
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.tile-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(7, 8, 10, 0.88) 100%); }
.tile-photo figcaption { position: relative; z-index: 1; padding: 30px; display: grid; gap: 8px; margin-top: auto; }
.tile-photo figcaption p { color: rgba(243, 244, 246, 0.8); }
@media (hover: hover) and (pointer: fine) { .tile-photo:hover img { transform: scale(1.03); } }

/* For investors: full-bleed statement */
.investors { position: relative; isolation: isolate; overflow: hidden; min-height: min(78vh, 760px); display: flex; align-items: flex-end; }
.inv-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.inv-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 8, 10, 0.82) 0%, rgba(7, 8, 10, 0.6) 38%, rgba(7, 8, 10, 0) 72%), linear-gradient(180deg, var(--bg) 0%, rgba(7, 8, 10, 0.3) 28%, rgba(7, 8, 10, 0.55) 62%, var(--bg) 100%); }
.inv-inner { padding: 0 0 120px; }
.investors h2 { font-size: clamp(48px, 7.4vw, 112px); font-weight: 650; letter-spacing: -0.05em; line-height: 0.95; max-width: 11ch; }
.investors .lead { max-width: 44ch; }
.investors .btn { margin-top: 34px; }

/* Contact: split */
.contact { padding: 140px 0; }
.contact-inner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.contact .lead { color: var(--muted); }
.direct { margin-top: 28px; font-size: 20px; }
.direct a { text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; }
.form { display: grid; gap: 16px; padding: 32px; border-radius: var(--r-tile); background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 500; color: #C3C7CF; }
input, select, textarea { width: 100%; padding: 13px 15px; border-radius: var(--r-input); border: 1px solid rgba(255, 255, 255, 0.14); background: #0B0D11; color: var(--text); font: 400 16px/1.4 Geist, sans-serif; transition: border-color 150ms ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
[aria-invalid="true"] { border-color: #FF7A70; }
textarea { resize: vertical; }
.error { min-height: 0; font-size: 14px; color: #FF9A92; }
.error:empty { display: none; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hint { font-size: 14px; color: var(--muted); }

.footer { padding: 36px 0 52px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; }
.footer .wordmark { font-size: 24px; color: var(--text); }

/* Reveal once on entering the viewport */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.js .reveal.shown { opacity: 1; transform: none; }

/* Tablet and phone: everything collapses to one column */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 112px 0 48px; }
  .hero-img { object-position: 72% 40%; }
  .hero-shade { background: linear-gradient(180deg, rgba(7, 8, 10, 0.55) 0%, rgba(7, 8, 10, 0.35) 30%, rgba(7, 8, 10, 0.88) 62%, var(--bg) 100%); }
  .toasts { justify-self: start; }
  .story { padding: 96px 0; }
  .story-inner { grid-template-columns: 1fr; gap: 48px; }
  .story h2 { margin-bottom: 40px; }
  .story-copy { padding-bottom: 0; }
  .step { min-height: 0; opacity: 1; margin-bottom: 32px; }
  .story-phone { position: static; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento > .tile { grid-column: auto !important; grid-row: auto !important; min-height: 220px; }
  .tile-photo { min-height: 380px; }
  .tile-photo::after { background: linear-gradient(180deg, rgba(7, 8, 10, 0.1) 25%, rgba(7, 8, 10, 0.92) 78%); }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .ctas .btn { flex: 1 1 auto; }
  .phone { transform: scale(0.92); transform-origin: top center; margin-bottom: -50px; }
  .contact, .banks { padding-bottom: 96px; }
}

/* Reduced motion: no movement; the story shows its finished state */
@media (prefers-reduced-motion: reduce) {
  .hero-img { animation: none; }
  .enter, .js .reveal { animation: none; opacity: 1; transform: none; transition: none; }
  .track { animation: none; flex-wrap: wrap; width: auto; padding-inline: 16px; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .msg { opacity: 1; transform: none; transition: none; }
  .toast { transition: opacity 200ms ease; }
  .step { opacity: 1; }
}
