/* ==========================================================================
   Saimudra Vinimay - Tokens
   ========================================================================== */
:root {
  --base1:#fe6750;
  --base2:#162b75;
  --paper: #F5F3EE;
  --ink: #0E0E0E;
  --navy: #1C2B4A;
  --signal: #C1421D;
  --line: #D8D3C7;
  --paper-raised: #FFFFFF;
  --border: 2px solid var(--ink);
  --shadow-hard: 5px 5px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);
  --max: 98%;
  --gap: 24px;
  --f-display: 'Montserrat', sans-serif;
  --f-body: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

section { border-bottom: var(--border); }
section:last-of-type { border-bottom: none; }

.pad-md { padding: 96px 0; }
.pad-md { padding: 64px 0; }
.pad-sm { padding: 40px 0; }

@media (max-width: 900px) {
  .pad-md { padding: 56px 0; }
  .pad-md { padding: 40px 0; }
  .wrap { padding: 0 20px; }
}

/* ==========================================================================
   Type scale
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.display-1 { font-size: clamp(2.8rem, 6vw, 5.6rem); }
.display-2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.35rem; font-weight: 700; }

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  font-weight: 400;
  line-height: 1.5;
  max-width: 620px;
}

p { max-width: 68ch; }

.label {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.figure {
  font-family: var(--f-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  border-bottom: var(--border);
  background: var(--base1);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.wordmark {
    font-family: var(--f-display);
    font-weight: 600;
    font-size: 2.15rem;
    letter-spacing: 0.2rem;
    font-variant-caps: petite-caps;
    color: var(--paper-raised);
}
.wordmark span { color: var(--signal); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  color:var(--paper);
}

.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  background: none;
  color:var(--paper);
  border: var(--border);
  padding: 8px 12px;
  font-family: var(--f-display);
  font-weight: 700;
  position: absolute;
  right:10px;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 84px; left: 0; right: 0;
    flex-direction: column;
    border-bottom: var(--border);
    padding: 12px 20px 20px;
    gap: 4px;
    background: var(--paper);
    color: var(--ink);
  }
  .nav-links.open { display: flex; }
  .nav-links a { border-bottom: 1px solid var(--line); padding: 12px 4px; }
  .nav-links a:hover, .nav-links a.active { background: none; color: var(--signal); border-color: transparent; border-bottom: 1px solid var(--line); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 26px;
  border: var(--border);
  background: var(--base2);
  color: var(--paper);
  box-shadow: var(--shadow-hard);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(0,0); box-shadow: 1px 1px 0 var(--ink); }

.btn-outline {
  background: var(--base1);
  color: var(--paper);
}

.btn-signal {
  background: var(--signal);
  color: var(--paper);
  box-shadow: var(--shadow-hard);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 72px 0 64px;
  border-bottom: var(--border);
}

.hero-figures {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--border);
  margin-top: 56px;
}

.hero-figures div {
    padding: 20px 0 0;
    border-right: 3px solid var(--line);
    margin-right: 5px;
}

.hero-figures div:last-child { border-right: none; }
.hero-figures .figure { font-size: clamp(2rem, 3.4vw, 3rem); display: block; }
.hero-figures .label { color: #55524A; display: block; margin-top: 6px; }

@media (max-width: 700px) {
  .hero-figures { grid-template-columns: 1fr; }
  .hero-figures div { border-right: none; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
  .hero-figures div:first-child { border-top: none; margin-top: 0; }
}

/* ==========================================================================
   Cards / list rows
   ========================================================================== */
.card {
  border: var(--border);
  background: var(--paper-raised);
  padding: 32px;
}

.card-flat {
  border: var(--border);
  padding: 28px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
@media (max-width: 900px) { .tile-grid { grid-template-columns: 1fr; } }

.row-list { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 90px 1fr 220px 140px;
  gap: var(--gap);
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.row:hover { background: rgba(0,0,0,0.02); }

@media (max-width: 800px) {
  .row { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
}

/* ==========================================================================
   Filters (transactions page)
   ========================================================================== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 0 32px;
}

.filter-btn {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
  border: 2px solid var(--ink);
  background: transparent;
  cursor: pointer;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: var(--border);
  background: var(--ink);
  color: var(--paper);
  padding: 56px 0 28px;
}
.site-footer a:hover { color: var(--signal); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--gap);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer-bottom {
  border-top: 1px solid #333;
  margin-top: 40px;
  padding-top: 20px;
  font-size: 0.82rem;
  color: #9A968C;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   Utility
   ========================================================================== */
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 32px; }
.mt-lg { margin-top: 64px; }
.text-signal { color: var(--signal); }
.text-muted { color: #55524A; }
.divider { border-top: var(--border); margin: 0; }
.eyebrow-none { color:#0000/* intentionally no all-caps eyebrow labels per brief */ }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }

.service-nav {
  display: flex;
  gap: 0;
  border: var(--border);
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.service-nav a {
  flex: 1;
  text-align: center;
  padding: 16px 12px;
  font-weight: 700;
  border-right: 1px solid var(--ink);
  min-width: 140px;
}
.service-nav a:last-child { border-right: none; }
.service-nav a.active { background: var(--navy); color: var(--paper); }
.service-nav a:not(.active):hover { background: var(--line); }

.bank-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bank-list li {
  border: 1px solid var(--ink);
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==========================================================================
   Gallery masonry grid
   ========================================================================== */
.gallery-masonry {
  columns: 3 260px;
  column-gap: 24px;
}
@media (max-width: 900px) { .gallery-masonry { columns: 2 200px; } }
@media (max-width: 560px) { .gallery-masonry { columns: 1; } }

.gallery-item {
  break-inside: avoid;
  margin: 0 0 24px;
  border: var(--border);
  background: var(--paper-raised);
}

.gallery-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  overflow: hidden;
  border-bottom: var(--border);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.gallery-trigger:hover img {
  transform: scale(1.035);
}

.gallery-item figcaption {
  padding: 14px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 14, 0.94);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  margin: 0;
  max-width: min(90vw, 1000px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  border: 3px solid var(--paper);
  background: var(--ink);
}

.lightbox-content figcaption {
  color: var(--paper);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 16px;
  text-align: center;
  max-width: 60ch;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: var(--paper);
  color: var(--ink);
  border: var(--border);
  cursor: pointer;
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1;
  transition: transform 0.12s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { transform: scale(1.06); background: var(--signal); color: var(--paper); }

.lightbox-close {
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

@media (max-width: 640px) {
  .lightbox { padding: 16px; }
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 8px; right: 8px; }
}

/* ==========================================================================
   Mobile overflow fixes - scoped to small screens only, desktop untouched
   ========================================================================== */
@media (max-width: 700px) {

  html, body { overflow-x: hidden; }

  /* 12-col layouts collapse to a single column; kills any inline
     grid-column: 1 / span N spans set in templates */
  .grid-12 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .grid-12 > * {
    grid-column: 1 / -1 !important;
  }

  /* Row-based lists (transactions, about steps, services list) collapse
     to one column regardless of any inline grid-template-columns set
     per-instance in templates !important is needed to beat inline styles */
  .row {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  /* Grid/flex children need min-width:0 to actually shrink instead of
     holding their content's natural width and forcing a scrollbar */
  .grid-12, .grid-12 *,
  .row, .row *,
  .two-col, .two-col *,
  .footer-grid, .footer-grid *,
  .hero-figures, .hero-figures * {
    min-width: 0;
  }

  /* Wordmark: the long name at desktop size/spacing is what's widening
     the sticky header past the viewport */
  .wordmark {
    font-size: 1.25rem;
    letter-spacing: 0.05rem;
    margin-left:2rem;
  }
  .site-header .wrap {
    height: auto;
    padding: 14px 0;
  }

  /* Service tabs: drop the fixed min-width so 3 tabs can actually
     fit a phone width instead of forcing 420px+ */
  .service-nav a {
    min-width: 0;
    flex: 1 1 33%;
    font-size: 0.8rem;
    padding: 12px 6px;
  }

  /* Clear the stray margin-right that isn't reset in the existing
     border-top mobile layout below */
  .hero-figures div {
    margin-right: 0;
  }

  /* Buttons shrink to content instead of holding desktop padding */
  .btn {
    padding: 12px 18px;
    font-size: 0.88rem;
  }

  /* Long unbroken strings (bank names, emails, client names) wrap
     instead of holding a column open */
  h1, h2, h3, p, a, li, td, .figure, .label, .lede {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Any table gets a scoped scroll container instead of blowing out
     the page's own horizontal scroll */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }
}

/* ==========================================================================
   Hero slideshow
   ========================================================================== */
.hero-slideshow {
  position: relative;
  border: var(--border);
  box-shadow: var(--shadow-hard);
  background: var(--ink);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.hero-slideshow-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  margin: 0;
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 40px;
  background: linear-gradient(to top, rgba(14,14,14,0.88), rgba(14,14,14,0));
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-slideshow-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.hero-slideshow-dot {
  width: 10px;
  height: 10px;
  border-radius: 0; /* square dots — consistent with no-rounded-corners system */
  border: 1.5px solid var(--paper);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-slideshow-dot.is-active {
  background: var(--signal);
  border-color: var(--signal);
  transform: scale(1.15);
}

@media (max-width: 700px) {
  .hero-slideshow {
    aspect-ratio: 16 / 10;
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}