/* SG Capital Partners concept: one line.
   The monogram is a single continuous stroke, so it draws itself on load. */

:root {
  --ink: #0d1117;
  --ink-2: #3b4350;
  --mute: #5f6874;
  --rule: #dde1e6;
  --mist: #f2f4f6;
  --paper: #ffffff;
  --blue: #0071bc;
  --blue-deep: #005a96;

  --display: "Red Hat Display", system-ui, sans-serif;
  --text: "Red Hat Text", system-ui, sans-serif;
  --gutter: clamp(16px, 3.4vw, 56px);
  --wrap: min(1360px, calc(100vw - 2 * var(--gutter)));
  --section: clamp(80px, 10vw, 168px);
  --ease: cubic-bezier(0.65, 0, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; line-height: 0.98; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wrap { width: var(--wrap); margin-inline: auto; }

/* Header */
.hd { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color 200ms; }
.hd.is-stuck { border-bottom-color: var(--rule); }
.hd__in { width: var(--wrap); margin-inline: auto; height: 80px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: auto; }
.nav { margin-left: auto; display: flex; gap: 32px; }
.nav a { text-decoration: none; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; transition: border-color 160ms; }
.nav a:hover { border-bottom-color: var(--blue); }

/* Hero */
.hero { min-height: calc(100svh - 80px); display: grid; align-items: center; padding: clamp(32px, 5vw, 72px) 0; }
.hero__in { width: var(--wrap); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(3rem, 1rem + 5.4vw, 7.25rem); letter-spacing: -0.04em; line-height: 0.94; }
.hero__lede { margin-top: clamp(24px, 3vw, 40px); max-width: 46ch; font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.3125rem); color: var(--ink-2); }
.index { margin-top: clamp(28px, 3.4vw, 48px); border-top: 1px solid var(--ink); max-width: 560px; }
.index a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.index strong { font-family: var(--display); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.015em; }
.index span { color: var(--mute); }
.index i { font-style: normal; grid-row: span 2; align-self: center; color: var(--blue); font-size: 1.25rem; transition: transform 180ms var(--ease); }
.index a:hover i { transform: translateX(5px); }
.index a:hover strong { color: var(--blue); }
.hero__mark { justify-self: center; width: min(100%, 540px); }
.hero__mark svg { width: 100%; height: auto; overflow: visible; }

/* The draw: the photo sits inside a static monogram mask. White cover strokes (pathLength 1)
   lie on top and slide off along the line, so the landscape is drawn in stroke by stroke.
   Without JS the cover is absent and the filled mark shows straight away. */
.draw .cover { display: none; }
.js .draw .cover { display: inline; }
.draw .cover path { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.js .draw.is-drawn .cover path { animation: draw var(--d, 1.4s) var(--ease) var(--t, 0s) forwards; }
@keyframes draw { to { stroke-dashoffset: -1; } }

/* Rolling headline word: the track moves up one line at a time */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.roll { display: inline-block; height: 1em; line-height: 1; overflow: hidden; vertical-align: top; color: var(--blue); padding-bottom: 0.08em; box-sizing: content-box; }
.roll__track { display: block; transition: transform 700ms var(--ease); }
.roll__track > span { display: block; height: 1em; line-height: 1; padding-bottom: 0.08em; box-sizing: content-box; }
.hero__mark .fill { opacity: 0; transition: opacity 700ms var(--ease); }
.hero__mark .fill.is-on { opacity: 1; }

/* Scroll-driven hero: the section is three screens tall and its content stays pinned,
   so each screen of scrolling moves the headline on one word. */
.hero--scrub { display: block; min-height: 0; height: calc(100svh * 2.6); padding: 0; }
.hero--scrub .hero__in { position: sticky; top: 80px; height: calc(100svh - 80px); min-height: 560px; padding: clamp(24px, 4vw, 56px) 0; }
.hero__steps { display: flex; gap: 8px; margin-top: 28px; }
.hero__steps span { width: 28px; height: 3px; background: var(--rule); transition: background-color 300ms; }
.hero__steps span.is-on { background: var(--blue); }

/* Value comparison: one bar is the point (accent), the other is context (grey).
   Both are direct-labelled; bars grow from the baseline when they come into view. */
.vc { --vc-accent: var(--blue); --vc-context: #848c97; margin: 0; max-width: 760px; }
.vc__title { font-weight: 600; font-size: 1rem; margin-bottom: 18px; }
.vc__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 0; border-top: 1px solid var(--rule, rgba(0,0,0,.12)); }
.vc__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.vc__label { color: inherit; }
.vc__val { font-family: var(--display); font-weight: 600; font-size: clamp(1.75rem, 1rem + 2vw, 3rem); letter-spacing: -0.03em; line-height: 1; }
.vc__track { height: 14px; }
.vc__bar { display: block; height: 100%; width: var(--w); background: var(--vc-context); border-radius: 0 4px 4px 0; transform-origin: left center; transition: transform 1100ms var(--ease); }
.vc__row--focus .vc__bar { background: var(--vc-accent); }
.js .vc:not(.is-in) .vc__bar { transform: scaleX(0); }
.vc__row--focus .vc__val { color: inherit; }
.vc__delta { margin-top: 16px; font-weight: 600; }
.vc__note { margin-top: 6px; font-size: 0.875rem; opacity: 0.8; }

/* How we invest */
.model { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 48px; }
.model__cols { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: clamp(32px, 4vw, 56px); }
.model__col { background: var(--paper); padding: clamp(22px, 2.6vw, 36px); border-top: 3px solid var(--blue); }
.model__col h3 { font-size: clamp(1.75rem, 1rem + 1.6vw, 2.5rem); letter-spacing: -0.03em; }
.model__col p { margin-top: 12px; color: var(--ink-2); }
.model__proof { grid-column: 2; margin-top: clamp(40px, 5vw, 72px); }
.model__proof > p { max-width: 56ch; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem); color: var(--ink-2); margin-bottom: 28px; }
.model .sectors { margin-top: clamp(56px, 6vw, 96px); }
.model__esg { grid-column: 2; margin-top: 20px; color: var(--ink-2); }

/* Recent projects tiles on the home page */
.recent { padding: var(--section) 0 0; }
.recent__head { margin-bottom: clamp(24px, 3vw, 40px); }
.tile + .tile { margin-top: 16px; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 600ms var(--ease); }
.tile.is-playing video { opacity: 1; }
.tile .pp-next__text em { display: block; max-width: 46ch; margin-top: 16px; font-style: normal; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.25rem); color: rgba(255, 255, 255, 0.86); }
.tile .pp-next__text small { font-size: 1rem; }

/* Sections */
.sec { padding: var(--section) 0; }
.sec--mist { background: var(--mist); }
.label { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--blue); letter-spacing: 0; }

.approach { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 48px; }
.approach__statement { font-family: var(--display); font-weight: 400; font-size: clamp(1.75rem, 1rem + 2.4vw, 3.25rem); line-height: 1.12; letter-spacing: -0.025em; max-width: 24ch; }
.sectors { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: clamp(40px, 5vw, 72px); }
.sectors h3 { font-size: 1.5rem; letter-spacing: -0.02em; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.sectors li { padding: 12px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }

/* Projects */
.project + .project { margin-top: var(--section); }
.project__head { width: var(--wrap); margin: 0 auto clamp(28px, 3vw, 44px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px 48px; align-items: end; }
.project__num { font-family: var(--display); font-weight: 600; color: var(--blue); }
.project h2 { font-size: clamp(3rem, 1rem + 6vw, 8rem); letter-spacing: -0.045em; line-height: 0.9; }
.project__place { margin-top: 14px; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); color: var(--ink-2); }
.photo { position: relative; overflow: hidden; background: var(--mist); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--bleed { height: clamp(380px, 78vh, 860px); }
.photo--bleed img { object-position: 50% 62%; }
.caption { margin-top: 12px; font-size: 0.875rem; color: var(--mute); }
.photos { width: var(--wrap); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; }
.photos .photo { aspect-ratio: 4 / 3; }
.photos .photo--tall { aspect-ratio: auto; }
.photos .photo--tall img { position: absolute; inset: 0; }
.project__body { width: var(--wrap); margin: clamp(32px, 4vw, 56px) auto 0; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); gap: 32px 48px; }
.project__body > p { grid-column: span 2; max-width: 58ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); color: var(--ink-2); }
.facts { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.facts div { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 0.875rem; color: var(--mute); }
.facts dd { font-weight: 500; }
.facts a { color: var(--blue); font-weight: 600; text-decoration: none; }
.facts a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Offices */
.offices { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); gap: 40px 48px; }
.offices h2 { font-size: clamp(2.5rem, 1rem + 3.6vw, 4.75rem); letter-spacing: -0.04em; }
.office h3 { font-size: 1.75rem; letter-spacing: -0.02em; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.office address { font-style: normal; margin-top: 16px; color: var(--ink-2); }
.contact { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 12px 48px; padding-top: 28px; border-top: 1px solid var(--rule); }
.contact a { font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 1rem + 1.6vw, 2.5rem); letter-spacing: -0.025em; text-decoration: none; }
.contact a:hover { color: var(--blue); }

/* Enquiry form */
.enquiry { grid-column: 2 / -1; display: grid; gap: 20px; margin-top: 16px; }
.enquiry h3 { font-size: 1.75rem; letter-spacing: -0.02em; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.enquiry__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.enquiry label { display: grid; gap: 6px; font-weight: 500; font-size: 0.9375rem; }
.enquiry input, .enquiry select, .enquiry textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid #b9c0c9; border-radius: 0; padding: 12px 14px; width: 100%; }
.enquiry textarea { resize: vertical; min-height: 140px; }
.enquiry input:focus-visible, .enquiry select:focus-visible, .enquiry textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.enquiry__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.enquiry__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.enquiry button { font: inherit; font-family: var(--display); font-weight: 600; font-size: 1.0625rem; color: var(--paper); background: var(--blue); border: 0; padding: 14px 32px; cursor: pointer; transition: background 160ms; }
.enquiry button:hover { background: var(--blue-deep); }
.enquiry button[disabled] { opacity: 0.6; cursor: wait; }
.enquiry__status { color: var(--ink-2); }
.enquiry__status.is-error { color: #b42318; }

/* Footer */
.ft { background: var(--ink); color: #c7ccd3; padding: 48px 0; font-size: 0.9375rem; }
.ft__in { width: var(--wrap); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.ft .brand { color: var(--paper); }

@media (max-width: 960px) {
  .nav { gap: 20px; }
  .hero__in { grid-template-columns: minmax(0, 1fr); }
  .hero__mark { order: -1; justify-self: start; width: min(46vw, 260px); }
  .approach, .project__head, .project__body, .offices, .model { grid-template-columns: minmax(0, 1fr); }
  .model__cols, .model__proof, .model__esg { grid-column: auto; }
  .sectors, .contact, .enquiry { grid-column: auto; }
  .enquiry__row { grid-template-columns: minmax(0, 1fr); }
  .project__body > p { grid-column: auto; }
}
@media (max-width: 640px) {
  .hd__in { height: 64px; }
  .nav { gap: 14px; font-size: 0.9375rem; }
  .nav a:nth-child(2) { display: none; }
  .brand span { display: none; }
  .hero { min-height: 0; }
  .hero__mark { width: min(38vw, 170px); }
  .hero h1 { font-size: clamp(2.75rem, 12vw, 3.5rem); }
  .hero__lede { margin-top: 20px; }
  .index strong { font-size: 1.25rem; }
  .pp-next.tile { height: min(118vw, 560px); }
  .tile .pp-next__text { gap: 12px; }
  .tile .pp-next__text b { font-size: clamp(2.5rem, 12vw, 3.25rem); }
  .tile .pp-next__text em { margin-top: 12px; font-size: 1rem; }
  .tile .pp-next__text i { display: none; }
}
/* On phones and short screens the hero content is taller than the screen, so pinning it
   clips the headline and leaves screens of dead scrolling. Unpin it and let the word
   change on a timer instead (main.js checks whether the panel is still sticky). */
@media (max-width: 640px), (max-height: 720px) {
  .hero--scrub { height: auto; }
  .hero--scrub .hero__in { position: static; height: auto; min-height: 0; gap: 28px; padding: clamp(24px, 6vw, 56px) 0 clamp(48px, 10vw, 96px); }
}
@media (max-width: 640px) {
  .sectors, .model__cols { grid-template-columns: minmax(0, 1fr); }
  .photos { grid-template-columns: minmax(0, 1fr); }
  .photos .photo--tall { aspect-ratio: 4 / 5; }
  .photo--bleed { height: 70vw; }
}
@media (prefers-reduced-motion: reduce) {
  .vc__bar { transition: none; }
  .js .vc:not(.is-in) .vc__bar { transform: none; }
  .roll__track, .hero__mark .fill { transition: none; }
  .js .draw .cover { display: none; }
  .index i, .nav a { transition: none; }
}
