/* ==========================================================================
   5 Rivers Ventures — site styles
   Edit the tokens in :root to re-skin the whole site.
   ========================================================================== */

:root {
  --ink: #12181b;          /* primary text */
  --ink-soft: #39434a;     /* secondary text */
  --muted: #6a7479;        /* captions, labels */
  --paper: #f7f8f7;        /* page background (warm off-white) */
  --paper-2: #eaedec;      /* alternate section background */
  --white: #ffffff;
  --line: #d9dedc;         /* hairlines */
  --accent: #2a7f8f;       /* "sol" amber */
  --accent-deep: #1d5f6d;
  --navy: #10222b;         /* dark bands */
  --navy-2: #17323f;

  --font-display: "Instrument Serif", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 4px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-deep); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block;
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1rem;
}
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--alt { background: var(--paper-2); }
.section--dark { background: var(--navy); color: #eef2f2; }
.section--dark .eyebrow { color: var(--accent); }
.section--dark .muted { color: #a8bcc4; }
.section-head { max-width: 62ch; margin-bottom: clamp(32px, 4vw, 56px); }
.grid { display: grid; gap: clamp(20px, 3vw, 40px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .85em 1.5em;
  font-size: .9rem; font-weight: 500; letter-spacing: .04em;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink); color: var(--paper);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost-light { background: transparent; color: #eef2f2; border-color: rgba(255,255,255,.45); }
.btn--ghost-light:hover { background: #eef2f2; color: var(--ink); border-color: #eef2f2; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.link-arrow { font-weight: 500; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.link-arrow:hover { border-color: var(--ink); }

/* Header ------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,248,247,.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 76px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name strong { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; letter-spacing: .02em; }
.brand-name span { font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: .86rem; font-weight: 500; letter-spacing: .02em; color: var(--ink-soft); padding-block: 6px; border-bottom: 1px solid transparent; }
.nav-links .mobile-only { display: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .btn { padding: .65em 1.15em; font-size: .82rem; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); transition: transform .25s var(--ease), top .25s var(--ease); }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1060px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 14px 0; font-size: 1rem; border-bottom: 0; }
  .nav-open .nav-links { display: flex; }
  .nav-links .mobile-only { display: block; }
  .nav-cta .btn { display: none; }
}

/* Hero ---------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(72px, 11vw, 150px); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 14ch; }
.hero h1 em { font-style: italic; color: var(--accent-deep); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 460px; width: 100%; justify-self: end; }
.hero-art svg { width: 100%; height: 100%; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 300px; justify-self: start; order: -1; }
}

/* Logo strip ---------------------------------------------------------------- */
.logo-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.logo-strip-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px clamp(16px, 3vw, 48px); padding-block: 26px; }
.logo-strip .label { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); flex: 0 0 auto; }
.logo-strip ul { display: flex; flex-wrap: wrap; gap: 6px clamp(18px, 3.4vw, 52px); list-style: none; margin: 0; padding: 0; }
.wordmark {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: .01em; color: var(--ink);
  opacity: .85; transition: opacity .2s var(--ease), color .2s var(--ease);
}
.wordmark:hover { opacity: 1; color: var(--accent-deep); }

/* Stats --------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 0; border: 1px solid var(--line); background: var(--white); }
.stat { padding: 28px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; color: var(--ink); }
.stat .lbl { margin-top: 10px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 600px) { .stat { border-right: 0; border-bottom: 1px solid var(--line); } .stat:last-child { border-bottom: 0; } }

/* Cards --------------------------------------------------------------------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(18,24,27,.35); border-color: #c4ccca; }
.card h3 { margin-top: .6rem; }
.card .idx { font-family: var(--font-display); font-size: 1.1rem; color: var(--accent-deep); }
.card p:last-child { margin-bottom: 0; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--line); padding: 4px 8px; border-radius: 999px; background: var(--paper); }

/* Split --------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split .sticky { position: sticky; top: 100px; }
.split--top { align-items: start; }

/* Steps --------------------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.steps li::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-display); font-size: 2rem; color: var(--accent-deep); line-height: 1; }
.steps h3 { font-size: 1.35rem; margin-bottom: .35em; }
.steps p { margin: 0; color: var(--ink-soft); }
@media (max-width: 600px) { .steps li { grid-template-columns: 56px minmax(0, 1fr); } }

/* Pull quote ---------------------------------------------------------------- */
.pull { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3.4rem); line-height: 1.15; max-width: 24ch; margin: 0; }
.pull em { font-style: italic; color: var(--accent); }

/* Portfolio grid ------------------------------------------------------------ */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 230px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.tile:hover, .tile:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(18,24,27,.35); border-color: #c4ccca; outline: none; }
.tile .t-sector { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* The company name renders as a typographic wordmark. To use a real logo, replace
   the <span class="t-name"> with <img class="t-logo" src="assets/logos/xxx.svg" alt="Company"> */
.tile .t-name { font-family: var(--font-display); font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.05; margin: 28px 0; color: var(--ink); }
.tile .t-logo { max-height: 44px; width: auto; margin: 28px 0; }
.tile .t-foot { display: flex; flex-direction: column; gap: 10px; font-size: .82rem; color: var(--ink-soft); }
.tile .t-foot .more { color: var(--accent-deep); font-weight: 500; white-space: nowrap; }

/* Modal --------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,27,45,.55); backdrop-filter: blur(3px); }
.modal-panel {
  position: relative; width: min(680px, 100%); max-height: 90vh; overflow: auto;
  background: var(--paper); border-radius: 6px; padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.5);
  animation: rise .35s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px);} to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--white); border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1; }
.modal-close:hover { background: var(--ink); color: var(--paper); }
.modal h3 { font-size: clamp(2rem, 4vw, 2.8rem); margin: .4em 0 .3em; }
.modal .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 20px; margin: 22px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modal .facts dt { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.modal .facts dd { margin: 4px 0 0; font-size: .95rem; }

/* Timeline ------------------------------------------------------------------ */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.timeline li { padding: 22px 18px 0 0; position: relative; }
.timeline li::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.timeline .yr { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; }
.timeline .what { display: block; margin-top: 8px; font-size: .92rem; color: var(--ink-soft); }

/* Team ---------------------------------------------------------------------- */
.person { text-align: left; }
.avatar {
  aspect-ratio: 4 / 5; width: 100%; border-radius: var(--radius); margin-bottom: 18px;
  background: linear-gradient(160deg, #dfe5e4, #c4ccca);
  display: grid; place-items: center; overflow: hidden;
}
/* Replace the placeholder initials with a photo: <img src="assets/team/name.jpg" alt="Name"> inside .avatar */
.avatar span { font-family: var(--font-display); font-size: 3rem; color: rgba(18,24,27,.35); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.4rem; margin-bottom: .15em; }
.person .role { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: .8rem; }
.person p { color: var(--ink-soft); font-size: .95rem; }

/* News ---------------------------------------------------------------------- */
.news-item { border-top: 1px solid var(--line); padding: 26px 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 20px; }
.news-item:last-child { border-bottom: 1px solid var(--line); }
.news-item .date { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.news-item h3 { font-size: 1.45rem; margin-bottom: .3em; }
.news-item p { color: var(--ink-soft); margin-bottom: .6em; }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: 6px; } }

/* FAQ ----------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-family: var(--font-display); font-size: 1.35rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--font-body); font-size: 1.4rem; color: var(--accent-deep); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 0 24px; color: var(--ink-soft); max-width: 70ch; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Forms --------------------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 18px; }
.form label { display: grid; gap: 6px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.form input, .form select, .form textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form textarea { min-height: 140px; resize: vertical; }
.form .note { font-size: .82rem; color: var(--muted); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.contact-list li strong { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* Page banner --------------------------------------------------------------- */
.page-banner { padding-block: clamp(56px, 8vw, 100px) clamp(40px, 6vw, 70px); border-bottom: 1px solid var(--line); }
.page-banner h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); max-width: 16ch; }
.page-banner .lede { margin-top: 1rem; }

/* CTA band ------------------------------------------------------------------ */
.cta-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; }
.cta-band h2 { margin: 0; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* Footer -------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #c2cbc9; padding-block: 64px 32px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { font-family: var(--font-body); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: #7f8e92; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .brand-name strong { color: #eef2f2; }
.site-footer .brand-name span { color: #7f8e92; }
.footer-disc { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: .76rem; line-height: 1.6; color: #7f8e92; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 24px; font-size: .78rem; color: #7f8e92; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Reveal on scroll ----------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Utilities ---------------------------------------------------------------- */
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.ph { color: var(--accent-deep); }  /* marks placeholder text to replace: [LIKE THIS] */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logo wall (K2-style portfolio grid) ------------------------------------------ */
.logo-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.logo-wall .tile { min-height: 150px; padding: 28px; display: grid; place-items: center; text-align: center; }
.logo-wall .tile .t-name { display: none; }
.logo-wall img.logo { width: 170px; height: 56px; object-fit: contain; }
.logo-wall .wordmark { font-size: clamp(1.4rem, 2vw, 1.75rem); }
.logo-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px clamp(32px, 5vw, 72px); padding-block: 36px; }
.logo-row img.logo { width: 150px; height: 44px; object-fit: contain; opacity: .9; }
.logo-row .wordmark { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.statement { text-align: center; }
.statement .pull { margin-inline: auto; max-width: 22ch; }
.statement p { max-width: 52ch; margin: 1.2rem auto 0; }
.pillars .card { text-align: left; }
.modal .m-logo { margin: 8px 0 18px; display: flex; align-items: center; min-height: 48px; }
.modal .m-logo img { width: 200px; height: 48px; object-fit: contain; object-position: left center; }
.modal .m-logo .wordmark { font-size: 2rem; }
.timeline li .t-logo-wrap { margin-top: 12px; min-height: 40px; display: flex; align-items: center; }
.timeline li img.logo { width: 140px; height: 34px; object-fit: contain; object-position: left center; }
.timeline li .wordmark { font-size: 1.2rem; }
