/* Chimba Ventures, chimba.ca. Ink on paper. Values come from tokens.css; none are restated here.
   The burst (the one thing in full colour) is on hold, so this page uses no saturated colour at all. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
h1, h2, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.work :focus-visible, .book :focus-visible, .foot :focus-visible { outline-color: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-pill); z-index: 30; }
.skip:focus { top: 12px; }

/* ---------- the logo: always the asset, coloured by the ink ---------- */
.lockup { display: inline-flex; align-items: flex-end; gap: 12px; text-decoration: none; color: inherit; }
.wm { display: block; height: 44px; aspect-ratio: 951.41 / 263.19; background: currentColor; -webkit-mask: url("assets/logo/chimba-wordmark.svg") center / contain no-repeat; mask: url("assets/logo/chimba-wordmark.svg") center / contain no-repeat; }
.lockup .label { font-weight: 700; font-size: 11.5px; letter-spacing: 0.24em; text-transform: uppercase; line-height: 1; padding-bottom: 5px; }

/* ---------- type ---------- */
.h-hero { font-family: var(--serif); font-weight: var(--h-weight); font-size: clamp(44px, 7.4vw, 116px); line-height: 0.98; letter-spacing: var(--h-track); }
.h-1 { font-family: var(--serif); font-weight: var(--h-weight); font-size: clamp(34px, 4.6vw, 68px); line-height: 1.03; letter-spacing: var(--h-track); text-wrap: balance; }
.h-2 { font-family: var(--serif); font-weight: var(--h-weight); font-size: clamp(30px, 3.6vw, 52px); line-height: 1.05; letter-spacing: var(--h-track); text-wrap: balance; }
.body { font-size: clamp(18px, 1.45vw, 21px); max-width: 52ch; }
.eyebrow { font-weight: 700; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; }

/* ---------- buttons: one action, one label ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.6em; font-family: var(--sans); font-weight: 700; font-size: 17px; line-height: 1; text-decoration: none; white-space: nowrap; padding: 18px 26px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); border: 0; cursor: pointer; transition: transform var(--t-fn) var(--ease-out); }
.btn-sm { font-size: 15px; padding: 13px 18px; }
.btn-lg { font-size: clamp(18px, 1.5vw, 21px); padding: 22px 32px; }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn .arr, .v-go .arr { display: inline-block; transition: transform var(--t-fn) var(--ease-out); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn:hover .arr { transform: translateX(5px); }
}

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: 84px; padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; transition: background-color 240ms ease, box-shadow 240ms ease, height 240ms var(--ease-out); }
.nav.is-stuck { height: 68px; background: var(--paper); background: color-mix(in srgb, var(--paper) 93%, transparent); box-shadow: 0 1px 0 var(--rule); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav .wm { transition: height 240ms var(--ease-out); }
.nav.is-stuck .wm { height: 36px; }

/* ---------- 1. hero ---------- */
.hero { position: relative; min-height: min(100dvh, 900px); padding: clamp(120px, 17vh, 176px) var(--pad) clamp(170px, 21vw, 300px); overflow: hidden; }
.hero-copy { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; }
.nb { white-space: nowrap; }
.h-hero .ln { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.h-hero .ln > span { display: block; animation: lift var(--t-mo) var(--ease-out) both; animation-delay: calc(var(--i) * 90ms + 60ms); }
.lede { text-wrap: balance; font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.5vw, 38px); line-height: 1.15; letter-spacing: -0.01em; margin: clamp(22px, 2.6vw, 36px) 0 clamp(26px, 2.8vw, 38px); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.cta small { font-size: 16px; max-width: 25em; line-height: 1.4; color: var(--ink-soft); }
.load { animation: rise var(--t-mo) var(--ease-out) both; animation-delay: calc(var(--i) * 90ms + 60ms); }
@keyframes lift { from { transform: translateY(112%); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes fade { from { opacity: 0; } }

/* the engraving: a cable-stayed bridge and a container ship, drawn in on load */
.engraving { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; min-height: 120px; z-index: 1; opacity: 0.55; pointer-events: none; }
.engraving path { fill: none; stroke: var(--ink); stroke-width: 1.15; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2200ms var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * 1ms + 500ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- 2. how we work (the one ink panel) ---------- */
.work { background: var(--ink); color: var(--paper); border-radius: var(--r-card); margin: 0 clamp(8px, 1.4vw, 20px); padding: clamp(56px, 8vw, 128px) calc(var(--pad) - clamp(8px, 1.4vw, 20px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); }
.work-head { position: sticky; top: 112px; align-self: start; }
.work-head .body { margin-top: 24px; color: color-mix(in srgb, var(--paper) 82%, var(--ink)); }
.qs li { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: baseline; padding: clamp(22px, 2.8vw, 38px) 0; border-top: 1px solid color-mix(in srgb, var(--paper) 22%, var(--ink)); }
.qs li:first-child { border-top: 0; padding-top: 6px; }
.q-n { font-family: var(--serif); font-weight: 600; font-size: 20px; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--paper); display: grid; place-items: center; transform: translateY(-5px); }
.qs p { font-family: var(--serif); font-weight: 500; font-size: clamp(23px, 2.5vw, 36px); line-height: 1.12; letter-spacing: -0.012em; text-wrap: balance; }
.qs .then { grid-template-columns: 1fr; }
.qs .then p { font-family: var(--sans); font-weight: 500; font-size: clamp(18px, 1.45vw, 21px); line-height: 1.5; letter-spacing: 0; max-width: 44ch; color: color-mix(in srgb, var(--paper) 82%, var(--ink)); }

/* ---------- 3. where we would start ---------- */
.start { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 150px) var(--pad); display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.tabs { display: flex; flex-direction: column; margin-top: clamp(22px, 3vw, 40px); border-top: 1.5px solid var(--ink); }
.tab { all: unset; box-sizing: border-box; cursor: pointer; position: relative; padding: 20px 44px 20px 0; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-weight: 500; font-size: clamp(21px, 2vw, 28px); letter-spacing: -0.01em; color: var(--ink-soft); transition: color var(--t-fn) ease; }
.tab::after { content: "→"; font-family: var(--sans); position: absolute; right: 6px; top: 50%; transform: translate(-10px, -50%); opacity: 0; transition: transform var(--t-tr) var(--ease-out), opacity var(--t-fn) ease; }
.tab.is-on { color: var(--ink); font-weight: 600; }
.tab.is-on::after { opacity: 1; transform: translate(0, -50%); }
.tab::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.tab.is-on.is-timed::before { animation: tabfill var(--tab-ms, 5200ms) linear forwards; }
@keyframes tabfill { to { transform: scaleX(1); } }
.tab:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--ink); } }

.start-panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-card); padding: clamp(26px, 3.6vw, 56px); min-height: clamp(380px, 33vw, 460px); display: flex; flex-direction: column; align-items: flex-start; }
.start-kicker { font-weight: 700; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 18px; }
.start-big { font-family: var(--serif); font-weight: 500; font-size: clamp(25px, 2.8vw, 42px); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
.start-small { font-size: 17px; color: var(--ink-soft); margin: 22px 0 30px; max-width: 46ch; }
.start-small b { color: var(--ink); }
.start-panel .btn { margin-top: auto; }
.start-panel .sw { transition: opacity 240ms ease, transform var(--t-tr) var(--ease-out); }
.start-panel.is-out .sw { opacity: 0; transform: translateY(14px); transition-duration: 160ms; }

/* ---------- 4. ventures ---------- */
.ventures { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(80px, 11vw, 168px); }
.ventures .h-2 { max-width: 16em; }
.v-grid { display: grid; align-items: start; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(14px, 1.8vw, 26px); margin-top: clamp(26px, 3.4vw, 52px); }
.v-card { position: relative; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-card); padding: clamp(22px, 2.6vw, 40px) clamp(22px, 2.6vw, 40px) 0; overflow: hidden; text-decoration: none; }
.v-2 { background: var(--paper-2); margin-top: clamp(0px, 5vw, 72px); }
.v-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.v-logo { height: 40px; width: auto; }
.v-icon { height: 44px; border-radius: 10px; }
.v-tag { font-size: 13.5px; font-weight: 700; padding: 7px 13px; border-radius: var(--r-pill); border: 1.5px solid var(--ink); white-space: nowrap; }
.v-line { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.4; margin: clamp(20px, 2.4vw, 34px) 0 clamp(22px, 2.6vw, 36px); max-width: 34em; }
.v-shot { margin-top: auto; border-radius: 12px 12px 0 0; overflow: hidden; height: clamp(230px, 27vw, 390px); box-shadow: 0 0 0 1px var(--rule), 0 -20px 50px -34px color-mix(in srgb, var(--ink) 55%, transparent); transform: translateY(14px); transition: transform var(--t-tr) var(--ease-out); }
.v-shot img { width: 165%; max-width: none; height: auto; }
.v-go { position: absolute; left: clamp(22px, 2.6vw, 40px); bottom: clamp(18px, 2vw, 28px); background: var(--ink); color: var(--paper); font-weight: 700; font-size: 15px; padding: 11px 17px; border-radius: var(--r-pill); display: inline-flex; gap: 8px; }
@media (hover: hover) and (pointer: fine) {
  .v-card:hover .v-shot { transform: translateY(0); }
  .v-card:hover .arr { transform: translateX(4px); }
}
.v-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); padding: clamp(24px, 3vw, 44px) 0; margin-top: clamp(14px, 2vw, 30px); }
.v-name { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 2.8vw, 40px); letter-spacing: var(--h-track); line-height: 1.05; }
.v-row .v-line { margin: 12px 0 0; }

/* ---------- 5. purpose ---------- */
.purpose { position: relative; text-align: center; padding: clamp(40px, 6vw, 96px) var(--pad) clamp(96px, 13vw, 200px); max-width: var(--max); margin: 0 auto; }
.flower { display: block; width: clamp(64px, 7vw, 104px); aspect-ratio: 639 / 635; margin: 0 auto clamp(22px, 3vw, 44px); background: var(--ink); -webkit-mask: url("assets/logo/chimba-symbol.svg") center / contain no-repeat; mask: url("assets/logo/chimba-symbol.svg") center / contain no-repeat; }
.js .flower.rv { transform: translateY(28px) rotate(-50deg) scale(0.6); }
.js .flower.rv.in { transform: none; transition-duration: 700ms, 1400ms; }
.purpose .h-hero { text-wrap: balance; }
.purpose-sub { font-size: clamp(18px, 1.6vw, 23px); max-width: 34em; margin: clamp(20px, 2.4vw, 34px) auto 0; text-wrap: balance; }

/* ---------- 6. Juan ---------- */
.juan { max-width: 1140px; margin: 0 auto; padding: 0 var(--pad) clamp(88px, 12vw, 176px); display: grid; grid-template-columns: clamp(200px, 24vw, 300px) 1fr; column-gap: clamp(28px, 4.6vw, 72px); align-items: start; }
.juan .eyebrow { grid-column: 1 / -1; }
.juan-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-card); display: block; }
.juan .eyebrow { margin-bottom: clamp(20px, 2.4vw, 34px); padding-top: 22px; border-top: 1.5px solid var(--ink); }
.juan-line { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.9vw, 42px); line-height: 1.16; letter-spacing: -0.014em; text-wrap: pretty; }
.juan-line + .juan-line { margin-top: 0.55em; }
.sign { margin-top: clamp(28px, 3.4vw, 48px); font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 2vw, 28px); }
.sign span { display: block; font-family: var(--sans); font-weight: 500; font-size: 15px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- 7. book ---------- */
.book { background: var(--ink); color: var(--paper); border-radius: var(--r-card) var(--r-card) 0 0; margin: 0 clamp(8px, 1.4vw, 20px); padding: clamp(72px, 10vw, 160px) var(--pad); text-align: center; }
.book-sub { font-size: clamp(18px, 1.6vw, 23px); margin: 22px auto 36px; max-width: 30em; color: color-mix(in srgb, var(--paper) 86%, var(--ink)); text-wrap: balance; }

.foot { background: var(--ink); color: var(--paper); margin: 0 clamp(8px, 1.4vw, 20px) clamp(8px, 1.4vw, 20px); border-radius: 0 0 var(--r-card) var(--r-card); border-top: 1px solid color-mix(in srgb, var(--paper) 22%, var(--ink)); padding: 28px calc(var(--pad) - clamp(8px, 1.4vw, 20px)); display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: flex-end; justify-content: space-between; font-size: 15px; }
.foot .wm { height: 34px; }
.foot p { opacity: 0.8; }

/* the action follows a phone reader down the page */
.stick { display: none; }

/* ---------- scroll reveals (hidden only when the script is there to reveal them) ---------- */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .juan { grid-template-columns: 1fr; }
  .juan-photo { width: 168px; margin-bottom: 26px; }
  body { font-size: 17px; }
  .nav { height: 68px; }
  .nav .btn { display: none; }
  .wm { height: 36px; }
  .nav.is-stuck { height: 58px; } .nav.is-stuck .wm { height: 30px; }
  .lockup { gap: 9px; } .lockup .label { font-size: 10px; padding-bottom: 4px; }
  .hero { min-height: 0; padding-top: 108px; padding-bottom: 150px; }
  .h-hero { font-size: clamp(34px, 10.2vw, 72px); animation: rise var(--t-mo) var(--ease-out) both; }
  .hero .h-hero .ln, .hero .h-hero .ln > span { display: inline; animation: none; overflow: visible; }
  .cta .btn { width: 100%; justify-content: center; }
  .work, .start { grid-template-columns: 1fr; }
  .work-head { position: static; }
  .v-grid { grid-template-columns: 1fr; }
  .v-2 { margin-top: 0; }
  .v-shot img { width: 230%; }
  .v-row .btn, .start-panel .btn, .book .btn { width: 100%; justify-content: center; }
  .btn-lg { padding-inline: 18px; }
  .foot { flex-direction: column; align-items: flex-start; padding-bottom: 96px; }
  .stick { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 25; justify-content: center; box-shadow: 0 0 0 2px var(--paper), 0 14px 30px -12px color-mix(in srgb, var(--ink) 70%, transparent); transform: translateY(140%); transition: transform var(--t-tr) var(--ease-out); }
  .stick.is-on { transform: none; }
}

/* ---------- reduced motion: gentler, not zero ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .h-hero, .h-hero .ln > span { animation: none; }
  .load { animation-name: fade; animation-duration: 400ms; }
  .engraving path { animation: none; stroke-dashoffset: 0; }
  .js .rv, .js .flower.rv { transform: none; transition: opacity 400ms ease; }
  .tab.is-on.is-timed::before { animation: none; }
  .tab.is-on::before { transform: scaleX(1); }
  .btn, .btn .arr, .v-shot, .stick, .nav, .nav .wm { transition: none; }
  .start-panel .sw { transition: opacity 200ms ease; transform: none; }
}
