/* ==========================================================================
   GS Finance landing page (gs-group.io/finance/)

   One page framed by hairlines, laid out like hsbg.partners: dark ink panels
   (blueprint grid, grain, a cobalt light and a generated graphic) alternate
   with calm Ice sections of plain prose. Cobalt & Ice palette and the GS Group
   type (DM Sans, DM Mono), from the GS Finance brand kit (/finance/brand).

   0. Fonts       4. Panels + hero     8. Who we work with
   1. Tokens      5. Light sections    9. Footer
   2. Base        6. Card panels      10. Motion, reduced motion
   3. Frame       7. Levels
   ========================================================================== */

/* ---------- 0. Fonts (the GS Group site's own files) --------------------- */

@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('/fonts/dm-sans-var.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/dm-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/dm-mono-500.woff2') format('woff2'); }

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  --ink: #0d1430;
  --ink-2: #0a0f27;
  --panel: #080c20;
  --cobalt: #2f4df0;
  --cobalt-2: #2541e2;
  --cobalt-3: #3b5aff;
  --sky: #9fb2ff;
  --ice: #eef1fe;
  --paper: #f5f7fe;
  --white: #ffffff;

  --text: var(--ink);
  --text-body: rgba(13, 20, 48, 0.74);
  --text-meta: rgba(13, 20, 48, 0.56);
  --line: rgba(13, 20, 48, 0.11);
  --line-2: rgba(13, 20, 48, 0.22);

  --on-dark: #eef1fe;
  --on-dark-body: rgba(238, 241, 254, 0.72);
  --on-dark-meta: rgba(238, 241, 254, 0.52);
  --on-dark-line: rgba(238, 241, 254, 0.12);

  --f-sans: 'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --f-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --frame: clamp(10px, 1.7vw, 24px);
  --pad: clamp(22px, 3.4vw, 48px);
  --maxw: 1600px;
  --sec-y: clamp(76px, 9vw, 136px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.08 0 0 0 0 0.19 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 2. Base ------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--paper) var(--grain-light);
  color: var(--text);
  font: 400 17px/1.7 var(--f-sans);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }

h1, h2 { font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1vw, 2.05rem); }
p { text-wrap: pretty; }
a { color: inherit; }

::selection { background: var(--cobalt); color: var(--white); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

/* underline that draws out on hover */
.u {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.5s var(--ease);
}
.u:hover { background-size: 0 1px; background-position: 100% 100%; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: 6px; text-decoration: none;
  transition: top 0.3s var(--ease);
}
.skip:focus { top: 12px; }

/* Lenis smooth scroll drives the native scroll position */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

/* the double slash: GS Finance's own mark detail, used as a bullet and a marker */
.ds { display: inline-block; width: 1.05em; height: 0.56em; background: currentColor;
  clip-path: polygon(52% 0, 72% 0, 20% 100%, 0 100%, 52% 0, 80% 0, 100% 0, 48% 100%, 28% 100%, 80% 0); }

/* ---------- 3. Frame ----------------------------------------------------- */

.frame {
  position: relative;
  width: calc(100% - 2 * var(--frame));
  max-width: var(--maxw);
  margin: 0 auto;
  border-inline: 1px solid var(--line);
}
.frame > * + *, main > * + * { border-top: 1px solid var(--line); }
.band { height: var(--frame); }

/* ---------- 4. Panels + hero --------------------------------------------- */

.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--panel);
  color: var(--on-dark);
}
.panel::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(54% 62% at var(--glow-x, 70%) var(--glow-y, 40%), rgba(47, 77, 240, 0.42), transparent 72%),
    radial-gradient(40% 48% at 0% 100%, rgba(159, 178, 255, 0.08), transparent 70%),
    linear-gradient(180deg, #0c1331 0%, #080c20 100%);
}
.panel::after {
  content: "";
  position: absolute; inset: 0; z-index: 3;
  background: var(--grain-dark);
  pointer-events: none;
}
.panel__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }

.hero {
  --glow-x: 64%;
  --glow-y: 42%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  min-height: clamp(600px, calc(100svh - 2 * var(--frame) - 44px), 900px);
  padding: var(--pad);
}
.hero__top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.hero__logo { width: clamp(150px, 15vw, 214px); height: auto; opacity: 0; transform: translateY(8px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.hero__nav { display: flex; align-items: center; gap: 22px; font-size: 15px; opacity: 0; transition: opacity 0.9s var(--ease) 0.25s; }
.hero__nav .u--light { color: var(--on-dark-body); }
.hero__logo.is-in { opacity: 1; transform: none; }
.hero__nav.is-in { opacity: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 10px; border-radius: 999px;
  background: rgba(238, 241, 254, 0.08); border: 1px solid rgba(238, 241, 254, 0.26);
  color: var(--on-dark); text-decoration: none; white-space: nowrap;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.pill:hover { background: rgba(238, 241, 254, 0.16); border-color: rgba(238, 241, 254, 0.5); }

.hero__title {
  position: relative; z-index: 2;
  max-width: 17.5em;
  font-size: clamp(1.75rem, 1.05rem + 2.2vw, 2.9rem);
  line-height: 1.1;
  color: var(--on-dark);
}
/* on wider screens the headline only breaks between phrases */
@media (min-width: 700px) { .hero__title .ph { white-space: nowrap; } }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero__title .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--n) * 110ms); }
.hero__title.is-in .line > span { transform: none; }

/* ---------- 5. Light sections -------------------------------------------- */

.sec { padding: var(--sec-y) var(--pad); }
.sec h2 { margin-bottom: 26px; }
.prose { max-width: 37em; }
.prose p { color: var(--text-body); }
.prose p + p { margin-top: 1.15em; }
.prose--lead p:first-child { color: var(--text); font-size: clamp(1.08rem, 1rem + 0.35vw, 1.24rem); line-height: 1.62; }

/* where we come in: plain statements in two columns, each led by the double slash */
.sec--where h2 { margin-bottom: clamp(30px, 3.4vw, 44px); }
.where {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(28px, 5vw, 72px);
  max-width: 1120px;
  border-top: 1px solid var(--line);
}
.where li {
  position: relative;
  padding: 20px 0 21px 34px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.55;
  color: var(--text);
}
.where li::before {
  content: ""; position: absolute; left: 0; top: 1.72em;
  width: 17px; height: 9px; background: var(--cobalt);
  clip-path: polygon(52% 0, 72% 0, 20% 100%, 0 100%, 52% 0, 80% 0, 100% 0, 48% 100%, 28% 100%, 80% 0);
}

/* ---------- 6. Card panels -----------------------------------------------
   Desktop: a card on the left, from below the panel top to its bottom, and the
   generated graphic on the right. Narrow: graphic first, card underneath. */

.split {
  --glow-x: 72%;
  --glow-y: 46%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: clamp(560px, 62vw, 780px);
}
.split__art { grid-column: 2; position: relative; min-height: 280px; }
.card {
  grid-column: 1; grid-row: 1; align-self: end;
  position: relative; z-index: 2;
  margin-top: clamp(96px, 10vw, 150px);
  padding: clamp(36px, 4.4vw, 64px) var(--pad) clamp(40px, 5vw, 72px);
  background: linear-gradient(180deg, #060918 0%, #070b1d 100%);
  color: var(--on-dark);
}
.card h2 { margin-bottom: 18px; }
.card > p { color: var(--on-dark-body); max-width: 31em; }
.card--paper { background: var(--paper) var(--grain-light); color: var(--text); }
.card--paper > p { color: var(--text-body); }

/* what we do */
.svc { margin-top: 30px; border-top: 1px solid var(--on-dark-line); }
.svc__item {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr);
  gap: 6px 28px;
  padding: 15px 0 16px;
  border-bottom: 1px solid var(--on-dark-line);
}
.svc__item dt { position: relative; font-weight: 500; font-size: 17px; letter-spacing: -0.012em; }
/* the double slash marks the row you're on, hanging in the margin */
.svc__item dt::before {
  content: ""; position: absolute; left: -24px; top: 0.6em;
  width: 15px; height: 8px; background: var(--sky);
  clip-path: polygon(52% 0, 72% 0, 20% 100%, 0 100%, 52% 0, 80% 0, 100% 0, 48% 100%, 28% 100%, 80% 0);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.45s var(--ease);
}
.svc__item dd { color: var(--on-dark-meta); font-size: 15px; line-height: 1.55; text-wrap: pretty; transition: color 0.4s var(--ease); }
.svc__item.is-on dt::before { transform: none; }
.svc__item.is-on dd { color: var(--on-dark-body); }

/* contact */
.mail-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 26px; }
.mail-row .big { font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.55rem); font-weight: 500; letter-spacing: -0.02em; }
.copy {
  border: 1px solid var(--line-2); background: transparent; border-radius: 999px;
  padding: 6px 13px 7px; font-size: 13px; color: var(--text-meta);
  transition: border-color 0.3s, color 0.3s;
}
.copy:hover { border-color: var(--ink); color: var(--ink); }

.form {
  margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px;
}
.field { display: grid; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field span { font-size: 13px; color: var(--text-meta); }
.field input, .field textarea, .field select {
  width: 100%;
  font-size: 16px;
  padding: 8px 0 9px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  outline: 0;
  transition: border-color 0.3s;
}
.field select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%230d1430' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 2px center / 11px no-repeat;
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--cobalt); }
.field input::placeholder, .field textarea::placeholder { color: rgba(13, 20, 48, 0.36); }
.form__foot { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; border-radius: 999px; padding: 12px 22px 13px;
  background: var(--cobalt); color: var(--white);
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn:hover { background: var(--cobalt-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: progress; }
.btn svg { width: 14px; height: 14px; transition: transform 0.45s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.form__note { font-size: 13px; color: var(--text-meta); }
.form__status { grid-column: 1 / -1; font-size: 15px; }
.form__status:empty { display: none; }
.form__status.is-error { color: #b42318; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sent { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.sent h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 6px; }
.sent p { color: var(--text-body); }

/* ---------- 7. Levels: a cobalt panel ------------------------------------ */

.panel--cobalt { background: var(--cobalt); padding: var(--sec-y) var(--pad); }
.panel--cobalt::before {
  background:
    radial-gradient(60% 80% at 82% 10%, rgba(140, 162, 255, 0.55), transparent 70%),
    radial-gradient(50% 70% at 4% 100%, rgba(13, 20, 48, 0.32), transparent 70%),
    linear-gradient(135deg, #2541e2 0%, #2f4df0 48%, #3b5aff 100%);
}
.panel--cobalt .levels__head { position: relative; z-index: 2; max-width: 40em; }
.levels__head h2 { margin-bottom: 14px; color: var(--white); }
.levels__head p { color: rgba(255, 255, 255, 0.82); max-width: 34em; }
.levels__grid { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%, 100% 64px; }
.levels__list {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(36px, 4.4vw, 56px);
}
.lvl {
  display: flex; flex-direction: column; gap: 10px;
  min-height: clamp(190px, 17vw, 240px);
  padding: 24px 24px 26px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-radius: 4px;
  box-shadow: 0 30px 60px -40px rgba(8, 12, 32, 0.7);
}
.lvl__n { font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; color: var(--cobalt); }
.lvl h3 { margin-top: clamp(44px, 5vw, 76px); font-size: clamp(1.2rem, 1.05rem + 0.5vw, 1.45rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
.lvl p { color: var(--text-body); font-size: 15.5px; line-height: 1.5; }

/* ---------- 8. Who we work with ------------------------------------------ */

.sec--how { padding-bottom: 0; }
.who__head { margin: clamp(56px, 7vw, 96px) 0 22px; font-size: 17px; font-weight: 500; letter-spacing: -0.012em; }
.who__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 calc(-1 * var(--pad));
  border-top: 1px solid var(--line);
}
.who__grid li {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: clamp(84px, 8vw, 112px);
  padding: 18px 20px;
  font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em;
  color: rgba(13, 20, 48, 0.8);
  text-wrap: balance;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--tint-a, 135deg), rgba(159, 178, 255, var(--tint, 0.2)), rgba(159, 178, 255, 0) 72%);
}
.who__grid li:nth-child(3n) { border-right: 0; }
.who__grid li:nth-child(2) { --tint-a: 200deg; --tint: 0.14; }
.who__grid li:nth-child(3) { --tint-a: 300deg; --tint: 0.24; }
.who__grid li:nth-child(4) { --tint-a: 45deg; --tint: 0.16; }
.who__grid li:nth-child(5) { --tint-a: 160deg; --tint: 0.26; }
.who__grid li:nth-child(6) { --tint-a: 250deg; --tint: 0.12; }
.who__grid li:nth-child(n + 4) { border-bottom: 0; }

/* ---------- 9. Footer ---------------------------------------------------- */

.foot { padding: clamp(40px, 5vw, 64px) var(--pad); display: grid; gap: 26px; }
.foot__logo { width: 171px; height: auto; }
.foot__row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px 40px; font-size: 13.5px; color: var(--text-meta); }
.foot__row p { max-width: 46em; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- responsive --------------------------------------------------- */

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .split__art { grid-column: 1; grid-row: 1; min-height: clamp(300px, 70vw, 440px); }
  .card { grid-column: 1; grid-row: 2; margin-top: 0; }
  .where { grid-template-columns: minmax(0, 1fr); }
  .levels__list { grid-template-columns: minmax(0, 1fr); }
  .lvl { min-height: 0; }
  .lvl h3 { margin-top: 26px; }
}
@media (max-width: 720px) {
  .who__grid { grid-template-columns: repeat(2, 1fr); }
  .who__grid li:nth-child(3n) { border-right: 1px solid var(--line); }
  .who__grid li:nth-child(2n) { border-right: 0; }
  .who__grid li:nth-child(n + 4) { border-bottom: 1px solid var(--line); }
  .who__grid li:nth-child(n + 5) { border-bottom: 0; }
  .hero__nav .u--light { display: none; }
  .svc__item { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 10. Motion ---------------------------------------------------- */

.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal], .hero__logo, .hero__nav { opacity: 1; transform: none; }
  .hero__title .line > span { transform: none; }
}

/* group companies strip (shared embed from /group/companies.js) */
.group-strip { padding: clamp(28px, 3.4vw, 44px) var(--pad); }
