/* NuG's site styles. Tokens come from content/tokens.json (generated below by the build).
   Motion character: precise, unhurried. Only transform and opacity animate. */
:root {
  --blue: #1E6BFF;
  --blue-deep: #1457D6;
  --blue-light: #7FA9FF;
  --link: #0B3FB3;
  --graphite: #0E1420;
  --night: #18233C;
  --night-2: #26365C;
  --surface: #131C31;
  --tint: #E8F0FF;
  --mist: #F6F8FC;
  --light: #C9D0DC;
  --slate: #5A6272;
  --amber: #F2A623;
  --white: #FFFFFF;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 8px;
  --r2: 16px;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s6: 48px;
  --s8: 64px;
  --s12: 96px;
  --t-fast: 120ms;
  --t: 240ms;
  --t-slow: 420ms;
  --ease-in: cubic-bezier(.2,.8,.2,1);
  --ease-out: cubic-bezier(.6,0,.9,.3);
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-opsz.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 160ms var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 300ms var(--ease-in) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
.head { view-transition-name: head; }
::view-transition-old(head), ::view-transition-new(head) { animation: none; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; background: var(--night); }
body { margin: 0; background: var(--white); color: var(--graphite); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, canvas, video { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
.dark a { color: var(--white); }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--blue); color: var(--white); }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.dark { background: var(--night); color: var(--white); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); color: var(--graphite); padding: 8px 16px; border-radius: var(--r); }
.skip:focus { left: 8px; }

/* Type */
.h-hero { font-size: clamp(38px, 6.2vw, 80px); line-height: 1.02; letter-spacing: -.036em; font-weight: 800; }
.h-hero em { font-style: normal; color: var(--blue-light); }
.h-page { font-size: clamp(44px, 7vw, 88px); }
.h-xl { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -.03em; font-weight: 800; }
.small { margin-top: 12px; font-size: 14px; color: var(--slate); }

/* Logo */
.logo { height: 30px; width: auto; fill: currentColor; overflow: visible; }
.logo .ap { fill: var(--blue); transform-box: fill-box; transform-origin: 50% 50%; }
.js .logo.fly .ap { animation: ap-fly 900ms var(--ease-in) 120ms both; }
@keyframes ap-fly { 0% { transform: translate(-640%, 300%) rotate(-30deg) scale(.5); opacity: 0; } 25% { opacity: 1; } 78% { transform: translate(6%, -6%) rotate(3deg) scale(1.06); } 100% { transform: none; } }
.lockup { display: inline-flex; align-items: center; gap: 16px; color: var(--white); text-decoration: none; }
.payoff { display: block; padding-left: 16px; border-left: 1px solid rgba(201,208,220,.3); font-size: 10.5px; line-height: 1.35; letter-spacing: .1em; text-transform: uppercase; }
.payoff b { display: block; font-weight: 600; color: var(--white); }
.payoff small { display: block; font-size: 9.5px; letter-spacing: .08em; color: var(--light); font-weight: 500; }

/* Header */
.head { position: sticky; top: 0; z-index: 60; background: var(--night); color: var(--white); }
.head-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a:not(.btn) { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r); color: var(--light); text-decoration: none; font-size: 15px; font-weight: 500; position: relative; transition: color var(--t-fast), background var(--t-fast); }
.nav > a:not(.btn):hover { color: var(--white); background: rgba(201,208,220,.1); }
.nav > a[aria-current="page"] { color: var(--white); }
.nav > a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; background: var(--blue-light); border-radius: 2px; }
.ic { flex: none; }
.nav-cta { margin-left: 12px; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: var(--white); margin: 6px 0; border-radius: 2px; transition: transform var(--t) var(--ease-in); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 860px) { .payoff { display: none; } }
@media (max-width: 680px) {
  .head-bar { height: 64px; }
  .menu-btn { display: block; margin-right: -10px; }
  .nav { position: fixed; inset: 64px 0 0 0; height: calc(100dvh - 64px); flex-direction: column; align-items: stretch; gap: 4px; padding: 16px var(--gutter) 32px; background: var(--night); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity var(--t) var(--ease-in), transform var(--t) var(--ease-in), visibility 0s linear var(--t); }
  .nav.open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav > a:not(.btn) { padding: 16px 8px; font-size: 22px; font-weight: 600; color: var(--white); border-radius: 0; }
  .nav > a[aria-current="page"]::after { display: none; }
  .nav .ic { width: 22px; height: 22px; color: var(--blue-light); }
  .nav-cta { margin: 24px 0 0; height: 52px; font-size: 17px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 24px; border: 0; border-radius: var(--r); background: var(--blue); color: var(--white) !important; font-weight: 700; font-size: 16px; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background var(--t-fast), transform var(--t-fast); }
.btn:hover { background: var(--blue-deep); box-shadow: 0 8px 24px rgba(30,107,255,.32); }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 44px; padding: 0 16px; font-size: 15px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 17px; }
.ic-arrow { flex: none; transition: transform var(--t) var(--ease-in); }
a:hover .ic-arrow, button:hover .ic-arrow { transform: translateX(4px); }

/* Hero */
.hero, .page-hero, .contact, .notfound { background: radial-gradient(90% 110% at 78% 42%, var(--night-2), var(--night) 68%); }
.hero { position: relative; min-height: min(86svh, 840px); display: flex; align-items: center; overflow: clip; padding-bottom: clamp(72px, 11vw, 150px); }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-in { position: relative; padding-block: 56px; }
.ln { display: block; overflow: hidden; padding-block: .08em; margin-block: -.08em; }
.ln > span { display: block; }
.js .ln > span { animation: ln-up 700ms var(--ease-in) both; }
.js .ln:nth-child(2) > span { animation-delay: 80ms; }
.js .ln:nth-child(3) > span { animation-delay: 160ms; }
@keyframes ln-up { from { transform: translateY(110%); } }
.hero-lede { margin-top: 24px; max-width: 54ch; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: var(--light); }
.js .hero-lede, .js .hero-bar { animation: fade-up 600ms var(--ease-in) 320ms both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }

/* Email bar */
.mailbar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; max-width: 560px; margin-top: 40px; padding: 8px; background: rgba(255,255,255,.08); border-radius: var(--r2); }
.mailbar label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mailbar input { height: 56px; min-width: 0; padding: 0 16px; border: 2px solid transparent; border-radius: var(--r); background: var(--white); color: var(--graphite); font-size: 17px; font-weight: 500; transition: border-color var(--t-fast); }
.mailbar input::placeholder { color: var(--slate); }
.mailbar input:focus { outline: none; border-color: var(--blue); }
input[aria-invalid="true"] { border-color: var(--amber) !important; }
@media (max-width: 520px) { .mailbar { grid-template-columns: 1fr; } .mailbar .btn { width: 100%; } }


/* Sections */
.sec { padding-block: clamp(56px, 8vw, 112px); }
.sec-tint { background: var(--mist); }
.sec-h { margin-bottom: clamp(24px, 3vw, 40px); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .04em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; background: var(--tint); color: var(--link); white-space: nowrap; justify-self: start; }
.tag-draft { background: rgba(242,166,35,.2); color: #6E4700; }
.dark .tag-draft { color: var(--amber); }

/* Reveal: visible by default, hidden only below the fold once JS has run */
.js .rv.pre { opacity: 0; transform: translateY(20px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity 560ms var(--ease-in), transform 560ms var(--ease-in); transition-delay: var(--d, 0ms); }

/* Explainer */
.film { position: relative; z-index: 2; margin-top: calc(clamp(72px, 11vw, 150px) * -1 + 8px); padding-bottom: clamp(56px, 8vw, 112px); }
.video { position: relative; aspect-ratio: 16/9; border-radius: var(--r2); overflow: hidden; background: var(--surface); box-shadow: 0 24px 64px rgba(19,28,49,.28); }
.video video { width: 100%; height: 100%; object-fit: cover; }
.poster { position: absolute; inset: 0; display: grid; place-items: center; color: var(--white); }
.poster canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster-in { position: relative; display: grid; justify-items: center; gap: 16px; }
.poster .logo { height: clamp(48px, 9vw, 112px); }
.poster .tag { justify-self: center; color: var(--amber); }

/* What we do */
.sec-work { padding-top: clamp(16px, 3vw, 40px); }
.work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.wimg { aspect-ratio: 4/3; border-radius: var(--r2); overflow: hidden; background: var(--night); margin-bottom: 16px; }
.wimg img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-in); }
.wcard:hover .wimg img { transform: scale(1.04); }
.wcard h3 { font-size: clamp(22px, 2.2vw, 26px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.wcard p { margin-top: 6px; color: var(--slate); }
@media (max-width: 760px) { .work { grid-template-columns: 1fr; gap: 32px; } }

/* Artificial intelligence */
.ai { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.aicard .wimg { aspect-ratio: 16/9; }
.aicard .wimg img { transition: transform 900ms var(--ease-in); }
.aicard:hover .wimg img { transform: scale(1.04); }
.aicard h3 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.12; letter-spacing: -.022em; font-weight: 800; }
.aicard p { margin-top: 8px; color: var(--slate); max-width: 52ch; }
.more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 4px; font-weight: 600; }
@media (max-width: 760px) { .ai { grid-template-columns: 1fr; gap: 32px; } }

/* Where we work */
.fields { position: relative; overflow: clip; }
.fields-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; filter: hue-rotate(14deg); }
.fields::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,22,42,.72), rgba(14,22,42,.04) 34%, rgba(14,22,42,.04) 52%, rgba(14,22,42,.9) 78%); }
.fields-in { position: relative; z-index: 1; padding-block: clamp(56px, 7vw, 96px) 32px; }
.fgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: clamp(160px, 20vw, 280px); }
.fgrid h3 { font-size: 21px; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; }
.fgrid p { margin-top: 6px; font-size: 16px; line-height: 1.45; color: var(--light); }
.ai-note { margin-top: 32px; font-size: 13px; color: var(--light); }
@media (max-width: 900px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fields::after { background: linear-gradient(180deg, rgba(14,22,42,.72), rgba(14,22,42,.1) 26%, rgba(14,22,42,.92) 58%); } }
@media (max-width: 480px) { .fgrid { grid-template-columns: 1fr; gap: 16px; } }

/* News */
.nlist { display: grid; gap: 8px; }
.nrow { background: var(--white); border-radius: var(--r2); transition: box-shadow var(--t) var(--ease-in); }
.nrow:has(a):hover { box-shadow: 0 10px 28px rgba(19,28,49,.08); }
.nrow > a, .nrow-in { display: grid; grid-template-columns: 112px 96px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 20px 24px; color: inherit; text-decoration: none; }
.nrow time { font-size: 14.5px; color: var(--slate); font-variant-numeric: tabular-nums; }
.nrow h3 { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.3; letter-spacing: -.015em; font-weight: 600; }
.nrow .ic-arrow { color: var(--link); }
.nrow > a:hover h3 { color: var(--link); }
@media (max-width: 680px) { .nrow > a, .nrow-in { grid-template-columns: auto 1fr auto; gap: 6px 12px; } .nrow h3 { grid-column: 1 / -1; grid-row: 2; } }

/* Contact */
.contact { position: relative; overflow: clip; padding-block: clamp(56px, 8vw, 112px); }
.contact-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 80px); align-items: start; }
.cform { display: grid; gap: 16px; padding: clamp(20px, 3vw, 32px); background: rgba(255,255,255,.07); border-radius: var(--r2); }
.cform.flash { animation: flash 900ms var(--ease-in); }
@keyframes flash { 30% { transform: scale(1.012); } }
.hp { position: absolute; left: -9999px; }
.field label { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600; font-size: 15px; }
.field label i { font-style: normal; color: var(--amber); }
.field label span { font-weight: 400; color: var(--light); font-size: 14px; }
.field input, .field textarea { display: block; width: 100%; padding: 14px 16px; border: 2px solid transparent; border-radius: var(--r); background: var(--white); color: var(--graphite); font-size: 17px; line-height: 1.4; resize: vertical; transition: border-color var(--t-fast); }
.field input { height: 56px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
.field ::placeholder { color: var(--slate); }
.cform .btn { justify-self: start; }
.fnote { font-size: 14px; color: var(--light); }
.cdone { padding: 16px; border-radius: var(--r); background: rgba(30,107,255,.2); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* Page hero */
.page-hero { position: relative; overflow: clip; padding-block: clamp(56px, 8vw, 112px) clamp(40px, 5vw, 72px); }
.page-hero .wrap { position: relative; }
.notfound { position: relative; overflow: clip; min-height: 72svh; display: flex; align-items: center; }
.notfound .wrap { position: relative; display: grid; gap: 32px; justify-items: start; }

/* Research */
.plist { display: grid; gap: 8px; }
.prow { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 32px; padding: 24px 28px; background: var(--mist); border-radius: var(--r2); }
.prow-meta { display: grid; gap: 2px; align-content: start; font-size: 14.5px; color: var(--slate); }
.prow-type { color: var(--graphite); font-weight: 600; }
.prow h2 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; letter-spacing: -.02em; font-weight: 700; max-width: 36ch; text-wrap: balance; }
.prow-main p { color: var(--slate); margin-top: 6px; font-size: 16px; }
.prow-files { display: grid; gap: 4px; align-content: start; justify-items: start; }
.prow-files a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 15.5px; white-space: nowrap; }
@media (max-width: 760px) { .prow { grid-template-columns: 1fr; gap: 8px; } .prow-meta { grid-auto-flow: column; justify-content: start; gap: 12px; } }

/* People */
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.person { display: flex; flex-direction: column; background: var(--mist); border-radius: var(--r2); overflow: hidden; transition: transform var(--t) var(--ease-in), box-shadow var(--t) var(--ease-in); }
.person:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(19,28,49,.1); }
.ph { position: relative; aspect-ratio: 4/5; background: var(--night); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: grayscale(1) contrast(1.05); transition: filter var(--t-slow) var(--ease-in), transform 800ms var(--ease-in); }
.person:hover .ph img { filter: none; transform: scale(1.03); }
.ph-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.ph-empty svg { width: 34%; fill: var(--blue); }
.pb { display: flex; flex-direction: column; gap: 4px; padding: 20px; flex: 1; align-items: flex-start; }
.pb .tag-draft { margin-bottom: 8px; }
.person h2 { font-size: 22px; letter-spacing: -.02em; line-height: 1.15; font-weight: 800; }
.role { color: var(--link); font-weight: 600; font-size: 15.5px; }
.bio { color: var(--slate); font-size: 15.5px; line-height: 1.45; margin-top: 4px; }
.plinks { display: flex; gap: 16px; margin-top: auto; padding-top: 4px; font-weight: 600; font-size: 15px; }
.plinks a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
@media (max-width: 960px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .people { grid-template-columns: 1fr; } }

.legal-page { max-width: 760px; padding-block: clamp(40px, 6vw, 72px); display: grid; gap: 16px; }

/* Footer */
.foot { background: var(--surface); color: var(--light); font-size: 14px; }
.foot a { color: var(--light); text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }
.foot-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 24px; }
.foot .logo { height: 24px; color: var(--white); }
.foot .tag-draft { color: var(--amber); }
.foot-links { display: flex; gap: 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
