/* Nebula Capital: Observatory */

/* Fonts are self-hosted so visitors' browsers never contact Google (Bodoni Moda, Work Sans: SIL Open Font License) */
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/bodoni-moda.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/bodoni-moda-italic.woff2) format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/work-sans.woff2) format("woff2"); }


:root {
  /* Type: the only block that differs between builds */
  --display: "Bodoni Moda", "Didot", Georgia, serif;
  --display-wt: 400;
  --display-track: -0.005em;
  --display-lh: 1.02;
  --display-opsz: 11; /* low optical size = thicker hairlines, less shimmer on dark */
  --body: "Work Sans", system-ui, sans-serif;

  /* Colour */
  --night: #0b0e16;
  --night-2: #0d1018;
  --star: #e4e0d6;
  --headline: #d9d4c8;
  --dim: #c2bdb2;
  --faint: #8d897f;
  --gold: #c9a96a;
  --line: rgba(255, 255, 255, 0.12);

  --gutter: clamp(20px, 6vw, 88px);
  --max: 1920px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--star);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.005em;
}
a { color: inherit; }
::selection { background: var(--gold); color: var(--night); }

/* Starfield and galaxy, drawn by sky.js */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-head { padding-top: clamp(24px, 4vw, 44px); }
.site-head .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.logo { font-family: var(--display); font-weight: var(--display-wt); font-size: 19px; letter-spacing: 0.26em; text-decoration: none; white-space: nowrap;  font-optical-sizing: none; font-variation-settings: "opsz" var(--display-opsz);}
.nav { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav a { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--dim); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover { color: var(--star); }
.nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

/* Type */
.display { font-family: var(--display); font-weight: var(--display-wt); letter-spacing: var(--display-track); line-height: var(--display-lh); margin: 0; font-optical-sizing: none; font-variation-settings: "opsz" var(--display-opsz); color: var(--headline); }
.display em { color: var(--gold); }
.eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0 0 18px; }
.lead { font-size: clamp(17px, 1.5vw, 19px); color: var(--dim); max-width: 50ch; }

/* Hero */
.hero { padding: clamp(96px, 16vh, 180px) 0 clamp(72px, 12vh, 140px); }
.hero h1 { font-size: clamp(38px, 5vw, 80px); max-width: 17ch; }
.hero .lead { margin: 16px 0 0; }
.hero-tag { margin: 40px 0 0; color: var(--gold); font-size: 15px; }
/* No single word left on the last line of a paragraph. */
p, li, dd, h1, h2, h3 { text-wrap: pretty; }

/* Sections */
section.band { padding: clamp(64px, 10vw, 120px) 0; border-top: 1px solid var(--line); }
.band-head { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-bottom: clamp(40px, 6vw, 72px); }
.band-head:last-child { margin-bottom: 0; }
.band-head h2 { font-size: clamp(32px, 4vw, 52px); }
.band-head p { margin: 0; color: var(--dim); max-width: 52ch; align-self: end; }

/* Services: sits directly under the hero, so only the inner rule is drawn */
section.band.band-services { border-top: 0; padding-top: 0; }
.services { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.service { padding: 36px 32px 8px 0; display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
/* subgrid keeps titles, descriptions and lists aligned across the three columns */
.service + .service { padding-left: 32px; border-left: 1px solid var(--line); }
.service .n { font-size: 12px; letter-spacing: .14em; color: var(--gold); }
.service h3 { font-size: clamp(30px, 3.2vw, 42px); margin: 14px 0 16px; }
.service p { color: var(--dim); margin: 0 0 18px; }
.service ul { list-style: none; margin: 0; padding: 0; font-size: 15px; color: var(--dim); }
.service li { padding: 9px 0; border-top: 1px solid var(--line); }

/* Fields */
.fields { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto; border-top: 1px solid var(--line); }
/* the 1fr filler cells make the gaps between names equal; they carry the row rule */
.fields .gap { border-bottom: 1px solid var(--line); min-width: 24px; }
@media (max-width: 1200px) { .fields { grid-template-columns: repeat(2, 1fr); column-gap: 24px; } .fields .gap { display: none; } }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } }
.constellation { display: none; }
@media (min-width: 900px) {
  .fields { display: none; }
  .constellation { display: block; position: relative; height: 460px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
}
.constellation svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.constellation line { stroke: rgba(228, 224, 214, .14); stroke-width: 1; transition: stroke .3s; }
.constellation.drawing line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.1s ease, stroke .3s; }
.constellation line.on { stroke: rgba(201, 169, 106, .7); }
.constellation .star { position: absolute; width: 0; height: 0; cursor: default; }
.constellation .star i { position: absolute; left: -4px; top: -4px; }
.constellation .star b { position: absolute; top: 0; left: 14px; transform: translateY(-50%); }
.constellation .star.pos-l b { left: auto; right: 14px; }
.constellation .star.pos-t b { top: auto; bottom: 10px; left: 0; transform: translateX(calc(-50% + var(--dx, 0px))); }
.constellation .star.pos-b b { top: 10px; left: 0; transform: translateX(calc(-50% + var(--dx, 0px))); }
.constellation.drawing .star { opacity: 0; transition: opacity .8s; }
.constellation.drawing .star.shown { opacity: 1; }
.constellation .star i { width: 8px; height: 8px; border-radius: 50%; background: var(--star); box-shadow: 0 0 10px rgba(228, 224, 214, .6); flex: none; transition: background 2.6s ease, box-shadow 2.6s ease; }
.constellation .star b { font-family: var(--display); font-weight: var(--display-wt); font-size: clamp(16px, 1.3vw, 22px); white-space: nowrap; color: var(--dim); transition: color 2.6s ease, text-shadow 2.6s ease; font-optical-sizing: none; font-variation-settings: "opsz" var(--display-opsz); }
.constellation .star.lit i, .constellation .star.on i { background: var(--gold); box-shadow: 0 0 16px rgba(201, 169, 106, .9); }
.constellation .star.lit b { color: var(--gold); text-shadow: 0 0 18px rgba(201, 169, 106, .35); }
.constellation .star.on b { color: var(--star); }
.constellation .star.on i, .constellation .star.on b { transition-duration: .3s; }
.fields-more-row { display: flex; justify-content: flex-end; margin: 28px 0 0; }
.fields-more { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--gold); }
.fields-more span { font-size: 19px; letter-spacing: 0; transition: transform .2s; }
.fields-more:hover { color: var(--star); }
.fields-more:hover span { transform: translateX(4px); }
.fields > span { padding: 22px 0; border-bottom: 1px solid var(--line); font-family: var(--display); font-weight: var(--display-wt); font-size: clamp(18px, 1.45vw, 26px); white-space: nowrap;  font-optical-sizing: none; font-variation-settings: "opsz" var(--display-opsz);}

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.principles h3 { font-size: 26px; margin: 0 0 12px; }
.principles p { color: var(--dim); margin: 0; }

/* Partner */
.partner { display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; object-position: 50% 20%; filter: grayscale(1) contrast(1.05); border: 1px solid var(--line); }
.partner h3 { font-size: clamp(36px, 4vw, 52px); margin: 0; }
.partner .role { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 10px 0 24px; }
.partner p { color: var(--dim); margin: 0 0 16px; max-width: 60ch; }
.partner .links a { color: var(--star); text-decoration: none; border-bottom: 1px solid var(--gold); }

/* Mandates */
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter button { font: inherit; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; background: none; color: var(--dim); border: 1px solid var(--line); padding: 8px 16px; cursor: pointer; }
.filter button:hover { color: var(--star); }
.filter button[aria-pressed="true"] { color: var(--night); background: var(--gold); border-color: var(--gold); }
.mandates { border-top: 1px solid var(--line); }
.mandate { display: grid; grid-template-columns: 2fr 1.1fr 3.4fr 32px; gap: 24px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); }
.mandate .co { font-family: var(--display); font-weight: var(--display-wt); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.1;  font-optical-sizing: none; font-variation-settings: "opsz" var(--display-opsz);}
.mandate .co small { display: block; font-family: var(--body); font-size: 14px; color: var(--faint); margin-top: 6px; letter-spacing: 0; }
.mandate .k { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.mandate .v { color: var(--faint); font-size: 14px; line-height: 1.55; }
.mandate .v b { display: block; color: var(--star); font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.mandate .go { text-align: right; text-decoration: none; color: var(--dim); font-size: 18px; }
.mandate .go:hover { color: var(--gold); }
.mandate[hidden] { display: none; }
.note { color: var(--faint); font-size: 14px; margin-top: 28px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 8vw, 120px); }
.contact-grid .big { font-family: var(--display); font-weight: var(--display-wt); font-size: clamp(30px, 4vw, 52px); line-height: 1.1; text-decoration: none; border-bottom: 1px solid var(--gold);  font-optical-sizing: none; font-variation-settings: "opsz" var(--display-opsz);}
.contact-grid .big:hover { color: var(--gold); }
@media (max-width: 600px) { .contact-grid .big { font-size: 7.5vw; } }
.details { display: grid; gap: 28px; align-content: start; }
.details dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.details dd { margin: 0; }
.details a { text-decoration: none; border-bottom: 1px solid var(--line); }
.details a:hover { border-color: var(--gold); }
.details dd + dd { margin-top: 8px; }

/* Long-form text (privacy page) */
.hero-short { padding-bottom: clamp(40px, 6vh, 72px); }
.prose { max-width: 760px; margin-left: 0; }
.prose h2 { font-family: var(--display); font-weight: var(--display-wt); font-optical-sizing: none; font-variation-settings: "opsz" var(--display-opsz); color: var(--headline); font-size: 26px; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--dim); margin: 0 0 14px; }
.prose a { color: var(--star); text-decoration: none; border-bottom: 1px solid var(--gold); }

/* Footer */
.site-foot { margin-top: auto; padding: 40px 0 36px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--star); }

/* Small screens */
@media (max-width: 860px) {
  .band-head, .contact-grid, .partner { grid-template-columns: 1fr; gap: 24px; }
  .portrait { max-width: 320px; }
  .services, .principles { grid-template-columns: 1fr; gap: 0; }
  .principles { gap: 36px; }
  .service, .service + .service { padding: 32px 0 16px; border-left: 0; }
  .service + .service { border-top: 1px solid var(--line); }
  .mandate { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
  .mandate .co { grid-column: 1 / -1; }
  .mandate .v { grid-column: 1 / -1; }
  .mandate .go { grid-row: 1; grid-column: 2; }
}
@media (max-width: 520px) {
  .site-head .wrap { flex-direction: column; align-items: flex-start; gap: 14px; }
}
