/* nTech Strategies */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0C1A2E;
  --night-mark: #11233D;
  --day: #FFFFFF;
  --sun: #F5C542;
  --sun-hover: #FFD25A;

  --on-night: #F3F5F8;
  --on-night-2: #B9C5D3;
  --on-night-3: #8D9CB1;
  --rule-night: rgba(243, 245, 248, 0.15);

  --ink: #0C1A2E;
  --ink-2: #46556B;
  --rule-day: #D8DFE8;
  --rule-sun: rgba(12, 26, 46, 0.22);
  --mist: #EDF1F6;
  --dot-day: #C3CEDB;

  --wrap: 1312px;
  --pad: clamp(20px, 5vw, 64px);
  --font: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--on-night);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 650;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: inherit; }
::selection { background: #FFFFFF; color: var(--night); }
.contact ::selection, .button::selection { background: var(--night); color: #FFFFFF; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.nowrap { white-space: nowrap; }

.wrap {
  max-width: calc(var(--wrap) + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad);
}

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 10; padding: 10px 14px; background: var(--sun); color: var(--night); }

/* The frame carries the navy. Dark sections are transparent so the large n can sit behind them;
   light sections paint their own background over it. */
.frame {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--night);
  color: var(--on-night);
}
.frame :focus-visible { outline-color: var(--sun); }
.frame > main { flex: 1 0 auto; }
.night { color: var(--on-night); }
.light { background: var(--day); color: var(--ink); }
.light :focus-visible { outline-color: var(--ink); }


/* Header */

.site-header { position: relative; z-index: 2; }
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 34px 0;
}
.logo { display: block; line-height: 0; color: #FFFFFF; }
.logo svg { display: block; height: 27px; width: auto; }
.nav { display: flex; align-items: center; gap: 38px; }
.nav a {
  padding: 4px 0 3px;
  border-bottom: 2px solid transparent;
  color: var(--on-night-2);
  font-size: 16.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.nav a:hover { color: #FFFFFF; border-bottom-color: var(--rule-night); }
.nav .nav-contact { color: var(--on-night); border-bottom-color: var(--sun); }
.nav .nav-contact:hover { border-bottom-color: var(--sun); }


/* Opening */


.hero-body {
  padding: clamp(64px, 20vh, 240px) 0 clamp(64px, 9vw, 120px);
}
.hero h1 {
  max-width: 13.6em;
  font-size: clamp(37px, 6.6vw, 96px);
  text-wrap: pretty;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.037em;
}
.hero-foot {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: clamp(56px, 9vw, 130px);
  padding-top: 32px;
  border-top: 1px solid var(--rule-night);
}
/* Canada in dots, as a mask over a slow pulse that radiates from Ottawa. */
.hero-foot { --map-w: min(52vw, 740px); }
.hero-map {
  position: absolute;
  z-index: -1;
  right: -2%;
  bottom: calc(100% + 6px);
  width: var(--map-w);
  aspect-ratio: 1200 / 1023;
  pointer-events: none;
  user-select: none;
}
.map-dots {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #294670;
  -webkit-mask: url("../img/canada-mask.svg") center / 100% 100% no-repeat;
  mask: url("../img/canada-mask.svg") center / 100% 100% no-repeat;
}
.map-pulse {
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  background: radial-gradient(circle, #FFD866 0%, rgba(245, 197, 66, 0.85) 14%, rgba(245, 197, 66, 0.35) 32%, rgba(245, 197, 66, 0) 52%);
  opacity: 0;
  transform: scale(0.05);
}
@media (prefers-reduced-motion: no-preference) {
  .map-pulse { animation: pulse 9s cubic-bezier(0.15, 0.6, 0.4, 1) infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .map-pulse { opacity: 0.3; transform: scale(0.45); }
}
@keyframes pulse {
  0% { opacity: 0; transform: scale(0.05); }
  5% { opacity: 1; }
  45% { opacity: 0.75; }
  70% { opacity: 0; transform: scale(1.15); }
  100% { opacity: 0; transform: scale(1.15); }
}

.lede {
  max-width: 31em;
  margin: 0;
  color: var(--on-night-2);
  font-size: clamp(19px, 1.6vw, 22.5px);
  line-height: 1.5;
}
.hero-reach { margin: 16px 0 0; color: var(--on-night-3); font-size: 16px; }
.hero-reach a { color: var(--on-night-2); text-decoration: none; }
.hero-reach a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }
.hero-reach .sep { padding: 0 10px; }
@media (min-width: 900px) {
  .hero h1 span { display: block; }
}
.hero-foot .hero-reach { margin: 0; }

/* A quiet entrance for the opening lines. Skipped for anyone who prefers reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-foot > .button, .hero-foot > .hero-reach, .hero h1 ~ .lede, .hero h1 ~ .button { animation: rise 0.9s 0.18s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-map { animation: appear 1.8s 0.1s ease-out both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

.button {
  display: inline-block;
  padding: 17px 28px 18px;
  border-radius: 3px;
  background: var(--sun);
  color: var(--night);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background-color .15s ease;
}
.button:hover { background: var(--sun-hover); }


/* Section basics */

.section { padding: clamp(72px, 9vw, 124px) 0; }
.section-title {
  font-size: clamp(36px, 4.3vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.032em;
}
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px 48px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-intro { max-width: 31em; margin: 0; font-size: 19.5px; line-height: 1.55; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
}


/* Services */

.services {
  background-color: #11233F;
  background-image: radial-gradient(circle at 1px 1px, rgba(243, 245, 248, 0.055) 1.1px, transparent 1.8px);
  background-size: 10px 10px;
}

/* Services as a poster: channels large on the left, outcomes small on the right. */
.poster { display: grid; grid-template-columns: 1fr; gap: 40px 48px; }
.poster .label { margin: 0 0 18px; color: var(--on-night-3); }
.channels, .outcomes { margin: 0; padding: 0; list-style: none; }
.channels li {
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.036em;
  color: var(--on-night);
  padding: 0.06em 0;
  transition: color .2s ease;
}
@media (hover: hover) { .channels li:hover { color: var(--sun); } }
/* One word at a time glows, in turn, the way the cities do on the map. */
@media (prefers-reduced-motion: no-preference) {
  .channels li { animation: turn 15.4s linear infinite; animation-timeline: auto; }
  @supports (animation-timeline: view()) {
    .channels li {
      animation: reveal linear both, turn 15.4s linear infinite;
      animation-timeline: view(), auto;
      animation-range: entry 0% entry 32%, normal;
    }
  }
  .channels li:nth-child(2) { animation-delay: 2.2s; }
  .channels li:nth-child(3) { animation-delay: 4.4s; }
  .channels li:nth-child(4) { animation-delay: 6.6s; }
  .channels li:nth-child(5) { animation-delay: 8.8s; }
  .channels li:nth-child(6) { animation-delay: 11s; }
  .channels li:nth-child(7) { animation-delay: 13.2s; }
  @media (hover: hover) { .channels li:hover { animation-play-state: paused; color: var(--sun); } }
}
@keyframes turn {
  0% { color: var(--on-night); }
  4% { color: var(--sun); }
  9% { color: var(--sun); }
  15% { color: var(--on-night); }
  100% { color: var(--on-night); }
}
.outcomes li {
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.45;
  color: var(--on-night-2);
}
.poster-note { max-width: 24em; margin: 0; color: var(--on-night-3); font-size: 16.5px; line-height: 1.5; }
.poster-note:first-of-type { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--rule-night); }
.poster-note + .poster-note { margin-top: 10px; }
@media (min-width: 900px) {
  .poster { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: start; }
  .poster-outcomes { padding-top: 2px; position: sticky; top: 40px; }
}

.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.services .section-intro { color: var(--on-night-2); }
.service-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--rule-night); }
.service {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 48px;
  padding: 34px 0 36px;
  border-top: 1px solid var(--rule-night);
}
.service h3 {
  font-size: clamp(28px, 3.6vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.032em;
}
.service p {
  max-width: 30em;
  margin: 0;
  color: var(--on-night-2);
  font-size: 19.5px;
  line-height: 1.5;
}
.service h3 { transition: color .2s ease; }
@media (hover: hover) {
  .night .service:hover h3 { color: var(--sun); }
}
.light .service-list { border-bottom-color: var(--rule-day); }
.light .service { border-top-color: var(--rule-day); }
.light .service p, .light .section-intro { color: var(--ink-2); }
@media (min-width: 900px) {
  .service { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .service p { padding-top: 12px; }
}


/* How we work */

.label {
  margin: 0 0 22px;
  color: var(--ink-2);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}


/* Who we work with */

/* Standard on every program */
.standard-grid { display: grid; grid-template-columns: 1fr; gap: 28px 48px; }
.terms { margin: 0; padding: 0; list-style: none; }
.terms li {
  max-width: 21em;
  padding: 30px 0 32px;
  border-top: 1px solid var(--rule-night);
  color: var(--on-night);
  font-size: clamp(23px, 2.4vw, 36px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.022em;
  text-wrap: pretty;
}
.terms li:first-child { border-top: 0; padding-top: 0; }
.terms em { font-style: normal; color: var(--sun); }

/* Each phrase turns yellow as its line scrolls into view. Without scroll timelines it is simply yellow. */
@property --lit {
  syntax: "<color>";
  inherits: true;
  initial-value: #F5C542;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .terms li {
      --lit: #F3F5F8;
      animation: reveal linear both, light linear both;
      animation-timeline: view(), view();
      animation-range: entry 0% entry 32%, entry 45% entry 110%;
    }
    .terms em { color: var(--lit); }
  }
}
@keyframes light {
  from { --lit: #F3F5F8; }
  to { --lit: #F5C542; }
}
@media (min-width: 900px) {
  .standard-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .standard-grid .section-title { position: sticky; top: 40px; }
}
.tint { background: var(--mist); color: var(--ink); }
.tint :focus-visible { outline-color: var(--ink); }
.who { padding-bottom: clamp(80px, 10vw, 148px); }
.who-inner { padding-top: 0; border-top: 0; }
.who-grid { display: grid; grid-template-columns: 1fr; gap: 20px 48px; }
.who-list { margin: 0; padding: 0; list-style: none; }
.who-list li { padding: 22px 0 24px; border-top: 1px solid #D3DBE5; }
.who-list li:first-child { padding-top: 6px; border-top: 0; }
.who-list li:last-child { padding-bottom: 0; }
.who-list h3 { margin-bottom: 6px; font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; }
.who-list p { max-width: 30em; margin: 0; color: var(--ink-2); font-size: 18px; line-height: 1.55; }
@media (min-width: 900px) { .who-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }


/* About */

.about-inner { padding-top: 0; border-top: 0; }
.about-text {
  max-width: 25em;
  margin: 0;
  font-size: clamp(25px, 2.75vw, 40px);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.022em;
}


/* Contact */

.contact { position: relative; isolation: isolate; overflow: clip; background: var(--sun); color: var(--night); }
.contact .wrap { position: relative; }
/* The logo's italic n in dots, tone on tone, behind the contact details, with a slow pulse through it. */
.contact-mark {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -3%;
  height: clamp(300px, 46vw, 660px);
  aspect-ratio: 449 / 510;
  transform: translateY(-50%);
  background: #E7B436;
  -webkit-mask: url("../img/n-mask.svg") center / 100% 100% no-repeat;
  mask: url("../img/n-mask.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}
.mark-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160%;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  background: radial-gradient(circle, #C9961F 0%, rgba(201, 150, 31, 0.6) 22%, rgba(201, 150, 31, 0) 55%);
  opacity: 0;
  transform: scale(0.05);
}
@media (prefers-reduced-motion: no-preference) {
  .mark-pulse { animation: pulse 11s cubic-bezier(0.15, 0.6, 0.4, 1) infinite; }
}
.contact :focus-visible { outline-color: var(--night); }
.contact h2 {
  max-width: 11em;
  font-size: clamp(42px, 6.6vw, 104px);
  font-weight: 700;
  line-height: 0.99;
  letter-spacing: -0.037em;
}
.contact-foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px 48px;
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: 32px;
  border-top: 1px solid var(--rule-sun);
}
.contact-text { max-width: 30em; margin: 0; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; }
.contact-email {
  display: inline-block;
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}
.contact-email:hover { text-decoration-thickness: 3px; }
.contact-lines { margin: 18px 0 0; font-size: 19px; line-height: 1.6; }
.contact-about { position: relative; max-width: 30em; margin: clamp(40px, 5vw, 64px) 0 0; padding-top: 22px; border-top: 1px solid var(--rule-sun); font-size: 16.5px; line-height: 1.5; color: rgba(12, 26, 46, 0.78); }
.contact-lines a { text-decoration: none; }
.contact-lines a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 900px) {
  .contact-foot { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .contact-reach { justify-self: end; }
}



/* Footer */

.site-footer { color: var(--on-night-3); font-size: 15px; }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  padding: 34px 0 38px;
}
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.footer-brand .logo svg { height: 19px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer-links a { color: var(--on-night-2); text-decoration: none; }
.footer-links a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }


/* Document pages (privacy, 404) */

.doc-head .hero-body { padding: clamp(48px, 9vh, 112px) 0 clamp(56px, 7vw, 96px); }
.doc-head h1, .not-found h1 { font-size: clamp(42px, 6vw, 88px); }
.doc-head .lede, .not-found .lede { margin-top: 24px; }
.doc { max-width: 46em; padding: clamp(56px, 7vw, 104px) 0 clamp(72px, 9vw, 128px); }
.doc h2 { margin: 52px 0 12px; font-size: clamp(25px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -0.02em; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--ink-2); font-size: 18.5px; }
.doc a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc .updated { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule-day); font-size: 15px; }
.not-found .button { margin-top: 40px; }


/* Small screens */

@media (max-width: 899px) {
  .hero-body { padding-top: clamp(150px, 34vw, 300px); }
  .hero-map {
    right: -14%;
    bottom: calc(100% + clamp(40px, 10vw, 80px));
    width: min(118%, 640px);
  }
  .map-dots { background: #223C64; }
}

@media (max-width: 720px) {
  .nav { gap: 22px; }
  .nav .nav-hide { display: none; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 33px; letter-spacing: -0.03em; }
}
@media (max-width: 374px) {
  .hero h1 { font-size: 30px; }
}
@media (max-width: 339px) {
  .hero h1 { font-size: 27px; }
}
@media (max-width: 420px) {
  .header-row { padding: 24px 0; }
  .logo svg { height: 23px; }
  .nav a { font-size: 16px; }
  .hero-reach .sep { display: none; }
  .hero-reach a { display: block; }
}

/* Sections ease in as they scroll into view. Browsers without scroll timelines show them as-is. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 32%;
    }
  }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@media print {
  .night, .contact { background: none !important; color: #000 !important; }
  .nav, .button { display: none; }
  .logo { color: var(--ink); }
  .night *, .contact * { color: #000 !important; }
}
