/* ==========================================================================
   Goldman Sachs — static homepage study
   Palette / type derived from the live site (gs-uitk component tokens)
   ========================================================================== */

:root {
  --gs-blue: #7297c5;
  --gs-blue-deep: #5c87b8;
  --ink: #121212;
  --ink-70: rgba(18, 18, 18, 0.7);
  --ink-55: rgba(18, 18, 18, 0.55);
  --paper: #ffffff;
  --grey: #f7f7fa;
  --grey-warm: #f4f4f5;
  --rule: rgba(18, 18, 18, 0.14);
  --white-95: rgba(255, 255, 255, 0.95);
  --white-70: rgba(255, 255, 255, 0.7);

  --serif: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", "Times New Roman", Times, serif;
  --sans: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;

  --pad: clamp(20px, 4vw, 56px);
  --maxw: 1280px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- shared type ---------- */

.eyebrow {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin: 0 0 14px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 18ch;
  color: var(--ink);
}

.card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.body-sm {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0 0 22px;
}

/* ---------- link with underline sweep ---------- */

.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.25s var(--ease), opacity 0.2s;
}

.link:hover { gap: 16px; opacity: 0.65; }

.link svg { width: 15px; height: 15px; flex: none; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--gs-blue);
  color: var(--white-95);
  transition: box-shadow 0.3s var(--ease);
}

.site-header.is-stuck { box-shadow: 0 1px 24px rgba(18, 18, 18, 0.16); }

.header-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  height: 72px;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 44px);
}

.brand {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 0.92;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--white-95);
  flex: none;
}

.brand span { display: block; }

.nav-primary,
.nav-secondary {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);
}

.nav-primary { margin-right: auto; }

.nav-primary a,
.nav-secondary a {
  font-size: 15px;
  color: var(--white-95);
  padding: 6px 0;
  position: relative;
  white-space: nowrap;
}

.nav-primary a::after,
.nav-secondary a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-primary a:hover::after,
.nav-secondary a:hover::after { transform: scaleX(1); }

.header-tools {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 22px);
  flex: none;
}

.icon-btn {
  background: none;
  border: 0;
  padding: 4px;
  color: var(--white-95);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-btn svg { width: 18px; height: 18px; }

.client-login {
  border: 1px solid var(--white-95);
  padding: 9px 20px;
  font-size: 15px;
  color: var(--white-95);
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.client-login:hover {
  background: var(--white-95);
  color: var(--gs-blue);
}

.menu-toggle { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 640px;
  height: clamp(560px, 84vh, 760px);
  overflow: hidden;
  background: #10161f;
  display: flex;
  align-items: flex-end;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  animation: heroIn 1.6s var(--ease) both;
}

@keyframes heroIn {
  from { transform: scale(1.06); opacity: 0.4; }
  to   { transform: scale(1); opacity: 1; }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(4, 8, 14, 0.78) 0%, rgba(4, 8, 14, 0.18) 42%, rgba(4, 8, 14, 0) 62%),
    linear-gradient(100deg, rgba(4, 8, 14, 0.7) 0%, rgba(4, 8, 14, 0.34) 44%, rgba(4, 8, 14, 0.05) 70%, rgba(4, 8, 14, 0) 86%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--pad) clamp(32px, 5vh, 64px);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(38px, 5.9vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--white-95);
  margin: 0;
  max-width: 17ch;
  animation: riseIn 1.1s 0.15s var(--ease) both;
}

.hero__sub {
  max-width: 48ch;
  margin: 24px 0 0;
  font-size: clamp(15px, 1.1vw, 16px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  animation: riseIn 1.1s 0.3s var(--ease) both;
}

.hero__cta {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--white-95);
  border-bottom: 1px solid var(--white-95);
  padding-bottom: 4px;
  transition: gap 0.25s var(--ease);
  animation: riseIn 1.1s 0.42s var(--ease) both;
}

.hero__cta:hover { gap: 16px; }

@keyframes riseIn {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ==========================================================================
   Sections — generic
   ========================================================================== */

.section { padding: clamp(56px, 8vw, 108px) 0; }

.section--grey { background: var(--grey); }
.section--warm { background: var(--grey-warm); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section-head .eyebrow { margin-bottom: 12px; }

/* ==========================================================================
   The Firm in Action — 3-up story cards
   ========================================================================== */

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 34px);
}

.story figure {
  margin: 0 0 22px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #e9e9ee;
}

.story figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.story:hover figure img { transform: scale(1.04); }

.story .eyebrow { margin-bottom: 10px; }

.story a.link { font-size: 14px; }

/* ==========================================================================
   What We Do — horizontal rail
   ========================================================================== */

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * clamp(20px, 2.4vw, 34px)) / 3);
  gap: clamp(20px, 2.4vw, 34px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 6px;
}

.rail::-webkit-scrollbar { display: none; }

.rail-card {
  scroll-snap-align: start;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

.rail-card figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e9e9ee;
}

.rail-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.rail-card:hover figure img { transform: scale(1.04); }

.rail-card__body { padding: 24px 26px 26px; flex: 1; display: flex; flex-direction: column; }

.rail-card h3 {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0 0 10px;
}

.rail-card p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-70);
  margin: 0 0 22px;
}

.rail-card .arrow {
  margin-top: auto;
  width: 26px;
  height: 26px;
  transition: transform 0.3s var(--ease);
}

.rail-card:hover .arrow { transform: translateX(5px); }

.rail-controls {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 30px;
}

.rail-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--ink-55);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s;
}

.rail-btn:hover:not(:disabled) { color: var(--ink); }
.rail-btn:disabled { opacity: 0.3; cursor: default; }
.rail-btn svg { width: 22px; height: 22px; }

.rail-controls { justify-content: flex-end; }

/* ==========================================================================
   Our Thinking — feature + list
   ========================================================================== */

.thinking-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.feature figure {
  margin: 0 0 22px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e9e9ee;
}

.feature figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.feature:hover figure img { transform: scale(1.03); }

.feature h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 8px 0 16px;
}

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-55);
}

.meta .dot { color: var(--rule); }

.insight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.insight-list li { border-bottom: 1px solid var(--rule); }

.insight-list a {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding: 22px 0;
  align-items: start;
}

.insight-list figure {
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e9e9ee;
}

.insight-list figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.insight-list a:hover figure img { transform: scale(1.06); }

.insight-list h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.18;
  letter-spacing: -0.005em;
  margin: 4px 0 10px;
  transition: opacity 0.2s;
}

.insight-list a:hover h4 { opacity: 0.6; }

/* ==========================================================================
   Newsletter band
   ========================================================================== */

.newsletter {
  background: var(--gs-blue);
  color: var(--white-95);
}

.newsletter__grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.newsletter .eyebrow { color: var(--white-70); }

.newsletter h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 50px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}

.newsletter p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--white-70);
  max-width: 46ch;
  margin: 0 0 30px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--white-95);
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 500;
  color: var(--white-95);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn-ghost:hover {
  background: var(--white-95);
  color: var(--gs-blue-deep);
}

.newsletter figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.newsletter figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Careers — collage + stats
   ========================================================================== */

.careers-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.careers-head p {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--ink-70);
  margin: 0;
  max-width: 44ch;
}

.collage {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: clamp(12px, 1.4vw, 20px);
  margin-bottom: clamp(48px, 6vw, 80px);
}

.collage figure {
  margin: 0;
  overflow: hidden;
  background: #e2e2e6;
}

.collage figure:nth-child(1) { aspect-ratio: 4 / 3; }
.collage figure:nth-child(2) { aspect-ratio: 4 / 3; margin-top: clamp(24px, 3vw, 48px); }
.collage figure:nth-child(3) { aspect-ratio: 4 / 3; }

.collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.collage figure:hover img { transform: scale(1.05); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.stat .figure {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  display: flex;
  align-items: flex-start;
}

.stat .figure sup {
  font-size: 0.42em;
  line-height: 1;
  margin-left: 4px;
  top: 0.1em;
  position: relative;
  font-weight: 400;
}

.stat p {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 18px 0 0;
  max-width: 26ch;
}

.sources {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-55);
  max-width: 78ch;
  margin: clamp(36px, 4vw, 52px) 0 0;
}

.careers-cta {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn-solid {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink);
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn-solid:hover { background: var(--ink); color: var(--paper); }

.careers-cta a:not(.btn-solid) {
  font-size: 16px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.careers-cta a:not(.btn-solid):hover { border-bottom-color: var(--ink); }

/* ==========================================================================
   Our Firm
   ========================================================================== */

.firm-lede {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 clamp(40px, 5vw, 68px);
  max-width: 26ch;
}

.firm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.firm-grid h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px;
}

.firm-grid p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-70);
  margin: 0;
}

.firm-grid em {
  font-style: italic;
  font-family: var(--serif);
  font-size: 1.06em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #000;
  color: var(--white-95);
  padding: clamp(48px, 6vw, 76px) 0 34px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) repeat(4, 1fr);
  gap: clamp(24px, 3vw, 44px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

.footer-brand {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 0.94;
  letter-spacing: -0.01em;
}

.footer-brand span { display: block; }

.footer-col h4 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--white-70);
  margin: 0 0 20px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.footer-col a {
  font-size: 15px;
  color: var(--white-95);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.footer-col a:hover { opacity: 0.6; }

.footer-col a svg { width: 12px; height: 12px; }

.social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.social a { display: grid; place-items: center; }

.social svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 34px;
  font-size: 13px;
  color: var(--white-70);
}

.footer-bottom .copy { margin-right: auto; }

.footer-bottom a { transition: color 0.2s; }
.footer-bottom a:hover { color: var(--white-95); }

.footer-bottom button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__img, .hero__title, .hero__sub, .hero__cta { animation: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .nav-secondary { display: none; }
  .thinking-layout { grid-template-columns: 1fr; }
  .newsletter__grid { grid-template-columns: 1fr; }
  .newsletter figure { max-width: 560px; }
  .rail { grid-auto-columns: calc((100% - clamp(20px, 2.4vw, 34px)) / 2); }
}

@media (max-width: 860px) {
  .header-inner { height: 62px; gap: 16px; }
  .nav-primary { display: none; }
  .menu-toggle { display: grid; }
  .search-btn { display: none; }

  .story-grid { grid-template-columns: 1fr; gap: 44px; }
  .careers-head { grid-template-columns: 1fr; }
  .collage { grid-template-columns: 1fr 1fr; }
  .collage figure:nth-child(2) { margin-top: 0; }
  .collage figure:nth-child(3) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .stats { grid-template-columns: 1fr; gap: 34px; }
  .firm-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 12px; }
  .rail { grid-auto-columns: 86%; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .client-login { padding: 7px 14px; font-size: 14px; }
  .footer-top { grid-template-columns: 1fr; }
  .insight-list a { grid-template-columns: 72px 1fr; gap: 14px; }
  .insight-list h4 { font-size: 18px; }
}
