/* ===========================================================
   Merchant Ventures Pvt Ltd — "The Dossier" design system
   An editorial, ledger-inspired layout: index rail, hairline
   rules, numbered rows, duotone photography. No cards, no
   gradients, no rounded pills.
   =========================================================== */

:root {
  --paper: #f5f1e8;
  --paper-raised: #ece5d4;
  --ink: #16233a;
  --ink-soft: #49536a;
  --ink-faint: #838d9c;
  --rule: #d8d4c6;
  --rule-strong: #16233a;
  --accent: #a8791f;
  --accent-ink: #7a5714;
  --accent-soft: #eee1c2;
  --accent-paper: #f6ecd8;

  --rail-w: 272px;
  --maxw: 980px;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
p { margin: 0 0 1em; color: var(--ink-soft); }
::selection { background: var(--ink); color: var(--paper); }

/* ---------- Shell / rail layout ---------- */
.shell { min-height: 100vh; }

.rail {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail-w); z-index: 70;
  background: var(--paper); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 30px 26px 24px;
  overflow-y: auto;
}
.rail-top { display: flex; flex-direction: column; gap: 34px; }
.rail-brand { display: flex; align-items: center; gap: 10px; }
.rail-brand img { height: 34px; width: auto; }

.rail-nav ul { display: flex; flex-direction: column; }
.rail-nav li { border-top: 1px solid var(--rule); }
.rail-nav li:last-child { border-bottom: 1px solid var(--rule); }
.rail-link {
  display: flex; align-items: baseline; gap: 10px; padding: 11px 2px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  transition: color .15s, padding-left .15s; position: relative;
}
.rail-link .n { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); flex-shrink: 0; }
.rail-link:hover, .rail-link.is-active { color: var(--accent); padding-left: 8px; }
.rail-link.is-active .n { color: var(--accent); }
.rail-sub { padding: 0 0 10px 20px; display: flex; flex-direction: column; gap: 7px; }
.rail-sub a { font-family: var(--mono); font-size: 10.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-faint); }
.rail-sub a:hover { color: var(--accent); }

.rail-bottom { display: flex; flex-direction: column; gap: 16px; }
.rail-meta { font-family: var(--mono); font-size: 11px; line-height: 1.7; color: var(--ink-faint); border-top: 1px solid var(--rule); padding-top: 14px; }
.rail-meta strong { display: block; color: var(--ink-soft); font-weight: 700; margin-bottom: 2px; }
.rail-social { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.rail-social a { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--ink-faint); }
.rail-social a:hover { color: var(--accent); }
.rail-cta { border: 1px solid var(--ink); padding: 11px 14px; text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; transition: background .2s, color .2s; }
.rail-cta:hover { background: var(--ink); color: var(--paper); }

.content { margin-left: var(--rail-w); min-height: 100vh; }

/* ---------- Mobile top bar ---------- */
.topbar { display: none; }
.mobile-nav { display: none; }
@media (max-width: 980px) {
  .rail { display: none; }
  .content { margin-left: 0; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 70; background: var(--paper);
    border-bottom: 1px solid var(--rule); padding: 0 20px; height: 62px;
  }
  .topbar img { height: 28px; }
  .topbar-toggle {
    font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    border: 1px solid var(--ink); background: none; padding: 9px 14px; cursor: pointer;
  }
  .mobile-nav {
    display: block;
    position: fixed; top: 62px; left: 0; right: 0; height: calc(100vh - 62px);
    background: var(--paper); z-index: 65; overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
    padding: 8px 24px 40px;
  }
  .mobile-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .mobile-nav ul { display: flex; flex-direction: column; }
  .mobile-nav li { border-top: 1px solid var(--rule); }
  .mobile-nav li:last-child { border-bottom: 1px solid var(--rule); }
  .mobile-nav .rail-link { padding: 16px 2px; font-size: 20px; font-family: var(--serif); }
  .mobile-nav .rail-link .n { font-size: 12px; }
  .mobile-nav .rail-sub { padding: 0 0 14px 4px; }
  .mobile-nav .rail-sub a { font-size: 11.5px; }
  .mobile-nav .rail-bottom { margin-top: 24px; }
}

/* ---------- Masthead (page hero) ---------- */
.masthead { padding: 76px 64px 52px; border-bottom: 1px solid var(--rule); }
.folio { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.folio::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.masthead h1 { font-size: clamp(38px, 6vw, 84px); line-height: 0.98; max-width: 920px; }
.masthead .lead { font-size: 17.5px; max-width: 600px; margin-top: 24px; }
.masthead-home h1 { font-size: clamp(42px, 7.2vw, 98px); }
.masthead-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; background: var(--ink); color: var(--paper); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ticker-track { display: inline-flex; animation: ticker 32s linear infinite; }
.ticker-track span { font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; padding: 13px 0; }
.ticker-track span::after { content: "—"; margin: 0 22px; color: var(--accent); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 60px 64px; border-bottom: 1px solid var(--rule); }
.section--tight { padding: 40px 64px; }
.section--ink { background: var(--ink); color: var(--paper); }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: var(--paper); }
.section--ink p { color: #b7bfcc; }
.section--ink .rule { border-color: rgba(245,241,232,0.18); }
.section--raised { background: var(--paper-raised); }
.section-label { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.section--ink .section-label { color: #8e99ab; }
.section-label .sq { width: 7px; height: 7px; background: var(--accent); flex-shrink: 0; }
.section h2 { font-size: clamp(26px, 3.2vw, 42px); line-height: 1.1; max-width: 760px; }
.section-head { margin-bottom: 40px; }
.section-head .lead { max-width: 640px; margin-top: 16px; font-size: 16px; }

/* ---------- Index rows (services / masthead lists) ---------- */
.index-list { border-top: 1px solid var(--ink); }
.section--ink .index-list { border-top-color: rgba(245,241,232,0.35); }
.index-row {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: start; gap: 18px 24px;
  padding: 26px 0; border-bottom: 1px solid var(--rule); transition: background .2s;
}
.section--ink .index-row { border-bottom-color: rgba(245,241,232,0.14); }
a.index-row { cursor: pointer; }
a.index-row:hover { background: var(--accent-soft); margin: 0 -20px; padding: 26px 20px; }
.section--ink a.index-row:hover { background: rgba(245,241,232,0.06); }
.index-row .num { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 4px; }
.index-row h3 { font-size: clamp(20px, 2.4vw, 27px); line-height: 1.15; }
.index-row .desc { grid-column: 2 / 3; font-size: 14.5px; margin-top: 8px; max-width: 640px; }
.index-row .go { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; padding-top: 6px; }
a.index-row:hover .go { color: var(--accent); }
.index-row ul.sub { grid-column: 2 / 3; margin-top: 14px; display: flex; flex-direction: column; gap: 7px; }
.index-row ul.sub li { font-size: 13.5px; color: var(--ink-soft); padding-left: 16px; position: relative; }
.index-row ul.sub li::before { content: "—"; position: absolute; left: 0; color: var(--ink-faint); }

/* team rows (accordion) */
.team-row { border-bottom: 1px solid var(--rule); padding: 26px 0; }
.team-row-head { display: grid; grid-template-columns: 64px 1fr auto; align-items: baseline; gap: 18px 24px; cursor: pointer; }
.team-row .num { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.team-row h3 { font-size: clamp(20px, 2.2vw, 26px); display: inline; }
.team-row .role { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); display: block; margin-top: 6px; }
.team-row .toggle { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.team-row.is-open .toggle { color: var(--accent); }
.team-row .quote { grid-column: 2/3; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ink); margin-top: 10px; max-width: 600px; }
.team-row .bio { grid-column: 2/3; max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); font-size: 14.5px; }
.team-row.is-open .bio { max-height: 4000px; }
.team-row .bio p { font-size: 14.5px; margin-top: 16px; max-width: 680px; }

/* ---------- Pull quote ---------- */
.pull-quote { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 32px); line-height: 1.32; border-left: 2px solid var(--accent); padding-left: 26px; margin: 10px 0 34px; max-width: 720px; }
.pull-quote cite { display: block; font-family: var(--mono); font-style: normal; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-top: 14px; }

/* ---------- Prose ---------- */
.prose { max-width: 720px; }
.prose h3 { font-size: 22px; margin: 44px 0 14px; }
.prose h3:first-child { margin-top: 0; }
.prose p { font-size: 15.5px; }
.prose-wide { max-width: none; }

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  padding: 15px 26px; border: 1px solid var(--ink); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-accent { border-color: var(--accent); color: var(--accent); }
.btn-accent:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn-ghost { border-color: var(--ink-faint); color: var(--ink-soft); }
.section--ink .btn { border-color: var(--paper); color: var(--paper); }
.section--ink .btn:hover { background: var(--paper); color: var(--ink); }
.btn svg { width: 13px; height: 13px; }

.link-arrow { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 3px; display: inline-flex; align-items: center; gap: 8px; }
.link-arrow svg { width: 12px; height: 12px; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Grids / columns ---------- */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }

/* ---------- Feature list (no icons-in-boxes; numbered) ---------- */
.feat { border-top: 1px solid var(--rule); padding-top: 18px; }
.section--ink .feat { border-top-color: rgba(245,241,232,0.18); }
.feat .n { font-family: var(--mono); font-size: 11px; color: var(--accent); display: block; margin-bottom: 10px; }
.feat h4 { font-size: 17px; margin-bottom: 8px; }
.feat p { font-size: 14px; margin: 0; }

/* ---------- Pill-less tags (hairline chips) ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: 9px; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--rule); padding: 7px 12px; }
.section--ink .tag { border-color: rgba(245,241,232,0.25); color: #d4d9e2; }

/* ---------- Checklist ---------- */
.ledger-list { display: flex; flex-direction: column; }
.ledger-list li { display: flex; gap: 14px; font-size: 15px; color: var(--ink-soft); padding: 12px 0; border-top: 1px solid var(--rule); }
.ledger-list li:last-child { border-bottom: 1px solid var(--rule); }
.ledger-list li .mark { font-family: var(--mono); color: var(--accent); flex-shrink: 0; }

/* ---------- Skill rows ---------- */
.skill-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--rule); gap: 16px; }
.skill-row:last-child { border-bottom: 1px solid var(--rule); }
.skill-row .label { font-size: 14.5px; font-weight: 600; }
.skill-row .val { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.skill-row .bar { grid-column: 1/-1; height: 2px; background: var(--rule); margin-top: 10px; position: relative; }
.skill-row .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); width: 0; transition: width 1.1s var(--ease); display: block; }

/* ---------- Testimonial ---------- */
.testimonial { border-top: 1px solid var(--ink); padding-top: 22px; }
.testimonial p { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink); }
.testimonial .who { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); margin-top: 14px; }
.testimonial .who strong { color: var(--ink-soft); }

/* ---------- Photography (duotone) ---------- */
.photo { position: relative; overflow: hidden; background: var(--ink); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.08) sepia(.32) hue-rotate(-16deg) saturate(2.4) brightness(.92); }
figure.photo { margin: 0; }
figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }

.masthead-photo { margin-top: 44px; aspect-ratio: 21/9; }
.breakout-photo { aspect-ratio: 16/9; margin: 8px 0 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 28px; }
.gallery-grid .photo { aspect-ratio: 4/3; }
.portrait-float { float: right; width: 220px; margin: 4px 0 24px 32px; }
.logo-plate { background: var(--paper); border: 1px solid var(--rule); padding: 18px 24px; display: inline-flex; margin-bottom: 10px; }
.logo-plate img { height: 56px; width: auto; }

/* ---------- Pager (prev/next) ---------- */
.pager { display: flex; justify-content: space-between; align-items: flex-start; padding: 44px 64px; border-bottom: 1px solid var(--rule); gap: 24px; flex-wrap: wrap; }
.pager a { max-width: 340px; }
.pager .dir { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.pager .title { display: block; font-family: var(--serif); font-size: 21px; margin-top: 8px; color: var(--ink); }
.pager a:hover .title { color: var(--accent); }
.pager .next { text-align: right; margin-left: auto; }

/* ---------- CTA section ---------- */
.cta { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta h2 { max-width: 560px; }
.cta p { max-width: 460px; }

/* ---------- Footer (colophon) ---------- */
.site-footer { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.footer-wordmark {
  position: absolute; left: 50%; bottom: -6%; transform: translateX(-50%);
  font-family: var(--serif); font-weight: 700; font-size: 20vw; line-height: 1;
  color: rgba(245,241,232,0.035); white-space: nowrap; pointer-events: none; user-select: none;
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; padding: 64px; border-bottom: 1px solid rgba(245,241,232,0.15); position: relative; z-index: 1; }
.footer-grid h5 { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #8e99ab; margin-bottom: 18px; font-weight: 400; }
.footer-grid ul { display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: 14px; color: #d4d9e2; }
.footer-grid a:hover { color: var(--accent-soft); }
.footer-brand p { font-size: 14px; color: #8e99ab; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; padding: 22px 64px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: #6c7889; position: relative; z-index: 1; flex-wrap: wrap; gap: 10px; }

/* ---------- Forms ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.field { border-top: 1px solid var(--rule); padding: 16px 0; }
.field.full { grid-column: 1/-1; }
.field label { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; border: none; background: transparent; font-family: var(--sans); font-size: 15px;
  color: var(--ink); padding: 4px 0; outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field textarea { resize: vertical; min-height: 70px; font-family: var(--sans); }
.form-end { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--ink); }
.form-status { font-family: var(--mono); font-size: 11.5px; margin-top: 16px; }

/* ---------- Office rows ---------- */
.office-row { border-top: 1px solid var(--rule); padding: 22px 0; display: grid; grid-template-columns: 160px 1fr; gap: 20px; }
.office-row:last-child { border-bottom: 1px solid var(--rule); }
.office-row h4 { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 400; }
.office-row p { font-size: 15px; margin: 0; color: var(--ink); }

/* ---------- News rows ---------- */
.news-row { border-top: 1px solid var(--rule); padding: 30px 0; display: grid; grid-template-columns: 180px 1fr; gap: 28px; }
.news-row:last-child { border-bottom: 1px solid var(--rule); }
.news-row .photo { aspect-ratio: 4/3; }
.news-row .meta { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.news-row h3 { font-size: 20px; margin-bottom: 8px; }
.news-row p { font-size: 14.5px; }
.news-row.no-img { grid-template-columns: 1fr; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .masthead, .section, .pager, .footer-grid, .footer-bottom { padding-left: 24px; padding-right: 24px; }
  .section--tight { padding-left: 24px; padding-right: 24px; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; gap: 28px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .index-row, .team-row-head { grid-template-columns: 40px 1fr; }
  .index-row .go { grid-column: 2/3; }
  .office-row, .news-row { grid-template-columns: 1fr; gap: 10px; }
  .news-row .photo { aspect-ratio: 16/9; }
  .form-row { grid-template-columns: 1fr; }
  .footer-wordmark { font-size: 26vw; }
  .portrait-float { float: none; width: 60%; margin: 0 auto 24px; }
}
@media (max-width: 600px) {
  .masthead { padding-top: 48px; padding-bottom: 36px; }
  .section { padding-top: 44px; padding-bottom: 44px; }
}
